SAP RSAR_ODS_API_GET Function Module for Read of ODS-content









RSAR_ODS_API_GET is a standard rsar ods api get 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 of ODS-content 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 rsar ods api get FM, simply by entering the name RSAR_ODS_API_GET into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSAODS
Program Name: SAPLRSAODS
Main Program: SAPLRSAODS
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSAR_ODS_API_GET 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 'RSAR_ODS_API_GET'"Read of ODS-content
EXPORTING
* I_T_REQUEST = "Request
* I_CURRENT_DATAFORMAT = "ODS in aktuellem Format der Transferstr.anzeigen
* I_SEGMENT_ID = "Segment-ID
* I_FETCH_DELETED = 'X' "Fetch deleted records
* I_SEG_TAB = "Segment Table
* I_CLOSE_CURSOR = ' ' "Close cursor
* I_PSA_NAME = "Name of the Persistant Staging Area
* I_T_DATAPAKID = "Datenpaketnummer
* I_T_RECORD = "Sätze des Datenpaketes
* I_T_SELECTIONS = "Freie Selektion
* I_T_WHERE = "Where Condition
* I_RECORDSTATUS = "Status of PSA record
* I_WITH_TEXT = "Texte zu Stagingfelder übergeben
* I_NEXT_FETCH = "Nächste Datenmenge holen,
* I_FETCH_SIZE = 0 "Datenmenge; Anzahl Records zur Rückgabe

IMPORTING
E_T_RSFIELDTXT = "Stagingfelder Beschreibung der DATA-Tabelle
E_MORE_DATA = "Es gibt weitere Daten zu dieser Selektion
E_ODSNAME = "ODS Name (logisch)
E_VERSION = "Version

TABLES
E_T_DATA = "Rohdaten aus Staging (ODS...)

EXCEPTIONS
NO_DATA_FOUND = 1 PARAMETER_FAILURE = 2 REQUEST_NOT_AVAILABLE = 3 NO_REQUEST_FOUND = 4 NO_FIELDS_TO_ODS = 5 NO_ODS_FOUND = 6 PACKAGE_LOCKED_BY_LOADING = 7
.



IMPORTING Parameters details for RSAR_ODS_API_GET

I_T_REQUEST - Request

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

I_CURRENT_DATAFORMAT - ODS in aktuellem Format der Transferstr.anzeigen

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

I_SEGMENT_ID - Segment-ID

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

I_FETCH_DELETED - Fetch deleted records

Data type: RS_BOOL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SEG_TAB - Segment Table

Data type: RSTSODS-ODSNAME
Optional: Yes
Call by Reference: Yes

I_CLOSE_CURSOR - Close cursor

Data type: RS_BOOL
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_PSA_NAME - Name of the Persistant Staging Area

Data type: RSODSNAME
Optional: Yes
Call by Reference: Yes

I_T_DATAPAKID - Datenpaketnummer

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

I_T_RECORD - Sätze des Datenpaketes

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

I_T_SELECTIONS - Freie Selektion

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

I_T_WHERE - Where Condition

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

I_RECORDSTATUS - Status of PSA record

Data type: RSPSAERROR
Optional: Yes
Call by Reference: Yes

I_WITH_TEXT - Texte zu Stagingfelder übergeben

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

I_NEXT_FETCH - Nächste Datenmenge holen,

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

I_FETCH_SIZE - Datenmenge; Anzahl Records zur Rückgabe

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

EXPORTING Parameters details for RSAR_ODS_API_GET

E_T_RSFIELDTXT - Stagingfelder Beschreibung der DATA-Tabelle

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

E_MORE_DATA - Es gibt weitere Daten zu dieser Selektion

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

E_ODSNAME - ODS Name (logisch)

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

E_VERSION - Version

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

TABLES Parameters details for RSAR_ODS_API_GET

E_T_DATA - Rohdaten aus Staging (ODS...)

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

EXCEPTIONS details

NO_DATA_FOUND - Keine Daten zu den Selektionskriterien vorhanden

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

PARAMETER_FAILURE - Falsche Parameterübergabe

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

REQUEST_NOT_AVAILABLE - Requests in ODS-Tabellen nicht vorhanden

Data type:
Optional: No
Call by Reference: Yes

NO_REQUEST_FOUND - Durch Selektionskriterien keine Requests gefunden

Data type:
Optional: No
Call by Reference: Yes

NO_FIELDS_TO_ODS - Keine Felder für ODS gefunden

Data type:
Optional: No
Call by Reference: Yes

NO_ODS_FOUND - Überhaupt kein ODS gefunden ...

Data type:
Optional: No
Call by Reference: Yes

PACKAGE_LOCKED_BY_LOADING - Paket durch Laden gesperrt

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RSAR_ODS_API_GET 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:
lt_e_t_data  TYPE STANDARD TABLE OF STRING, "   
lv_i_t_request  TYPE RSODS_R_REQUEST, "   
lv_no_data_found  TYPE RSODS_R_REQUEST, "   
lv_e_t_rsfieldtxt  TYPE RSARC_T_RSFIELDTXT, "   
lv_i_current_dataformat  TYPE RS_BOOL, "   
lv_i_segment_id  TYPE RSSEGID, "   
lv_i_fetch_deleted  TYPE RS_BOOL, "   'X'
lv_i_seg_tab  TYPE RSTSODS-ODSNAME, "   
lv_i_close_cursor  TYPE RS_BOOL, "   SPACE
lv_i_psa_name  TYPE RSODSNAME, "   
lv_e_more_data  TYPE RS_BOOL, "   
lv_i_t_datapakid  TYPE RSODS_R_DATAPAKID, "   
lv_parameter_failure  TYPE RSODS_R_DATAPAKID, "   
lv_e_odsname  TYPE RSA_ODSNAME, "   
lv_i_t_record  TYPE RSODS_R_RECORD, "   
lv_request_not_available  TYPE RSODS_R_RECORD, "   
lv_e_version  TYPE RSAVERSION, "   
lv_i_t_selections  TYPE RSDS_EXPR_TAB, "   
lv_no_request_found  TYPE RSDS_EXPR_TAB, "   
lv_i_t_where  TYPE RSDMD_T_WHERE, "   
lv_no_fields_to_ods  TYPE RSDMD_T_WHERE, "   
lv_no_ods_found  TYPE RSDMD_T_WHERE, "   
lv_i_recordstatus  TYPE RSPSAERROR, "   
lv_i_with_text  TYPE RS_BOOL, "   
lv_package_locked_by_loading  TYPE RS_BOOL, "   
lv_i_next_fetch  TYPE RS_BOOL, "   
lv_i_fetch_size  TYPE RSARI_PACKETNR. "   0

  CALL FUNCTION 'RSAR_ODS_API_GET'  "Read of ODS-content
    EXPORTING
         I_T_REQUEST = lv_i_t_request
         I_CURRENT_DATAFORMAT = lv_i_current_dataformat
         I_SEGMENT_ID = lv_i_segment_id
         I_FETCH_DELETED = lv_i_fetch_deleted
         I_SEG_TAB = lv_i_seg_tab
         I_CLOSE_CURSOR = lv_i_close_cursor
         I_PSA_NAME = lv_i_psa_name
         I_T_DATAPAKID = lv_i_t_datapakid
         I_T_RECORD = lv_i_t_record
         I_T_SELECTIONS = lv_i_t_selections
         I_T_WHERE = lv_i_t_where
         I_RECORDSTATUS = lv_i_recordstatus
         I_WITH_TEXT = lv_i_with_text
         I_NEXT_FETCH = lv_i_next_fetch
         I_FETCH_SIZE = lv_i_fetch_size
    IMPORTING
         E_T_RSFIELDTXT = lv_e_t_rsfieldtxt
         E_MORE_DATA = lv_e_more_data
         E_ODSNAME = lv_e_odsname
         E_VERSION = lv_e_version
    TABLES
         E_T_DATA = lt_e_t_data
    EXCEPTIONS
        NO_DATA_FOUND = 1
        PARAMETER_FAILURE = 2
        REQUEST_NOT_AVAILABLE = 3
        NO_REQUEST_FOUND = 4
        NO_FIELDS_TO_ODS = 5
        NO_ODS_FOUND = 6
        PACKAGE_LOCKED_BY_LOADING = 7
. " RSAR_ODS_API_GET




ABAP code using 7.40 inline data declarations to call FM RSAR_ODS_API_GET

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.

 
 
 
 
 
 
DATA(ld_i_fetch_deleted) = 'X'.
 
"SELECT single ODSNAME FROM RSTSODS INTO @DATA(ld_i_seg_tab).
 
DATA(ld_i_close_cursor) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!