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

BAPI_DOCUMENT_CHANGE2 objectlinks

Former Member
0 Likes
1,335

Hi together!

I want to add an objectlink to a document.

I use the BAPI_DOCUMENT_CHANGE2:

lt_drad-objecttype = 'KNA1'.

lt_drad-objectkey = '100789'.

CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'

EXPORTING

documenttype = idrad-dokar

documentnumber = idrad-doknr

documentpart = idrad-doktl

documentversion = idrad-dokvr

IMPORTING

RETURN = ls_return

TABLES

OBJECTLINKS = lt_drad

.

    • errors occured ??

IF ls_return-type CA 'EA'.

ROLLBACK WORK.

MESSAGE ID '26' TYPE 'I' NUMBER '000'

WITH ls_return-message.

The idrad is filled but the bapi does not add the objectlink.

What can I do ?

Volker

1 ACCEPTED SOLUTION
Read only

christian_wohlfahrt
Active Contributor
0 Likes
807

Hi Volker!

Did you delete the append? Otherwise you just fill the header line of lt_drad, not the table.

Regards,

Christian

3 REPLIES 3
Read only

christian_wohlfahrt
Active Contributor
0 Likes
808

Hi Volker!

Did you delete the append? Otherwise you just fill the header line of lt_drad, not the table.

Regards,

Christian

Read only

0 Likes
807

Hi Christian !

Thanks !

Sometimes it's just a little thing

Works !

Es geht !!

Read only

Former Member
0 Likes
807

what is the error u get ?