cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI Object Links Classification

Former Member
0 Kudos

Hello,

I am using BAPI_DOCUMENT_CREATE2 for creating document info records, which works great. I make an object links to an equipment number and you can classify this object link in CV02N with class 048 object link. This also works in transaction CV02N, but how can i classify the object links in the BAPI?

Kind regards,

Nick

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Fixed the problem to put the classications on the picture instead

christoph_hopf
Advisor
Advisor
0 Kudos

Dear Nick,

to achieve this the BAPI_DOCUMENT_CREATE2 is not the correct one. This BAPI only allows to create document info records and do nearly the same actions as in CV01N. But here it is not possible to classify object links.

For this specific case the following BAPI sequence could be useful:

BAPI_OBJCL_GETDETAIL - read the existing classification data

BAPI_OBJCL_CHANGE - edits the classification data

BAPI_TRANSACTION_COMMIT - necessary to write the whole changes to the database.

Instead of BAPI_OBJCL_CHANGE you can also use BAPI_OBJCL_CREATE to generate an assignment.

Further information on these BAPIs you will find in transaction BAPI under Cross-Application Components >> Classification.

Best regards,

Christoph

Former Member
0 Kudos

Hi Nick,

You should be able to create a Document info record with a link to an object with the BAPI you stated.

Find below an example of the code you should be using.

    • Object link to material master

CLEAR lt_drad.

REFRESH lt_drad.

lt_drad-objecttype = 'MARA'.

lt_drad-objectkey = 'M4711'.

APPEND lt_drad.

Regards,

Johan

Former Member
0 Kudos

This is no problem for me, i can make an object link to an equipment. But you can classify this object links --> add characteristics to this object link.

Transaction CV02n change document tab --> object links --> select the object and press the grey "circle"button.