‎2011 Sep 07 9:21 AM
Hi All,
I am trying to Post GR at PGI.
I am using Badi DELIVERY_PUBLISH~PUBLISH_AFTER_SAVE for writin gthe code.
There i am calling BAPI - BAPI_GOODSMVT_CREATE for movement type 101.
But i am getting a dump for as Delivery does not exist.
System is successfully create the std Mat.doc for PGI but while creating Mat.doc. from my code it is throwing a dump.
PLease suggest.
Thnx
RK
‎2011 Sep 07 11:01 AM
Hi RK,
Is the error coming at creation of delivery or in change delivery mode? If it is at creation then in DELIVERY_PUBLISH~PUBLISH_AFTER_SAVE you will get the delivery number but it will not be commited to database
at this time hence BAPI_GOODSMVT_CREATE wii give error as the delivery does not exist.
To overcome this you can bundle your entire code written in for Posting GR in a function odule and then call this FM in background task in the BADI.Please refer syntax of calling FM in background task if you are not aware of it.
And dont forget to make this FM as Remote Enabled in FM properties
Thanks,
Pawan Gore
‎2011 Sep 07 11:01 AM
Hi RK,
Is the error coming at creation of delivery or in change delivery mode? If it is at creation then in DELIVERY_PUBLISH~PUBLISH_AFTER_SAVE you will get the delivery number but it will not be commited to database
at this time hence BAPI_GOODSMVT_CREATE wii give error as the delivery does not exist.
To overcome this you can bundle your entire code written in for Posting GR in a function odule and then call this FM in background task in the BADI.Please refer syntax of calling FM in background task if you are not aware of it.
And dont forget to make this FM as Remote Enabled in FM properties
Thanks,
Pawan Gore
‎2011 Sep 07 11:09 AM
‎2011 Sep 12 11:46 AM
It is not working......
System is giving dump....as
Short text
The current application triggered a termination with a short dump.
Short text of error message:
Delivery does not exist
Long text of error message:
Diagnosis
The delivery you specified does not exist.
This document may have been archived.
Procedure
Check the delivery number you entered.
If the delivery has only just been added, it is possible that it
has not yet been posted. If this is the case, repeat the
transaction again later. If the error message still appears, inform
your programming team or system administrator.
I tried with Background..but code didnt work...couldnt debug as background process...
Please suggest .....
‎2011 Sep 15 10:18 AM
Hi All,
Finally it is working.
As suggested by Pawan, I wrote all the code in a ZFM
then i called my ZFM in the same badi DELIVERY_PUBLISH in method PUBLISH_AFTER_SAVE.
Thats it.........
Thanks Pankaj and all for there useful reply.
RK.
Edited by: Rahul Keshav on Sep 21, 2011 6:30 PM