SAP Function Modules

FM_CHANGE_AA_DOCFM_READ_CHAIN SAP Function module







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

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


Pattern for FM FM_CHANGE_AA_DOCFM_READ_CHAIN - FM CHANGE AA DOCFM READ CHAIN





CALL FUNCTION 'FM_CHANGE_AA_DOCFM_READ_CHAIN' "
  EXPORTING
    i_rldnr =                   " fmcha1-rldnr
    i_refbt =                   " fmcha1-refbt
    i_refbn =                   " fmcha1-refbn
    i_rfpos =                   " fmcha1-rfpos
    i_rfknt =                   " fmcha1-rfknt
    i_fikrs =                   " fmcha1-fikrs
    i_bukrs =                   " fmifiit-bukrs
    i_kokrs =                   " fmia-kokrs
    i_gjahr =                   " fmifiit-kngjahr
*   i_derive_accass = SPACE     " c
*   i_check_boc = SPACE         " c
  IMPORTING
    e_t_return =                " fm_t_oireturn  FM: Return Parameter for Commitment Documents
  TABLES
    t_fmcha1 =                  " fmcha1
*   t_gjahr =                   " range_c4      Structure of a Ranges Table for a Character (4) Field
    t_logsys =                  " range_c10     Structure of a Range Table for a (10) Character Field
    .  "  FM_CHANGE_AA_DOCFM_READ_CHAIN

ABAP code example for Function Module FM_CHANGE_AA_DOCFM_READ_CHAIN





The ABAP code below is a full code listing to execute function module FM_CHANGE_AA_DOCFM_READ_CHAIN 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_t_return  TYPE FM_T_OIRETURN ,
it_t_fmcha1  TYPE STANDARD TABLE OF FMCHA1,"TABLES PARAM
wa_t_fmcha1  LIKE LINE OF it_t_fmcha1 ,
it_t_gjahr  TYPE STANDARD TABLE OF RANGE_C4,"TABLES PARAM
wa_t_gjahr  LIKE LINE OF it_t_gjahr ,
it_t_logsys  TYPE STANDARD TABLE OF RANGE_C10,"TABLES PARAM
wa_t_logsys  LIKE LINE OF it_t_logsys .


SELECT single RLDNR
FROM FMCHA1
INTO @DATA(ld_i_rldnr).


SELECT single REFBT
FROM FMCHA1
INTO @DATA(ld_i_refbt).


SELECT single REFBN
FROM FMCHA1
INTO @DATA(ld_i_refbn).


SELECT single RFPOS
FROM FMCHA1
INTO @DATA(ld_i_rfpos).


SELECT single RFKNT
FROM FMCHA1
INTO @DATA(ld_i_rfknt).


SELECT single FIKRS
FROM FMCHA1
INTO @DATA(ld_i_fikrs).


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


SELECT single KOKRS
FROM FMIA
INTO @DATA(ld_i_kokrs).


SELECT single KNGJAHR
FROM FMIFIIT
INTO @DATA(ld_i_gjahr).

DATA(ld_i_derive_accass) = 'Check type of data required'.
DATA(ld_i_check_boc) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_fmcha1 to it_t_fmcha1.

"populate fields of struture and append to itab
append wa_t_gjahr to it_t_gjahr.

"populate fields of struture and append to itab
append wa_t_logsys to it_t_logsys. . CALL FUNCTION 'FM_CHANGE_AA_DOCFM_READ_CHAIN' EXPORTING i_rldnr = ld_i_rldnr i_refbt = ld_i_refbt i_refbn = ld_i_refbn i_rfpos = ld_i_rfpos i_rfknt = ld_i_rfknt i_fikrs = ld_i_fikrs i_bukrs = ld_i_bukrs i_kokrs = ld_i_kokrs i_gjahr = ld_i_gjahr * i_derive_accass = ld_i_derive_accass * i_check_boc = ld_i_check_boc IMPORTING e_t_return = ld_e_t_return TABLES t_fmcha1 = it_t_fmcha1 * t_gjahr = it_t_gjahr t_logsys = it_t_logsys . " FM_CHANGE_AA_DOCFM_READ_CHAIN
IF SY-SUBRC EQ 0. "All OK 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_t_return  TYPE FM_T_OIRETURN ,
ld_i_rldnr  TYPE FMCHA1-RLDNR ,
it_t_fmcha1  TYPE STANDARD TABLE OF FMCHA1 ,
wa_t_fmcha1  LIKE LINE OF it_t_fmcha1,
ld_i_refbt  TYPE FMCHA1-REFBT ,
it_t_gjahr  TYPE STANDARD TABLE OF RANGE_C4 ,
wa_t_gjahr  LIKE LINE OF it_t_gjahr,
ld_i_refbn  TYPE FMCHA1-REFBN ,
it_t_logsys  TYPE STANDARD TABLE OF RANGE_C10 ,
wa_t_logsys  LIKE LINE OF it_t_logsys,
ld_i_rfpos  TYPE FMCHA1-RFPOS ,
ld_i_rfknt  TYPE FMCHA1-RFKNT ,
ld_i_fikrs  TYPE FMCHA1-FIKRS ,
ld_i_bukrs  TYPE FMIFIIT-BUKRS ,
ld_i_kokrs  TYPE FMIA-KOKRS ,
ld_i_gjahr  TYPE FMIFIIT-KNGJAHR ,
ld_i_derive_accass  TYPE C ,
ld_i_check_boc  TYPE C .


SELECT single RLDNR
FROM FMCHA1
INTO ld_i_rldnr.


"populate fields of struture and append to itab
append wa_t_fmcha1 to it_t_fmcha1.

SELECT single REFBT
FROM FMCHA1
INTO ld_i_refbt.


"populate fields of struture and append to itab
append wa_t_gjahr to it_t_gjahr.

SELECT single REFBN
FROM FMCHA1
INTO ld_i_refbn.


"populate fields of struture and append to itab
append wa_t_logsys to it_t_logsys.

SELECT single RFPOS
FROM FMCHA1
INTO ld_i_rfpos.


SELECT single RFKNT
FROM FMCHA1
INTO ld_i_rfknt.


SELECT single FIKRS
FROM FMCHA1
INTO ld_i_fikrs.


SELECT single BUKRS
FROM FMIFIIT
INTO ld_i_bukrs.


SELECT single KOKRS
FROM FMIA
INTO ld_i_kokrs.


SELECT single KNGJAHR
FROM FMIFIIT
INTO ld_i_gjahr.

ld_i_derive_accass = 'Check type of data required'.
ld_i_check_boc = '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 FM_CHANGE_AA_DOCFM_READ_CHAIN or its description.