13.6.11

SAP Note 26002 - Cust.enhance 1 of results analysis, doc.enhance

Symptom:

Problems in handling customer enhancement 1 (user exit) of results analysis.

Cause and prerequisites

Missing documentation

Solution
Description of customer enhancement 1.

Customer enhancement 1 has been available since Release 2.2B. The interface has been enhanced for maintenance levels 2.2F, 3.0E, 3.0F and 4.0A.

Customer enhancement 1 has two applications:

  • On the one hand, the customer can add to the standard selection. This makes sense if his or her method deviates only a little from one of the methods displayed in the standard system. Here, the corresponding method in Customizing is chosen. The program imports all data, calculates the values according to the selected standard method, branches to the customer enhancement and carries out the individual, additional calculations programmed by the customer, branches back and saves the data.
  • On the other hand, the customer can program a method in the enhancement that deviates completely from the standard system. In this case, it is best to choose the final results analysis setting in Customizing. The program imports all data. All actual costs are copied to the sales costs. It branches to the customer enhancement; there the calculations predefined by the customer are carried out, it branches back and the data is saved.

To use customer enhancement 1, you must execute several actions:

  • Include the customer enhancement using Transaction CMOD.
    • Create a project; this is not a project from the SAP Project Management System.
    • Assign the SAP enhancement KKAG0001 to the project.
    • Choose the component EXIT_SAPLKKAG_001 from this enhancement; this is a function module.
    • The function module contains the Include module ZXKAGU01. Branch to this include and maintain your program code there.
    • When your module is complete, activate the project.
    • After transport, you must regenerate the function group in the target system. For this purpose, call function module EXIT_SAPLKKAG_001 in the ABAP/4 Function Library of the ABAP/4 Development Workbench and choose 'Function module > Gen. function group'.
  • Branch to the Customizing of results analysis and choose the maintenance of the valuation methods. On the detail screen, a letter is to be entered in the 'UsrFtn 1' field (user-defined function 1), which is also copied to the function module. If this field is empty, the module will not be activated.

Interface of the function module EXIT_SAPLKKAG_001:

Import parameters
ABGRENZUNGS_SCHLUESSEL Results analysis key
ABGRENZUNGS_VERSION Results analysis version
STEUERUNG_KUNDENERWEITERUNG_1 Control cust.enhancement 1/val.method
BEARBEITUNGS_GJAHR Fisc.year of res.analysis accounting
BEARBEITUNGS_PMONAT Period (month) of res.anal.accounting
BEARBEITUNGS_WAEHRUNG Currency of res.analysis accounting
COEP_KOKRS Controlling area
COEP_BUKRS Company code
AUFK_AUFNR Order number
PRPS_PSPNR Internal project line item number
PRPS_POSID Work breakdown structure element
VBUK_VBELN Sales and distribution document no.
VBUP_POSNR Line item no. of SD document
OBJEKTNUMMER Cost element itemization number
BASIS_PLANMENGE Planned quantity
BASIS_ISTMENGE Actual quantity

Table parameters for data import
IMPORT_ABGRENZUN Table w. values fr. calc. of imputed costs
determined automatically
IMPORT_BASIS Table w. actual + plan. values for valuation

Table parameters for data download
EXPORT_VERAENDER Table w. changes to values from calc. of
imputed costs

Exceptions
FEHLER_MIT_NACHRICHT Error with message from this module
FEHLER_OHNE_NACHRICHT Error w/o message from this module

The meaning of the import parameters is self-explanatory to a large extent. The 'STEUERUNG_KUNDENERWEITERUNG_1' parameter contains the content of the 'UsrFtn 1' field of the valuation method detail screen. The program flow in the function module can be controlled this way. The values of the imported and the exported tables relate to the year 'BEARBEITUNGS_GJAHR' and the period 'BEARBEITUNGS_PMONAT'.

The table 'IMPORT_ABGRENZUN' imports the values determined by automatic results analysis to the function module. The table 'IMPORT_BASIS' imports the actual and planned values.

The table 'EXPORT_VERAENDER' exports the change to results analysis data determined by the function module. That is, this table is empty if no data has been changed.

Error-related exceptions for extraordinary returns from the function module can be programmed with the statements

  • MESSAGE E300 WITH <... 2> <... 3> <... 4> RAISING FEHLER_MIT_NACHRICHT
  • RAISING FEHLER_OHNE_NACHRICHT


The tables of the interface have underlying structures. In the definitions of the specified domains, a list with fixed values is predefined in each case, the meaning of which is also explained there. The ZLNID field is an exception; its allowed values are defined in the 'Update' table in Customizing. The description 'Period value' refers to the change to a value in the period to be processed. The 'Cumulative value' is the total of all period values, totalled across all periods earlier than or equal to the period to be processed.

The table 'IMPORT_ABGRENZUN' has the structure 'XKAABGR'. The first three fields are the key fields.

Field Domain Meaning
ABGTY ABGR_ABGTY Results analysis form
AWKUS ABGR_AWKUS Transaction Creation/usage/balance
ZLNID ZEILEN_ID Line ID
ABGRKUMKG Accumulated value, total
ABGRKUMKF Accumulated value, fixed portion
ABGRJHRKG Annual value, total
ABGRJHRKF Annual value, fixed portion
ABGRPERKG Period value, total
ABGRPERKF Period value, fixed portion


The table 'IMPORT_BASIS' has the structure 'XKABASIS'. Only the first field is a key field.

Field Domain Meaning
ZLNID ZEILEN_ID Line ID
BEWKZ ABGR_BEWKZ Valuation indicator
KATEG KATEGORIE Category
ISTKUMKG Accumulated actual value, total
ISTKUMKF Accumulated actual value, fixed portion
ISTPERKG Actual period value, total
ISTPERKF Actual period value, fixed portion
ISTJHRKG Annual value, total
ISTJHRKF Annual value, fixed portion
PLANBEWKG Overall planned value, total
PLANBEWKF Overall planned value, fixed portion
ISTMNGKUM *** currently not used ***
ISTMNGPER *** currently not used ***
PLANMNG *** currently not used ***


The table 'EXPORT_VERAENDER' has the structure 'XKAVABGR'. The first three fields are the key fields.

Field Domain Meaning
ABGTY ABGR_ABGTY Results analysis form
AWKUS ABGR_AWKUS Transaction Creation/usage/balance
ZLNID ZEILEN_ID Line ID
ABGRVERKG Change of a value, total
ABGRVERKF Change of a value, fixed portion

Additional key words

The description 'Work in process calculation' is also used instead of the description 'Results analysis'.

Keyword: EXIT_SAPLKKAG_001, KKAG0001, ZXKAGU01, KKA3, KKA2

No comments:

Post a Comment