07-03-2007 8:27 AM
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
07-03-2007 8:28 AM
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
07-03-2007 8:28 AM
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
07-03-2007 10:19 AM
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.
07-03-2007 8:29 AM
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
07-03-2007 9:12 AM
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
07-03-2007 9:22 AM
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.