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_CREATE2 -Updating object links

Former Member
0 Likes
2,589

Hi I am using this bapi to create documents through CV01n.

but, problems is i could not update this OBJECT links tab. I want to populate Customer no. I am trying by sending through Object links structure, but no use.

What mght be the Problem?

Pls. Help Me.

Regards,

Krishna.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,539

Hello,

You must specify the objectlink type

CLEAR objectlinks. REFRESH objectlinks.

CLEAR objectlinks.

objectlinks-OBJECTTYPE = 'MARA'.

objectlinks-OBJECTKEY = WA_NAME-MATNR.

APPEND objectlinks.

Thierry

4 REPLIES 4
Read only

Former Member
0 Likes
1,539

Hi,

Please read the Function module documentation. An example is given there.

**.... Object links

DATA: lt_drad LIKE bapi_doc_drad OCCURS 0 WITH HEADER LINE.

**.... Object link to material master

CLEAR lt_drad.

REFRESH lt_drad.

lt_drad-objecttype = 'MARA'.

lt_drad-objectkey = 'M4711'.

APPEND lt_drad.

You can find the entries for the object type 'OBJECTTYPE' in the table TCLO (MARA for material). The object key 'OBJECTKEY' is made up of the key fields of the SAP object that is also is in the table TCLO.

Edited by: Neenu Jose on Nov 3, 2008 9:41 AM

Edited by: Neenu Jose on Nov 3, 2008 9:42 AM

Edited by: Neenu Jose on Nov 3, 2008 9:44 AM

Edited by: Neenu Jose on Nov 3, 2008 9:47 AM

Read only

0 Likes
1,539

Hi Neenu,

Thanks for your quick response.

I know there is documentation for this.

My concern was i was trying to Populate customer number.

Any way my problem was cleared. I for got add leading zeros for customer number while excuting BAPI from SE37.

Now I added and it is working Fine.

Thanks,

Krishna.

Read only

Former Member
0 Likes
1,540

Hello,

You must specify the objectlink type

CLEAR objectlinks. REFRESH objectlinks.

CLEAR objectlinks.

objectlinks-OBJECTTYPE = 'MARA'.

objectlinks-OBJECTKEY = WA_NAME-MATNR.

APPEND objectlinks.

Thierry

Read only

Former Member
0 Likes
1,539

Thank You all.