2007 Feb 14 8:49 AM
Hi experts,
I have the following requirement-
I am supposed to have 2 radio buttons and a text box to enter a file name on the selection-screen and based on the button the user selects i need to provide F4 help for the text box. If the user selects the 1st radio button, i need to provide F4 help to get a presentation server file and if he chooses the 2nd one an F4 help for application server file needs to be triggered.
I have 2 at selection-screen events- one for radio button and the other for F4 help and the problem is only one gets triggered at one go.
Could somebody please tell me how to capture radio button values in the event at selection-screen on value request?
Thanks and Regatrds,
Pallavi
2007 Feb 14 9:45 AM
code-
data:lw_flag(1).
PARAMETERS:p_mode1 RADIOBUTTON group g1 default 'X',
p_mode2 RADIOBUTTON group g1 .
parameter p_desti type string.
AT SELECTION-SCREEN.
if sy-ucomm eq 'g1'.
if p_mode1 eq 'X'.
lw_flag = 'X'.
elseif p_mode2 eq 'X'.
lw_flag = ' '.
endif.
endif.
IF p_desti IS INITIAL.
MESSAGE E001(0).
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_desti.
*Display the pop up to accept the file name
if lw_flag = 'X'.
PERFORM f4_get_filename_presentation.
else.
PERFORM f4_get_filename_application.
endif.
Hi experts,
I have the following requirement-
I am supposed to have 2 radio buttons and a text box to enter a file name on the selection-screen and based on the button the user selects i need to provide F4 help for the text box. If the user selects the 1st radio button, i need to provide F4 help to get a presentation server file and if he chooses the 2nd one an F4 help for application server file needs to be triggered.
I have 2 at selection-screen events- one for radio button and the other for F4 help and the problem is only one gets triggered at one go.
Could somebody please tell me how to capture radio button values in the event at selection-screen on value request?
Thanks and Regatrds,
Pallavi
2007 Feb 14 8:53 AM
Hi
in at selection-screen event validate your radio buttons and accordingly call the fms for the same
Regards
Shiva
2007 Feb 14 8:56 AM
SUPPOSE YOU HAVE TWO RADIO BUTTONS
R1 AND R2. IF R1 IS CHOOSING BY USER YOU HAVE TO SHOW F4 HELP AND IF R2 IS CLICKED YOU DONT WANT TO SHOW THE F4 HELP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
IF R1 = 'X'.
CALL FM F4IF_INT_TABLE_VALUE_REQUEST<OR WHATEVER YOU NEED>
ENDIF.
REGARDS
SHIBA DUTTA
2007 Feb 14 8:57 AM
use 2 events AT SELECTION-SCREEN and AT SELECTION-SCREEN ON VALUE-REQUEST
data : v_flag(1).
parameters : p_rad1 radiobutton group rad user-command 'ABC',
p_rad2 radiobutton group rad user-command 'ABC'.
at selection-screen.
if sy-ucomm eq 'ABC'.
if p_rad1 eq 'X'.
v_flag = 'X'.
elseif p_rad2 eq 'X'.
v_flag = ' '.
endif.
endif.
at selection-screen on value-request.
if v_flag eq 'X'.
*call presentation server
else.
*call application server
endif.
2007 Feb 14 9:13 AM
This may help u
Aparameters : fname like rlgrap-filename.
DATA : filename TYPE string.
DATA : table1 TYPE filetable,
rc TYPE i.
DATA : VAL LIKE DYNPREAD-FIELDVALUE.
data: dynfields type table of dynpread with header line.
PARAMETERS : R1 RADIOBUTTON GROUP RG modif id abc.
PARAMETERS : R2 RADIOBUTTON GROUP RG modif id def.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_filename = '*.*'
CHANGING
file_table = table1
rc = rc.
IF sy-subrc <> 0.
MESSAGE e000(zXXX) WITH 'Error'.
ENDIF.
read table table1 index 1 into fname.
IF fname cs '.XLS'. "substitute .csv
dynfields-fieldname = 'R1'.
dynfields-fieldvalue = 'X'.
append dynfields.
dynfields-fieldname = 'R2'.
dynfields-fieldvalue = ' '.
append dynfields.
elseif fname cs '.DOC'.
dynfields-fieldname = 'R1'.
dynfields-fieldvalue = ' '.
append dynfields.
dynfields-fieldname = 'R2'.
dynfields-fieldvalue = 'X'.
append dynfields.
ENDIF.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
2007 Feb 14 9:38 AM
Hi guys,
i tried the same solutions but it is still not working.
i still unable to see the radio button values getting set .I tried out the code suggested by Chandrasekhar Jagarlamudi .The flag is always blank.
please help!
thanks and regards,
pallavi.
2007 Feb 14 9:42 AM
2007 Feb 14 9:45 AM
code-
data:lw_flag(1).
PARAMETERS:p_mode1 RADIOBUTTON group g1 default 'X',
p_mode2 RADIOBUTTON group g1 .
parameter p_desti type string.
AT SELECTION-SCREEN.
if sy-ucomm eq 'g1'.
if p_mode1 eq 'X'.
lw_flag = 'X'.
elseif p_mode2 eq 'X'.
lw_flag = ' '.
endif.
endif.
IF p_desti IS INITIAL.
MESSAGE E001(0).
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_desti.
*Display the pop up to accept the file name
if lw_flag = 'X'.
PERFORM f4_get_filename_presentation.
else.
PERFORM f4_get_filename_application.
endif.
2007 Feb 14 9:47 AM
2007 Feb 14 9:49 AM
at selection-screen on value-request for <textfield you declare as parameter>.
if p_mode1 = 'X'.
PERFORM f4_get_filename_presentation.
else.
shiba dutta
2007 Feb 14 9:51 AM
try this
REPORT YCHATEST.
PARAMETERS:P_MODE1 RADIOBUTTON GROUP G1 USER-COMMAND ABC DEFAULT 'X' ,
P_MODE2 RADIOBUTTON GROUP G1.
PARAMETER P_DESTI(100).
DATA : LW_FLAG.
LW_FLAG = 'X'.
AT SELECTION-SCREEN.
IF SY-UCOMM EQ 'ABC'.
IF P_MODE1 EQ 'X'.
LW_FLAG = 'X'.
ELSEIF P_MODE2 EQ 'X'.
LW_FLAG = ' '.
ENDIF.
ENDIF.
IF P_DESTI IS INITIAL.
MESSAGE E001(0).
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DESTI.
*Display the pop up to accept the file name
IF LW_FLAG = 'X'.
PERFORM F4_GET_FILENAME_PRESENTATION.
ELSE.
PERFORM F4_GET_FILENAME_APPLICATION.
ENDIF.
2007 Feb 14 11:20 AM
Hi chandrashekar,
Thanks a lot,it works.
Thanks again everybody.
regards,
pallavi.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |