SAP RSAR_READ_OLTPSOURCE Function Module for Read the DataSource fields in transfer structure
RSAR_READ_OLTPSOURCE is a standard rsar read oltpsource 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 the DataSource fields in transfer structure 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 read oltpsource FM, simply by entering the name RSAR_READ_OLTPSOURCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSAC
Program Name: SAPLRSAC
Main Program: SAPLRSAC
Appliation area: B
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSAR_READ_OLTPSOURCE 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_READ_OLTPSOURCE'"Read the DataSource fields in transfer structure.
EXPORTING
I_OLTPSOURCE = "DataSource
I_LOGSYS = "Source System
I_ISTYPE = "Type of requested data
I_S_SYS = "Log Sys. with Text and Type
I_T_OSOURCEFIELD = "OLTP Source Fields
IMPORTING
E_T_TSSFIELD = "Table Transfer Struture Field Definition Transfer Structure
E_T_OLTPSFIELD = "Table Transfer Struture Field Definition Transfer Structure
CHANGING
C_S_TSHEADER = "Dialog structure transfer rules header
C_S_LOADMETH = "Transfer structure for determining the load method
C_T_OSFIELDMAP = "Feld <-> InfoObject Mapping of an OLTP Source
EXCEPTIONS
UNREACHABLE = 1 INCONSISTENCY = 2
IMPORTING Parameters details for RSAR_READ_OLTPSOURCE
I_OLTPSOURCE - DataSource
Data type: RSOLTPSOURCEROptional: No
Call by Reference: Yes
I_LOGSYS - Source System
Data type: RSSLOGSYSOptional: No
Call by Reference: Yes
I_ISTYPE - Type of requested data
Data type: RSREQUTYPEOptional: No
Call by Reference: Yes
I_S_SYS - Log Sys. with Text and Type
Data type: RSARC_S_SYSOptional: No
Call by Reference: Yes
I_T_OSOURCEFIELD - OLTP Source Fields
Data type: RSAOS_T_OLTPSOURCEFIEOptional: No
Call by Reference: Yes
EXPORTING Parameters details for RSAR_READ_OLTPSOURCE
E_T_TSSFIELD - Table Transfer Struture Field Definition Transfer Structure
Data type: RSARC_T_RSSTSFIELDOptional: No
Call by Reference: Yes
E_T_OLTPSFIELD - Table Transfer Struture Field Definition Transfer Structure
Data type: RSARC_T_RSSTSFIELDOptional: No
Call by Reference: Yes
CHANGING Parameters details for RSAR_READ_OLTPSOURCE
C_S_TSHEADER - Dialog structure transfer rules header
Data type: RSAD_TSHEADEROptional: No
Call by Reference: Yes
C_S_LOADMETH - Transfer structure for determining the load method
Data type: RSAD_LOADMETHODOptional: No
Call by Reference: Yes
C_T_OSFIELDMAP - Feld <-> InfoObject Mapping of an OLTP Source
Data type: RSAOS_T_OSFIELDMAPOptional: No
Call by Reference: Yes
EXCEPTIONS details
UNREACHABLE - Source system can not be reached
Data type:Optional: No
Call by Reference: Yes
INCONSISTENCY - Inconsistency
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RSAR_READ_OLTPSOURCE 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_unreachable | TYPE STRING, " | |||
| lv_c_s_tsheader | TYPE RSAD_TSHEADER, " | |||
| lv_e_t_tssfield | TYPE RSARC_T_RSSTSFIELD, " | |||
| lv_i_oltpsource | TYPE RSOLTPSOURCER, " | |||
| lv_i_logsys | TYPE RSSLOGSYS, " | |||
| lv_c_s_loadmeth | TYPE RSAD_LOADMETHOD, " | |||
| lv_inconsistency | TYPE RSAD_LOADMETHOD, " | |||
| lv_e_t_oltpsfield | TYPE RSARC_T_RSSTSFIELD, " | |||
| lv_i_istype | TYPE RSREQUTYPE, " | |||
| lv_c_t_osfieldmap | TYPE RSAOS_T_OSFIELDMAP, " | |||
| lv_i_s_sys | TYPE RSARC_S_SYS, " | |||
| lv_i_t_osourcefield | TYPE RSAOS_T_OLTPSOURCEFIE. " |
|   CALL FUNCTION 'RSAR_READ_OLTPSOURCE' "Read the DataSource fields in transfer structure |
| EXPORTING | ||
| I_OLTPSOURCE | = lv_i_oltpsource | |
| I_LOGSYS | = lv_i_logsys | |
| I_ISTYPE | = lv_i_istype | |
| I_S_SYS | = lv_i_s_sys | |
| I_T_OSOURCEFIELD | = lv_i_t_osourcefield | |
| IMPORTING | ||
| E_T_TSSFIELD | = lv_e_t_tssfield | |
| E_T_OLTPSFIELD | = lv_e_t_oltpsfield | |
| CHANGING | ||
| C_S_TSHEADER | = lv_c_s_tsheader | |
| C_S_LOADMETH | = lv_c_s_loadmeth | |
| C_T_OSFIELDMAP | = lv_c_t_osfieldmap | |
| EXCEPTIONS | ||
| UNREACHABLE = 1 | ||
| INCONSISTENCY = 2 | ||
| . " RSAR_READ_OLTPSOURCE | ||
ABAP code using 7.40 inline data declarations to call FM RSAR_READ_OLTPSOURCE
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.Search for further information about these or an SAP related objects