SAP Function /SPE/AAC_DETERMINATION - Account Assignment Categories Determination

Parameter Reference Type Length Default Optional Text
IP_CATEG /SPE/AAC_CATEG C 2 Account Assignment Category (EWM -- ERP)
IP_DATE SYST-DATUM D 8 X Validation Date
IP_DBBYP XFELD C 1 SPACE X Bypassing Buffers (for future versions)
IP_DELIM DELIM C 1 ';' Separator in Data Strings
IP_PACKER /SPE/AAC_ZIP C 8 'GZIP' X Name of the requested compression method (for future versions)
IP_PLANT WERKA C 4 Plant
IP_SYUNAME SYUNAME C 12 SPACE X User Name (mandatory)
IP_UNICODE XFELD C 1 X Unicode Flag (for future versions)

Parameter Reference Type Length Text
EP_FIELDCAT STRING g 0 Field Catalog (list of field names)
EP_INFO_ZIP STRING g 0 Table "Account-Information" in packed format
EP_PACK_DONE XFELD C 1 "Account-Information" and "Language Dependant Text Elements" have been packed
EP_SUBRC SYSUBRC I 4 User Return Code
EP_TEXT_ZIP STRING g 0 Table "Language Dependant Text Elements" in packed format

Parameter Reference Length Optional Text
TE_AAC_FIELDS /SPE/S_AAC_FIELDS 331 AAC - Object Attributes
TE_AAC_OBJID /SPE/S_AAC_OBJID 110 AAC - Object ID
TE_AAC_TEXT /SPE/S_AAC_TEXT 86 AAC - Language Dependent Texts
TE_RETURN BAPIRET2 548 Return Parameter
TI_EXTNUM /SPE/S_AAC_EXTNUM 45 AAC - External Object Number
TI_EXTNUMRA /SPE/S_AAC_EXTNUMRA 73 AAC - External Object Number Range
TI_INTNUM /SPE/S_AAC_INTNUM 64 AAC - Internal Object Number
TI_LANGU /SPE/S_AAC_LANGU 1 Language Code(s)

Functionality
AAC (Account Assignment Category) Determination
For a specified AAC, all defined elements will be returned for the givenplant.
If the Validation Date is not given, then the system fieldSY-DATUM will be taken.
If you want to restrict the search to specified objects, you need tofill the importing tables TI_INTNUM and/or TI_EXTNUMappropriately. With the importing table TI_EXTNUMRA, you canspecify ranges of objects.
Language dependant texts will be returned in the exporting tableTE_AAC_TEXT, according to the language ID entries in theimporting table TI_LANGU.
The exporting table TE_AAC_OBJID contains the resulting list ofall selected objects, e.g. the IDs of all Cost Centers.
The exporting parameter EP_FIELDCAT contains the names of thereturned fields, separated by the specified delimiter character., e.g."CSKS-KOKRS;CSKS-KOSAR;CSKS-WAERS".
The exporting table TE_AAC_FIELDS contains more detailedinformation about each object, whereas the object IDs are contained inthe exporting table TE_AAC_OBJID. The number of lines in theexporting table TE_AAC_FIELDS computes as follows: Number oflines in the exporting table TE_AAC_OBJID multiplied withthe number of fields which are specified in the exporting parameterEP_FIELDCAT.
The exporting table TE_RETURN contains several messages from theruntime of the module, which messages can be helpful in case of anunexpected error. Moreover, an application log will be written for eachdetermination. The application logs can be retrieved with transactionSLG1, parameter Program = /SPE/AAC_DETERMINATION.

Notes
An authority check will be done for the function module/SPE/AAC_DETERMINATION in function group /SPE/AACA. Anadditional authority check for the specified category will be done usingthe object /SPE/AAC, activity 16.

Further information
There are three BAdI Definitions which can be implemented at thecustomer's site:
/SPE/AAC_IN - Enhancement-Spot /SPE/AAC_DETERMINATION_IN:Add and remove fields from the standard field list (exporting parameterEP_FIELDCAT ), create Customer Defined Categories and change thecontents of the STATUS filter.
See also the example implementation /SPE/AAC_IN_EXAM, where theCategory "Z1" for the Data Base Table PROJ is added, the fieldAUFK-KALSM is assigned to the category "11" (Order) and thestatus "Settlement Rule exists" is added to category "12" (WBSElements).
/SPE/AAC_DB - Enhancement-Spot /SPE/AAC_DETERMINATION_DB:Data Base access for customer defined categories.
See also the example implementation /SPE/AAC_DB_EXAM, where aData Base read access is implemented for the customer defined examplecategory "Z1", and the resulting list of objects is distributed to thecorresponding exporting tables.
/SPE/AAC_OUT - Enhancement-Spot /SPE/AAC_DETERMINATION_OUT
: Handle the exporting tables (e.g.: delete specific lines from theresulting tables).
See also the example implementation /SPE/AAC_OUT_EXAM, wherelines can be removed from the exporting tables TE_AAC_OBJID,TE_AAC_FIELDS and TE_AAC_TEXT.