|
We have a situation
where the Marketing Team keeps making changes to existing sales orders.
These changes are often not communicated to the production team, leading
to the creation of products that are not in sync with the updated sales
orders.
Could someone help us with the further process steps to be followed? Any documentation would be appreciated. This is related to the S4Hana Public Cloud Edition. Solution 1: One way to help the production team is to develop a customized report. You can then schedule it to run in the background and automatically email any changes at the start of the workday. Program logic look like this: Check for open Sales Order by date range and open status using the following tables. Table
VBAP - Sales Document: Item Data
VBUK - Sales Document: Header Status and Administrative
Data
VBUP - Sales
Document: Item Status
After getting the open Sales Order data, use the following tables to retrieve the change information. Table
CDPOS - Change document items
Solution 2: 395569 - CHECKLISTSD: Change Outputs Symptom When certain attribute values in documents are changed, the system must automatically create a change output. This requires customer-specific adjustments as the standard SAP system does not support change outputs processing. This note provides modification instructions and does not claim to be complete. Internal program structures may change in different releases, so no guarantee is provided for this note (see also Notes 381348 and 170183). Customizing Settings For the output type on which the change output is based,
make the following settings in Customizing (detail view of an output type):
Change Outputs Section: Assign a form routine (field label: ‘T685B-AROUT’) from the program (field label: ‘T685B-APROG’) to the output type. Do not use the form routine of a print program. Process If the same output is found during new document processing, the assigned routine is executed by an external program call (performed in the subroutine NNAST_AENDE_CHECK of the include LV61BFON). The routine must set a return code using the system field SY-SUBRC. If the value is zero, the system creates an output; if the value is other than zero, it does not create an output. If the system creates an output, it sets the “Change message” indicator in the output record (field NAST-AENDE). Since output determination starts during document processing,
it is recommended to run the routine in the relevant programs. This ensures
the required data of the document (old and new status) is available. Use
the following programs and assign the required form routines to the includes
of the relevant user exits:
The most important data is available in internal tables
or structures. The record layout generally corresponds to the basic tables.
Variables for the new and old status are available for comparisons. The
old status refers to data read before changes, while the new status refers
to current data. This affects the following internal structures and tables:
The Y variables contain the old data, and the X variables contain the new data (except for the current order header). Objects are represented by a header structure (K) and an item table (P). For sales orders, an additional schedule line table (E) exists. Procedure Example The procedure can be illustrated by a simple example. If an item is added to an order or deleted from an order, the confirmation (output type BA00) must be printed again. All other changes are ignored. Form Routine Creation: First, create a form routine ZZ_ITEM_CHECK in the user exit MV45AFZZ. The source code may look as specified below. If the change indicator is set to “Insert (I)” or “Delete (D)”, the change is relevant, and the return value is set to zero. As a result, the system creates a change output. By processing the output, the relevant print program is executed, printing out the complete order confirmation. Important Remarks: Identical Outputs: Within identical outputs, there can be only one output that is not processed. If several relevant changes to an object are performed one after the other and the relevant output is not immediately processed, the old output receives a new timestamp. This is not relevant in the above example because the system always prints the complete confirmation. A problem occurs if the last change restores the initial status before the last printout: The system prints the same confirmation. This can be avoided if the change history of an object is available (see change documents). It is also useful to print out only the actual changes, i.e., the items that have been changed. Unprocessed Outputs: If there is a relevant change and subsequently, an output is created but not processed, and then an irrelevant change is performed in the document, the output that has not been processed yet must be retained. Reason and Prerequisites There are clarification requirements and information requirements in the environment of change outputs. Solution As mentioned above, a general solution is not available. This note is intended to be used as instructions. Important: This is a modification. See Note 170183. Note: SAP will not deal with the implementation and testing of source code in the SAP standard system. Sample Source Code Include MV45AFZZ:
SY-SUBRC = 4.
ENDFORM.
|
|
See Also
Get help for your SAP SD problems
SAP Sales and Distribution Books
Delivery Hints
SAP Sales and Distribution Tips
Main Index
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|