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

Problem with Selection Screen

Former Member
0 Likes
792

Hi all,

I need to develop a selection screen, where it will ask to choose one radio button.

depend on that radio button the screen should modify.

so, for this what should i do. Plz help me to complete this task.

Thanks in advance.

Raj.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

Hi,

declare the radio buttons.

use the Event, At selection-screen on radiobutton group.

in this event, just validate and set the status of the flag field.

then, in the 'At selection-screen output' Event,

based on the flag value, modify the screen.

To modify the screen,

Loop at screen.

if screen-name = 'pm1'.

screen-XXXXXXX = '1' or '0'.

modify screen.

endif.

endloop.

I Hope this will help you.

Reward me if u saticefy.

7 REPLIES 7
Read only

Former Member
0 Likes
768

Hi

See this sample programs for this

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,

pa_lifnr TYPE lfa1-lifnr MODIF ID abc,

pa_vkorg TYPE vbak-vkorg MODIF ID abc.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.

SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,

s_date FOR gs_lfa1-erdat MODIF ID def,

s_augru FOR gs_vbak-augru MODIF ID def,

s_vbeln FOR gs_vbak-vbeln MODIF ID def.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *

SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *

SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

IF pa_rep EQ gc_x.

LOOP AT SCREEN.

IF screen-group1 = gc_abc.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_def.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

ELSEIF pa_upd EQ gc_x.

*For Reprocessing

LOOP AT SCREEN.

IF screen-group1 = gc_def.

screen-input = gc_zero_num.

ELSEIF screen-group1 = gc_abc.

screen-active = gc_one_num.

ENDIF.

MODIFY SCREEN.

CLEAR pa_upd.

ENDLOOP.

ENDIF.

***********************************************************

REPORT zrich_001.

PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'

user-command chk,

p_rad2 RADIOBUTTON GROUP grp1.

SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,

s_datum2 FOR sy-datum MODIF ID d2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_rad1 = 'X'

AND screen-group1 = 'D2'.

screen-active = '0'.

ENDIF.

IF p_rad2 = 'X'

AND screen-group1 = 'D1'.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

<b>

Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
768

Hello,

Check this code.


SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,
                S_ANFNR FOR EKPO-ANFNR MODIF ID RD2.
 
PARAMETERS: P_PO  RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',
            P_RFQ RADIOBUTTON GROUP RAD1.
 
AT SELECTION-SCREEN OUTPUT.
 
  IF P_PO = 'X'.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD2'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'RD1'.
        SCREEN-INPUT = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.



If useful reward.

Vasanth 


Read only

Former Member
0 Likes
768
Read only

Former Member
0 Likes
768

Hi,

Modify the screen attributes of the fields in the selection screen dynamically.

Use loop at screen

Reward if useful.

Regards,

Umasankar.

Read only

Former Member
0 Likes
768

HI

refer this code

SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,

S_ANFNR FOR EKPO-ANFNR MODIF ID RD2.

PARAMETERS: P_PO RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',

P_RFQ RADIOBUTTON GROUP RAD1.

AT SELECTION-SCREEN OUTPUT.

IF P_PO = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'RD2'.

<write your code as your requirement>

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'RD1'.

<write your code as your requirement>

ENDIF.

ENDLOOP.

ENDIF.

Reward all helpfull answers.

Regards.

Jay

Read only

Former Member
0 Likes
769

Hi,

declare the radio buttons.

use the Event, At selection-screen on radiobutton group.

in this event, just validate and set the status of the flag field.

then, in the 'At selection-screen output' Event,

based on the flag value, modify the screen.

To modify the screen,

Loop at screen.

if screen-name = 'pm1'.

screen-XXXXXXX = '1' or '0'.

modify screen.

endif.

endloop.

I Hope this will help you.

Reward me if u saticefy.

Read only

Former Member
0 Likes
768

Hello,

try like this.

SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,

S_ANFNR FOR EKPO-ANFNR MODIF ID RD2.

PARAMETERS: P_PO RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',

P_RFQ RADIOBUTTON GROUP RAD1.

AT SELECTION-SCREEN OUTPUT.

IF P_PO = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'RD2'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ELSE.

IF SCREEN-GROUP1 = 'RD1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

if helpful reward some points.

with regards,

Suresh.A