Application Development 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: 

BDC issue

Former Member
0 Kudos

Hi All,

Iam using call transaction method to upload the Vendor details and my requirement is like i have to display the all the vendor no's created as list output at last. My question is how to capture the created vendor no's?

Regards,

Shiva

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

U should capture the messages generated after saving the new vendor, here you can find out the new number:

ATA: T_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.

CALL TRANSACTION 'XK01' USING BDC_TAB
                              MESSAGES INTO T_MESSAGES. 
IF SY-SUBRC = 0.
  LOOP AT T_MESSAGES.
*---> Write the messages with nr vendor  
  ENDLOOP.
ENDIF.

The message should be 170 of class F2 (I'm not sure but you can check in debug, if it's so:

LOOP AT T_MESSAGES WHERE MSGID = 'F2'
                     AND MSGNR = '170'.
  WRITE T_MESSAGES-MSGV1.
ENDLOOP.

Max

5 REPLIES 5

Former Member
0 Kudos

Hi

U should capture the messages generated after saving the new vendor, here you can find out the new number:

ATA: T_MESSAGES TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.

CALL TRANSACTION 'XK01' USING BDC_TAB
                              MESSAGES INTO T_MESSAGES. 
IF SY-SUBRC = 0.
  LOOP AT T_MESSAGES.
*---> Write the messages with nr vendor  
  ENDLOOP.
ENDIF.

The message should be 170 of class F2 (I'm not sure but you can check in debug, if it's so:

LOOP AT T_MESSAGES WHERE MSGID = 'F2'
                     AND MSGNR = '170'.
  WRITE T_MESSAGES-MSGV1.
ENDLOOP.

Max

0 Kudos

Hi,

Try This

CALL Transaction 'XK01' using Bdcdata mode 'N' update 'A'.

Get Parameter id 'LIF' field VendNo.

Here Vendno is a variable which will contain Created Vendor no

Reward points if useful.

Regards,

A.Thuyavan.

Former Member
0 Kudos

Hi Shiva,

I think the created vendor number are returned in the MESSAGES <itab> table,.

Can you just check once in debugging.

Reward points if useful.

Regards,

Atish

Former Member
0 Kudos

Hi,

I fu are using the call transaction then definitely you cna see them in the messages tab.The structure name is BDCMSGCOLL.

reward points if useful.

Regards,

sasi

Former Member
0 Kudos

Hi Shiva,

I beleive your not printing the error list right? u want to display the output what ever uploaded into data base table. then after uplaoding the data we can display the output lise by selecting the data from data base table.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar.