04-12-2015 1:19 PM
Hi ,
While calling transaction Co11 in background sometimes there is error due to locks .
The issue is that good issue and confirmation happens but not good receipt because of this error .
If the error is occurring during goods receipt , i have used "BAPI_PRODORDCONF_CANCEL'"
Do we need to write commit & rollback to revert the goods issue & confirmation
Call transaction C011....
if sy-subrc <> 0 .
BAPI_TRANSACTION_ROLLBACK
endif.
Kindly suggest
04-12-2015 5:58 PM
Hi,
Try
Commit work.
wait up to 5 seconds .
Hope it helpful,
Regards,
Venkat
04-13-2015 6:27 AM
Incase of error it is commiting hence i want a solution to rollback the goods issued
04-13-2015 8:57 AM
Hi Rachel,
BAPI_TRANSACTION_ROLLBACK, not works at here i think.
*/ optional part
WHILE.
CALL FM to do lock check.
if lock not exist.
exit.
else.
wait up to 1 seconds.
endif.
ENDWHILE.
* optional part/
Call transaction C011....
IF sy-subrc NE 0.
CALL "BAPI_PRODORDCONF_CANCEL'"
CALL 'BAPI_GOODSMVT_CANCEL'.
ENDIF.
regards,
Archer
04-14-2015 12:27 PM
I have tried reading locks using enqueue read & then removing locks throughs dequeue.
Also tried looping through BAPI & using wait statement & incase iof still error occurs "CALL "BAPI_PRODORDCONF_CANCEL"
But still I am getting RFC_USER error.
IS there any program where I can automate goods receipt , incase of RFC_error after confirmation.