Ansicht
Dokumentation

MCF20001 - PPIS: Statistics update of production orders

MCF20001 - PPIS: Statistics update of production orders

General Data in Customer Master   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

In the statistics update from the production orders, only data from the documents themselves is used as a rule.

If you wish to make use of additional data for the statistics update that is not contained in the documents, then you can determine this data via the user exit '001'.

Procedure:
  1. Defining the new data as fields in the ABAP/4 Data Dictionary.

The fields have to be included in the user structures provided. They are as follows: MCAFKOUSR (order header data), MCAFPOUSR (order item), MCAFVGUSR (order operation), MCCOMPUSR (material components) and/or MCKALKUSR (cost itemization) You can use append structures to do this.

  1. Determining the new fields in the user exits

Data from the production orders is made available to determine the field contents:

  • XMCAFKO, structure MCAFKOB (order header data)
  • XMCAFPO, structure MCAFPOB (order item)
  • XMCAFVG, structure MCAFVGB (order operation)
  • XMCCOMP, structure MCCOMPB (material components)
  • XMCKALK, structure MCKALKB (cost itemization)
  • X_STAT, structure MCFSTATUS (individual status for each object, sorted)
  • CONTROL, structure MCCONTROL (control parameter, for example to check whether normal updating or the setup of statistical data is required)

In addition the point in time (PA up to PF) at which you just called up the Shop Floor Information System is also transferred.

  1. Field catalogs

You need to include the new fields in field catalogs so that they can be used in the definition of info structures.

CAUTION !!!

You need to consider the following problems when using this user exit:

Updating changed documents

When document changes take place, the application always provides two types of data: the document data corresponding to the document status before the change, and the document data from after the change.

In the case of the data from before the document change, the statistics update takes back the statistical data that was originally updated (a negative posting). The system then uses the data from after the document change to carry out the normal statistics update.

If you now employ a use exit to determine additional data, then you have to ensure that this data has not been changed since the last change due to document changes or you need to ensure that you can also determine the old statuses of the data. You can recognize whether the old statuses have been processed by looking at the field SUPKZ in the structures provided. If SUPKZ = '1', this means that the old document data is now being processed. If SUPKZ = '2', this means that the new document status is available.

Example

LOOP AT xmcafko.
CALL FUNCTION xy ...
xmcafko-... = ...
MODIFY xmcafko.
ENDLOOP.

LOOP AT xmcafvg.
* Prüfen, ob Vorgang den Status FREI hat
READ TABLE x_stat WITH KEY
supkz = xmcafvg-supkz
objnr = xmcafvg-objnr
stat = 'I0002' " Status FREI, siehe Tabelle TJ02
inact = space
BINARY SEARCH.
IF sy-subrc EQ 0. " Status ist FREI
xmcafvg-... = ...
ELSE.
xmcafvg-... = ...
ENDIF.
MODIFY XMCAFVG.
ENDLOOP.






BAL Application Log Documentation   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 3706 Date: 20240329 Time: 133326     sap01-206 ( 59 ms )