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 CV01N Document not creating

Former Member
0 Likes
3,019

Hi Everybody

I am using the bapi fm BAPI_DOCUMENT_CREATE2 for craeting document for CV01n ..

BAPI_DOC_DRAW2-DOCUMENTNUMBER = wa_finaldata-doknr.
BAPI_DOC_DRAW2-DOCUMENTTYPE = wa_finaldata-dokar.
BAPI_DOC_DRAW2-DOCUMENTVERSION = wa_finaldata-dokvr.
BAPI_DOC_DRAW2-DOCUMENTPART = wa_finaldata-doktl.
BAPI_DOC_DRAW2-DESCRIPTION = wa_finaldata-dktxt.
BAPI_DOC_DRAW2-LABORATORY = wa_finaldata-labor.
BAPI_DOC_DRAW2-AUTHORITYGROUP = wa_finaldata-begru.
BAPI_DOC_DRAW2-STATUSEXTERN = wa_finaldata-stabk.
BAPI_DOC_DRAW2-WSAPPLICATION1 = wa_finaldata-dappl.


I am exporting the values ...Return no error message I am getting and sy-subrc = 0..



But Document not creating ..Pl. help me where is mistake ???



Thanks

Subhasis

9 REPLIES 9
Read only

Former Member
0 Likes
2,373

PL. help me ..If anybody came across CV01N T-code updation through bapi function module ???

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,373

do you commit? how are you using this bapi, in which context?

Read only

Former Member
0 Likes
2,373

You need to take a look at the RETURN structure (type BAPIRET2). Does that contain any error messages or other information?

Read only

0 Likes
2,373

RETURN structure (type BAPIRET2) does not contain any error messages ..Its Successful ..Then I am using 

BAPI_TRANSACTION_COMMIT is called but document not creating when checking in CV02N..


Pl. help all basic parameters I am passing ..

Read only

former_member192467
Active Participant
0 Likes
2,373

Hi,

Please check if the following parameters are filled properly:

originaltype

storagecategory


Also, check if BAPI_TRANSACTION_COMMIT is called.


Regards,

Renjith Michael

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,373

BAPI implementing FM shouml never fill sy-subrc, were you able to even put some EXCEPTION in your report?

Look at RETURN for error message(s) , type E or A

  • If none found use BAPI_TRANSACTION_COMMIT
  • If found use BAPI_TRANSACTION_ROLLBACK and provide some log to user

Hint: Refer to your course notes or the online documentation for 'Calling BAPIs from ABAP'

Regards,

Raymond

Read only

0 Likes
2,373

Thanks for ur reply...

But my BAPI returning no error message then I am using BAPI_TRANSACTION_COMMIT..But still

Document not creating ....

Thanks

Read only

0 Likes
2,373

Are there errors in SM13?

Read only

ashraf_usmani
Participant
0 Likes
2,373

Hello,


Do you use all conversion before doing the transaction ? if no please do.

Please use  BAPI_TRANSACTION_COMMIT

Hope it will help you

Regards

Ashraf