Ansicht
Dokumentation

JYMDISJ1 - IS-M/MDIS: Enhanced Statistics Update for Sales Orders

JYMDISJ1 - IS-M/MDIS: Enhanced Statistics Update for Sales Orders

ABAP Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Data from the sales documents and some data enriched in the standard system is used for the statistics update from the sales orders.

The sales order data is structured from an LIS perspective in a three-level order hierarchy consisting of header - item - schedule line. Since the partner and delivery viability assignments can further subdivide the time slice for an item, a fourth hierarchy level containing partner and delivery viability assignment data has been added under the schedule line.

If you now want to use further data for the statistics update that is not available as standard, you can obtain this data by means of user exits available on each of the four hierarchy levels:

  • User exit '100' - Data enrichment at document header level
  • User exit '101' - Data enrichment at item level
  • User exit '102' - Data enrichment at schedule line level
  • User exit '103' - Data enrichment at partner/del.via.assgmt level

Procedure

  1. Define new data as fields in the ABAP/4 Data Dictionary
The fields must be added to the user structures provided for this purpose, MCJKAKUSR (document header level), MCJKAPUSR (item level), MCJKEPUSR (schedule line level) and MCJKPAZUSR (partner/delivery viability assignments).
  1. Determining new fields in user exits
Data from the documents is provided for use in determining the fields:
User exit '100':
  • I_XMCJKAK (all fields from current document header - structure MCJKAKB)

  • I_CONTROL (general update control, e.g. normal update or recompilation)

  • T_XMCJKAK (all document headers in table - structure MCJKAKB)

User exit '101':
  • I_XMCJKAK (all fields from current document header - structure MCJKAKB)

  • I_XMCJKAP (all fields from current document item - structure MCJKAPB)

  • I_CONTROL (general update control, e.g. normal update or recompilation)

  • T_XMCJKAK (all document headers in table - structure MCJKAKB)

  • T_XMCJKAP (all document items in table - structure MCJKAPB)

This means data from the document header is also offered in item processing. If the document contains several items, the user exit is repeated for each item. When processing an item, both the interface tables and data from other items are available.
User exit '102':
  • I_XMCJKAK (all fields from current document header - structure MCJKAKB)

  • I_XMCJKAP (all fields from current document item - structure MCJKAPB)

  • I_XMCJKEP (all fields from current doc.sch.line - structure MCJKEPB)

  • I_CONTROL (general update control, e.g. normal update or recompilation)

  • T_XMCJKAK (all document headers in table - structure MCJKAKB)

  • T_XMCJKAP (all document items in table - structure MCJKAPB)

  • T_XMCJKEP (all document schedule lines in table - structure MCJKEPB)

This means data from the document header and item are also offered when processing schedule lines. If a document item contains several schedule lines, the user exit is repeated for each schedule line. When processing a schedule line, both the interface tables and data from the other schedule lines are available.
User exit '103':
  • I_XMCJKAK (all fields from current document header - structure MCJKAKB)

  • I_XMCJKAP (all fields from current document item - structure MCJKAPB)

  • I_XMCJKEP (all fields from current doc.sch.line - structure MCJKEPB)

  • I_XMCJKPAZ (all fields from current part/dVia ass.- structure MCJKPAZB)

  • I_CONTROL (general update control, e.g. normal update or recompilation)

  • T_XMCJKAK (all document headers in table - structure MCJKAKB)

  • T_XMCJKAP (all document items in table - structure MCJKAPB)

  • T_XMCJKEP (all document schedule lines in table - structure MCJKEPB)

  • T_XMCJKPAZ (all partner/deliv.viability assgmts - structure MCJKPAZB)

This means data from the document header, item and schedule line is also offered here. If there are several assignments, the user exit is repeated for each assignment. When processing an assignment, both the interface tables and data from the other assignments are available.
Once the new field contents have been determined, they are passed on to the update program by means of the following structures:
E_XMCJKAKUSR (user exit '100'), E_XMCJKAPUSR (user exit '101'), E_XMCJKEPUSR (user exit '102') or E_XMCJKPAZUSR (user exit '103')
  1. Field catalogs
The new fields must be added to field catalogs so that they can be used in defining info structures.
CAUTION
The following problems must be taken into account when using these user exits:
Updating changes to documents
The application always provides two kinds of data for document changes: document data corresponding to the version of the document before the change and document data after the change.
The statistics update uses the data before the document change to cancel the statistics data originally updated (negative posting). The new data is then used to perform the normal statistics update.
If additional data is now determined using user exits, you must ensure that this data has not been changed since the last document change or that the old version of the data can be maintained. The processing status of old versions is indicated by the entry in field SUPKZ in the structures provided. The entry '1' indicates that the old document data is currently being processed and '2' indicates that the new document version is available.





TXBHW - Original Tax Base Amount in Local Currency   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 7699 Date: 20240425 Time: 094411     sap01-206 ( 86 ms )