2013 Nov 20 4:55 AM
I have came across a requirement:
While saving production order (CO01) transaction, saved is performed after release.
Out of four operations from production order first two should get automatically confirmed.
Say i have four oprations:
The first two operation PRESS 2 & AGEING MACHINE should get confimed while saving prod order.
The problem is i am using Smod Enhancement PPCO0001.
FM->EXIT_SAPLCOBT_001
INCLUDE ZXCO1U01.
here i am calling a BAPI ('BAPI_PRODORDCONF_CREATE_TT')
to automatic posting of confirmation of first two operations.
While passing production order no to this bapi(aufnr),
Error message are returned in return parameter of this bapi.
Order no ** is not found.
This is becoz, order no is generated by transaction but not has been
committed in database.
And also i cant use COMMIT WORK AND WAIT in USEr exit.
Suggest something which helps.
2013 Nov 20 5:05 AM
Hi Abhishek
You can not do this here as order is not generated plus even if it is genearated it will be locked. Tell me one thing when you create production order check in SWEL does any event gets raised? (dont forget to switch on the trace in SWELS before creating the order). If some CREATED event is getting raised you can then attach you function module as receiving one in SWETYPV and create confirmations
Nabheet
nabheet,
i am using z Function group ZFG_TMP. (See screenshot posted above)
anyways, i have copied entire function module manually(along with import export parameters).
now i need some hint to proceed furthur,
Seconldy you will have to create a wrapper FM2 which will be RFC enabled and contains the code to confirm the operations.
You will call this FM2 function module in FM1 as a background task so that you will able to commit also.
now,i have created second FM -> Zfm2_afvc_pm.
in which parameter do i have to pass FM2 (Zfm2_afvc_pm)
in FM1 (ZSWW_WI_CREATE_VIA_EVENT_AFVC).
Also,Where do i have to call FM1??
And what are the import export paramters of FM2(wrapper FM)?
2013 Dec 04 9:38 AM
FREBUS2012 is also visible in my system.
but QCYBUS2012 is not visible.
this buisness object is displayed in logs in SWEL after po is created.
What exactly is this? and from where it can be viewed.
2013 Dec 04 9:43 AM
Sometimes the events can also be raised via SWEC. Where you can maintain the business objects which are still not created.
Nabhete
2013 Dec 04 10:45 AM
another series of questions evolved into my mind. when i opened transaction SWEC.
Leave it for tomorrow Q & A.
2014 Feb 20 10:05 AM
HI nabheet,
i was wondering once again this requirement.
i have created wrapper FM ( 2nd function module) to confirm some operations in prod order.
But something weird is happening.
For debugging, i am not calling 2nd FM in background task.
In 2nd FM whenever this select statement is executed , session closes(not all 6 sessions, but the 1 which i am debugging.).
the problem i feel may be: select commands can not be executed in update debugging.
But how i'll be able to write perfect code for confirmations with out debugging.
There may be some way out for debugging.??
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |