Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_DOCUMENT_CHANGE2 in a batch program

Former Member
0 Likes
533

We are using Function Module BAPI_DOCUMENT_CHANGE2 to process Vendor Safety DMS records in batch processing. There may be several hundred to several thousand records on any given night. The job is scheduled to run one time per night. It runs under the username of BATCH. Virtually, every night we get one or both of these errors, which cause the job to end in error status. We are not sure why the errors occur or how to trouble shoot. Any suggestions would be appreciated.

1) ONSHORE_SAFETY_RATING .... Document &1 does not exist

Example: &1 = CN1/1102364/*

2) Document CN1/1100058/000/00 is locked by BATCH

Thanks,

-don.

2 REPLIES 2
Read only

Former Member
0 Likes
429

Hi

It also depends upon the dependency of the records and also the connectivity.

Can place some wait after each record is processed. This will be helpful to unlock the record.

Regards

Shiva

Read only

Former Member
0 Likes
429

Sorryfor the delay in closing this out. I put a wait in the program of 5 seconds which resolved the record loclking. We had to write a custom program to delete orphan records from the DRAD table for the other error.

Thanks,

-don.