‎2008 Feb 02 3:46 AM
first the user enters the plant (input button).
Now i have a table control where the user has to enter the material no.
Now my requirenment is that as soon as the user enter the material no. it should check that the material should be extended in plant.
if nt than a error msg shuld be displayed.
thanks in advance,
Ghadoliya
‎2008 Feb 02 5:45 AM
Hi,
You can write a Chain endchain command in the correponding PAI and validate it.
ie,
in PAI.
LOOP at Itab.(Which is used for table cntrol).
chain. "ISBN-Nr.
field: <MATNR> '' The field for matnr in Table control.
module validate.
endchain.
endloop.
"And in module.
MODULE validate.
select single <matnr> from marc
into <wa-marc>
where matnr = <matnr> and
werks = <werks>.
if sy-subrc ne 0.
<error message>
endif.
where
ENDMODULE.
‎2008 Feb 02 4:00 AM
In the At selection-screen event write the below code..
select single matnr from marc
into lv_matnr
where matnr = pa_matnr "<<your selection screen parameter
and werks = pa_werks "<<your plant in the selection screen
if sy-subrc NE 0.
clear lv_matnr.
message "<<<< you want to raise..
endif.
‎2008 Feb 02 5:45 AM
Hi,
You can write a Chain endchain command in the correponding PAI and validate it.
ie,
in PAI.
LOOP at Itab.(Which is used for table cntrol).
chain. "ISBN-Nr.
field: <MATNR> '' The field for matnr in Table control.
module validate.
endchain.
endloop.
"And in module.
MODULE validate.
select single <matnr> from marc
into <wa-marc>
where matnr = <matnr> and
werks = <werks>.
if sy-subrc ne 0.
<error message>
endif.
where
ENDMODULE.