Update Purchase requisition based on external operation of production order
During our recent ECC implementation, business requested that Service Material value (populated in user field : AFVGD-USR00) should be auto populated into a purchase requisition for an external operation.
The Purchase Requisition (PR) is created as soon as a Production order lines having Operation control keys relevant for external processing such as ‘EXTL’ or ‘EXTP’ is saved. In Standard SAP, PR is created with Operation text as a Material Description and it does not carry Material code in the PR material Code field. But to provide better visibility to buyer and supplier, business requested a PR to be created from Production order with external operations should address the following.
Purchase Requisition should be
- Auto populated Material code in PR with material code maintained in the “Service Matl” field in the Operation details screen for the external Operation number in Production Order(ref the screen Shot)
- Item long text: material text both short and long copied from the material master, engineering revision level to copy from basic data 1 of the material master.
The business also requested some pre-validations when performing auto population of material code.
For e.g.:
1. The service material code should begin with ‘SM_’.
2. Material should be available in MARA table.
3. Material and plant combination should exist in MARC table.
The validation errors should be visible on the operation details screen of the production order.
It took me some time to debug the end to end transaction to find out appropriate enhancement points to achieve different business requirements. I am listing down the enhancements used in table below.
I hope this is useful for others attempting to map similar requirements during automatic PR createdchanged when Production Order is createdchanged.
Enhancement Details:
Sequence |
Enhancement Type |
Enhancement Name |
Purpose |
1 | User – Exit | EXIT_SAPLCOVG_001 |
E.g. when there is no change to external operation or when an external operation is deleted etc.
|
2 | Spot | Enhancement spot – ES_SAPLCOZF
Point – PR:SAPLCOZFEX:SAPLCOZF_OLC_002EI |
|
3 | User – Exit | EXIT_SAPLCOZF_001 |
|
4 | Badi | WORKORDER_UPDATE
Method – AT_SAVE |
|
5 | Spot | Enhancement spot – ES_SAPLEBNE
Point – PR:SAPLEBNEEX:LEBNEF08_01EI |
|
6 | Badi | WORKORDER_UPDATE
Method – IN_UPDATE |
|
New NetWeaver Information at SAP.com
Very Helpfull