‎2008 Jun 04 4:11 PM
Hi experts,
In one of my report I have to put validation on selection screen. I have 4 fields defined under select-options (S_LGNUM, S_WERKS S_EXIDV2, S_EXIDV).
Now
When warehouse(LGNUM) and Plant(WERKS) are blank then Case# (EXIDV2) or HU#(EXIDV) become mandtory at selection screen.
How to code for this Please help.Points sure.
Anshu.
‎2008 Jun 04 4:41 PM
hi,
you try to create 2 blocks .
block 1 : S_LGNUM, S_WERKS
block 2 : S_EXIDV2, S_EXIDV
Give modif id as A for second block select options.
now you can use this event.
At selection-screen on block b1.
if s_lgnum is initial and s_werks is initial.
loop at screen.
if screen-group1 = 'A'.
screen-required = '1'. (pls chk this screen field, but for making mandatory there is one field available in screen internal table)
endif.
modify screen.
endloop.
Regards
Sandeep REddy
‎2008 Jun 04 4:31 PM
Hi ,
Please go through the sample code.
tables: mara.
select-options: matnr for mara-matnr,
mbrsh for mara-mbrsh,
meins for mara-meins ,
mtart for mara-mtart.
at selection-screen.
if matnr is initial and mbrsh is initial.
if meins is initial or mtart is initial.
message e000(0) with 'Please enter values'.
endif.
endif.
Hope this solves the problem.
Reward points if helpful.
Thanks and Regards.
‎2008 Jun 04 4:41 PM
hi,
you try to create 2 blocks .
block 1 : S_LGNUM, S_WERKS
block 2 : S_EXIDV2, S_EXIDV
Give modif id as A for second block select options.
now you can use this event.
At selection-screen on block b1.
if s_lgnum is initial and s_werks is initial.
loop at screen.
if screen-group1 = 'A'.
screen-required = '1'. (pls chk this screen field, but for making mandatory there is one field available in screen internal table)
endif.
modify screen.
endloop.
Regards
Sandeep REddy