SAP Function Modules

FDM_AR_PREPARE_CLEARED_ITEMS SAP Function module







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

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


Pattern for FM FDM_AR_PREPARE_CLEARED_ITEMS - FDM AR PREPARE CLEARED ITEMS





CALL FUNCTION 'FDM_AR_PREPARE_CLEARED_ITEMS' "
* EXPORTING
*   i_xskip_crme = SPACE        " xfeld
  TABLES
    t_bkpf =                    " bkpf          Accounting Document Header
    t_postab =                  " ausz_info     Open Item Data for Clearing Transactions
    t_dispute_data =            " fdm_t_ar_dispute_data  FSCM-DM: Data for Creating/Changing Disputes in AR
    ct_paytab =                 " fdm_t_ar_paytab  FSCM-DM: Amount Changes in Dispute Case (Totals)
    ct_clr_items =              " fdm_t_ar_clr_items  FSCM-DM: Items Involved in Clearing
    et_assignments =            " fdm_t_ar_rel_item  FSCM-DM: Assigned Invoices and Payments/Credits
    .  "  FDM_AR_PREPARE_CLEARED_ITEMS

ABAP code example for Function Module FDM_AR_PREPARE_CLEARED_ITEMS





The ABAP code below is a full code listing to execute function module FDM_AR_PREPARE_CLEARED_ITEMS 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_bkpf  TYPE STANDARD TABLE OF BKPF,"TABLES PARAM
wa_t_bkpf  LIKE LINE OF it_t_bkpf ,
it_t_postab  TYPE STANDARD TABLE OF AUSZ_INFO,"TABLES PARAM
wa_t_postab  LIKE LINE OF it_t_postab ,
it_t_dispute_data  TYPE STANDARD TABLE OF FDM_T_AR_DISPUTE_DATA,"TABLES PARAM
wa_t_dispute_data  LIKE LINE OF it_t_dispute_data ,
it_ct_paytab  TYPE STANDARD TABLE OF FDM_T_AR_PAYTAB,"TABLES PARAM
wa_ct_paytab  LIKE LINE OF it_ct_paytab ,
it_ct_clr_items  TYPE STANDARD TABLE OF FDM_T_AR_CLR_ITEMS,"TABLES PARAM
wa_ct_clr_items  LIKE LINE OF it_ct_clr_items ,
it_et_assignments  TYPE STANDARD TABLE OF FDM_T_AR_REL_ITEM,"TABLES PARAM
wa_et_assignments  LIKE LINE OF it_et_assignments .

DATA(ld_i_xskip_crme) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.

"populate fields of struture and append to itab
append wa_t_postab to it_t_postab.

"populate fields of struture and append to itab
append wa_t_dispute_data to it_t_dispute_data.

"populate fields of struture and append to itab
append wa_ct_paytab to it_ct_paytab.

"populate fields of struture and append to itab
append wa_ct_clr_items to it_ct_clr_items.

"populate fields of struture and append to itab
append wa_et_assignments to it_et_assignments. . CALL FUNCTION 'FDM_AR_PREPARE_CLEARED_ITEMS' * EXPORTING * i_xskip_crme = ld_i_xskip_crme TABLES t_bkpf = it_t_bkpf t_postab = it_t_postab t_dispute_data = it_t_dispute_data ct_paytab = it_ct_paytab ct_clr_items = it_ct_clr_items et_assignments = it_et_assignments . " FDM_AR_PREPARE_CLEARED_ITEMS
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_xskip_crme  TYPE XFELD ,
it_t_bkpf  TYPE STANDARD TABLE OF BKPF ,
wa_t_bkpf  LIKE LINE OF it_t_bkpf,
it_t_postab  TYPE STANDARD TABLE OF AUSZ_INFO ,
wa_t_postab  LIKE LINE OF it_t_postab,
it_t_dispute_data  TYPE STANDARD TABLE OF FDM_T_AR_DISPUTE_DATA ,
wa_t_dispute_data  LIKE LINE OF it_t_dispute_data,
it_ct_paytab  TYPE STANDARD TABLE OF FDM_T_AR_PAYTAB ,
wa_ct_paytab  LIKE LINE OF it_ct_paytab,
it_ct_clr_items  TYPE STANDARD TABLE OF FDM_T_AR_CLR_ITEMS ,
wa_ct_clr_items  LIKE LINE OF it_ct_clr_items,
it_et_assignments  TYPE STANDARD TABLE OF FDM_T_AR_REL_ITEM ,
wa_et_assignments  LIKE LINE OF it_et_assignments.

ld_i_xskip_crme = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_bkpf to it_t_bkpf.

"populate fields of struture and append to itab
append wa_t_postab to it_t_postab.

"populate fields of struture and append to itab
append wa_t_dispute_data to it_t_dispute_data.

"populate fields of struture and append to itab
append wa_ct_paytab to it_ct_paytab.

"populate fields of struture and append to itab
append wa_ct_clr_items to it_ct_clr_items.

"populate fields of struture and append to itab
append wa_et_assignments to it_et_assignments.

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