Fonction SAP BAPI_SL_GETTOTALRECORDS - Special Purpose Ledger: Select totals records for accounts

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
BUS_AREA BAPI1021_1-BUS_AREA C 4 X Business area
COMPANY BAPI1021_1-COMPANY C 6 X Company
COMPANYCODE BAPI1021_1-COMP_CODE C 4 X Company code
COSTCENTER BAPI1021_1-COSTCENTER C 10 X Cost center
CO_AREA BAPI1021_1-CO_AREA C 4 X Controlling area
CURRENCY BAPI1021_1-CURRENCY C 5 X Currency Key
FISCALYEAR BAPI1021_1-FISC_YEAR N 4 Fiscal year
FUNC_AREA BAPI1021_1-FUNC_AREA C 4 X Functional area
FUNC_AREA_LONG BAPI1021_1-FUNC_AREA_LONG C 16 X Functional Area
GL_ACCOUNT BAPI1021_1-GL_ACCOUNT C 10 X Account number
GRANT_NBR BAPI1021_1-GRANT_NBR C 20 X Grant
LEDGER BAPI1021_1-LEDGER C 2 Ledger
PER BAPI1021_1-PERIOD C 3 X Period
PERIOD_AGG BAPI1021_1-PER_AGG C 1 'X' X Indicator: Aggregate over periods
PROFIT_CTR BAPI1021_1-PROFIT_CTR C 10 X Profit Center
RECORDTYPE BAPI1021_1-REC_TYPE C 1 '0' X Record type
VERSION BAPI1021_1-VERSION C 3 '01' X Version

Paramètre Reférence Type Long. Description
RETURN BAPIRET2 u 548 Return parameter

Paramètre Reférence Long. Facultatif Description
EXTENSIONIN BAPIPAREX 990 Customer enhancement entry parameters
EXTENSIONOUT BAPIPAREX 990 Customer enhancement output for customer fields
TOTALS_SPL BAPI1021_TOTALS_SPL 336 Totals records (without customer fields)

Functionality
With this method you can call up totals records for theSpecial Purpose Ledger.The following entries are mandatory: ledger, fiscal year, as well asthe company code for local ledgers and the global company for globalledgers. Additional selection criteria include the record type,version, account number, business area, cost center, profit center,functional area, controlling area, currency key, period, and indicatorPERIOD_AGG, which produces a total for all periods selected. All fieldshave the following restriction: Data selection can only be carried outif the technical fields names match the SAP standard names (forexample, account number = RACCT).
The totals records are output to table TOTALS_SPL. Customer-definedfields are not considered.

  • 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 inputparameters. We reccommend you use table ExtensionIn, if you want tocall up totals records from ZZ* or YY* summary tables, which youexplicitly select with customer fields. You enter parameters in theparameter ExtensionIn. When doing so, you have to transfer a row thathas the value "BAPI_TE_SPL_PARAMETER" to the field STRUCTURE. Entervalues for all fields as parameters in the field VALUEPART1, enteringthe individual values without hyphens.
      Note on data selection with customer fields:
      Enter customer include CI_1021_INCLUDE_IN1 in your system in thestructure 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 andassign the customer fields from the work area TOTALS_LINE (structureGLU1).
        Also, customer include CI_1021_INCLUDE_SUMTABLE_ZZ has to be created inyour system with the desired output fields in structureBAPI_TE_SPL_SUMMARY_RECORD. Finally, a project for enhancement GSL1021Aneeds to be created with transaction CMOD and then activated. Theoutput 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 (fieldRACCT) for example, is output in table TOTALS_SPL.

        • Selection with customer fields:

        • 1. Create include CI_1021_INCLUDE_IN1 for the structureBAPI_TE_SPL_PARAMETER. For the selection using field ZZFIELD2, assignit 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 (required), 0002: value forZZFIELD2)
          • Output of customer fields:

          • To output the value of field ZZFIELD (data element ZZDE) in tableEXTENSIONOUT for example, proceed as follows:
            1. For the structure BAPI_TE_SPL_SUMMARY_RECORD create includeCI_1021_INCLUDE_SUMTABLE_ZZ and assign field ZZFIELD with data elementZZDE as a component and activate the include.
            2. Create customer include ZXSPLU01 for function moduleEXIT_SAPL1021_001. Assign the related value to fieldCUSTOMER_ZZ-ZZFIELD from the work area TOTALS_LINE (TOTALS_LINEcontains the structure GLU1):
            Move-corresponding totals_line to customer_zz.
            Now, activate the include.
            3. Create a project with transaction CMOD and assign the enhancementGSL1021A. Activate the project.
            You obtain the following result for table EXTENSIONOUT:
            STRUCTURE BAPI_TE_SPL_SUMMARY_RECORD
            VALUEPART1 2 0001
            Value 2 for VALUPART1 numerates the data record and allows anassignment to the related data record of table TOTALS_SPL. The value0001 represent the result here for field ZZFIELD.

            Notes

            Description
            This table contains the return messages from the method call.

            Value range
            Type ID Nummer Text
            E GLBP 005 Ledger & does not exist
            E GLBP 020 Ledger & is not a Special Purpose Ledger
            E GU 606 Enter a company code for local ledger &
            E GI 702 Specify company code
            E GU 608 Enter a global company for global ledger &
            E GU 609 Enter a valid global company
            E GLBP 024 No field &4 exists in ledger &1 for &2 &3
            E GLBP 029 Error during conversion of enhancement &1(parameter &2, structure &3)
            S GI 306 No data has been selected
            E GU 444 No information found
            S GLBP 009 & Data records were not transferred due to lack ofauthorization
            S GLBP 011 No data record (from &) displayed due to missingauthorization
            S GLBP 010 Trans.currency not displ. for group valuation orPC valuation of ledgers
            E B1 537 & initial v, currency amount & in & wastransferred without a currency

            Description
            This parameter is used to make selections per businessarea. If no entry is made, all business areas are selected.

            Description
            This required parameter for global ledgers is used to select aglobal company.

            Description
            This required parameter is used to select the company code. You canfind information on company codes in the data element documentationcompany code.

            Description
            This parameter is used for the selection of a cost center
            . If no value is entered, all cost centers are selected.

            Description
            This optional parameter is used to select the controllingarea.

            Description
            This parameter is used to select the currency key.

            Description
            This required parameter is used to select the fiscal year
            .

            Description
            This parameter is obsolete. Use parameter FUNC_AREA_LONGinstead.

            Description
            This optional parameter is used to select the functionalarea.

            Description
            This parameter is used to select the account number. If no value isentered, the system selects all accounts.

            Description
            This optional parameter is used to select the grant
            .

            Description
            With this parameter, you select the ledger for the dataselection.

            Description
            The entry of a posting period allows you to selecttotals records for individual periods.

            Description
            If this parameter is set, the data is totaled at the period level. Ifno posting period is entered, the data is summarized for the fiscalyear.

            Description
            This optional parameter is used to select a profit center
            . If no value is entered, the system selects all profit centers.

            Description
            By selecting a record type you specify whether actualor plan data is to be selected. If no value is entered, both actual andplan data is selected.

            Default
            The default value is "0": Actual data

            Description
            This parameter is used to specify the version.

            Default
            The default value for the version is "001": Actual data

            Description
            Using the table ExtensionIn, you can include customer fields in theinput parameters. Use of table ExtensionIn is recommended if you callup data from summary tables ZZ* or YY*, in which case you areexplicitly selecting the customer fields.

            Description
            The values for customer fields can be output using table EXTENSIONOUT.

            Description
            The output of the selected totals records is carried out in tableTOTALS_SPL. Customer-defined fields are not included.