07-04-2013 10:18 AM
Hi Experts,
My requirement is that if the Process order system status is Revoked from TECO, then there should not be any further changes to Process Order.
I can get the status of Process order from the FM STATUS_READ by passing object number to the FM.
I tried to use the User exit - PPCO0018 -Check for changes to production order header
However it is not getting triggred upon changing the status of order from TECO to REL even if there are changes in the Order header .
Basic finish date CAUFVD-GLTRP
Basic start date CAUFVD-GSTRP
Also there is user exit PPCO0007 - Exit when saving production order
In this user exit there is one input parameter, two output parameter
Import parameter - HEADER_IMP
Export parameter - HEADER_EXP
NO_UPDATE
In HEADER_IMP all the updated parameters are being passed, I don't want these changes to be saved in the Process order.
Could you please let me know how can use these user exit so that there should not be any updates in the Process order.
Thanks
Vinay
08-08-2014 7:01 PM
Hi, this is an example of the implementation for the user-exit 'PPCO0007':
IF HEADER_IMP-PRCTR IS INITIAL.
NO_UPDATE = 'X'. " Reject the changes
ELSE
IF HEADER_IMP-FUNC_AREA EQ '101ABC'.
MOVE-CORRESPONDING HEADER_IMP TO HEADER_EXP. " Transfer to exporting parameter
HEADER_EXP-FUNC_AREA = '202ABC'. " Change the data
ENDIF.
ENDIF.
From SAP documentation:
User Exit for Checking or Changing Header Fields During Order Maintenance
This customer exit makes two functions possible:
Note that the data that is transferred from the customer exit in the export structure of the order header is no longer checked by the system. The person who uses the customer exit is therefore responsible for data consistency!
There are also fields that cannot be changed in the customer exit since they are reentered later in the program.
These include: the creator of the order, the last person to change it, the creation date and the change date. Also, when the order is created there are various number fields that are still filled with temporary numbers. These include; the order number if the system is working with an internal number assignment.
HEADER_IMP
NO_UPDATE
HEADER_EXP
XCO1
Hope it helps