‎2008 May 08 9:54 AM
Hi All,
I need Vendor name based on Purchase order number[ebeln].
Thanks.
Points wil be appreciated.
‎2008 May 08 9:57 AM
Hi Jasmine,
Fetch the LIFNR value from EKKO table based on PO number.
Using LIFNR fetch vendor name from LFA1 table.
Hope this helps you.
Thanks,
Arun
‎2008 May 08 10:00 AM
You have LIFNR(vendor) from purchase order data and go with that LIFNR to LFA1 table and get the vendor name.
Regards,
Madan.
‎2008 May 08 10:00 AM
In ekko you have: EBELN (Purchase doc) and LIFNR (Vendor number), go to LFA1 (Vendor master) with LIFNR and you will get the name in field LFA1-NAME1
‎2008 May 08 10:01 AM
get lifnr from table ekko and den use table lfa1 field name1 to retrieve vendor name
‎2008 May 08 10:04 AM
Hi ,
Fetch the LIFNR value from EKKO table based on PO number(EBELN).
Using this LIFNR fetch vendor name (Name1 field) from LFA1 table.
Cheers,
Saurabh
‎2008 May 08 10:04 AM
‎2008 May 08 11:49 AM
Hi,
Please note that it is a better practice to pick up vendor name from ADRC rather than LFA1 since in LFA1 it stores only 35 characters however in ADRC it stores 40 characters. Hence If Vendor name is more than 35 characters then If you use from LFA1 then it will pick up only first 35 characters of the name.
Select Single * from ekko where ebeln = w_ebeln. ( Your PO no )
Case sy-subrc.
When 0.
When Others.
Clear ekko.
Endcase.
Select Single * from LFA1 where lifbr = ekko-lifnr.
Case sy-subrc.
When 0.
When Others.
Clear lfa1.
Endcase.
*
Select Single * from ADRC where ADDRNUMBER = lfa1-adrnr.
Case sy-subrc.
When 0.
When Others.
Clear adrc.
Endcase.
*
w_vname = adrc-name1.
I hope this helps,
Regards,
Raju Chitale