‎2007 Oct 16 4:42 PM
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
‎2007 Oct 16 4:44 PM
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
‎2007 Oct 16 4:47 PM
select-options:
s_matnr for mara-matnr obligatory.
Can i get this symbol tickmark if i run it in foreground.
‎2007 Oct 16 4:49 PM
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.
‎2007 Oct 16 4:47 PM
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
‎2007 Oct 16 4:47 PM
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.
‎2007 Oct 16 4:58 PM
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®