SAP Function Modules

RSAR_PROGRAM_GENERATE_ODS SAP Function module - Generates programs for reading and writing for the ODS







RSAR_PROGRAM_GENERATE_ODS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RSAR_PROGRAM_GENERATE_ODS into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RSAI
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RSAR_PROGRAM_GENERATE_ODS - RSAR PROGRAM GENERATE ODS





CALL FUNCTION 'RSAR_PROGRAM_GENERATE_ODS' "Generates programs for reading and writing for the ODS
  EXPORTING
    i_odsname_act =             " rsa_odsdbname  Name of current ODS table
    i_odsname_new =             " rsa_odsdbname  Name the latest ODS table
*   i_reportname =              " rsa_progname  Name of an existing report
*   i_partitioned = RS_C_FALSE  " rs_bool       Boolean
*   i_only_temp = RS_C_FALSE    " rs_bool       Only temporarily for different Structure
*   i_debug_level = 0           " i             Debug level for the generation
*   i_db_commit = RS_C_FALSE    " rs_bool       Boolean
  IMPORTING
    e_reportname =              " rsa_progname  Name of generated report
  EXCEPTIONS
    PROG_TEMPLATE_ERROR = 1     "               Error when generating the program
    REPORT_CREATION_ERROR = 2   "               Error creating new reports
    TEMPLATE_ERROR = 3          "               Failed to generate the temp. program
    .  "  RSAR_PROGRAM_GENERATE_ODS

ABAP code example for Function Module RSAR_PROGRAM_GENERATE_ODS





The ABAP code below is a full code listing to execute function module RSAR_PROGRAM_GENERATE_ODS including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_e_reportname  TYPE RSA_PROGNAME .

DATA(ld_i_odsname_act) = 'Check type of data required'.
DATA(ld_i_odsname_new) = 'Check type of data required'.
DATA(ld_i_reportname) = 'Check type of data required'.
DATA(ld_i_partitioned) = 'Check type of data required'.
DATA(ld_i_only_temp) = 'Check type of data required'.
DATA(ld_i_debug_level) = 'Check type of data required'.
DATA(ld_i_db_commit) = 'Check type of data required'. . CALL FUNCTION 'RSAR_PROGRAM_GENERATE_ODS' EXPORTING i_odsname_act = ld_i_odsname_act i_odsname_new = ld_i_odsname_new * i_reportname = ld_i_reportname * i_partitioned = ld_i_partitioned * i_only_temp = ld_i_only_temp * i_debug_level = ld_i_debug_level * i_db_commit = ld_i_db_commit IMPORTING e_reportname = ld_e_reportname EXCEPTIONS PROG_TEMPLATE_ERROR = 1 REPORT_CREATION_ERROR = 2 TEMPLATE_ERROR = 3 . " RSAR_PROGRAM_GENERATE_ODS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_reportname  TYPE RSA_PROGNAME ,
ld_i_odsname_act  TYPE RSA_ODSDBNAME ,
ld_i_odsname_new  TYPE RSA_ODSDBNAME ,
ld_i_reportname  TYPE RSA_PROGNAME ,
ld_i_partitioned  TYPE RS_BOOL ,
ld_i_only_temp  TYPE RS_BOOL ,
ld_i_debug_level  TYPE I ,
ld_i_db_commit  TYPE RS_BOOL .

ld_i_odsname_act = 'Check type of data required'.
ld_i_odsname_new = 'Check type of data required'.
ld_i_reportname = 'Check type of data required'.
ld_i_partitioned = 'Check type of data required'.
ld_i_only_temp = 'Check type of data required'.
ld_i_debug_level = 'Check type of data required'.
ld_i_db_commit = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RSAR_PROGRAM_GENERATE_ODS or its description.