cancel
Showing results for 
Search instead for 
Did you mean: 

Doc is created frm BAPI_DOCUMENT_CREATE2 but not visible in CV02N

Former Member
0 Kudos

Hi Everyone,

I have created document through BAPI_DOCUMENT_CREATE2 and given the input values as below

DOCUMENTDATA:

DOCUMENTTYPE- DES

DOCUMENTDESCRIPTIONS:

LANGUAGE - EN

DESCRIPTION - TESTING FROM BAPI

OBJECTLINKS:

OBJECTTYPE - MARA

OBJECTKEY - 1000 MILES

DOCUMENTFILE:

WSAPPLICATION - TXT

DOCPATH - C:\USERS\V-KISHRK\DESKTOP

DOCFILE - WSDL.TXT

when i executed the function it returns Document number and other details, but when i check in CV01N with that document number

it showing error like data is not exsists.

DOCPATH and DOCFILE are from my desktop(local mechine).

Please tell me what input values i need to give.

Thanks,

Kishore

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Are you executing this FM in SE37 or in a Z-program?

As "when i executed the function it returns Document number and other details, " means the docement is generated in system.

Regards

Neelima

Daniel_KASIMIR
Participant
0 Kudos

Yes,

COMMIT WORK is important.

But the path should end with "\"

Are you using parameter pf_ftp_dest ?

When working from local machine it should be: 'SAPFTP'

When the application server shoul pull the document apply 'SAPFTPA' and place original in a share the application server can reach.

Regards

Daniel K.

Former Member
0 Kudos

Hi Daniel,

For which parameter i should give the name as 'SAPFTP'? I executed 'BAPI_TRANSACTION_COMMIT' after creating document, even still it is not showing up in CV02N anything else i have to do??

Thanks,

Kishore

Daniel_KASIMIR
Participant
0 Kudos

Hi Krishore,

CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'

EXPORTING

pf_ftp_dest = 'SAPFTPA'

....

IMPORTING

....

And perhaps see note 504692:

https://service.sap.com/sap/support/notes/504692

regards

Daniel

Former Member
0 Kudos

Hi Daniel,

I did mention the name as u said then i got the below error:

'Error while checking in and storing: C:\USERS\V-KISHRK\DESKTOP\WSDL.TXT'

Please tell me anything else i have to do??

Thanks,

Kishore

Daniel_KASIMIR
Participant
0 Kudos

I'm sorry Kishore,

I have no further idea.

Perhaps you can cut your code in serveral pieces and you just try to create the DIR without object linking and originals first.

If this works, try to attach the original. Do you use Abap to call the Bapi or an other language?

Regards

Daniel

Former Member
0 Kudos

Hi

Please do commit work with "BAPI_TRANSACTION_COMMIT" and check in cv02n.

Regards

Neelima