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: 

Validation for Company code for a vendor in LFB1 TABLE.

Former Member
0 Kudos

Hi Experts,

New to ABAP Objects!! I need to write a method which will have two input parameters Vendor number and company code. and i have check wether company code exist for given vendor number.

Can any one send the code for the above validation.

Thanks in advance for your help.

-Chris.

1 REPLY 1

uwe_schieferstein
Active Contributor
0 Kudos

Hello Chris

I have checked on ERP 6.0 and there is no standard class available for checking vendors.

However, within your method simply call BAPI_VENDOR_EXISTENCECHECK.

If the vendor exists but not for the company code the BAPI returns the message E522(FN):

Vendor &1 exists, but is not created in company code &2

You may have a look at classes beginning with CL_REEX..., e.g.:

CL_REEXC_COMPANY_CODE          Company Code (T001)
CL_REEXC_CONTROLLING_AREA      Controlling Area (TKA01)

Regards

Uwe