cancel
Showing results for 
Search instead for 
Did you mean: 

Create Document with attachment using BAPI

Former Member
0 Kudos

Hi,

I have task to create document (like in transaction cv01n) with some attachment using SAP XI.

File must to be in Content Server.

For this task I try to using:

1) SDOK_LOIO_CREATE_WITH_PHIO - create PHIO and LOIO with relationship between them

2) SDOK_PHIO_STORE_CONTENT - upload content to content server

3) BAPI_DOCUMENT_CREATE2 - create document and connect document to uploaded file

But I need to set up settings in ERP too.

So, in ERP I created:

1. In DMWB: Document Area, LOIO and PHOP Class, Connection Space (LOGOBJECT is Relationship Class u2013 from PHIO to LOIO)

2. In SPRO/SAP NetWeaver/KnowledgeManagment/ Settings in the Knowledge Warehouse System/ Content Management Service/Define Content Repositories I connect Repository with Document Area and in Define Content Repositories I connect Category with Document Area and Repository.

When I use SDOK_LOIO_CREATE_WITH_PHIO, everything is ok. It response me LOIO and PHIO idu2019s. When I use SDOK_PHIO_STORE_CONTENT, everything is ok too. But when I use BAPI_DOCUMENT_CREATE2 it don't create link to file (Error data carrier not defined). What can be wrong?

Accepted Solutions (0)

Answers (2)

Answers (2)

MangeshP
Active Contributor
0 Kudos

Dear Dmitry Rassakhatsky

Can you please elaborate what you are trying to achive using BAPI_DOCUMENT_CREATE02 and SAP XI.

We would be in better position to suggest solution.

Also most of us will not be able to understand Technical ABAP so request you to provide detail scenario.

With Warm Regards

Mangesh Pande

Former Member
0 Kudos

hi

check whether you are passing the data carrier values and also check whether the data carrier is set to the right path