08-20-2007 2:17 PM
Hi ,
In my report two radio buttons and two bloc selection screens are there.When we select the first radio button first screen will be editable second screen will be non-editable vice-versa.
but the problem is in each selection screen one mandatory field is required suppose if i give the one field obligatory in first block screen it is not allowing the second readout please help me regarding this how i will make the mandatory field in both screens.
Thanks,
Harinath
08-20-2007 2:21 PM
hi
could u please send the code written in
at selection-screen output.
08-21-2007 5:37 AM
AT SELECTION-SCREEN OUTPUT.
IF pa_udp = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'. "#CCE
screen-active = 1.
ELSEIF screen-group1 = 'DEF'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF pa_rep = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'. "#CCE
screen-input = 0.
ELSEIF screen-group1 = 'DEF'.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
This is my Code on At Selection screen event
08-21-2007 6:00 AM
Hi...
Dont Declare your field as OBLIGATORY.
Instead perform the validation in AT SELECTION-SCREEN event. But validation should be only when Particular Radiobutton is selected.
And Generate only Error Message (Type E).
Try this code:
AT SELECTION-SCREEN on <yOUR mandatory field>.
IF PA_UPD = 'X'.
IF <YOUR MANDATORY FIELD> IS INITIAL.
Message 'Entry is must in this field' type 'E'.
ENDIF.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
IF pa_udp = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'. "#CCE
screen-active = 1.
ELSEIF screen-group1 = 'DEF'.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF pa_rep = 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'ABC'. "#CCE
screen-input = 0.
ELSEIF screen-group1 = 'DEF'.
screen-active = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
<b>Reward if Helpful</b>
08-21-2007 10:09 AM
Hi,
i have tried like that also but that time it is not selected the second screen
Thanks,
Hari.
08-21-2007 10:16 AM
Hi
Have u given modif id to selection screen fields .......
can u post u r code
reward points to all helpful answers
kiran.M
08-21-2007 10:33 AM
HI
u can do like this..
give default values to those fields which are obligatory....
then it will work fine.
if u want to change the value on selection screen u can change .....
u can chk this...
parameters : rb1 radiobutton group grp1 user-command RB1 default 'X',
rb2 radiobutton group grp1.
selection-screen begin of block b1 WITH FRAME.
parameters : p_name(20) obligatory DEFAULT 'ABC' MODIF ID ID1.
selection-screen end of block b1.
selection-screen begin of block b2 WITH FRAME.
parameters : p_name1(20) obligatory DEFAULT 'XYZ' MODIF ID ID2.
selection-screen end of block b2.
AT SELECTION-SCREEN OUTPUT.
IF RB1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ID1'.
SCREEN-INPUT = ' '.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ID2'.
SCREEN-INPUT = ' '.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Message was edited by:
Premalatha G
08-20-2007 2:34 PM
Do not make any fields obligatory - instead code a check in the "AT SELECTION-SCREEN" event using IF tests to validate that right fields have been completed, and issue error message if not.
Andrew
08-21-2007 5:40 AM
Hi Andrew,
i have done like that only,but when ever that error message will come that time only blank screen is comming but i want error message in selection screen.
Thanks,
Hari
08-21-2007 5:44 AM
Hi Hari,
Here IF u give the defauale values for the obligatory fields then u will get the error message in the same screen.If u are validating the selection screen inputs in the 'At Selection Screen event' this will display erros in the next screen.
So give the defaulat values for obligatory fields if u wanna display the error messge in the same screen.
Thanks,CSR.
****Please Reward if helpful.
08-20-2007 2:36 PM
Hi,
Please give default values for mandatory fields.
Then u will not face any problem.
Thanks,CSR.