Application Development and Automation 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: 
Read only

POV event

former_member423024
Participant
0 Kudos
798

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.

11 REPLIES 11
Read only

Former Member
0 Kudos
707

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

Read only

awin_prabhu
Active Contributor
0 Kudos
707

You have to assign a USER COMMAND to radio buttons.


PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND u1,  "  <-----
                         r2 RADIOBUTTON GROUP g1.

Read only

0 Kudos
707

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..

Read only

0 Kudos
707

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

Read only

0 Kudos
707

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

Read only

0 Kudos
707

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.

Read only

0 Kudos
707

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

Read only

Former Member
0 Kudos
707

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'.

Read only

0 Kudos
707

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.

Read only

0 Kudos
707

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

Read only

former_member423024
Participant
0 Kudos
707

issue resolved..