BAPI_AR_ACC_GETKEYDATEBALANCE 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 BAPI_AR_ACC_GETKEYDATEBALANCE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
3007
Released Date:
15.07.1997
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_AR_ACC_GETKEYDATEBALANCE' "Customer account balance at a key date
EXPORTING
companycode = " bapi3007_1-comp_code Company code
customer = " bapi3007_1-customer Customer
keydate = " bapi3007-key_date Key date
* balancespgli = SPACE " bapi3007-bal_sglind Balance per special G/L indicator
* noteditems = SPACE " bapi3007-ntditms_rq Noted items requested
IMPORTING
return = " bapireturn Return Code
TABLES
keybalance = " bapi3007_3 Balance at key date
. " BAPI_AR_ACC_GETKEYDATEBALANCE
The ABAP code below is a full code listing to execute function module BAPI_AR_ACC_GETKEYDATEBALANCE 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).
| ld_return | TYPE BAPIRETURN , |
| it_keybalance | TYPE STANDARD TABLE OF BAPI3007_3,"TABLES PARAM |
| wa_keybalance | LIKE LINE OF it_keybalance . |
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_return | TYPE BAPIRETURN , |
| ld_companycode | TYPE BAPI3007_1-COMP_CODE , |
| it_keybalance | TYPE STANDARD TABLE OF BAPI3007_3 , |
| wa_keybalance | LIKE LINE OF it_keybalance, |
| ld_customer | TYPE BAPI3007_1-CUSTOMER , |
| ld_keydate | TYPE BAPI3007-KEY_DATE , |
| ld_balancespgli | TYPE BAPI3007-BAL_SGLIND , |
| ld_noteditems | TYPE BAPI3007-NTDITMS_RQ . |
This method supplies a customer's total balance at a given key date.
The total balance includes both standard and special general ledger
...See here for full SAP fm documentation
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 BAPI_AR_ACC_GETKEYDATEBALANCE or its description.
BAPI_AR_ACC_GETKEYDATEBALANCE - Customer account balance at a key date BAPI_AR_ACC_GETCURRENTBALANCE - Closing balance of customer account in current fiscal year BAPI_AR_ACC_GETBALANCEDITEMS - Customer account clearing transactions in a given time period BAPI_AP_ACC_GETSTATEMENT - Vendor Account Statement for a given Period BAPI_AP_ACC_GETPERIODBALANCES - Posting Period Balances per Vendor Account in Current Fiscal Year BAPI_AP_ACC_GETOPENITEMS - Vendor Account Open Items at a Key Date