Application Development and Automation 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: 
Read only

HOW TO GET LIFNR by using LFM1-EKORG

Former Member
0 Kudos
728

Hi SAP Gurus..

i have to get all vendors which are having the different ekorg .

i am using lfm1 for ekorg and lifnr

by using the lfa1-lifnr how to get lifnr with different ekorg

How do i go abt this...

Thanks in Advance

Shri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
378

Hi,

write a select query like this

data : begin of t_lfm1 occurs 0,

lifnr type lfm1-lifnr,

ekorg type lfm1-ekorg,

end of t_lfm1.

select lifnr

ekorg from lfm1

into table t_lfm1

where ekorg in s_ekorg. "where s_ekorg is a selected purchase orgs

Regards

Krishna

3 REPLIES 3
Read only

former_member555112
Active Contributor
0 Kudos
378

Hi,

LFA1 is the vendor master table. It will contain all the vendors and their general details.

One vendor can be assigned to several purchase organisation.

LFM1 contains the purchase organisation details for a vendor.

So for one entry in LFA1 you can have one or many entries in LFM1.

Regards,

Ankur Parab

Read only

0 Kudos
378

Hi ankur..

Tats wat i want...in selected query...i have given in technical terms...u hav explained me in functional way..

Read only

Former Member
0 Kudos
379

Hi,

write a select query like this

data : begin of t_lfm1 occurs 0,

lifnr type lfm1-lifnr,

ekorg type lfm1-ekorg,

end of t_lfm1.

select lifnr

ekorg from lfm1

into table t_lfm1

where ekorg in s_ekorg. "where s_ekorg is a selected purchase orgs

Regards

Krishna