SAP Function Modules

WLF_REGU_COPY_FROM_DATA SAP Function module







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

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


Pattern for FM WLF_REGU_COPY_FROM_DATA - WLF REGU COPY FROM DATA





CALL FUNCTION 'WLF_REGU_COPY_FROM_DATA' "
* EXPORTING
*   i_invoice_date =            " komlfk-wfdat  Agency Business: Posting Date
*   i_bill_reason =             " komlfk-lfgru  Agency Business: Reason for Activity
*   i_invoice_type =            " komlfk-lfart  Agency Business: Billing Document Type
  TABLES
    t_bapiacdh =                " bapiacdh
    t_wbeln =                   " wbrk_key
*   t_error_messages =          " wlf1_error
*   t_bapiabii =                " bapiabii      Item Data to Be Processed
    .  "  WLF_REGU_COPY_FROM_DATA

ABAP code example for Function Module WLF_REGU_COPY_FROM_DATA





The ABAP code below is a full code listing to execute function module WLF_REGU_COPY_FROM_DATA 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_bapiacdh  TYPE STANDARD TABLE OF BAPIACDH,"TABLES PARAM
wa_t_bapiacdh  LIKE LINE OF it_t_bapiacdh ,
it_t_wbeln  TYPE STANDARD TABLE OF WBRK_KEY,"TABLES PARAM
wa_t_wbeln  LIKE LINE OF it_t_wbeln ,
it_t_error_messages  TYPE STANDARD TABLE OF WLF1_ERROR,"TABLES PARAM
wa_t_error_messages  LIKE LINE OF it_t_error_messages ,
it_t_bapiabii  TYPE STANDARD TABLE OF BAPIABII,"TABLES PARAM
wa_t_bapiabii  LIKE LINE OF it_t_bapiabii .


DATA(ld_i_invoice_date) = 20210129

DATA(ld_i_bill_reason) = some text here

DATA(ld_i_invoice_type) = some text here

"populate fields of struture and append to itab
append wa_t_bapiacdh to it_t_bapiacdh.

"populate fields of struture and append to itab
append wa_t_wbeln to it_t_wbeln.

"populate fields of struture and append to itab
append wa_t_error_messages to it_t_error_messages.

"populate fields of struture and append to itab
append wa_t_bapiabii to it_t_bapiabii. . CALL FUNCTION 'WLF_REGU_COPY_FROM_DATA' * EXPORTING * i_invoice_date = ld_i_invoice_date * i_bill_reason = ld_i_bill_reason * i_invoice_type = ld_i_invoice_type TABLES t_bapiacdh = it_t_bapiacdh t_wbeln = it_t_wbeln * t_error_messages = it_t_error_messages * t_bapiabii = it_t_bapiabii . " WLF_REGU_COPY_FROM_DATA
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_i_invoice_date  TYPE KOMLFK-WFDAT ,
it_t_bapiacdh  TYPE STANDARD TABLE OF BAPIACDH ,
wa_t_bapiacdh  LIKE LINE OF it_t_bapiacdh,
ld_i_bill_reason  TYPE KOMLFK-LFGRU ,
it_t_wbeln  TYPE STANDARD TABLE OF WBRK_KEY ,
wa_t_wbeln  LIKE LINE OF it_t_wbeln,
ld_i_invoice_type  TYPE KOMLFK-LFART ,
it_t_error_messages  TYPE STANDARD TABLE OF WLF1_ERROR ,
wa_t_error_messages  LIKE LINE OF it_t_error_messages,
it_t_bapiabii  TYPE STANDARD TABLE OF BAPIABII ,
wa_t_bapiabii  LIKE LINE OF it_t_bapiabii.


ld_i_invoice_date = 20210129

"populate fields of struture and append to itab
append wa_t_bapiacdh to it_t_bapiacdh.

ld_i_bill_reason = some text here

"populate fields of struture and append to itab
append wa_t_wbeln to it_t_wbeln.

ld_i_invoice_type = some text here

"populate fields of struture and append to itab
append wa_t_error_messages to it_t_error_messages.

"populate fields of struture and append to itab
append wa_t_bapiabii to it_t_bapiabii.

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