Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit PPCO0018 & PPCO0007 -Keep the Process order as it is once it is revoked from TECO

vinay_pasalkar
Participant
0 Kudos

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

1 REPLY 1

nmirandaghn
Participant
0 Kudos

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:

FU EXIT_SAPLCOZV_001

____________________________________________________

Short Text

User Exit for Checking or Changing Header Fields During Order Maintenance

Functionality

This customer exit makes two functions possible:

  • Changing data in the order header. For this purpose, the order header with the changed data can be transferred back to the calling program as export structure HEADER_EXP. The calling program then saves the data.

  • Checks that prevent the order being saved or changed. For this, the export parameter NO_UPDATE must be set to a non-initial value. The calling program then branches back to online processing. If data in the order header is changed and the parameter NO_UPDATE is set at the same time, then the changed data is adopted nonetheless. The data is thus available in online maintenance.

Notes

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.

Parameters

HEADER_IMP
NO_UPDATE
HEADER_EXP

Exceptions

Function Group

XCO1

Hope it helps