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

DIS not created with BAPI_DOCUMENT_CREATE2 (commit)

Former Member
0 Likes
1,076

Hi experts,

I am receiving a weird issue when I try to create a document info record with BAPI_DOCUMENT_CREATE2.

There is a document number returned, but the info record is not being created.
I have tried it 'COMMIT WORK AND WAIT' as well as BAPI_TRANSACTION_COMMIT (with waiting and without).

Here is what I tried:

Test data:

Test sequence (based on note 2622784):

Result:

DIS has not been created (CV03N):

The weird part is:

If I run it a second time, the exact same number is returned and the document info record is created.

I tried it in a custom fm with a 'WAIT UP TO X SECONDS' (10 - 60 seconds), but no luck.

Any ideas on that?


Thanks in advance!

Kind regards

Tim

2 REPLIES 2
Read only

ziolkowskib
Active Contributor
0 Likes
948

Hi,
Do you get any information in RETURN structure after the execution?
Do you encounter any dumps in ST22 after BAPI execution?
Regards,
Bartosz

Read only

Former Member
0 Likes
948

Hi Bartosz,

ST22 is clean and the return structure is empty.
As mentioned before:

After calling the bapi and do the bapi_transaction_commit (wait = X), I am doing a select on draw, but there is no entry.

Afterwards I run the bapi, within the same fm, and doing a commit again.

Then, the inforecord is created, with the same number, already returned in the first call.

The issue is: we need to call the bapi via rfc, so this workaround is not working for us.

I appreciate any ideas.

Thanks!

Kind regards

Tim