24.8.11

SAP Note 26957 - Cust.enhancemt 2 of results analysis, doc.enhancemt

Symptom:

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

Cause and prerequisites

Missing documentation

Solution
Description of customer enhancement 2.

Customer enhancement 2 has been available since Release 2.2F. The corresponding applications were enhanced in Releases 3.0B and 4.0A.

Customer enhancement 2 has three applications:

  • The customer can import the planned values, either from tables, which are read using ABAP/4, or via a dialog box programmed by the user. In Customizing, the 'Profit basis' field must have the characteristic 'X' so that the planned values are determined this way.
  • As of Release 3.0B, the customer can change the planned values imported by the system. Here, the system imports the planned values according to the setting in the valuation method and branches to the customer enhancement prior to the results analysis accounting of each period. In Customizing, the 'Valuation basis' field must have an entry from value range '0-9' to make this possible.
  • As of Release 4.5, you can assign the actual values read by the system to other line IDs. You may not change the actual values in total. To allow this, field 'Valuation basis' in the Customizing should contain an entry from value range '0-9'-

To use customer enhancement 2, you have to execute several actions:

  • Include the customer enhancement using Transaction CMOD.
    • Create a project; this is not a project from SAP Project Management System.
    • Assign the SAP enhancement KKAG0001 to the project.
    • Choose the component EXIT_SAPLKKAG_002 from this enhancement; this is a function module.
    • The function module contains the include module ZXKAGU02. Branch to this include and maintain your program code there.
    • When your module is complete, activate the project.
  • Branch to the Customizing of Results Analysis and choose the maintenance of the valuation methods and branch to the detail screen.
    • If you want to import the planned values yourself, enter an 'X' in the 'Profit basis' field.
    • If you only want to change the data imported by the system, then enter a number from value range '0-9' in the 'Valuation basis' field. You can use the numbers to control the program flow in the function module. (This has been available as of Release 3.0B)

Interface of the function module EXIT_SAPLKKAG_002:

Import parameters
ABGRENZUNGS_SCHLUESSEL Results analysis key
ABGRENZUNGS_VERSION Results analysis version
BEWERTUNGSBASIS Valuation basis
BEARBEITUNGS_WAEHRUNG Currency of results 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 number
VBUP_POSNR Line item no. of the SD document
OBJEKTNUMMER Cost element itemization number
BEARBEITUNGS_PERIODE Period of processing
BEGINN_OFFENE_PERIODE First open period

CHANGING parameters
POSITIONS_NETTOERLOES Plan.revenue of line item no. of SD document
STRUKTURPLAN_ERLOES Work breakdown structure revenue
STRUKTURPLAN_KOSTEN Work breakdown structure costs
BASIS_PLANMENGE Plan.quantity of line item no. of SD doc.
BASIS_PLANMENGE_EINHEIT Header unit

Table parameters for data import and export
EXPORT_BASIS Table w. (actual and) plan.values for valuation
EXPORT_ISTTAUSCH Table for changing the actual data assignment

Exceptions
FEHLER_MIT_NACHRICHT Error with message from this module
FEHLER_OHNE_NACHRICHT Error without message from this module

The meaning of the import parameters is self-explanatory to a large extent. The 'Valuation basis' field contains the contents of the 'Valuation basis' field of the valuation method detail screen. The program flow in the function module can be controlled this way.
If you change the valuation basis (you are using valuation basis 0-9), BEARBEITUNGS_PERIODE contains the period for which the results analysis is just being carried out. Please take into account that the customer enhancement is first called for the closing period (i.e. for the period before the first open period to accrue). Thus, if you carry out the results analysis for exactly one period, the customer enhancement is called twice. If you are not interested in the data of the closing period, do not change the valuation basis until the condition "BEARBEITUNGS_PERIODE >= BEGINN_OFFENE_PERIODE" is met.
If you change the planned data (you use profit basis X), the customer enhancement is called once befor the periods are processed. Parameters BEARBEITUNGS_PERIODE and BEGINN_OFFENE_PERIODE are not filled.

The planned values not depending on cost elements are processed using the change parameters. The change parameters are declared as export parameters in Release 2.2.

The table 'EXPORT_BASIS' imports the actual and planned values imported by the results analysis program. The planned values are changed in the customer enhancement in table 'EXPORT_BASIS' or set up again, and then exported back to the results analysis program. Actual data changes in table 'EXPORT_BASIS' are ignored.

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 table 'EXPORT_BASIS' has an underlying structure. In the definitions of the specified domains, a list with fixed values, the meaning of which is also explained there, is predefined in each case. The ZLNID field is an exception; its allowed values are defined in the 'Update' table in Customizing.

The table 'EXPORT_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
ISTJHRKG *** currently not used ***
ISTJHRKF *** currently not used ***
ISTPERKG Actual period value, entire
ISTPERKF Actual period 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 ***

If you use the setting 'Profit basis = X', the value fields for planned and actual values are empty when the data is transferred to the function module. You can then enter the planned values after the data transfer.

If you use the setting 'Valuation basis = 0,1,2, ...,9', the value fields for the planned and actual values are provided with values when the data is transferred to the function module, and you can change the planned values once the data has been transferred.

Additional key words

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

Keyword: EXIT_SAPLKKAG_002, KKAG0001, ZXKAGU02


No comments:

Post a Comment