SAP RSAP_DATA_GENERATE Function Module for









RSAP_DATA_GENERATE is a standard rsap data generate 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 rsap data generate FM, simply by entering the name RSAP_DATA_GENERATE into the relevant SAP transaction such as SE37 or SE38.

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



Function RSAP_DATA_GENERATE 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 'RSAP_DATA_GENERATE'"
EXPORTING
I_OBJECT = "InfoSource
* I_NO_PROG_GENERATE = "
* I_NO_CP_ACTIVATE = "
I_SEGNAME = "
* I_SEGID = "
I_SLOGSYS = "Source System
I_RLOGSYS = "DWH System
I_IDOCTYP = "
* I_OBJTYPE = 'D' "
* I_TFMETHODE = 'I' "
* I_PERCENTAGE = '050' "

IMPORTING
E_SEGLENTH = "
E_TSDATE = "
E_TSTIME = "

TABLES
T_SEGFIELDS = "

EXCEPTIONS
ERROR_IN_IDOC = 1 WRONG_RELEASE = 10 ERROR_DELTA_GENERATION = 11 ISOURCE_NOT_EXIST = 2 ERROR_IN_STRUCTURE = 3 ERROR_BY_ACTIVATE = 4 ERROR_ASSIGN_SEGMENT_TO_IDOC = 5 ERROR_BY_DELETE = 6 TRANSTRUCTURE_NAME_DIFFERENT = 7 GENERATION_ERROR = 8 UNKNOWN_ERROR = 9
.



IMPORTING Parameters details for RSAP_DATA_GENERATE

I_OBJECT - InfoSource

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

I_NO_PROG_GENERATE -

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

I_NO_CP_ACTIVATE -

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

I_SEGNAME -

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

I_SEGID -

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

I_SLOGSYS - Source System

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

I_RLOGSYS - DWH System

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

I_IDOCTYP -

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

I_OBJTYPE -

Data type: E1RSSH-REQOBJTYPE
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TFMETHODE -

Data type: ROISGEN-TFMETHODE
Default: 'I'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PERCENTAGE -

Data type: USRACLEXT-SEQNO
Default: '050'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RSAP_DATA_GENERATE

E_SEGLENTH -

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

E_TSDATE -

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

E_TSTIME -

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

TABLES Parameters details for RSAP_DATA_GENERATE

T_SEGFIELDS -

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

EXCEPTIONS details

ERROR_IN_IDOC -

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

WRONG_RELEASE -

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

ERROR_DELTA_GENERATION -

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

ISOURCE_NOT_EXIST -

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

ERROR_IN_STRUCTURE -

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

ERROR_BY_ACTIVATE -

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

ERROR_ASSIGN_SEGMENT_TO_IDOC -

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

ERROR_BY_DELETE -

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

TRANSTRUCTURE_NAME_DIFFERENT -

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

GENERATION_ERROR -

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

UNKNOWN_ERROR -

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

Copy and paste ABAP code example for RSAP_DATA_GENERATE 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_i_object  TYPE RSSIS-ISOURCE, "   
lv_e_seglenth  TYPE EDSEA-SEGLEN, "   
lt_t_segfields  TYPE STANDARD TABLE OF RSGENFLDS, "   
lv_error_in_idoc  TYPE RSGENFLDS, "   
lv_wrong_release  TYPE RSGENFLDS, "   
lv_i_no_prog_generate  TYPE SY-INPUT, "   
lv_i_no_cp_activate  TYPE SY-INPUT, "   
lv_error_delta_generation  TYPE SY, "   
lv_e_tsdate  TYPE ROISGEN-TSTPDAT, "   
lv_i_segname  TYPE RSSIS-ISOURCE, "   
lv_isource_not_exist  TYPE RSSIS, "   
lv_i_segid  TYPE ROOSGENSEG-SEGID, "   
lv_e_tstime  TYPE ROISGEN-TSTPTIM, "   
lv_error_in_structure  TYPE ROISGEN, "   
lv_i_slogsys  TYPE TBDLS-LOGSYS, "   
lv_error_by_activate  TYPE TBDLS, "   
lv_i_rlogsys  TYPE TBDLS-LOGSYS, "   
lv_error_assign_segment_to_idoc  TYPE TBDLS, "   
lv_i_idoctyp  TYPE IDOCSYN-IDOCTYP, "   
lv_error_by_delete  TYPE IDOCSYN, "   
lv_i_objtype  TYPE E1RSSH-REQOBJTYPE, "   'D'
lv_transtructure_name_different  TYPE E1RSSH, "   
lv_i_tfmethode  TYPE ROISGEN-TFMETHODE, "   'I'
lv_generation_error  TYPE ROISGEN, "   
lv_i_percentage  TYPE USRACLEXT-SEQNO, "   '050'
lv_unknown_error  TYPE USRACLEXT. "   

  CALL FUNCTION 'RSAP_DATA_GENERATE'  "
    EXPORTING
         I_OBJECT = lv_i_object
         I_NO_PROG_GENERATE = lv_i_no_prog_generate
         I_NO_CP_ACTIVATE = lv_i_no_cp_activate
         I_SEGNAME = lv_i_segname
         I_SEGID = lv_i_segid
         I_SLOGSYS = lv_i_slogsys
         I_RLOGSYS = lv_i_rlogsys
         I_IDOCTYP = lv_i_idoctyp
         I_OBJTYPE = lv_i_objtype
         I_TFMETHODE = lv_i_tfmethode
         I_PERCENTAGE = lv_i_percentage
    IMPORTING
         E_SEGLENTH = lv_e_seglenth
         E_TSDATE = lv_e_tsdate
         E_TSTIME = lv_e_tstime
    TABLES
         T_SEGFIELDS = lt_t_segfields
    EXCEPTIONS
        ERROR_IN_IDOC = 1
        WRONG_RELEASE = 10
        ERROR_DELTA_GENERATION = 11
        ISOURCE_NOT_EXIST = 2
        ERROR_IN_STRUCTURE = 3
        ERROR_BY_ACTIVATE = 4
        ERROR_ASSIGN_SEGMENT_TO_IDOC = 5
        ERROR_BY_DELETE = 6
        TRANSTRUCTURE_NAME_DIFFERENT = 7
        GENERATION_ERROR = 8
        UNKNOWN_ERROR = 9
. " RSAP_DATA_GENERATE




ABAP code using 7.40 inline data declarations to call FM RSAP_DATA_GENERATE

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 ISOURCE FROM RSSIS INTO @DATA(ld_i_object).
 
"SELECT single SEGLEN FROM EDSEA INTO @DATA(ld_e_seglenth).
 
 
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_no_prog_generate).
 
"SELECT single INPUT FROM SY INTO @DATA(ld_i_no_cp_activate).
 
 
"SELECT single TSTPDAT FROM ROISGEN INTO @DATA(ld_e_tsdate).
 
"SELECT single ISOURCE FROM RSSIS INTO @DATA(ld_i_segname).
 
 
"SELECT single SEGID FROM ROOSGENSEG INTO @DATA(ld_i_segid).
 
"SELECT single TSTPTIM FROM ROISGEN INTO @DATA(ld_e_tstime).
 
 
"SELECT single LOGSYS FROM TBDLS INTO @DATA(ld_i_slogsys).
 
 
"SELECT single LOGSYS FROM TBDLS INTO @DATA(ld_i_rlogsys).
 
 
"SELECT single IDOCTYP FROM IDOCSYN INTO @DATA(ld_i_idoctyp).
 
 
"SELECT single REQOBJTYPE FROM E1RSSH INTO @DATA(ld_i_objtype).
DATA(ld_i_objtype) = 'D'.
 
 
"SELECT single TFMETHODE FROM ROISGEN INTO @DATA(ld_i_tfmethode).
DATA(ld_i_tfmethode) = 'I'.
 
 
"SELECT single SEQNO FROM USRACLEXT INTO @DATA(ld_i_percentage).
DATA(ld_i_percentage) = '050'.
 
 


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!