2007 Aug 27 8:30 AM
Hi All-
I have a requirement. there r two radiobuttons on the selection screen rb1 and rb2. By default, rb1 is selected. Now, if rb1 is selected, file shud load from Application server and if rb2 is loaded, it shud load form presentation server. before showing the selecton screen, since rb1 is default, i want to show application server field only and after showing th selection screen, if i check rb2, the field for presentation server should be active and application server field shud be inactive...how to go abt it..i have used at selection-screen output for default rb1 button and it is workig fine...i want sample code for rest of the logic.
Tx
Hi All-
I have a requirement. there r two radiobuttons on the selection screen rb1 and rb2. By default, rb1 is selected. Now, if rb1 is selected, file shud load from Application server and if rb2 is loaded, it shud load form presentation server. before showing the selecton screen, since rb1 is default, i want to show application server field only and after showing th selection screen, if i check rb2, the field for presentation server should be active and application server field shud be inactive...how to go abt it..i have used at selection-screen output for default rb1 button and it is workig fine...i want sample code for rest of the logic.
Tx
2007 Aug 27 8:36 AM
Hi,
cehck the sample code..
p_aserv RADIOBUTTON GROUP grp
USER-COMMAND app, "Application server
p_afile1 TYPE filename-fileextern , "Application File
"Name for contracts
p_afile2 TYPE filename-fileextern , "Application
"FileName for
"Long text
p_aerfl1 TYPE filename-fileextern , "Error File
"forcontracts
p_aerfl2 TYPE filename-fileextern , "Error File
"for Longtext
p_pserv RADIOBUTTON GROUP grp, "Presentation Server
p_pfile1 TYPE rlgrap-filename , "Presentation File
"Name forcontracts
p_pfile2 TYPE rlgrap-filename , "Presentation File
"Name for long
"texts
p_errfl1 TYPE rlgrap-filename ,
"Error File for
"contracts
p_errfl2 TYPE rlgrap-filename . "Err File Long text
IF p_pserv IS INITIAL.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_PFILE1'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_PFILE2'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_ERRFL1'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_ERRFL2'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'P_AFILE1'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_AFILE2'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_AERFL1'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'P_AERFL2'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDIF.
Regards,
Nagaraj
2007 Aug 27 8:36 AM
Hi Shakir,
SELECTION-SCREEN BEGIN OF BLOCK blk3 .
PARAMETERS: p_app RADIOBUTTON GROUP rad,
p_aserve LIKE rlgrap-filename MODIF ID rad,
p_pre RADIOBUTTON GROUP rad,
p_pserve LIKE rlgrap-filename MODIF ID rad.
SELECTION-SCREEN END OF BLOCK blk3.
----
AT SELECTION-SCREEN OUTPUT. *
----
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_ASERVE'.
IF p_app EQ 'X'.
screen-name = 'P_ASERVE'.
screen-input = '1'.
screen-active = '1'.
ELSE.
screen-name = 'P_ASERVE'.
screen-input = space.
ENDIF.
ENDIF.
IF screen-name = 'P_PSERVE' .
IF p_pre EQ 'X'.
screen-name = 'P_PSERVE'.
screen-input = '1'.
screen-active = 'X'.
ELSE.
screen-name = 'P_PSERVE'.
screen-input = space.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
This works fine.
Award points if this is helpful.
Regards,
Ravi G
2007 Aug 27 8:37 AM
at selection-screen output.
loop at screen.
case screen-name.
when 'P_SERVER'
screen-active = 0.
modify screen.
endcase.
endloop.
if u give the above part of code then Presentation server field will not be active that will be greyedout.
At selection screen .
if rb1 = 'X'
use GUI_DOWNLOAD and get the details from file and storein internal table.
elseif rb2 = 'X'.
use dataset and get the details store in itab and use it
endif.
REWARD iF HELPFLL.
2007 Aug 27 8:40 AM
Hi,
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_r2 = 'X'.
IF screen-name = 'P_FILE' " Presentation file input field
screen-required = 1.
screen-input = 1.
MODIFY SCREEN.
ELSEIF p_r1 = 'X'.
IF screen-name = 'A_FILE' " Application file input field
screen-required = 1.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Before this in inititialization event make both Presentation and application server fields as disable.
<b>Reward if helpful.</b>
2007 Aug 27 8:53 AM
Thanks to all of you!
I know all above..I mean, I am able to display the selection-screen by inactivating one field..say application server upload is inactive and presentation server field is active. Now, after showing this selection screen, i will select second radiobutton, and for this , application server upload must be active and presentation server field should be inactive. How can i do this? and in which event??
Hope you got my question...
2007 Aug 27 10:55 AM
Hi shakir,
I ahve already given the code which i have done for ur requirement...did u check that..It will work...
Reward points if u find useful
Regards,
Nagaraj
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |