SAP Function Modules

RSSM_CALL_RSAR_DATA_REQUEST_1 SAP Function module - Call up RSAR_DATA_REQUEST with int. table







RSSM_CALL_RSAR_DATA_REQUEST_1 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 RSSM_CALL_RSAR_DATA_REQUEST_1 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RSSM
Released Date: 24.10.1997
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RSSM_CALL_RSAR_DATA_REQUEST_1 - RSSM CALL RSAR DATA REQUEST 1





CALL FUNCTION 'RSSM_CALL_RSAR_DATA_REQUEST_1' "Call up RSAR_DATA_REQUEST with int. table
  EXPORTING
    p_logid =                   " rsd1-logid
    p_logid_p =                 " rsd1-logid_p
    p_source =                  " rsldpio-source
    p_typ =                     " rsldpio-typ
    p_logsys =                  " rsldpio-logsys
    p_oltpsource =              " rsldpio-oltpsource
    p_uname =                   " sy-uname
    p_batch =                   " c
*   g_gnr =                     " rsreqdone-gnr
*   i_apo_call =                " c
*   g_bapirnr = SPACE           " rssdbatch-bapirnr  Request number for the data transfer
  IMPORTING
    error =                     " c
    g_rnr =                     " rsseldone-rnr
    e_t_msg_crt =               " rs_t_msg      BW: Table with Messages (Application Log)
  TABLES
    p_t_rsldpsel =              " rsldpsel
    p_t_rsldpio =               " rsldpio
    p_t_rssdbatch =             " rssdbatch
*   p_t_rsldpcrt =              " rsldpcrt      CRT Enhancement Apollo
  EXCEPTIONS
    INTERNAL_ERROR = 1          "
    .  "  RSSM_CALL_RSAR_DATA_REQUEST_1

ABAP code example for Function Module RSSM_CALL_RSAR_DATA_REQUEST_1





The ABAP code below is a full code listing to execute function module RSSM_CALL_RSAR_DATA_REQUEST_1 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_error  TYPE C ,
ld_g_rnr  TYPE RSSELDONE-RNR ,
ld_e_t_msg_crt  TYPE RS_T_MSG ,
it_p_t_rsldpsel  TYPE STANDARD TABLE OF RSLDPSEL,"TABLES PARAM
wa_p_t_rsldpsel  LIKE LINE OF it_p_t_rsldpsel ,
it_p_t_rsldpio  TYPE STANDARD TABLE OF RSLDPIO,"TABLES PARAM
wa_p_t_rsldpio  LIKE LINE OF it_p_t_rsldpio ,
it_p_t_rssdbatch  TYPE STANDARD TABLE OF RSSDBATCH,"TABLES PARAM
wa_p_t_rssdbatch  LIKE LINE OF it_p_t_rssdbatch ,
it_p_t_rsldpcrt  TYPE STANDARD TABLE OF RSLDPCRT,"TABLES PARAM
wa_p_t_rsldpcrt  LIKE LINE OF it_p_t_rsldpcrt .


DATA(ld_p_logid) = some text here

DATA(ld_p_logid_p) = some text here

SELECT single SOURCE
FROM RSLDPIO
INTO @DATA(ld_p_source).


SELECT single TYP
FROM RSLDPIO
INTO @DATA(ld_p_typ).


SELECT single LOGSYS
FROM RSLDPIO
INTO @DATA(ld_p_logsys).


SELECT single OLTPSOURCE
FROM RSLDPIO
INTO @DATA(ld_p_oltpsource).

DATA(ld_p_uname) = 'some text here'.
DATA(ld_p_batch) = 'some text here'.

SELECT single GNR
FROM RSREQDONE
INTO @DATA(ld_g_gnr).

DATA(ld_i_apo_call) = 'some text here'.

SELECT single BAPIRNR
FROM RSSDBATCH
INTO @DATA(ld_g_bapirnr).


"populate fields of struture and append to itab
append wa_p_t_rsldpsel to it_p_t_rsldpsel.

"populate fields of struture and append to itab
append wa_p_t_rsldpio to it_p_t_rsldpio.

"populate fields of struture and append to itab
append wa_p_t_rssdbatch to it_p_t_rssdbatch.

"populate fields of struture and append to itab
append wa_p_t_rsldpcrt to it_p_t_rsldpcrt. . CALL FUNCTION 'RSSM_CALL_RSAR_DATA_REQUEST_1' EXPORTING p_logid = ld_p_logid p_logid_p = ld_p_logid_p p_source = ld_p_source p_typ = ld_p_typ p_logsys = ld_p_logsys p_oltpsource = ld_p_oltpsource p_uname = ld_p_uname p_batch = ld_p_batch * g_gnr = ld_g_gnr * i_apo_call = ld_i_apo_call * g_bapirnr = ld_g_bapirnr IMPORTING error = ld_error g_rnr = ld_g_rnr e_t_msg_crt = ld_e_t_msg_crt TABLES p_t_rsldpsel = it_p_t_rsldpsel p_t_rsldpio = it_p_t_rsldpio p_t_rssdbatch = it_p_t_rssdbatch * p_t_rsldpcrt = it_p_t_rsldpcrt EXCEPTIONS INTERNAL_ERROR = 1 . " RSSM_CALL_RSAR_DATA_REQUEST_1
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_error  TYPE C ,
ld_p_logid  TYPE RSD1-LOGID ,
it_p_t_rsldpsel  TYPE STANDARD TABLE OF RSLDPSEL ,
wa_p_t_rsldpsel  LIKE LINE OF it_p_t_rsldpsel,
ld_g_rnr  TYPE RSSELDONE-RNR ,
ld_p_logid_p  TYPE RSD1-LOGID_P ,
it_p_t_rsldpio  TYPE STANDARD TABLE OF RSLDPIO ,
wa_p_t_rsldpio  LIKE LINE OF it_p_t_rsldpio,
ld_e_t_msg_crt  TYPE RS_T_MSG ,
ld_p_source  TYPE RSLDPIO-SOURCE ,
it_p_t_rssdbatch  TYPE STANDARD TABLE OF RSSDBATCH ,
wa_p_t_rssdbatch  LIKE LINE OF it_p_t_rssdbatch,
ld_p_typ  TYPE RSLDPIO-TYP ,
it_p_t_rsldpcrt  TYPE STANDARD TABLE OF RSLDPCRT ,
wa_p_t_rsldpcrt  LIKE LINE OF it_p_t_rsldpcrt,
ld_p_logsys  TYPE RSLDPIO-LOGSYS ,
ld_p_oltpsource  TYPE RSLDPIO-OLTPSOURCE ,
ld_p_uname  TYPE SY-UNAME ,
ld_p_batch  TYPE C ,
ld_g_gnr  TYPE RSREQDONE-GNR ,
ld_i_apo_call  TYPE C ,
ld_g_bapirnr  TYPE RSSDBATCH-BAPIRNR .


ld_p_logid = some text here

"populate fields of struture and append to itab
append wa_p_t_rsldpsel to it_p_t_rsldpsel.

ld_p_logid_p = some text here

"populate fields of struture and append to itab
append wa_p_t_rsldpio to it_p_t_rsldpio.

SELECT single SOURCE
FROM RSLDPIO
INTO ld_p_source.


"populate fields of struture and append to itab
append wa_p_t_rssdbatch to it_p_t_rssdbatch.

SELECT single TYP
FROM RSLDPIO
INTO ld_p_typ.


"populate fields of struture and append to itab
append wa_p_t_rsldpcrt to it_p_t_rsldpcrt.

SELECT single LOGSYS
FROM RSLDPIO
INTO ld_p_logsys.


SELECT single OLTPSOURCE
FROM RSLDPIO
INTO ld_p_oltpsource.

ld_p_uname = 'some text here'.
ld_p_batch = 'some text here'.

SELECT single GNR
FROM RSREQDONE
INTO ld_g_gnr.

ld_i_apo_call = 'some text here'.

SELECT single BAPIRNR
FROM RSSDBATCH
INTO ld_g_bapirnr.

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 RSSM_CALL_RSAR_DATA_REQUEST_1 or its description.