SAP Function Modules

FM_PAYTR_SEPARATE_DOCUMENTS SAP Function module







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

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


Pattern for FM FM_PAYTR_SEPARATE_DOCUMENTS - FM PAYTR SEPARATE DOCUMENTS





CALL FUNCTION 'FM_PAYTR_SEPARATE_DOCUMENTS' "
  EXPORTING
    i_test = 'X'                " c
*   i_perform_avc = SPACE       " c
  TABLES
    t_payments_fi =             " fmpa_t_fi_item_type
    t_invoices_fi =             " fmpa_t_fi_item_type
*   t_invoices_fi_comp =        " fmpa_t_fi_item_type
    t_documents_fi =            " fmpa_t_fi_item_type
    t_header =                  " fmpa_t_fi_header_type
    t_cc_header =               " fmpa_t_fi_cc_header_type
    t_payment_amount =          " fmpa_t_payment_amount
    t_down_payments_upd =       " fmpa_t_payment_on_acc
    t_control_data =            " fmfi_t_control_data
*   t_90_30_docs_fi =           " fmpa_t_fi_item_type
    t_90_30_docs_fm =           " fmifiit       FI Line Item Table in Funds Management
*   t_80_90_docs =              " fmpa_t_fi_item_type  Key Table FI
*   t_ledger =                  " fmpa_t_ledger
* CHANGING
*   i_flg_opay =                " c
  EXCEPTIONS
    FATAL_ERROR = 1             "               Critical Error
    .  "  FM_PAYTR_SEPARATE_DOCUMENTS

ABAP code example for Function Module FM_PAYTR_SEPARATE_DOCUMENTS





The ABAP code below is a full code listing to execute function module FM_PAYTR_SEPARATE_DOCUMENTS 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_payments_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_payments_fi  LIKE LINE OF it_t_payments_fi ,
it_t_invoices_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_invoices_fi  LIKE LINE OF it_t_invoices_fi ,
it_t_invoices_fi_comp  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_invoices_fi_comp  LIKE LINE OF it_t_invoices_fi_comp ,
it_t_documents_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_documents_fi  LIKE LINE OF it_t_documents_fi ,
it_t_header  TYPE STANDARD TABLE OF FMPA_T_FI_HEADER_TYPE,"TABLES PARAM
wa_t_header  LIKE LINE OF it_t_header ,
it_t_cc_header  TYPE STANDARD TABLE OF FMPA_T_FI_CC_HEADER_TYPE,"TABLES PARAM
wa_t_cc_header  LIKE LINE OF it_t_cc_header ,
it_t_payment_amount  TYPE STANDARD TABLE OF FMPA_T_PAYMENT_AMOUNT,"TABLES PARAM
wa_t_payment_amount  LIKE LINE OF it_t_payment_amount ,
it_t_down_payments_upd  TYPE STANDARD TABLE OF FMPA_T_PAYMENT_ON_ACC,"TABLES PARAM
wa_t_down_payments_upd  LIKE LINE OF it_t_down_payments_upd ,
it_t_control_data  TYPE STANDARD TABLE OF FMFI_T_CONTROL_DATA,"TABLES PARAM
wa_t_control_data  LIKE LINE OF it_t_control_data ,
it_t_90_30_docs_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_90_30_docs_fi  LIKE LINE OF it_t_90_30_docs_fi ,
it_t_90_30_docs_fm  TYPE STANDARD TABLE OF FMIFIIT,"TABLES PARAM
wa_t_90_30_docs_fm  LIKE LINE OF it_t_90_30_docs_fm ,
it_t_80_90_docs  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE,"TABLES PARAM
wa_t_80_90_docs  LIKE LINE OF it_t_80_90_docs ,
it_t_ledger  TYPE STANDARD TABLE OF FMPA_T_LEDGER,"TABLES PARAM
wa_t_ledger  LIKE LINE OF it_t_ledger .

DATA(ld_i_flg_opay) = 'Check type of data required'.
DATA(ld_i_test) = 'Check type of data required'.
DATA(ld_i_perform_avc) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_payments_fi to it_t_payments_fi.

"populate fields of struture and append to itab
append wa_t_invoices_fi to it_t_invoices_fi.

"populate fields of struture and append to itab
append wa_t_invoices_fi_comp to it_t_invoices_fi_comp.

"populate fields of struture and append to itab
append wa_t_documents_fi to it_t_documents_fi.

"populate fields of struture and append to itab
append wa_t_header to it_t_header.

"populate fields of struture and append to itab
append wa_t_cc_header to it_t_cc_header.

"populate fields of struture and append to itab
append wa_t_payment_amount to it_t_payment_amount.

"populate fields of struture and append to itab
append wa_t_down_payments_upd to it_t_down_payments_upd.

"populate fields of struture and append to itab
append wa_t_control_data to it_t_control_data.

"populate fields of struture and append to itab
append wa_t_90_30_docs_fi to it_t_90_30_docs_fi.

"populate fields of struture and append to itab
append wa_t_90_30_docs_fm to it_t_90_30_docs_fm.

"populate fields of struture and append to itab
append wa_t_80_90_docs to it_t_80_90_docs.

"populate fields of struture and append to itab
append wa_t_ledger to it_t_ledger. . CALL FUNCTION 'FM_PAYTR_SEPARATE_DOCUMENTS' EXPORTING i_test = ld_i_test * i_perform_avc = ld_i_perform_avc TABLES t_payments_fi = it_t_payments_fi t_invoices_fi = it_t_invoices_fi * t_invoices_fi_comp = it_t_invoices_fi_comp t_documents_fi = it_t_documents_fi t_header = it_t_header t_cc_header = it_t_cc_header t_payment_amount = it_t_payment_amount t_down_payments_upd = it_t_down_payments_upd t_control_data = it_t_control_data * t_90_30_docs_fi = it_t_90_30_docs_fi t_90_30_docs_fm = it_t_90_30_docs_fm * t_80_90_docs = it_t_80_90_docs * t_ledger = it_t_ledger * CHANGING * i_flg_opay = ld_i_flg_opay EXCEPTIONS FATAL_ERROR = 1 . " FM_PAYTR_SEPARATE_DOCUMENTS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_i_flg_opay  TYPE C ,
ld_i_test  TYPE C ,
it_t_payments_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_payments_fi  LIKE LINE OF it_t_payments_fi,
ld_i_perform_avc  TYPE C ,
it_t_invoices_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_invoices_fi  LIKE LINE OF it_t_invoices_fi,
it_t_invoices_fi_comp  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_invoices_fi_comp  LIKE LINE OF it_t_invoices_fi_comp,
it_t_documents_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_documents_fi  LIKE LINE OF it_t_documents_fi,
it_t_header  TYPE STANDARD TABLE OF FMPA_T_FI_HEADER_TYPE ,
wa_t_header  LIKE LINE OF it_t_header,
it_t_cc_header  TYPE STANDARD TABLE OF FMPA_T_FI_CC_HEADER_TYPE ,
wa_t_cc_header  LIKE LINE OF it_t_cc_header,
it_t_payment_amount  TYPE STANDARD TABLE OF FMPA_T_PAYMENT_AMOUNT ,
wa_t_payment_amount  LIKE LINE OF it_t_payment_amount,
it_t_down_payments_upd  TYPE STANDARD TABLE OF FMPA_T_PAYMENT_ON_ACC ,
wa_t_down_payments_upd  LIKE LINE OF it_t_down_payments_upd,
it_t_control_data  TYPE STANDARD TABLE OF FMFI_T_CONTROL_DATA ,
wa_t_control_data  LIKE LINE OF it_t_control_data,
it_t_90_30_docs_fi  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_90_30_docs_fi  LIKE LINE OF it_t_90_30_docs_fi,
it_t_90_30_docs_fm  TYPE STANDARD TABLE OF FMIFIIT ,
wa_t_90_30_docs_fm  LIKE LINE OF it_t_90_30_docs_fm,
it_t_80_90_docs  TYPE STANDARD TABLE OF FMPA_T_FI_ITEM_TYPE ,
wa_t_80_90_docs  LIKE LINE OF it_t_80_90_docs,
it_t_ledger  TYPE STANDARD TABLE OF FMPA_T_LEDGER ,
wa_t_ledger  LIKE LINE OF it_t_ledger.

ld_i_flg_opay = 'Check type of data required'.
ld_i_test = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_payments_fi to it_t_payments_fi.
ld_i_perform_avc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_invoices_fi to it_t_invoices_fi.

"populate fields of struture and append to itab
append wa_t_invoices_fi_comp to it_t_invoices_fi_comp.

"populate fields of struture and append to itab
append wa_t_documents_fi to it_t_documents_fi.

"populate fields of struture and append to itab
append wa_t_header to it_t_header.

"populate fields of struture and append to itab
append wa_t_cc_header to it_t_cc_header.

"populate fields of struture and append to itab
append wa_t_payment_amount to it_t_payment_amount.

"populate fields of struture and append to itab
append wa_t_down_payments_upd to it_t_down_payments_upd.

"populate fields of struture and append to itab
append wa_t_control_data to it_t_control_data.

"populate fields of struture and append to itab
append wa_t_90_30_docs_fi to it_t_90_30_docs_fi.

"populate fields of struture and append to itab
append wa_t_90_30_docs_fm to it_t_90_30_docs_fm.

"populate fields of struture and append to itab
append wa_t_80_90_docs to it_t_80_90_docs.

"populate fields of struture and append to itab
append wa_t_ledger to it_t_ledger.

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