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

logic needed

Former Member
0 Likes
298

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
282

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.

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
282

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.

Read only

Former Member
0 Likes
283

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.