SAP Function Modules

WLF_ACCOUNTING_AC_LIST_CREATE SAP Function module







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

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


Pattern for FM WLF_ACCOUNTING_AC_LIST_CREATE - WLF ACCOUNTING AC LIST CREATE





CALL FUNCTION 'WLF_ACCOUNTING_AC_LIST_CREATE' "
  EXPORTING
    i_komlfk =                  " komlfk
*   i_simulation = SPACE        " c
    i_wbeln =                   " komlfk-wbeln
*   i_comp = SPACE              " trwpr-component  Component in ACC Interface
*   i_comp_check = SPACE        " trwpr-component  Component in ACC Interface
  IMPORTING
    e_komlfk =                  " komlfk
    e_reverse_fail =            " c
  TABLES
    t_komv =                    " komv
    t_komlfl =                  " komlfl
    t_komlfp =                  " komlfp
    t_komlfk =                  " komlfk
    t_komlfac =                 " komlfac
*   t_accit =                   " accit
*   t_acccr =                   " acccr
*   t_acchd =                   " acchd
*   t_acctx =                   " accbset
*   t_analyse_tab =             " wlf_ac_pro
*   t_error_messages =          " wlf1_error
*   t_accfi =                   " accfi         Interface to Accounting: Financial Accounting One-Time Accounts
  EXCEPTIONS
    NO_DOCUMENT_REQUIRED = 1    "
    DOCUMENT_NOT_NES = 2        "
    AC_DOCUMENT_ERROR = 3       "
    ACCOUNT_MISSING = 4         "
    COMPANY_CODE_ERROR = 5      "
    FAKTURA_DATA_ERROR = 6      "
    ENTRY_IN_VF_KRED_NOT_FOUND = 7  "
    ENTRY_IN_VF_DEBI_NOT_FOUND = 8  "
    BSCHL_NOT_FOUND = 9         "
    ACCOUNT_NOT_FOUND = 10      "
    AC_DOCU_CANCEL_ERROR = 11   "
    CURRENCY_ERROR = 12         "
    BADI_ERROR = 13             "
    .  "  WLF_ACCOUNTING_AC_LIST_CREATE

ABAP code example for Function Module WLF_ACCOUNTING_AC_LIST_CREATE





The ABAP code below is a full code listing to execute function module WLF_ACCOUNTING_AC_LIST_CREATE 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_komlfk  TYPE KOMLFK ,
ld_e_reverse_fail  TYPE C ,
it_t_komv  TYPE STANDARD TABLE OF KOMV,"TABLES PARAM
wa_t_komv  LIKE LINE OF it_t_komv ,
it_t_komlfl  TYPE STANDARD TABLE OF KOMLFL,"TABLES PARAM
wa_t_komlfl  LIKE LINE OF it_t_komlfl ,
it_t_komlfp  TYPE STANDARD TABLE OF KOMLFP,"TABLES PARAM
wa_t_komlfp  LIKE LINE OF it_t_komlfp ,
it_t_komlfk  TYPE STANDARD TABLE OF KOMLFK,"TABLES PARAM
wa_t_komlfk  LIKE LINE OF it_t_komlfk ,
it_t_komlfac  TYPE STANDARD TABLE OF KOMLFAC,"TABLES PARAM
wa_t_komlfac  LIKE LINE OF it_t_komlfac ,
it_t_accit  TYPE STANDARD TABLE OF ACCIT,"TABLES PARAM
wa_t_accit  LIKE LINE OF it_t_accit ,
it_t_acccr  TYPE STANDARD TABLE OF ACCCR,"TABLES PARAM
wa_t_acccr  LIKE LINE OF it_t_acccr ,
it_t_acchd  TYPE STANDARD TABLE OF ACCHD,"TABLES PARAM
wa_t_acchd  LIKE LINE OF it_t_acchd ,
it_t_acctx  TYPE STANDARD TABLE OF ACCBSET,"TABLES PARAM
wa_t_acctx  LIKE LINE OF it_t_acctx ,
it_t_analyse_tab  TYPE STANDARD TABLE OF WLF_AC_PRO,"TABLES PARAM
wa_t_analyse_tab  LIKE LINE OF it_t_analyse_tab ,
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_accfi  TYPE STANDARD TABLE OF ACCFI,"TABLES PARAM
wa_t_accfi  LIKE LINE OF it_t_accfi .

DATA(ld_i_komlfk) = 'Check type of data required'.
DATA(ld_i_simulation) = 'Check type of data required'.

DATA(ld_i_wbeln) = some text here

SELECT single COMPONENT
FROM TRWPR
INTO @DATA(ld_i_comp).


SELECT single COMPONENT
FROM TRWPR
INTO @DATA(ld_i_comp_check).


"populate fields of struture and append to itab
append wa_t_komv to it_t_komv.

"populate fields of struture and append to itab
append wa_t_komlfl to it_t_komlfl.

"populate fields of struture and append to itab
append wa_t_komlfp to it_t_komlfp.

"populate fields of struture and append to itab
append wa_t_komlfk to it_t_komlfk.

"populate fields of struture and append to itab
append wa_t_komlfac to it_t_komlfac.

"populate fields of struture and append to itab
append wa_t_accit to it_t_accit.

"populate fields of struture and append to itab
append wa_t_acccr to it_t_acccr.

"populate fields of struture and append to itab
append wa_t_acchd to it_t_acchd.

"populate fields of struture and append to itab
append wa_t_acctx to it_t_acctx.

"populate fields of struture and append to itab
append wa_t_analyse_tab to it_t_analyse_tab.

"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_accfi to it_t_accfi. . CALL FUNCTION 'WLF_ACCOUNTING_AC_LIST_CREATE' EXPORTING i_komlfk = ld_i_komlfk * i_simulation = ld_i_simulation i_wbeln = ld_i_wbeln * i_comp = ld_i_comp * i_comp_check = ld_i_comp_check IMPORTING e_komlfk = ld_e_komlfk e_reverse_fail = ld_e_reverse_fail TABLES t_komv = it_t_komv t_komlfl = it_t_komlfl t_komlfp = it_t_komlfp t_komlfk = it_t_komlfk t_komlfac = it_t_komlfac * t_accit = it_t_accit * t_acccr = it_t_acccr * t_acchd = it_t_acchd * t_acctx = it_t_acctx * t_analyse_tab = it_t_analyse_tab * t_error_messages = it_t_error_messages * t_accfi = it_t_accfi EXCEPTIONS NO_DOCUMENT_REQUIRED = 1 DOCUMENT_NOT_NES = 2 AC_DOCUMENT_ERROR = 3 ACCOUNT_MISSING = 4 COMPANY_CODE_ERROR = 5 FAKTURA_DATA_ERROR = 6 ENTRY_IN_VF_KRED_NOT_FOUND = 7 ENTRY_IN_VF_DEBI_NOT_FOUND = 8 BSCHL_NOT_FOUND = 9 ACCOUNT_NOT_FOUND = 10 AC_DOCU_CANCEL_ERROR = 11 CURRENCY_ERROR = 12 BADI_ERROR = 13 . " WLF_ACCOUNTING_AC_LIST_CREATE
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "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_e_komlfk  TYPE KOMLFK ,
ld_i_komlfk  TYPE KOMLFK ,
it_t_komv  TYPE STANDARD TABLE OF KOMV ,
wa_t_komv  LIKE LINE OF it_t_komv,
ld_e_reverse_fail  TYPE C ,
ld_i_simulation  TYPE C ,
it_t_komlfl  TYPE STANDARD TABLE OF KOMLFL ,
wa_t_komlfl  LIKE LINE OF it_t_komlfl,
ld_i_wbeln  TYPE KOMLFK-WBELN ,
it_t_komlfp  TYPE STANDARD TABLE OF KOMLFP ,
wa_t_komlfp  LIKE LINE OF it_t_komlfp,
ld_i_comp  TYPE TRWPR-COMPONENT ,
it_t_komlfk  TYPE STANDARD TABLE OF KOMLFK ,
wa_t_komlfk  LIKE LINE OF it_t_komlfk,
it_t_komlfac  TYPE STANDARD TABLE OF KOMLFAC ,
wa_t_komlfac  LIKE LINE OF it_t_komlfac,
ld_i_comp_check  TYPE TRWPR-COMPONENT ,
it_t_accit  TYPE STANDARD TABLE OF ACCIT ,
wa_t_accit  LIKE LINE OF it_t_accit,
it_t_acccr  TYPE STANDARD TABLE OF ACCCR ,
wa_t_acccr  LIKE LINE OF it_t_acccr,
it_t_acchd  TYPE STANDARD TABLE OF ACCHD ,
wa_t_acchd  LIKE LINE OF it_t_acchd,
it_t_acctx  TYPE STANDARD TABLE OF ACCBSET ,
wa_t_acctx  LIKE LINE OF it_t_acctx,
it_t_analyse_tab  TYPE STANDARD TABLE OF WLF_AC_PRO ,
wa_t_analyse_tab  LIKE LINE OF it_t_analyse_tab,
it_t_error_messages  TYPE STANDARD TABLE OF WLF1_ERROR ,
wa_t_error_messages  LIKE LINE OF it_t_error_messages,
it_t_accfi  TYPE STANDARD TABLE OF ACCFI ,
wa_t_accfi  LIKE LINE OF it_t_accfi.

ld_i_komlfk = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_komv to it_t_komv.
ld_i_simulation = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_komlfl to it_t_komlfl.

ld_i_wbeln = some text here

"populate fields of struture and append to itab
append wa_t_komlfp to it_t_komlfp.

SELECT single COMPONENT
FROM TRWPR
INTO ld_i_comp.


"populate fields of struture and append to itab
append wa_t_komlfk to it_t_komlfk.

"populate fields of struture and append to itab
append wa_t_komlfac to it_t_komlfac.

SELECT single COMPONENT
FROM TRWPR
INTO ld_i_comp_check.


"populate fields of struture and append to itab
append wa_t_accit to it_t_accit.

"populate fields of struture and append to itab
append wa_t_acccr to it_t_acccr.

"populate fields of struture and append to itab
append wa_t_acchd to it_t_acchd.

"populate fields of struture and append to itab
append wa_t_acctx to it_t_acctx.

"populate fields of struture and append to itab
append wa_t_analyse_tab to it_t_analyse_tab.

"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_accfi to it_t_accfi.

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