SAP RPY_VIEW_READ Function Module for Read View









RPY_VIEW_READ is a standard rpy view read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read View processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rpy view read FM, simply by entering the name RPY_VIEW_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: SIFD
Program Name: SAPLSIFD
Main Program: SAPLSIFD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function RPY_VIEW_READ pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RPY_VIEW_READ'"Read View
EXPORTING
* ACTIVATION_TYPE_I = 'M' "
* LANGUAGE = SY-LANGU "
VIEW_NAME = "Name of the view to be read

IMPORTING
VIEW_HEAD = "
ACTIVATION_TYPE_O = "

TABLES
VIEW_FIELDS = "
VIEW_SELCONDS = "
VIEW_TABLES = "

EXCEPTIONS
CANCELLED = 1 NOT_FOUND = 2 PERMISSION_ERROR = 3 ILLEGAL_TYPE = 4
.



IMPORTING Parameters details for RPY_VIEW_READ

ACTIVATION_TYPE_I -

Data type: DDREFSTRUC-STATE
Default: 'M'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE -

Data type: SY-LANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

VIEW_NAME - Name of the view to be read

Data type: RPY_VIHD-VIEWNAME
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RPY_VIEW_READ

VIEW_HEAD -

Data type: RPY_VIHD
Optional: No
Call by Reference: No ( called with pass by value option)

ACTIVATION_TYPE_O -

Data type: DDREFSTRUC-STATE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for RPY_VIEW_READ

VIEW_FIELDS -

Data type: RPY_VIFD
Optional: No
Call by Reference: No ( called with pass by value option)

VIEW_SELCONDS -

Data type: RPY_VISC
Optional: No
Call by Reference: No ( called with pass by value option)

VIEW_TABLES -

Data type: RPY_VITB
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CANCELLED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NOT_FOUND - View not found

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PERMISSION_ERROR - User does not have display authorization

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ILLEGAL_TYPE -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for RPY_VIEW_READ Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_cancelled  TYPE STRING, "   
lv_view_head  TYPE RPY_VIHD, "   
lt_view_fields  TYPE STANDARD TABLE OF RPY_VIFD, "   
lv_activation_type_i  TYPE DDREFSTRUC-STATE, "   'M'
lv_language  TYPE SY-LANGU, "   SY-LANGU
lv_not_found  TYPE SY, "   
lt_view_selconds  TYPE STANDARD TABLE OF RPY_VISC, "   
lv_activation_type_o  TYPE DDREFSTRUC-STATE, "   
lv_view_name  TYPE RPY_VIHD-VIEWNAME, "   
lt_view_tables  TYPE STANDARD TABLE OF RPY_VITB, "   
lv_permission_error  TYPE RPY_VITB, "   
lv_illegal_type  TYPE RPY_VITB. "   

  CALL FUNCTION 'RPY_VIEW_READ'  "Read View
    EXPORTING
         ACTIVATION_TYPE_I = lv_activation_type_i
         LANGUAGE = lv_language
         VIEW_NAME = lv_view_name
    IMPORTING
         VIEW_HEAD = lv_view_head
         ACTIVATION_TYPE_O = lv_activation_type_o
    TABLES
         VIEW_FIELDS = lt_view_fields
         VIEW_SELCONDS = lt_view_selconds
         VIEW_TABLES = lt_view_tables
    EXCEPTIONS
        CANCELLED = 1
        NOT_FOUND = 2
        PERMISSION_ERROR = 3
        ILLEGAL_TYPE = 4
. " RPY_VIEW_READ




ABAP code using 7.40 inline data declarations to call FM RPY_VIEW_READ

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
"SELECT single STATE FROM DDREFSTRUC INTO @DATA(ld_activation_type_i).
DATA(ld_activation_type_i) = 'M'.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_language).
DATA(ld_language) = SY-LANGU.
 
 
 
"SELECT single STATE FROM DDREFSTRUC INTO @DATA(ld_activation_type_o).
 
"SELECT single VIEWNAME FROM RPY_VIHD INTO @DATA(ld_view_name).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!