Skip to Content
0
Former Member
Oct 29, 2012 at 04:50 PM

BAPI_SALESORDER_CREATEFROMDAT2 duplicates SO

53 Views

Hi;

I'm facing a problem, i've made a report that runs in background job, it takes a list of files from a UNIX Server and process each one by one inside a loop.

1) with this FM EPS_GET_DIRECTORY_LISTING y get the list of files to process

2) then i do a LOOP to the table with the returned list of files, at the begin of the loop i clean al Bapi tables and variables and place a WAIT UP TO 4 ECONDS.

3) i extract the data from the file with OPEN DATASET

4) i pass the data to BAPI table-fields

5) i validate that the sales order is not repeated by searching in a Z table where all the sales orders are (the unix txt files for sales ordes comes from the web).

6) execute BAPI BAPI_SALESORDER_CREATEFROMDAT2

7) go back to the begin of the loop

in my Z table i control if the Sales orders are recordered with 4 seconds of difference, the repeated sales order i check them in tcode VA02 and i see the sales orders with 1 second of difference.

I've read this post that faces the sames problem but whitout a positive answer http://scn.sap.com/message/10264963

Any help.

David Fúnez

Tegucigalpa, Honduras