SAP Function Modules

TRCA_CUST_GETITEM SAP Function module - Determine Payment Status of a Customer Item







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

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


Pattern for FM TRCA_CUST_GETITEM - TRCA CUST GETITEM





CALL FUNCTION 'TRCA_CUST_GETITEM' "Determine Payment Status of a Customer Item
  EXPORTING
    companycode =               " bapi3007_1-comp_code  Company Code
*   customer =                  " bapi3007_1-customer  Customer
    document =                  " belnr_d       Accounting Document Number
    year =                      " gjahr         Fiscal Year
*   item_number =               " buzei         Number of Line Item within Accounting Document
*   keydate =                   " bapi3007-key_date  Key Date
  IMPORTING
    item_is_open =              " tb_xafeld     Beleg ist offen (X=true, space=false)
    item_is_balanced =          " tb_xafeld     Beleg ist ausgeziffert (X=true, space=false)
  EXCEPTIONS
    NOT_FOUND = 1               "               Document not found
    .  "  TRCA_CUST_GETITEM

ABAP code example for Function Module TRCA_CUST_GETITEM





The ABAP code below is a full code listing to execute function module TRCA_CUST_GETITEM 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_item_is_open  TYPE TB_XAFELD ,
ld_item_is_balanced  TYPE TB_XAFELD .


DATA(ld_companycode) = some text here

DATA(ld_customer) = some text here
DATA(ld_document) = 'Check type of data required'.
DATA(ld_year) = 'Check type of data required'.
DATA(ld_item_number) = 'Check type of data required'.

DATA(ld_keydate) = 20210129 . CALL FUNCTION 'TRCA_CUST_GETITEM' EXPORTING companycode = ld_companycode * customer = ld_customer document = ld_document year = ld_year * item_number = ld_item_number * keydate = ld_keydate IMPORTING item_is_open = ld_item_is_open item_is_balanced = ld_item_is_balanced EXCEPTIONS NOT_FOUND = 1 . " TRCA_CUST_GETITEM
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_item_is_open  TYPE TB_XAFELD ,
ld_companycode  TYPE BAPI3007_1-COMP_CODE ,
ld_item_is_balanced  TYPE TB_XAFELD ,
ld_customer  TYPE BAPI3007_1-CUSTOMER ,
ld_document  TYPE BELNR_D ,
ld_year  TYPE GJAHR ,
ld_item_number  TYPE BUZEI ,
ld_keydate  TYPE BAPI3007-KEY_DATE .


ld_companycode = some text here

ld_customer = some text here
ld_document = 'Check type of data required'.
ld_year = 'Check type of data required'.
ld_item_number = 'Check type of data required'.

ld_keydate = 20210129

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