Ansicht
Dokumentation

BAPI_SL_GETTOTALRECORDS - Special Purpose Ledger or New GL: Select Totals Records for Accounts

BAPI_SL_GETTOTALRECORDS - Special Purpose Ledger or New GL: Select Totals Records for Accounts

rdisp/max_wprun_time - Maximum work process run time   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

You can use this to call totals records for the Special Purpose Ledger. The following entries are mandatory: ledger, fiscal year, as well as the company code for local ledgers, and the global company for global ledgers. Additional selection criteria include the record type, version, account number, business area, cost center, profit center, functional area, controlling area, currency key, period, and indicator PERIOD_AGG, which produces a total for all periods selected. All fields have the following restriction: Data selection can only be performed if the technical fields names match the standard SAP names (for example, account number = RACCT).

The totals records are output in the table TOTALS_SPL. Customer-defined fields are not taken into consideration.

  • Customer fields:

For this reason, SAP enhancement GSL1021A was created.

  • Data selection with customer fields:
  • Using table ExtensionIn, you can include customer fields in your input parameters. It is recommended that you use table ExtensionIn, if you want to call up data for totals records from ZZ* or YY* summary tables, which you explicitly select with customer fields. You enter parameters in the parameter ExtensionIn. When doing so, you have to transfer a row that has the value "BAPI_TE_SPL_PARAMETER" in the field STRUCTURE. Enter values for all fields as parameters in the field VALUEPART1, entering the individual values without hyphens.

  • Note on data selection with customer fields:

Enter customer include CI_1021_INCLUDE_IN1 in your system in the structure BAPI_TE_SPL_PARAMETER with the desired fields.
  • Data output for customer fields:
  • The values for customer fields can be output using table EXTENSIONOUT.

  • Note on data output for customer fields:

To do this, enter include ZXSPLU01 in user exit EXIT_SAPL1021_001 and assign the customer fields from the work area TOTALS_LINE (structure GLU1).
Also, customer include CI_1021_INCLUDE_SUMTABLE_ZZ has to be created in your system with the desired output fields in structure BAPI_TE_SPL_SUMMARY_RECORD. Finally, a project for enhancement GSL1021A needs to be created with transaction CMOD and then activated. The output is in table form with the structure BAPIPAREX.

Example

You created table group ZZCUS and ledger Z1 for summary table ZZCUST. For each selected data record, the value for the account number (field RACCT), for example, is output in table TOTALS_SPL.

  • Selection with customer fields:

1 Create include CI_1021_INCLUDE_IN1 for the structure BAPI_TE_SPL_PARAMETER. For the selection using field ZZFIELD2, assign it to include CI_1021_INCLUDE_IN1 and activate it.

2 Make an entry in the first row of table EXTENSIONIN.

STRUCTURE: BAPI_TE_SPL_PARAMETER

VALUEPART1: 00010002 (0001: for row 1 (mandatory), 0002: value for ZZFIELD2)

  • Output of customer fields:

To output the value of field ZZFIELD (data element ZZDE) in table EXTENSIONOUT, for example, proceed as follows:

1 For the structure BAPI_TE_SPL_SUMMARY_RECORD, create include CI_1021_INCLUDE_SUMTABLE_ZZ and assign field ZZFIELD with data element ZZDE as a component and activate the include.

2 Create customer include ZXSPLU01 for the function module EXIT_SAPL1021_001. Assign the related value from the work area TOTALS_LINE (TOTALS_LINE has the structure GLU1) to the field CUSTOMER_ZZ-ZZFIELD:

move-corresponding totals_line to customer_zz.

Now, activate the include.

3 Create a project with transaction CMOD and assign the enhancement GSL1021A. Activate the project.

You obtain the following result for table EXTENSIONOUT:

STRUCTURE BAPI_TE_SPL_SUMMARY_RECORD

VALUEPART1 2 0001

The value 2 for VALUPART1 numbers the data record and allows an assignment to the related data record of the table TOTALS_SPL. The value 0001 represents the result for the field ZZFIELD.

Notes

Further information





Parameters

BUS_AREA
COMPANY
COMPANYCODE
COSTCENTER
CO_AREA
CURRENCY
EXTENSIONIN
EXTENSIONOUT
FISCALYEAR
FUNC_AREA
FUNC_AREA_LONG
GL_ACCOUNT
GRANT_NBR
LEDGER
PER
PERIOD_AGG
PROFIT_CTR
RECORDTYPE
RETURN
TOTALS_SPL
USE_ALT_C_STRUC
VERSION

Exceptions

Function Group

1021

BAL_S_LOG - Application Log: Log header data   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 7024 Date: 20240523 Time: 164750     sap01-206 ( 101 ms )