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_CREATE2 error

Former Member
0 Likes
1,678

Hi!!

I'm trying to create a document through BAPI_DOCUMENT_CREAT2, we fill everything and run, not an error but the document is not created,

follows the fields that I filled

DocumentType - DBE

DocumentNumber - 22224

DOCUMENTVERSION - 00

DOCUMENTPART - 000

DESCRIPTION - "TEST"

USERNAME - PTCABAP

STATUSEXTERN - SW

STATUSINTERN-W1

TABLE

DOCUMENTDESCRIPTIONS - LANGUAGE - EN

LANGUAGE_ISO - EN

DESCRIPTION - "TEST"

can someone help me?

thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,504

Hi,

You have to use FM BAPI_TRANSACTION_COMMIT afterwards.

Martin

8 REPLIES 8
Read only

Former Member
0 Likes
1,505

Hi,

You have to use FM BAPI_TRANSACTION_COMMIT afterwards.

Martin

Read only

0 Likes
1,504

Hi Martin!!!

I do commits but still it says the document does not exist!

In BAPI_TRANSACTION_COMMIT just run, right?

I can create the document through CV01N but i need create in BAPI_DOCUMENT_CREATE2.

I verify the BAPI_DOCUMENT_GETDETAIL2 and it's all ok.

Read only

0 Likes
1,504

Hi Paulo,

Right, you just have to call BAPI_TRANSACTION_COMMIT after you call BAPI_DOCUMENT_CREATE2.

Both FM have a return table parameter that you can use to see if there are any errors at the creation.

Martin

Read only

0 Likes
1,504

Hi Martin,

Both FM not return anything... No errors, however does not create the document.

suggestions?

ty

Read only

0 Likes
1,504

Hi Paulo,

It is strange, perhaps you could post some of the code you are using to call FM BAPI_DOCUMENT_CREATE2 to try to see what's wrong.

Martin

Read only

0 Likes
1,504

follows:

DocumentType - DBE

DocumentNumber - 22224

DOCUMENTVERSION - 00

DOCUMENTPART - 000

DESCRIPTION - "TEST"

USERNAME - PTCABAP

STATUSEXTERN - SW

STATUSINTERN-W1

TABLE

DOCUMENTDESCRIPTIONS - LANGUAGE - EN

LANGUAGE_ISO - EN

DESCRIPTION - "TEST"

Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
1,504

Hi Paulo,

check the below link may helpful for you.

http://scn.sap.com/thread/1639500

Regards,

Gurunath D

Read only

0 Likes
1,504

Hi Gurunath!

Not working =/