Application Development 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: 

Selection Screen Issue.....Immediate Soln needed...

Former Member
0 Kudos

selection-screen: begin of block blk1

with frame title text-020.

parameter: R1 radiobutton group G1 user-command ABC default 'X',

R2 radiobutton group G1 ,

R3 radiobutton group G1.

selection-screen end of block blk1.

selection-screen: begin of block blk2

with frame title text-020.

select-options: s_reqmai for zcomd_skftable-zreqemail NO INTERVALS

no-extension modif id XYZ .

select-options: s_reqdep for zcomd_skftable-zreqdept NO INTERVALS

no-extension modif id XYZ .

select-options: s_date for sy-datum no intervals default sy-datum no-extension modif id ABC.

select-options: s_appnam for zcomd_skftable-zapprname no intervals no-extension modif id XYZ.

select-options: s_appdes for zcomd_skftable-zapprdesi no intervals no-extension.

select-options: s_appno for zcomd_skftable-zreqno no intervals no-extension modif id ABC.

select-options: s_reqby for zcomd_skftable-zreqby no intervals no-extension modif id XYZ .

selection-screen end of block blk2.

AT SELECTION-SCREEN output.

if R1 = 'X'.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 0.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

There are 3 Radio Buttons and few Input Boxes in the selection screen.

The First radio Button will be selected by Default.

At the same time the Field “S_APPNO” will be disabled if the First radio is active.

If User Selects second or Third Radio Button, the system will make the field ‘S_APPNO” into Active mode.

But I want to make the field “S_APPNO” as even MANDATORY ..

For this purpose, I coded as follows..

select-options: s_appno for zcomd_skftable-zreqno no intervals no-extension modif id ABC obligatory.

And rest of the lines as mentioned above..

IN this case, when user clicks second Radio button, the field “s_appno” will become acive and even mandatory…

BUT, if user again selects first Radio Button, system will popup error like “Make an entry in Mandatory field”…

Hence how to make it possible to avoid this error and make the s_appno again into DIISPLAY mode when user shifts from second or third radio button to First radio Button…???

Can anyone give me the exact code for this requirement...????

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Hi Pavan,

You have to use error messages instead of obligatory keyword

.

Issue an error message when the field is empty.

Regards,

ravi

6 REPLIES 6

Former Member
0 Kudos

HI,

instead of obligatory check

do it programatically when 2 or 3 radio button checked

AT SELECTION-SCREEN output.

if R1 = 'X'.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 0.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

Regards

amole

Former Member
0 Kudos

hi

leave the mandatary option from S_APPNOW and manage it by messagge error:

AT SELECTION-SCREEN.

IF R1 = SPACE.

IF S_APPNO[] IS INITIAL.

MESSAGE E......

ENDIF.

ENDIF.

Max

Former Member
0 Kudos

Check field for intitial or not . if initial show the error specifying to enter the value.

Former Member
0 Kudos

Hi,

AT SELECTION-SCREEN output.

if R1 = 'X'.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 0.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'S_APPNO-LOW'.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

<b> If S_APPNO[] is initial.

message e00 'Enter value'.

endif.</b>

Regards,

Amole

former_member181962
Active Contributor
0 Kudos

Hi Pavan,

You have to use error messages instead of obligatory keyword

.

Issue an error message when the field is empty.

Regards,

ravi

Former Member
0 Kudos

Hi Pavan

If i have understood your problem, it can be done easily.

S_APPNO should be mandatory only when radtio button 2 or 3 is selected.

-> Remove Obligatory in S_APPNO declaration

loop at screen.
     if screen-name = 'S_APPNO-LOW' and r1 is initial.
        screen-required = 1.
        modify screen.
     else.
        screen-required = 0.
        modify screen.
     endif.
endloop.

Hope this helps you.

Do remember to reward for helpful answers.

Kind Regards

Eswar