‎2007 Jul 17 1:07 PM
hi guys,
need ur help.
i have a selection screen with the fields material (select-option), plant(parameter) and inspection type(parameter). Now i want to validate the material according to the palnt and display all the material that do not belong to the plant keyed in.
How can this be done ?? please help me out.
‎2007 Jul 17 1:11 PM
hi ,
first check the material field and then check if plant is initial or not .
if initial then prompt a message to enter the plant no
else
get the material no based on the plant no and display the material no that doesn't belong to the plant.
‎2007 Jul 17 1:11 PM
Hi
Declare the Material and Plant like
tables: t001w, mara,marc.
paramters: p_werks like t001w-werks.
select-options: s_matnr for mara-matnr.
At selection-screen on s_matnr.
Select matnr werks into (marc-matnr, marc-werks) upto 1 rows
from marc where matnr in s_matnr and
werks = p_werks (or werks <> p_werks).
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 17 1:15 PM
hi guys,
thats not my question. I want to know like how can i display a list of material no. that do not belong to the particular plat to the user. say it can have around 10 material nos.
‎2007 Jul 17 1:15 PM
at selection-screen on s_matnr.
tables: marc.
select matnr into w_matnr upto from 1 rows marc where matnr in s_matnr and werks = p_werks.
If sy-subrc ne 0.
Message E000.
endif.
‎2007 Jul 17 1:27 PM
u can go for ALV-Reuse_alv_grid_display where u can display the list of values.
this is the best method.
orelse u can go for table contro.l.
s_matnr - select-options, l_plant - plant parameter
if not l_plant is inital.
if not s_matnr is initial.
Select MATNR PLANT from MARC into table t_marc where plantt = l_pant and
matnr in s_matnr.
build fieldcatelog and then use reuse_alv_grid_display.