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: 

Using At Selection-Screen on radiobutton....

Former Member
0 Kudos

Hi all,

I have the following paramters:

PARAMETERS:

P_LOCAL RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND FLAG,

P_UNIX RADIOBUTTON GROUP RB1,

P_INFILE(80) VISIBLE LENGTH 41 LOWER CASE.

How can I use: AT SELECTION-SCREEN ON RADIOBUTTON GROUP so that when switching the radiobuttons, the file-path clears.

Thanks in advance.

Regards,

Fred.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

1.

PARAMETERS:

P_LOCAL RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND FLAG ,

P_UNIX RADIOBUTTON GROUP RB1,

P_INFILE(80) VISIBLE LENGTH 41 LOWER CASE modif id md.

2. AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'MD'.

IF P_LOCAL = 'X'.

screen-active = 1.

ELSE.

screen-active = 0.

ENDIF.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

7 REPLIES 7

Former Member
0 Kudos

1.

PARAMETERS:

P_LOCAL RADIOBUTTON GROUP RB1 DEFAULT 'X' USER-COMMAND FLAG ,

P_UNIX RADIOBUTTON GROUP RB1,

P_INFILE(80) VISIBLE LENGTH 41 LOWER CASE modif id md.

2. AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'MD'.

IF P_LOCAL = 'X'.

screen-active = 1.

ELSE.

screen-active = 0.

ENDIF.

MODIFY SCREEN.

ENDCASE.

ENDLOOP.

0 Kudos

Is it not possible to use:

AT SELECTION-SCREEN ON RADIOBUTTON???

0 Kudos

Nope

Try the code I gave you. Should work, if not, definitely let me know.

0 Kudos

at selection-screen ON RADIOBUTTON GROUP rb1.

and based check which one = 'X' ,clear the path

FYI.. Sandeep is right . You can not do this ...

you have to use loop at screen and endloop.

Thanks

SK

Message was edited by: Saquib Khan

Former Member
0 Kudos

Fred,

You should be able to do something like this...

at selection-screen output.

if p_unix = 'X'.

p_infile = ''.

endif.

Regards,

Den

Former Member
0 Kudos

Fred,

You can also use something like the following to combine Sandips approach with your request to clear the value. This is a cut/paste from an existing program of mine -- apologies if I left something out, but you'll get the idea.

-d

SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.

parameter: rsearch radiobutton group A

user-command c_sel

default 'X'

modif id sel.

select-options: sebeln for ekko-ebeln modif id SHO,

slifnr for ekko-lifnr modif id SHO,

sbox for zpoarchive-box modif id SHO,

sqqyyyy for zpoarchive-qqyyyy modif id SHO.

selection-screen uline.

parameter: RUPLOAD RADIOBUTTON GROUP A modif id sel.

parameter: rchange radiobutton group A modif id sel.

parameter: pqqyyyy like zpoarchive-qqyyyy modif id CHG,

pbox like zpoarchive-box modif id CHG.

parameter: FILENAME(128) TYPE C

default 'c:\temp\ponums.xls'

modif id CHG.

selection-screen begin of line.

selection-screen comment 32(40) text-001.

selection-screen end of line.

SELECTION-SCREEN END OF BLOCK B.

----


at selection-screen output.

----


loop at screen.

if screen-group1 eq 'SHO'.

check screen-name ns '-opti_push'.

if rsearch = 'X'.

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

elseif screen-group1 eq 'CHG'.

check screen-name ns '-opti_push'.

if rsearch <> 'X'.

screen-input = 1.

else.

screen-input = 0.

endif.

modify screen.

endif.

endloop.

if rupload = 'X'.

filename = 'upload'.

else.

filename = ''.

endif.

0 Kudos

yeah sandip, you're right and code worked.

regards,

fred.