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

validations on selection screen

Former Member
0 Likes
495

Hi friends,

I need to validate on matnr field on selection screen. I need to check the matnr entered by the user is available in mara table or not.

Thanx in advance.

Regards,

Parvez.

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
471

hi,

u can do the validation in.

at selection-screen .

if field_matnr is not initial.

select single matnr from mara into tmp_fld

where matnr = field_matnr.

if sy-subrc <> 0.

show error message.

endif.

endif.

rgds

anver

pls mark hlpful answrs

3 REPLIES 3
Read only

Former Member
0 Likes
471

at selection-screen on p_matnr.

select single *

from mara

where matnr = p_matnr.

if sy-subrc <> 0.

message e001 with 'error'.

endif.

Read only

Former Member
0 Likes
471

Parvez,

Do the validation in AT SELECTION-SCREEN on P_mantr.

Like

Select single * from MARA where MATNR eq p_MATNR.

if sy-subrc <> 0.

  • Error message

endif.

~thomas.

Read only

anversha_s
Active Contributor
0 Likes
472

hi,

u can do the validation in.

at selection-screen .

if field_matnr is not initial.

select single matnr from mara into tmp_fld

where matnr = field_matnr.

if sy-subrc <> 0.

show error message.

endif.

endif.

rgds

anver

pls mark hlpful answrs