cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_DOCUMENT_CREATE2 when called in webdynpro

Former Member
0 Kudos

Hi all,

      When BAPI_DOCUMENT_CREATE2 is called in webdynpro abap it is not generating  correct document no.(10000000322 ) but when i execute seperately the correct number is getting generated (like AP01DRW1000230). i have checked giving the host name, pf_ftp_dest and pf_http_dest also, still its not working...

can anyone help me on this.

Thanks all,

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185241
Active Participant
0 Kudos

This function module returns docnr , it is correct ( number is correct )

To open the document you have to use following function module

'BAPI_DOCUMENT_CHECKOUTVIEW2'

'SCMS_DOC_READ'

'SCMS_BINARY_TO_XSTRING'

Before calling the FM  'BAPI_DOCUMENT_CHECKOUTVIEW2' you have to read data deom databse

select single * from dms_doc_files

     
into ls_dms

     
where doknr = lv_doc_num.

Here lv_doc_number is the number , returned by BAPI_DOCUMNET_CREATE2.

Please let me know if you have any problem

Thanks

Abhi

Former Member
0 Kudos

The number created is not correct, the number should be generated along with the plant and doc. type (ex: AP01DRW1000230). i am able to open the documents, i am not facing any problem with documents.

Former Member
0 Kudos

Issue Solved