Skip to Content
0
May 14, 2010 at 08:59 AM

Implicit Enhancement option not working in CO48

86 Views

Hello Experts,

Requirement is to update the Good Receipent field through the custom logic during the CO48, for this i am using the Implicit Enhancement option at the end of the Subroutine. This is the Subrotuine where Database commit statement is being executed and new created Production order from the Planned order is getting saved in DB.

In the Implicit Enhacmanet code, i am using the BAPI_PROCORD_CHANGE for updating the Goods receipent field by passing the created PO number.

When i debugg the code, my enhancement is working perfectly as i want.

Problem is:- but without debugging, Enhancement is being executed properly but GR field AFPO-WEMPF is not being affected by this.

To resolve this I added the statement WAIT up TO 2 sec just before the BAPI run and now in all the case with/without debugging the enhancement is working. (It seems as some time delay required between PO save and GR field save in DB)

If I use this WAIT statement then it will delay CO48 by 2 seconds so is there any other alternative??

Please suggest.

Regards

Jagesh