×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。




Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> UserExit>MCS10001



Index

MCS10001

User Exits from SIS
Usually only data is used from the documents themselves for the statistical update from the sales documents.
If you want to use additional data for the statistical update that is not included in the documents, use the user exits to determine this data.

User Exit '001' - Enhancement of data on the document header level
User Exit '002' - Enhancement of data on the item level

Procedure:

1. Definition of new data as fields in the ABAP/4 Data Dictionary
The fields must be incorporated into the user structures MCVBAKUSR (document header level) and MCVBAPUSR (item level) that have been designed for them.

2. Determining the new fields in the user exits
Data from the documents is made available to determine the field contents:

User Exit '001':
I_XMCVBAK (all fields from the document header - structure MCVBAKB)
I_XMCVBUK (all fields from the document status - structure MCVBUKB)
I_CONTROL (general updating control, for example, if it is a normal
update or the setup that is under consideration)

User-Exit '002':
I_XMCVBAK (all fields from the document header - structure MCVBAKB)
I_XMCVBUK (all fields from the document status - structure MCVBUKB)
I_XMCVBAP (all fields from the document item - structure MCVBAPB)
I_XMCVBUP (all fields from the item status - structure MCVBUPB)
I_CONTROL (general updating control, for example, if it is a normal
update or the setup that is under consideration), that is,
data from the document header will be provided in the item processing. If there is more than one item in the document, the user exit will then run more than once (for each individual item). When processing an item, no data will be available from the other items.

After determining the new field contents, they will be transferred to the update program via the structures E_XMCVBAKUSR (User Exit '001') und E_XMCVBAPUSR (User Exit '002').

3. Field catalogs
Incorporate the new fields into the field catalogs so that they can be used in the info structure definitions.

CAUTION !!!
Please take note of the following situations when using this user exit:

1. Updating with document changes

When there are document changes, the application gives you two types of data to use: the document data that correspond to the document status before the change and to the document data after the change.
When using data before the document change, the statistical update returns the originally updated statistical data (negative posting). A normal statistical update is executed using the new data.
If additional data is determined via user exits, you must first ensure that in document changes, this data was not changed since the last change or that the old data status can be determined. You can recognize the processing of the old status by the field SUPKZ in the structures. SUPKZ = '1' indicates that the old document data is now being processed and SUPKZ = '2', means that the new document status is available.

2. Data that is read twice

If you want to determine additional data from customer or material master records, then check whether an enhancement of the document data would be possible instead. In document processing, the master data is already read. If the document data is expanded by the additional fields that are necessary for the statistical update, they can then be made available when the master data is read in the document processing. User exits from document processing are also available here. A second
Function/Program:
  • EXIT_SAPLMCS1_001: SIS: User Exit for SD Document - Header Data
  • EXIT_SAPLMCS1_002: SIS: User Exit for SD Document - Item Data

02-Oct-2005