2010 Dec 29 1:03 PM
Hi,
I'm trying AT SELECTION-SCREEN ON VALUE-REQUEST event for a particular field on selection screen .
I'm handling logic inside the above event based on 2 radiobuttons which are declared just before the above field.
But even though the radiobutons are clicked, the values of the radio buttons are not passed with in the POV event and showing as Null in debug Mode.
Could anyone provide kindly teh solution for this.
Thanks
Natasha SS.
2010 Dec 29 1:15 PM
Hi,
if it is a Dialog programming assign function code to the Field in the Layout.
if it is a Report programming assign User command for the radio buttons.
Prabhudsa
2010 Dec 29 1:16 PM
You have to assign a USER COMMAND to radio buttons.
PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND u1, " <-----
r2 RADIOBUTTON GROUP g1.
2010 Dec 29 1:20 PM
I did the same. But it still not working..
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-004.
PARAMETERS: locfile TYPE char1 RADIOBUTTON GROUP abc, "USER-COMMAND xyz,
appfile TYPE char1 RADIOBUTTON GROUP abc .
PARAMETERS : pa_file LIKE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.
IF locfile = 'X'.
...............
endif.
IF appfile = 'X'.
...........
endif.
Kindly see the aboev code and let me know ur suggestions..
2010 Dec 29 1:27 PM
Don't make field pa_file as mandatory.
PARAMETERS: locfile TYPE char1 RADIOBUTTON GROUP abc USER-COMMAND xyz, " Give USER COMMAND here
appfile TYPE char1 RADIOBUTTON GROUP abc .
PARAMETERS : pa_file LIKE rlgrap-filename OBLIGATORY. " Remove OBLIGATORY here
2010 Dec 29 1:31 PM
Hi,
Please check below code which i have done some changes to u r program..
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-004.
parameters: pa_file type rlgrap-filename OBLIGATORY,
locfile radiobutton group rb default 'X',
applife radiobutton group rb.
selection-screen end of block b1.
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file.
<Perform ur task>
Start of selection.
IF locfile = 'X'.
<UR CODE>
ELSEIF appfile = 'X'.
<ur code>
endif.Hope this will solve u r issue..
Regards,
Viswa
2010 Dec 29 1:39 PM
As per my requirement the field pa_file is mandatory.
I also added user command. But it's not working.
Kindly help me out.
I need to operate the logic by IF condition based on the 2 radiobuttons.
Kindly help me out.
2010 Dec 29 1:41 PM
Hi,
This is caused because pa_file = OBLIGATORY.
Just remove this and you see that locfile or appfile is filled.
Do the test if pa_file is filled later on in your program.
Sucess,
Rob
2010 Dec 30 4:14 AM
Hi Natasha,
Try This.
REPORT z_test LINE-SIZE 255.
TABLES: rlgrap.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-004.
SELECT-OPTIONS: pa_file FOR rlgrap-filename NO INTERVALS NO-EXTENSION.
PARAMETERS: locfile TYPE c RADIOBUTTON GROUP abc DEFAULT 'X' USER-COMMAND xyz,
appfile TYPE c RADIOBUTTON GROUP abc .
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_file-low.
IF locfile IS NOT INITIAL.
MESSAGE s000(38) WITH 'selected locfile'.
ELSEIF appfile IS NOT INITIAL.
MESSAGE s000(38) WITH 'selected app file'.
ENDIF.
AT SELECTION-SCREEN ON pa_file.
IF sy-ucomm = 'ONLI' AND pa_file IS INITIAL.
MESSAGE e000(38) WITH 'Kindly enter a value in PA_FILE.'.
ENDIF.
START-OF-SELECTION.
WRITE : / 'Executed'.
2010 Dec 30 11:00 AM
Hi Gurus,
The Actual issue is the values of slection screen elements(RADIO BUTTONS) are not getting passed inside the POV event used for another field in teh selection screen.
I mean to say even though the radiobutton is clicked , While I was debugging it's showing the value as SPACE for that Button.
Kindly help me out regarding this.
Thanks
Natasha SS.
2010 Dec 30 11:08 AM
Hi,
In the POV before checking the radiotbutton value , you first get the value of radiobutton by using the FM --> DYNP_VALUES_READ
For eg -->
H_DYNPFIELDS-FIELDNAME = 'R_RD1'.
APPEND H_DYNPFIELDS.
H_DYNPFIELDS-FIELDNAME = 'R_RD2'.
APPEND H_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = H_DYNPFIELDS
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC IS INITIAL.
READ TABLE H_DYNPFIELDS WITH KEY FIELDNAME = 'R_RD1'.
IF NOT H_DYNPFIELDS-FIELDVALUE IS INITIAL.
Then your logic when R_RD1 EQ 'X'
ELSE.
Then your logic when R_RD2 EQ 'X'
ENDIF.
ENDIF.
Regards,
Madhukar Shetty
2010 Dec 30 2:24 PM