SAP RSA3_GEN_OSOURCE_FROM_TABLE Function Module for
RSA3_GEN_OSOURCE_FROM_TABLE is a standard rsa3 gen osource from table SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rsa3 gen osource from table FM, simply by entering the name RSA3_GEN_OSOURCE_FROM_TABLE into the relevant SAP transaction such as SE37 or SE38.
Function Group: RSA3
Program Name: SAPLRSA3
Main Program: SAPLRSA3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RSA3_GEN_OSOURCE_FROM_TABLE 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 'RSA3_GEN_OSOURCE_FROM_TABLE'".
EXPORTING
I_OLTPSOURCE = "
* I_OSTYPE = 'TRAN' "
I_TABNAME = "
I_APPLNM = "
* I_NO_TRANSPORT = 'X' "
I_TXTSH = "
I_TXTMD = "
I_TXTLG = "
IMPORTING
E_S_OSOURCE = "
E_T_OSFIELDS = "
E_T_MESSAGES = "
E_SUBRC = "
IMPORTING Parameters details for RSA3_GEN_OSOURCE_FROM_TABLE
I_OLTPSOURCE -
Data type: RSAOT_OLTPSOURCEOptional: No
Call by Reference: No ( called with pass by value option)
I_OSTYPE -
Data type: RSAOT_TYPEDefault: 'TRAN'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TABNAME -
Data type: DD02L-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_APPLNM -
Data type: RSAOT_APPLNMOptional: No
Call by Reference: No ( called with pass by value option)
I_NO_TRANSPORT -
Data type: ROOSPRMSC-INITSTATEDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TXTSH -
Data type: ROOSOURCET-TXTSHOptional: No
Call by Reference: No ( called with pass by value option)
I_TXTMD -
Data type: ROOSOURCET-TXTMDOptional: No
Call by Reference: No ( called with pass by value option)
I_TXTLG -
Data type: ROOSOURCET-TXTLGOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RSA3_GEN_OSOURCE_FROM_TABLE
E_S_OSOURCE -
Data type: RSAOT_S_OSOURCEOptional: No
Call by Reference: Yes
E_T_OSFIELDS -
Data type: RSAOT_T_OSFIELDOptional: No
Call by Reference: Yes
E_T_MESSAGES -
Data type: RSAOT_T_MESSAGESOptional: No
Call by Reference: Yes
E_SUBRC -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RSA3_GEN_OSOURCE_FROM_TABLE 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_e_s_osource | TYPE RSAOT_S_OSOURCE, " | |||
| lv_i_oltpsource | TYPE RSAOT_OLTPSOURCE, " | |||
| lv_i_ostype | TYPE RSAOT_TYPE, " 'TRAN' | |||
| lv_e_t_osfields | TYPE RSAOT_T_OSFIELD, " | |||
| lv_i_tabname | TYPE DD02L-TABNAME, " | |||
| lv_e_t_messages | TYPE RSAOT_T_MESSAGES, " | |||
| lv_e_subrc | TYPE SY-SUBRC, " | |||
| lv_i_applnm | TYPE RSAOT_APPLNM, " | |||
| lv_i_no_transport | TYPE ROOSPRMSC-INITSTATE, " 'X' | |||
| lv_i_txtsh | TYPE ROOSOURCET-TXTSH, " | |||
| lv_i_txtmd | TYPE ROOSOURCET-TXTMD, " | |||
| lv_i_txtlg | TYPE ROOSOURCET-TXTLG. " |
|   CALL FUNCTION 'RSA3_GEN_OSOURCE_FROM_TABLE' " |
| EXPORTING | ||
| I_OLTPSOURCE | = lv_i_oltpsource | |
| I_OSTYPE | = lv_i_ostype | |
| I_TABNAME | = lv_i_tabname | |
| I_APPLNM | = lv_i_applnm | |
| I_NO_TRANSPORT | = lv_i_no_transport | |
| I_TXTSH | = lv_i_txtsh | |
| I_TXTMD | = lv_i_txtmd | |
| I_TXTLG | = lv_i_txtlg | |
| IMPORTING | ||
| E_S_OSOURCE | = lv_e_s_osource | |
| E_T_OSFIELDS | = lv_e_t_osfields | |
| E_T_MESSAGES | = lv_e_t_messages | |
| E_SUBRC | = lv_e_subrc | |
| . " RSA3_GEN_OSOURCE_FROM_TABLE | ||
ABAP code using 7.40 inline data declarations to call FM RSA3_GEN_OSOURCE_FROM_TABLE
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_ostype) | = 'TRAN'. | |||
| "SELECT single TABNAME FROM DD02L INTO @DATA(ld_i_tabname). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_e_subrc). | ||||
| "SELECT single INITSTATE FROM ROOSPRMSC INTO @DATA(ld_i_no_transport). | ||||
| DATA(ld_i_no_transport) | = 'X'. | |||
| "SELECT single TXTSH FROM ROOSOURCET INTO @DATA(ld_i_txtsh). | ||||
| "SELECT single TXTMD FROM ROOSOURCET INTO @DATA(ld_i_txtmd). | ||||
| "SELECT single TXTLG FROM ROOSOURCET INTO @DATA(ld_i_txtlg). | ||||
Search for further information about these or an SAP related objects