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

Get Plant

Former Member
0 Likes
1,096

Hi all ,

How can i Get plant(werks) based on Comp Code(bukrs?

Thanks,Rayeez

Hi all ,

How can i Get plant(werks) based on Comp Code(bukrs?

Thanks,Rayeez

8 REPLIES 8
Read only

Former Member
0 Likes
1,041

chk this table

write select statement on this table

T001W_EXT

this should be more accurate

TMZWK

chk this also

J_1IMOCOMP

chk this FM

K_ABC_GET_WERKS_FOR_BUKRS

Message was edited by: Sekhar

Read only

Former Member
0 Likes
1,041

Go to TMZWK table.

Read only

athavanraja
Active Contributor
0 Likes
1,041

can you tell us the context in which you want to do this. a company code can have more than one werks.

Regards

Raja

Read only

0 Likes
1,041

Hi Raja,

In my FSpec.I have reqirement like this.

"There is a business requirement to separate internal “profit in inventory” by trading partner and send this information (change in “profit in inventory” by trading partner)"

Thanks for all your efforts.

Rayeez

Read only

0 Likes
1,041

Hi,

In Selection Screen Company Code is input filed .

Based on this field i need to retriew plants.

Then Determine and store all valuated materials, qty, and inter-company profit for each plant.

Thanks ,Rayeez

Read only

Former Member
0 Likes
1,041

Hi,

You can try using the FM "K_WERKS_OF_BUKRS_FIND"

Cheers

VJ

Read only

Former Member
0 Likes
1,041

Hai Rayeez

Check the following Code

PARAMETERS:

P_BUKRS LIKE BKPF-BUKRS MEMORY ID BUK OBLIGATORY.

DATA:

IT_T_001W LIKE T001W OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'K_WERKS_OF_BUKRS_FIND'

EXPORTING

BUKRS = P_BUKRS

TABLES

ITAB_001W = IT_T_001W

EXCEPTIONS

OTHERS = 3.

loop at IT_T_001W.

write 😕 IT_T_001W-WERKS.

endloop.

Thanks & regards

Sreenivasulu P

Read only

Former Member
0 Likes
1,041

Hello Rayeez,

U can use table T001W. This connects plant with valution area which is nothing but company code.