08-20-2007 11:41 AM
Hi friends,
i wanna to fatch storage location based on plant in the function module.
in the function module import parameter is
field id = 'plant'
table itab.
it select all plant from table T001W.
i want to storage location based on Plant in Function module.
Thanks.
08-20-2007 11:48 AM
Hi,
You can fech all the storage location for a plant from table <b>T001L</b>.
<b>Reward if hlepful.</b>
08-20-2007 11:49 AM
hi,
use this code, it will display only selected data.
In POV (Process on value request)
field 'plant' module get_help.
and write module like below.
select sloc from t001w into corresponding fields of table itab where plant eq <plant>.
SELECT * FROM zgpack INTO CORRESPONDING FIELDS OF TABLE izgpack.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'TEST'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'TEST'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab.
08-20-2007 11:54 AM
Rashmi,
For this there is no need to use a separate FM, just write a simple select query to table T001L. You can observe T001L will have all storage locations maintined against the plants.
Example :
Select werks lgort
from T001L
into table i_t001l
where werks eq <i>Plant</i>.
After this use appropriate Read Table statement to validate or to use data.
ALL THE VERY BEST.
- Vamsi
08-20-2007 12:08 PM
thanks for ur Response,
but my quary is that.in my function module i am geting plant data from table t100w. but in the function module how the user select plant and get storage location.
do i use Read statement.
code: for Plant
SELECT werks name1 spras FROM t001w INTO it.
it-field_id = 'PLANT'.
APPEND it.
CLEAR it.
ENDSELECT.
ENDIF.
code for storage location
SELECT lgort lgobe
FROM t001l INTO itab .
but it fatching all storage location.
i want to use where condition for storage location.
please help me.
08-20-2007 12:17 PM
you can try fn module
LOCATION_READ_T001L
(i am in 4.7 version)...
regards
shiba dutta
08-20-2007 1:12 PM
hi Shiba,
should i take one more import parameter as werks_id.
i want to use existing selected plant.
can u help me out.
08-20-2007 12:51 PM