SAP Function Modules

AIC1_EXTERNAL_DATA_REPLICATE SAP Function module







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

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


Pattern for FM AIC1_EXTERNAL_DATA_REPLICATE - AIC1 EXTERNAL DATA REPLICATE





CALL FUNCTION 'AIC1_EXTERNAL_DATA_REPLICATE' "
* EXPORTING
*   compr_vrsn =                " imch-compr_vrsn
*   capinvprogram =             " imch-inv_prog
*   approvalyear =              " imch-appr_year
*   flag_own_logsystem = 'X'    " imch-ownsys_flg
*   with_commit = ' '           " raic1-flg
  IMPORTING
    error_message =             " hier_mess
  TABLES
    external_data =             " bapi1057cd
*   messages =                  " hier_mess
    .  "  AIC1_EXTERNAL_DATA_REPLICATE

ABAP code example for Function Module AIC1_EXTERNAL_DATA_REPLICATE





The ABAP code below is a full code listing to execute function module AIC1_EXTERNAL_DATA_REPLICATE 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_message  TYPE HIER_MESS ,
it_external_data  TYPE STANDARD TABLE OF BAPI1057CD,"TABLES PARAM
wa_external_data  LIKE LINE OF it_external_data ,
it_messages  TYPE STANDARD TABLE OF HIER_MESS,"TABLES PARAM
wa_messages  LIKE LINE OF it_messages .


SELECT single COMPR_VRSN
FROM IMCH
INTO @DATA(ld_compr_vrsn).


SELECT single INV_PROG
FROM IMCH
INTO @DATA(ld_capinvprogram).


SELECT single APPR_YEAR
FROM IMCH
INTO @DATA(ld_approvalyear).


SELECT single OWNSYS_FLG
FROM IMCH
INTO @DATA(ld_flag_own_logsystem).


DATA(ld_with_commit) = some text here

"populate fields of struture and append to itab
append wa_external_data to it_external_data.

"populate fields of struture and append to itab
append wa_messages to it_messages. . CALL FUNCTION 'AIC1_EXTERNAL_DATA_REPLICATE' * EXPORTING * compr_vrsn = ld_compr_vrsn * capinvprogram = ld_capinvprogram * approvalyear = ld_approvalyear * flag_own_logsystem = ld_flag_own_logsystem * with_commit = ld_with_commit IMPORTING error_message = ld_error_message TABLES external_data = it_external_data * messages = it_messages . " AIC1_EXTERNAL_DATA_REPLICATE
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_error_message  TYPE HIER_MESS ,
ld_compr_vrsn  TYPE IMCH-COMPR_VRSN ,
it_external_data  TYPE STANDARD TABLE OF BAPI1057CD ,
wa_external_data  LIKE LINE OF it_external_data,
ld_capinvprogram  TYPE IMCH-INV_PROG ,
it_messages  TYPE STANDARD TABLE OF HIER_MESS ,
wa_messages  LIKE LINE OF it_messages,
ld_approvalyear  TYPE IMCH-APPR_YEAR ,
ld_flag_own_logsystem  TYPE IMCH-OWNSYS_FLG ,
ld_with_commit  TYPE RAIC1-FLG .


SELECT single COMPR_VRSN
FROM IMCH
INTO ld_compr_vrsn.


"populate fields of struture and append to itab
append wa_external_data to it_external_data.

SELECT single INV_PROG
FROM IMCH
INTO ld_capinvprogram.


"populate fields of struture and append to itab
append wa_messages to it_messages.

SELECT single APPR_YEAR
FROM IMCH
INTO ld_approvalyear.


SELECT single OWNSYS_FLG
FROM IMCH
INTO ld_flag_own_logsystem.


ld_with_commit = some text here

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