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

Selection screen

Former Member
0 Likes
729

Hi all,

I want that initially my selection screen should have only two Radio-buttons.

When user clicks any one button then corresponding block should appear.

I have coded this


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: app_ser RADIOBUTTON GROUP gp1 DEFAULT 'X'
            USER-COMMAND chk,
            pre_ser RADIOBUTTON GROUP gp1.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.

PARAMETERS: Locl_pth LIKE ibipparms-path modif id g2.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME.
parameters: p_full(128) type c modif id g1.  "fULL PATH FOR UNIX
SELECTION-SCREEN END OF BLOCK b3.

*---------------------------------------------------------------------*
*                    At Selection-Screen(output)
*---------------------------------------------------------------------*
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF app_ser = 'X' and screen-group1 = 'G2'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
   IF pre_ser = 'X' and screen-group1 = 'G1'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.

but the problem is that block corresponding to some radio-button always appears at the initial screen.

while I want only radio-button on the selection screen initially.

please help me out.

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:55 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
696

Hi Kush.

This solves ur problem

Keep ur Entire code unchanged and just add this.

INITIALIZATION.

LOOP AT SCREEN.

IF screen-group1 = 'G2' OR screen-group1 = 'G1'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<REMOVED BY MODERATOR>

Bhupal

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:57 PM

7 REPLIES 7
Read only

Former Member
0 Likes
696

Hi,

Block with frame ll always appear....

Try removing frame...........

Cheers,

jose.

Read only

Former Member
0 Likes
696

Hi,

LOOP AT SCREEN.

IF app_ser = 'X'

IF screen-group1 = 'G2'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'G1'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDIF.

IF pre_ser = 'X'.

IF screen-group1 = 'G2'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'G1'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

Read only

0 Likes
696

this is still the same

thanks for help

but

my requirement is to get selection screen with only radio buttons

and when user clicks any button then some action should happen.

Read only

Former Member
0 Likes
696

Hi,

see below code,

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

SKIP.

    • Selection Criteria for GR Number*

PARAMETERS: r_grnum RADIOBUTTON GROUP rb1 TYPE c USER-COMMAND zzex.

*SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME .

SELECT-OPTIONS: s_mblnr FOR v_mblnr MODIF ID zx1 ,

s_zeile FOR v_zeile MODIF ID zx1 .

SELECTION-SCREEN END OF BLOCK b2 .

    • Selection Criteria for Production Order*

PARAMETERS: r_prod RADIOBUTTON GROUP rb1 TYPE c.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME .

SELECT-OPTIONS: s_aufnr FOR v_aufnr MODIF ID zx2.

SELECTION-SCREEN END OF BLOCK b3 .

    • Selection Criteria for Delivery Number*

PARAMETERS: r_dele RADIOBUTTON GROUP rb1 TYPE c.

SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME .

SELECT-OPTIONS: s_vbeln FOR v_vbeln MODIF ID zx3,

s_posnr FOR v_posnr MODIF ID zx3.

SELECTION-SCREEN END OF BLOCK b4 .

PARAMETERS: r_matsrn RADIOBUTTON GROUP rb1 TYPE c.

SELECTION-SCREEN: BEGIN OF BLOCK b5 WITH FRAME. "TITLE text-004.

    • SKIP.*

SELECT-OPTIONS: s_matnr FOR v_matnr MODIF ID zx4,

s_sernr FOR v_sernr MODIF ID zx4 MATCHCODE OBJECT eqsn.

SELECTION-SCREEN END OF BLOCK b5.

SELECTION-SCREEN END OF BLOCK b1.

LOOP AT SCREEN.

IF r_grnum EQ c_x.

IF screen-group1 = c_zx1.

screen-active = 1.

ELSEIF screen-group1 = c_zx2.

screen-active = 0.

ELSEIF screen-group1 = c_zx3.

screen-active = 0.

ELSEIF screen-group1 = c_zx4.

screen-active = 0.

ENDIF.

ELSEIF r_prod = c_x.

IF screen-group1 = c_zx1.

screen-active = 0.

ELSEIF screen-group1 = c_zx2.

screen-active = 1.

ELSEIF screen-group1 = c_zx3.

screen-active = 0.

ELSEIF screen-group1 = c_zx4.

screen-active = 0.

ENDIF.

ELSEIF r_dele = c_x.

IF screen-group1 = c_zx3.

screen-active = 1.

ELSEIF screen-group1 = c_zx1.

screen-active = 0.

ELSEIF screen-group1 = c_zx2.

screen-active = 0.

ELSEIF screen-group1 = c_zx4.

screen-active = 0.

ENDIF.

ELSEIF r_matsrn = c_x.

IF screen-group1 = c_zx4.

screen-active = 1.

ELSEIF screen-group1 = c_zx1.

screen-active = 0.

ELSEIF screen-group1 = c_zx2.

screen-active = 0.

ELSEIF screen-group1 = c_zx3.

screen-active = 0.

ENDIF.

ELSE.

IF screen-group1 = c_zx2 OR screen-group1 = c_zx1

OR screen-group1 = c_zx3 OR screen-group1 = c_zx4.

screen-active = 0.

ENDIF.

ENDIF.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:56 PM

Read only

Former Member
0 Likes
696

I got you r problem.you want to refersh the screen on Radio button click it self i guess.

just add the "ucomm" addition to first radiobutton from radiobutton group. and this will solve your problem. for more help press f1 on readio button statement and see the ucomm option at end.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:57 PM

Read only

Former Member
0 Likes
697

Hi Kush.

This solves ur problem

Keep ur Entire code unchanged and just add this.

INITIALIZATION.

LOOP AT SCREEN.

IF screen-group1 = 'G2' OR screen-group1 = 'G1'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

<REMOVED BY MODERATOR>

Bhupal

Edited by: Alvaro Tejada Galindo on Feb 26, 2008 12:57 PM

Read only

Former Member
0 Likes
696

try this


REPORT  ztest_cha.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: app_ser RADIOBUTTON GROUP gp1
USER-COMMAND chk,
pre_ser RADIOBUTTON GROUP gp1.
SELECTION-SCREEN END OF BLOCK b1.


SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.

PARAMETERS: locl_pth LIKE ibipparms-path MODIF ID g2.

SELECTION-SCREEN END OF BLOCK b2.

data : v_flag,
       v_flag1.

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME.
PARAMETERS: p_full(128) TYPE c MODIF ID g1. "fULL PATH FOR UNIX
SELECTION-SCREEN END OF BLOCK b3.

INITIALIZATION.
  LOOP AT SCREEN.
    IF screen-group1 = 'G1' OR
       screen-group1 = 'G2'.
      screen-active = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

AT SELECTION-SCREEN.
  IF app_ser = 'X'.
    v_flag = 1.
    v_flag1 = 0.
  elseif pre_ser eq 'X'.
    v_flag = 0.
    v_flag1 = 1.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF app_ser = 'X'.
      IF screen-group1 = 'G1'.
        screen-active = v_flag.
      elseif screen-group1 = 'G2'.
        screen-active = v_flag1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
    IF pre_ser = 'X'.
      IF screen-group1 = 'G1'.
        screen-active = v_flag.
      elseif screen-group1 = 'G2'.
        screen-active = v_flag1.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.