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

filed validation foreground / background

sudhakar196
Participant
0 Likes
695

select-options:

s_matnr for mara-matnr.

if report is started online the material number is an obligatory field.

How i can we achive this. i need obligatory mark on s_matnr if i run in foreground.

thx

sudhakar

6 REPLIES 6
Read only

Former Member
0 Likes
663

In At selection screen on S_MATNR, put this logic.

IF SY_BATCH = SPACE.

IF S_MATNR[] IS INITIAL.

message E000 WITH 'Please enter Material No.

ENDIF.

ENDIF.

This should help you to make MATNR mandatory in foreground.

ashish

Read only

0 Likes
663

select-options:

s_matnr for mara-matnr obligatory.

Can i get this symbol tickmark if i run it in foreground.

Read only

0 Likes
663

By this you can only get the from field of the select options mandatory.

If you want to make both the from and the to fields mandatory,use what the people in above replies have mentioned.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

JozsefSzikszai
Active Contributor
0 Likes
663

hi Suhakar,

you can only do if you build up some check:

AT SELECTION-SCREEN.

IF s_matnr IS INITIAL AND

sy-batch IS INITIAL. " this checks is program runs in foreground

issue error message

ENDIF.

Hope this helps

ec

Read only

Former Member
0 Likes
663

Hi Sudhakar,

Please mention OBLIGATORY keyword while defining matnr n the selection screen itself.

select-options:

s_matnr for mara-matnr obligatory.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

former_member194669
Active Contributor
0 Likes
663

Hi,


report zars.
parameters : p_matnr like mara-matnr obligatory.

initialization.
if sy-batch eq 'X'.
loop at screen.
 if screen-name = 'P_MATNR'.
    screen-required = 0.
    modify screen.
 endif.
endloop.
endif.

start-of-selection.
write : 'test'.

a®