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

Add documents to materials via BAPI

Former Member
0 Likes
1,965

Hi,

I want to add a document to a material (transaction mm01 --> additional data --> Document data) via BAPI.

I am using the BAPI BAPI_MATERIAL_CREATE2 to create the material, but I can not find the import parameter to pass the document.

Does another BAPI exist, or where can I find the relation between the material and the document?

Please provide me with some information about this.

Many thanks for your help,

Christoph

1 ACCEPTED SOLUTION
Read only

hadiman_ngoei
Product and Topic Expert
Product and Topic Expert
0 Likes
1,438

Check out for Business object DRAW, a number of methods are available to create a document and link it with the material.

Thanks and regards,

Hadiman

3 REPLIES 3
Read only

hadiman_ngoei
Product and Topic Expert
Product and Topic Expert
0 Likes
1,439

Check out for Business object DRAW, a number of methods are available to create a document and link it with the material.

Thanks and regards,

Hadiman

Read only

0 Likes
1,438

Hi Hadiman,

many thanks for your answer. I got checked it out and at the end I am going to use the

BAPI bapi_document_saveobjectlinks. This should be fine to fullfill my requirements.

Best regards,

Christoph

Read only

former_member694032
Discoverer
0 Likes
1,438

After using BAPI bapi_document_saveobjectlinks.

you have to use

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

it works well