SAP Function Modules

AM_DEPR_POST_RFC SAP Function module







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

Associated Function Group: ARF1
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM AM_DEPR_POST_RFC - AM DEPR POST RFC





CALL FUNCTION 'AM_DEPR_POST_RFC' "
  EXPORTING
    i_test =                    " anlb-xnega
    i_bukrs =                   " t093c-bukrs
    i_gjahr =                   " anlp-gjahr
*   i_extform =                 " anla-txt50
    i_buper =                   " t093d-afblpe
    i_again =                   " rarep-again
    i_next =                    " rarep-xnext
    i_taba =                    " taba
    i_nocheck =                 " rarep-checkp
    i_rstart =                  " rarep-rstart
    i_ukv_aktiv =               " anlb-xnega
  TABLES
    t_fehl =                    " arf_fehl
    t_r_anln1 =                 " anln1_rang
*   t_r_anln2 =                 " anln2_rang
    t_r_afabe =                 " afabe_rang
    t_t093d =                   " t093d
*   t_anlp =                    " anlp
*   t_anlatxt =                 " anlatxt
  EXCEPTIONS
    INTERNAL_ERROR = 1          "
    .  "  AM_DEPR_POST_RFC

ABAP code example for Function Module AM_DEPR_POST_RFC





The ABAP code below is a full code listing to execute function module AM_DEPR_POST_RFC 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_t_fehl  TYPE STANDARD TABLE OF ARF_FEHL,"TABLES PARAM
wa_t_fehl  LIKE LINE OF it_t_fehl ,
it_t_r_anln1  TYPE STANDARD TABLE OF ANLN1_RANG,"TABLES PARAM
wa_t_r_anln1  LIKE LINE OF it_t_r_anln1 ,
it_t_r_anln2  TYPE STANDARD TABLE OF ANLN2_RANG,"TABLES PARAM
wa_t_r_anln2  LIKE LINE OF it_t_r_anln2 ,
it_t_r_afabe  TYPE STANDARD TABLE OF AFABE_RANG,"TABLES PARAM
wa_t_r_afabe  LIKE LINE OF it_t_r_afabe ,
it_t_t093d  TYPE STANDARD TABLE OF T093D,"TABLES PARAM
wa_t_t093d  LIKE LINE OF it_t_t093d ,
it_t_anlp  TYPE STANDARD TABLE OF ANLP,"TABLES PARAM
wa_t_anlp  LIKE LINE OF it_t_anlp ,
it_t_anlatxt  TYPE STANDARD TABLE OF ANLATXT,"TABLES PARAM
wa_t_anlatxt  LIKE LINE OF it_t_anlatxt .


SELECT single XNEGA
FROM ANLB
INTO @DATA(ld_i_test).


SELECT single BUKRS
FROM T093C
INTO @DATA(ld_i_bukrs).


SELECT single GJAHR
FROM ANLP
INTO @DATA(ld_i_gjahr).


SELECT single TXT50
FROM ANLA
INTO @DATA(ld_i_extform).


SELECT single AFBLPE
FROM T093D
INTO @DATA(ld_i_buper).


DATA(ld_i_again) = some text here

DATA(ld_i_next) = some text here
DATA(ld_i_taba) = 'Check type of data required'.

DATA(ld_i_nocheck) = some text here

DATA(ld_i_rstart) = some text here

SELECT single XNEGA
FROM ANLB
INTO @DATA(ld_i_ukv_aktiv).


"populate fields of struture and append to itab
append wa_t_fehl to it_t_fehl.

"populate fields of struture and append to itab
append wa_t_r_anln1 to it_t_r_anln1.

"populate fields of struture and append to itab
append wa_t_r_anln2 to it_t_r_anln2.

"populate fields of struture and append to itab
append wa_t_r_afabe to it_t_r_afabe.

"populate fields of struture and append to itab
append wa_t_t093d to it_t_t093d.

"populate fields of struture and append to itab
append wa_t_anlp to it_t_anlp.

"populate fields of struture and append to itab
append wa_t_anlatxt to it_t_anlatxt. . CALL FUNCTION 'AM_DEPR_POST_RFC' EXPORTING i_test = ld_i_test i_bukrs = ld_i_bukrs i_gjahr = ld_i_gjahr * i_extform = ld_i_extform i_buper = ld_i_buper i_again = ld_i_again i_next = ld_i_next i_taba = ld_i_taba i_nocheck = ld_i_nocheck i_rstart = ld_i_rstart i_ukv_aktiv = ld_i_ukv_aktiv TABLES t_fehl = it_t_fehl t_r_anln1 = it_t_r_anln1 * t_r_anln2 = it_t_r_anln2 t_r_afabe = it_t_r_afabe t_t093d = it_t_t093d * t_anlp = it_t_anlp * t_anlatxt = it_t_anlatxt EXCEPTIONS INTERNAL_ERROR = 1 . " AM_DEPR_POST_RFC
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_i_test  TYPE ANLB-XNEGA ,
it_t_fehl  TYPE STANDARD TABLE OF ARF_FEHL ,
wa_t_fehl  LIKE LINE OF it_t_fehl,
ld_i_bukrs  TYPE T093C-BUKRS ,
it_t_r_anln1  TYPE STANDARD TABLE OF ANLN1_RANG ,
wa_t_r_anln1  LIKE LINE OF it_t_r_anln1,
ld_i_gjahr  TYPE ANLP-GJAHR ,
it_t_r_anln2  TYPE STANDARD TABLE OF ANLN2_RANG ,
wa_t_r_anln2  LIKE LINE OF it_t_r_anln2,
ld_i_extform  TYPE ANLA-TXT50 ,
it_t_r_afabe  TYPE STANDARD TABLE OF AFABE_RANG ,
wa_t_r_afabe  LIKE LINE OF it_t_r_afabe,
ld_i_buper  TYPE T093D-AFBLPE ,
it_t_t093d  TYPE STANDARD TABLE OF T093D ,
wa_t_t093d  LIKE LINE OF it_t_t093d,
ld_i_again  TYPE RAREP-AGAIN ,
it_t_anlp  TYPE STANDARD TABLE OF ANLP ,
wa_t_anlp  LIKE LINE OF it_t_anlp,
ld_i_next  TYPE RAREP-XNEXT ,
it_t_anlatxt  TYPE STANDARD TABLE OF ANLATXT ,
wa_t_anlatxt  LIKE LINE OF it_t_anlatxt,
ld_i_taba  TYPE TABA ,
ld_i_nocheck  TYPE RAREP-CHECKP ,
ld_i_rstart  TYPE RAREP-RSTART ,
ld_i_ukv_aktiv  TYPE ANLB-XNEGA .


SELECT single XNEGA
FROM ANLB
INTO ld_i_test.


"populate fields of struture and append to itab
append wa_t_fehl to it_t_fehl.

SELECT single BUKRS
FROM T093C
INTO ld_i_bukrs.


"populate fields of struture and append to itab
append wa_t_r_anln1 to it_t_r_anln1.

SELECT single GJAHR
FROM ANLP
INTO ld_i_gjahr.


"populate fields of struture and append to itab
append wa_t_r_anln2 to it_t_r_anln2.

SELECT single TXT50
FROM ANLA
INTO ld_i_extform.


"populate fields of struture and append to itab
append wa_t_r_afabe to it_t_r_afabe.

SELECT single AFBLPE
FROM T093D
INTO ld_i_buper.


"populate fields of struture and append to itab
append wa_t_t093d to it_t_t093d.

ld_i_again = some text here

"populate fields of struture and append to itab
append wa_t_anlp to it_t_anlp.

ld_i_next = some text here

"populate fields of struture and append to itab
append wa_t_anlatxt to it_t_anlatxt.
ld_i_taba = 'Check type of data required'.

ld_i_nocheck = some text here

ld_i_rstart = some text here

SELECT single XNEGA
FROM ANLB
INTO ld_i_ukv_aktiv.

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