Application Development 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: 

Validate plant and material on selection screen with select-options

Former Member
0 Kudos

Hi all,

I want to validate plant and material on selection screen. More over I need to validate the combination of that also (i.e plant based materials). Individually I made the validations, but combination I didn’t get it.

For your information both are select-options, please reply me if you have an idea. The table to get the relationship is KEKO. <b>I have the below code for parameters, but I require code for select options.</b>


SELECT MATNR WERKS FROM KEKO UP TO 1 ROWS 
INTO (KEKO-MATNR, KEKO-WERKS)
WHERE MATNR = P_MATNR AND 
WERKS = P_WERKS.
IF SY-SUBRC <> 0.
MESSAGE E023 WITH 'COST ESTIMATE NOT FOUND FOR '
P_MATNR P_WERKS 'COMBINATION'.
ENDIF.
ENDSELECT.

Surely I will reward you.

Thanks in Advance,

Raghu.

3 REPLIES 3

Former Member
0 Kudos

Hi Raghu

Create ranges for the parameter

and append lines of p_xxx to r_xxx

now in the select query under where condt give the range dec ie r_xxxx

hope this help u

Reward pts if useful

Regards

Sreenivas

0 Kudos

Hi..

Thanks for the reply.

But in this case i have select-options, not parameters.

So please help me in case of select-options.

reagards,

raghu.

0 Kudos

Raghu,

You can't validate on select-options, MARC will have N to 1 relation between Material and plant.

You can do one thing, keep material as select-option and plant as parameter, now you can validate the materials on plant level.

Reward if this helps,

Satish