Application Development 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: 

BAPI_DOCUMENT_CREATE2 CV01N Document not creating

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Sandra_Rossi
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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 ..

former_member192467
Active Participant
0 Kudos

Hi,

Please check if the following parameters are filled properly:

originaltype

storagecategory


Also, check if BAPI_TRANSACTION_COMMIT is called.


Regards,

Renjith Michael

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

Thanks for ur reply...

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

Document not creating ....

Thanks

0 Kudos

Are there errors in SM13?

ashraf_usmani
Participant
0 Kudos

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