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: 

Relationship between company code n plant

Former Member
0 Kudos

<i>Hi,

which table stores company code n plant info.

I wanna select all the plants belongs to a company code.

Thanks.

Senthil</i>

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Mistake. Table:T001K

7 REPLIES 7

Former Member
0 Kudos

Hi,

Table: T001

Former Member
0 Kudos

Hi,

Mistake. Table:T001K

0 Kudos

Hi,

T100k contains bukrs, but how to relate bwkey with the plant.

Thanks,

Senthil

0 Kudos

hi,

First go to T001K with company code and retrive BWKEY then go T001W table and retrive corresponding plant for that BWKEY.

rajkumar abbu

Former Member
0 Kudos

Pass Company code (BUKRS) to T001k retrive all the plants(BWKEY)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

I think T001W_EXT can help you.

types : begin of ty,

werks type t001w_ext,

bukrs type t001w_ext,

end of ty.

data : itab type standard table of ty,

wa type ty.

select werks bukrs into table itab from t001w_ext where bukrs = s_bukrs.

sort itab.

delete adjacent duplicates comparing all fields.

loop at itab into wa.

write wa.

endloop.

Kindly reward points by clicking the star on the left of reply,if it helps.

Former Member
0 Kudos

if p_werks is a parameter the select statement would be

select bukrs bwkey into table it_t001k where bwkey = p_werks.

it_t001K is an internal table having two fields bukrs and bwkey for Company code and Plant. The field BWKEY is Plant in this table