cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI / FM to create or change Document Data in MM02 TCode.

Former Member
0 Kudos

Hi All,

I am searching for some FM / BAPI to Create or Change Document Data in MM02 TCode.

Document Data Tab is available inside Additional Data (Ctrl + F6).

Any one worked for similar requirement, please share your finding or some helpful suggesitions.

Thanking You All.

Accepted Solutions (1)

Accepted Solutions (1)

tomas_talpa
Active Contributor

Hi Ankit,

you can do it from the other side, i.e. change the object assignment in document -- see FM BAPI_DOCUMENT_SAVEOBJECTLINKS (and BAPI_DOCUMENT_GETOBJECTLINKS to understand the structure and content of table OBJECTLINKS).

Kind Regards

TomT

Former Member
0 Kudos

Hi Tom,

Thanks for the reply, but How can I create the Document Data if it does not exists?

tomas_talpa
Active Contributor
0 Kudos

With BAPI_DOCUMENT_CREATE (or BAPI_DOCUMENT_CREATE2) you can create the Document Inforecord (like in CV01N), object links included...

...hm, maybe I am misinterpreting your question, Ankit -- by "How can I create the Document Data" you mean:

  • create the document itself and and link to Material Master it one step, like in CV01N? then go with BAPI_DOCUMENT_CREATE;
  • or "create the view/tab "Document Data" in Material Master, like assigning already existing Document to material in MM02? then go with BAPI_DOCUMENT_SAVEOBJECTLINKS; the "action" of assigning Document to Material Master on tab "Document Data" of MM02 is equivalent to assigning Material Master to Document on tab "Object Links" of CV02N

TOmT

former_member970493
Discoverer
0 Kudos

Thank you Tomas!

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

tejyadav
Active Contributor
0 Kudos

Try with LSMW or BDC

Former Member
0 Kudos

Hi Tej,

Thanks for the reply, but I do not want to go for BDC/LSMW.

If some FM/BAPI is not existing I would prefer the Group of FM's as used by Standard SAP Code.

If have any relevent idea, please share.