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: 

Retreiving plants based on company code in program

Former Member
0 Kudos

Hi all ,

My requirement is I have 6 company codes in which there are 16 plants all together but my requirement is I need only 6 plants from them and these plants are in various company codes.

It would be helpful if someone can provide solution.

<removed_by_moderator>

Thanks & Regards

Jerry

Edited by: Julius Bussche on Aug 13, 2008 4:41 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Select bukrs werks from tvko into itab

where bukrs in bukrs_list.

Sort itab by bukrs.

Delete adjacent records comparing bukrs...

Like this you can get single company code and corresponding plant.

Thank you

4 REPLIES 4

SuhaSaha
Advisor
Advisor
0 Kudos

Hello,

Are u selecting the table T001W?

BR,

Suhas

Former Member
0 Kudos

Check the table TVKO.

Former Member
0 Kudos

Select bukrs werks from tvko into itab

where bukrs in bukrs_list.

Sort itab by bukrs.

Delete adjacent records comparing bukrs...

Like this you can get single company code and corresponding plant.

Thank you

Former Member
0 Kudos

Please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting further.

If you can confirm that you have read the rules, then I will also give my answer.

Cheers,

Julius