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: 

Subscreen validations.

Former Member
0 Kudos

Dear friends,

I want to validate the sub-screen field.

from my main screen I am calling subscree which is having the dynamic select option.

I want to validate the subscreen select option field.

my code is like this:

PROCESS BEFORE OUTPUT.

CALL SUBSCREEN: MATKL INCLUDING SY-REPID '3000'.

PROCESS AFTER INPUT.

CALL SUBSCREEN: MATKL.

MODULE USER_COMMAND_0200.

Under USER_COMMAND_0200 I have writen the validation code:

SELECT * FROM zmmsortseq INTO TABLE itab_mfg

WHERE matkl IN r_matkl.

IF sy-subrc NE 0.

MESSAGE e000(zm) WITH text-010.

ENDIF.

r_matkl is my subscreen select option.

One the error message will triger I want to enable the select option again but its displaying in grey mode.

Thanks,

Sridhar Patlola.

3 REPLIES 3

Former Member
0 Kudos

Hi Sridhar,

Give like this

IF sy-subrc NE 0.

MESSAGE <b>i000</b>(zm) WITH text-010.

ENDIF.

instead of e in the message give i then you will get it in change mode.

Regards

Haritha.

0 Kudos

Hi Haritha,

Thanks for the replay.

Yes I have given the same and after i000 message called the same screen then its ok working fine but client need a error message not information message.

Former Member
0 Kudos

u cannot use select * for field validation .......

try using select single.............

SELECT single matkl FROM zmmsortseq INTO <variable of type matkl>

WHERE matkl IN r_matkl.

reward points if helpful........