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.
Showing results for 
Search instead for 
Did you mean: 

Based on the company code, how do I get its vendor/customer code?

0 Kudos

Hello Experts,

I am currently modifying a report wherein based on the company code(our subsidiary companies)

that the user entered on the selection screen, I need to get its vendor code. How do

I do this guys? Thank you and take care!


Former Member
0 Kudos

Use LFB1 table



0 Kudos


Thanks for your reply. However, LFB1 table contains multiple vendor codes when I

type in the company code of our subsidiary company. I only need to get one which is

not an outside vendor, etc. but the code of our subsidiary companies. Thank you!

0 Kudos

hi Viray,

Go to LFA1 table, In the Trading Partner field (VBUND) give the company code from the selection screen. You will get the vendor number.



0 Kudos

Hi Vijay,

Check with below tables complete vendor master :

LFA1 Vendor Master (General Section)

LFAS Vendor master (VAT registration n

LFAT Vendor master record (tax groupi

LFB1 Vendor Master (Company Code)

LFB5 Vendor master (dunning data)

LFBK Vendor Master (Bank Details)

LFBW Vendor master record (withholding

LFC1 Vendor master (transaction figure

LFC3 Vendor master (special G/L transa

LFCPR Function code profile per step

LFCTX Pushbutton text

LFEI Vendor Master: Preference for Imp

LFINF Delivery information Project Syst

LFINFX Assignment delivery information t

LFLR Vendor Master Record: Supply Regi

LFM1 Vendor master record purchasing o

LFM2 Vendor Master Record: Purchasing

LFMC Vendor master (short texts for co

LFMH Vendor hierarchy

LFZA Permitted Alternative Payee

if possible talk to functinal guy and he will tell you the table,field name



0 Kudos

If you have the vendor number that represents each of your company codes stored somewhere in your system, this sounds like local customisation. For example, are they held in the additional data for company code configuration in transaction OBY6 (in which case table T001Z holds the values)? Or perhaps you have a local "Z" table that hold this, or have used a vendor account group for these. In other words, where in standard SAP in your system are you able to see the vendor number for each company code?