SAP SRTT_GET_DATA Function Module for Get data of table or view









SRTT_GET_DATA is a standard srtt get data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get data of table or 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 srtt get data FM, simply by entering the name SRTT_GET_DATA into the relevant SAP transaction such as SE37 or SE38.

Function Group: SRTT
Program Name: SAPLSRTT
Main Program: SAPLSRTT
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SRTT_GET_DATA 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 'SRTT_GET_DATA'"Get data of table or view
EXPORTING
IV_VIEWNAME = "View Name
IV_GET_SOURCE = "
* IV_SYSTEMTYPE = "Cross-System Customizing Object
* RFCDEST = "Destination table for Remote Function Call
* RFCDEST_SRC = "Logical Destination (Specified in Function Call)
* RFCDEST_TRG = "Logical Destination (Specified in Function Call)
* IV_VIEW_VARIANT = "not used
* IV_VIEW_TABLE_FLAG = "'V'= sm30 object, 'T' = no sm30 object
* IV_SELECT_BY_KEYLIST = "'X'= create sellist from keylist
* IV_WITHOUT_SUBSET = ' ' "
* IV_WITHOUT_EXITS = ' ' "
* IV_WITH_AUTHORITY_CHECK = ' ' "
* IV_CALLED_FROM_SM30 = ' ' "
* IV_CHECK_LINEDEP_AUTH = ' ' "

IMPORTING
EV_DATA_ACCESS_RESTRICTED = "
MSG_TEXT = "Line with 80 characters

TABLES
* IT_KEYLIST = "
* IT_SELLIST = "Selection Range for View Maintenance
* IT_NAMTAB_VIEW = "Control Block Structure for View Fields in View Maintenance
* IT_HEADER_VIEW = "Control Block Structure for View Maintenance
IT_HEADER = "
ET_BOX = "
* IT_NAMETAB = "Nametab of View or Table for Nametab Comparison

EXCEPTIONS
NO_AUTH = 1 NO_VIEWMAINT_TOOL = 2 READ_ERROR = 3 COMPRESS_ERROR = 4 NOT_FOUND = 5 DESTINATION_ERROR = 6 RFC_ERROR = 7
.



IMPORTING Parameters details for SRTT_GET_DATA

IV_VIEWNAME - View Name

Data type: NTAB_CMP-VIEWNAME
Optional: No
Call by Reference: Yes

IV_GET_SOURCE -

Data type:
Optional: No
Call by Reference: Yes

IV_SYSTEMTYPE - Cross-System Customizing Object

Data type: SCDTOBJECT-SYSTEM_TRG
Optional: Yes
Call by Reference: Yes

RFCDEST - Destination table for Remote Function Call

Data type: RFCDES-RFCDEST
Optional: Yes
Call by Reference: Yes

RFCDEST_SRC - Logical Destination (Specified in Function Call)

Data type: RFCDES-RFCDEST
Optional: Yes
Call by Reference: Yes

RFCDEST_TRG - Logical Destination (Specified in Function Call)

Data type: RFCDES-RFCDEST
Optional: Yes
Call by Reference: Yes

IV_VIEW_VARIANT - not used

Data type: NTAB_CMP-VARIANT
Optional: Yes
Call by Reference: Yes

IV_VIEW_TABLE_FLAG - 'V'= sm30 object, 'T' = no sm30 object

Data type: NTAB_CMP-FLAG
Optional: Yes
Call by Reference: Yes

IV_SELECT_BY_KEYLIST - 'X'= create sellist from keylist

Data type: NTAB_CMP-FLAG
Optional: Yes
Call by Reference: Yes

IV_WITHOUT_SUBSET -

Data type: NTAB_CMP-FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

IV_WITHOUT_EXITS -

Data type: NTAB_CMP-FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

IV_WITH_AUTHORITY_CHECK -

Data type: NTAB_CMP-FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

IV_CALLED_FROM_SM30 -

Data type: NTAB_CMP-FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

IV_CHECK_LINEDEP_AUTH -

Data type: NTAB_CMP-FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for SRTT_GET_DATA

EV_DATA_ACCESS_RESTRICTED -

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

MSG_TEXT - Line with 80 characters

Data type: RFCLINE_D
Optional: No
Call by Reference: Yes

TABLES Parameters details for SRTT_GET_DATA

IT_KEYLIST -

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

IT_SELLIST - Selection Range for View Maintenance

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

IT_NAMTAB_VIEW - Control Block Structure for View Fields in View Maintenance

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

IT_HEADER_VIEW - Control Block Structure for View Maintenance

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

IT_HEADER -

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

ET_BOX -

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

IT_NAMETAB - Nametab of View or Table for Nametab Comparison

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

EXCEPTIONS details

NO_AUTH -

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

NO_VIEWMAINT_TOOL -

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

READ_ERROR -

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

COMPRESS_ERROR -

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

NOT_FOUND -

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

DESTINATION_ERROR -

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

RFC_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SRTT_GET_DATA 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_no_auth  TYPE STRING, "   
lt_it_keylist  TYPE STANDARD TABLE OF E071KC, "   
lv_iv_viewname  TYPE NTAB_CMP-VIEWNAME, "   
lv_ev_data_access_restricted  TYPE NTAB_CMP-FLAG, "   
lv_iv_get_source  TYPE NTAB_CMP, "   
lv_iv_systemtype  TYPE SCDTOBJECT-SYSTEM_TRG, "   
lv_rfcdest  TYPE RFCDES-RFCDEST, "   
lv_rfcdest_src  TYPE RFCDES-RFCDEST, "   
lv_rfcdest_trg  TYPE RFCDES-RFCDEST, "   
lv_msg_text  TYPE RFCLINE_D, "   
lt_it_sellist  TYPE STANDARD TABLE OF VIMSELLIST, "   
lv_iv_view_variant  TYPE NTAB_CMP-VARIANT, "   
lv_no_viewmaint_tool  TYPE NTAB_CMP, "   
lv_read_error  TYPE NTAB_CMP, "   
lt_it_namtab_view  TYPE STANDARD TABLE OF VIMNAMTAB, "   
lv_iv_view_table_flag  TYPE NTAB_CMP-FLAG, "   
lv_compress_error  TYPE NTAB_CMP, "   
lt_it_header_view  TYPE STANDARD TABLE OF VIMDESC, "   
lv_iv_select_by_keylist  TYPE NTAB_CMP-FLAG, "   
lt_it_header  TYPE STANDARD TABLE OF NTAB_HDR, "   
lv_not_found  TYPE NTAB_HDR, "   
lv_iv_without_subset  TYPE NTAB_CMP-FLAG, "   ' '
lt_et_box  TYPE STANDARD TABLE OF NTAB_CMP, "   
lv_iv_without_exits  TYPE NTAB_CMP-FLAG, "   ' '
lv_destination_error  TYPE NTAB_CMP, "   
lv_rfc_error  TYPE NTAB_CMP, "   
lt_it_nametab  TYPE STANDARD TABLE OF NTAB_CMP, "   
lv_iv_with_authority_check  TYPE NTAB_CMP-FLAG, "   ' '
lv_iv_called_from_sm30  TYPE NTAB_CMP-FLAG, "   ' '
lv_iv_check_linedep_auth  TYPE NTAB_CMP-FLAG. "   ' '

  CALL FUNCTION 'SRTT_GET_DATA'  "Get data of table or view
    EXPORTING
         IV_VIEWNAME = lv_iv_viewname
         IV_GET_SOURCE = lv_iv_get_source
         IV_SYSTEMTYPE = lv_iv_systemtype
         RFCDEST = lv_rfcdest
         RFCDEST_SRC = lv_rfcdest_src
         RFCDEST_TRG = lv_rfcdest_trg
         IV_VIEW_VARIANT = lv_iv_view_variant
         IV_VIEW_TABLE_FLAG = lv_iv_view_table_flag
         IV_SELECT_BY_KEYLIST = lv_iv_select_by_keylist
         IV_WITHOUT_SUBSET = lv_iv_without_subset
         IV_WITHOUT_EXITS = lv_iv_without_exits
         IV_WITH_AUTHORITY_CHECK = lv_iv_with_authority_check
         IV_CALLED_FROM_SM30 = lv_iv_called_from_sm30
         IV_CHECK_LINEDEP_AUTH = lv_iv_check_linedep_auth
    IMPORTING
         EV_DATA_ACCESS_RESTRICTED = lv_ev_data_access_restricted
         MSG_TEXT = lv_msg_text
    TABLES
         IT_KEYLIST = lt_it_keylist
         IT_SELLIST = lt_it_sellist
         IT_NAMTAB_VIEW = lt_it_namtab_view
         IT_HEADER_VIEW = lt_it_header_view
         IT_HEADER = lt_it_header
         ET_BOX = lt_et_box
         IT_NAMETAB = lt_it_nametab
    EXCEPTIONS
        NO_AUTH = 1
        NO_VIEWMAINT_TOOL = 2
        READ_ERROR = 3
        COMPRESS_ERROR = 4
        NOT_FOUND = 5
        DESTINATION_ERROR = 6
        RFC_ERROR = 7
. " SRTT_GET_DATA




ABAP code using 7.40 inline data declarations to call FM SRTT_GET_DATA

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 VIEWNAME FROM NTAB_CMP INTO @DATA(ld_iv_viewname).
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_ev_data_access_restricted).
 
 
"SELECT single SYSTEM_TRG FROM SCDTOBJECT INTO @DATA(ld_iv_systemtype).
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfcdest).
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfcdest_src).
 
"SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_rfcdest_trg).
 
 
 
"SELECT single VARIANT FROM NTAB_CMP INTO @DATA(ld_iv_view_variant).
 
 
 
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_view_table_flag).
 
 
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_select_by_keylist).
 
 
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_without_subset).
DATA(ld_iv_without_subset) = ' '.
 
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_without_exits).
DATA(ld_iv_without_exits) = ' '.
 
 
 
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_with_authority_check).
DATA(ld_iv_with_authority_check) = ' '.
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_called_from_sm30).
DATA(ld_iv_called_from_sm30) = ' '.
 
"SELECT single FLAG FROM NTAB_CMP INTO @DATA(ld_iv_check_linedep_auth).
DATA(ld_iv_check_linedep_auth) = ' '.
 


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!