SAP Function Modules

RP_FILL_AR_INFOTYPES SAP Function module







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

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


Pattern for FM RP_FILL_AR_INFOTYPES - RP FILL AR INFOTYPES





CALL FUNCTION 'RP_FILL_AR_INFOTYPES' "
  EXPORTING
    a_pernr =                   " p0001-pernr
    a_seqnr =                   " pc261-seqnr
    a_versc =                   " pc202
*   abrech = SPACE              "
  TABLES
    a_rt =                      " pc207
    a_crt =                     " pc208
*   infty_tab =                 " infotyp_tab
*   outdated_infty_tab =        " infotyp_tab
  EXCEPTIONS
    NO_INFOTYPES = 1            "
    MISSING_CUMTY_CUSTOMIZING = 2  "
    WRONG_PYINFTY_STRUCTURE = 3  "
    INFOTYPE_OUT_OF_DATE = 4    "
    .  "  RP_FILL_AR_INFOTYPES

ABAP code example for Function Module RP_FILL_AR_INFOTYPES





The ABAP code below is a full code listing to execute function module RP_FILL_AR_INFOTYPES 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:
it_a_rt  TYPE STANDARD TABLE OF PC207,"TABLES PARAM
wa_a_rt  LIKE LINE OF it_a_rt ,
it_a_crt  TYPE STANDARD TABLE OF PC208,"TABLES PARAM
wa_a_crt  LIKE LINE OF it_a_crt ,
it_infty_tab  TYPE STANDARD TABLE OF INFOTYP_TAB,"TABLES PARAM
wa_infty_tab  LIKE LINE OF it_infty_tab ,
it_outdated_infty_tab  TYPE STANDARD TABLE OF INFOTYP_TAB,"TABLES PARAM
wa_outdated_infty_tab  LIKE LINE OF it_outdated_infty_tab .


DATA(ld_a_pernr) = Check type of data required

DATA(ld_a_seqnr) = Check type of data required
DATA(ld_a_versc) = 'Check type of data required'.
DATA(ld_abrech) = 'some text here'.

"populate fields of struture and append to itab
append wa_a_rt to it_a_rt.

"populate fields of struture and append to itab
append wa_a_crt to it_a_crt.

"populate fields of struture and append to itab
append wa_infty_tab to it_infty_tab.

"populate fields of struture and append to itab
append wa_outdated_infty_tab to it_outdated_infty_tab. . CALL FUNCTION 'RP_FILL_AR_INFOTYPES' EXPORTING a_pernr = ld_a_pernr a_seqnr = ld_a_seqnr a_versc = ld_a_versc * abrech = ld_abrech TABLES a_rt = it_a_rt a_crt = it_a_crt * infty_tab = it_infty_tab * outdated_infty_tab = it_outdated_infty_tab EXCEPTIONS NO_INFOTYPES = 1 MISSING_CUMTY_CUSTOMIZING = 2 WRONG_PYINFTY_STRUCTURE = 3 INFOTYPE_OUT_OF_DATE = 4 . " RP_FILL_AR_INFOTYPES
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 ELSEIF SY-SUBRC EQ 4. "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_a_pernr  TYPE P0001-PERNR ,
it_a_rt  TYPE STANDARD TABLE OF PC207 ,
wa_a_rt  LIKE LINE OF it_a_rt,
ld_a_seqnr  TYPE PC261-SEQNR ,
it_a_crt  TYPE STANDARD TABLE OF PC208 ,
wa_a_crt  LIKE LINE OF it_a_crt,
ld_a_versc  TYPE PC202 ,
it_infty_tab  TYPE STANDARD TABLE OF INFOTYP_TAB ,
wa_infty_tab  LIKE LINE OF it_infty_tab,
ld_abrech  TYPE STRING ,
it_outdated_infty_tab  TYPE STANDARD TABLE OF INFOTYP_TAB ,
wa_outdated_infty_tab  LIKE LINE OF it_outdated_infty_tab.


ld_a_pernr = Check type of data required

"populate fields of struture and append to itab
append wa_a_rt to it_a_rt.

ld_a_seqnr = Check type of data required

"populate fields of struture and append to itab
append wa_a_crt to it_a_crt.
ld_a_versc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_infty_tab to it_infty_tab.
ld_abrech = 'some text here'.

"populate fields of struture and append to itab
append wa_outdated_infty_tab to it_outdated_infty_tab.

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