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 Manipulation

Former Member
0 Likes
792

I need for a block2 with two radio buttons to be underintensified (not selectable) until a radio button is selected in block1.

question 1) How do I declare block2 default as underintensified(unselectable)?

question 2) How do I make block2 selectable once block1 is selected?

Thank-You

1 ACCEPTED SOLUTION
Read only

former_member210123
Active Participant
0 Likes
573

You can do that using loop at screen..and based on the user command u can do the modifications...wait let me give an example...

3 REPLIES 3
Read only

former_member210123
Active Participant
0 Likes
574

You can do that using loop at screen..and based on the user command u can do the modifications...wait let me give an example...

Read only

0 Likes
573

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

SELECT-OPTIONS: s_werks FOR l_werks, " For Plant

s_lgort FOR l_lgort. " For Storage Location

SELECTION-SCREEN END OF BLOCK b1.

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

PARAMETERS: p_rb_rep RADIOBUTTON GROUP rg1 DEFAULT 'X' USER-COMMAND rg1.

PARAMETERS: p_rb_fil RADIOBUTTON GROUP rg1.

SELECTION-SCREEN END OF BLOCK b2.

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

PARAMETERS: p_pre RADIOBUTTON GROUP rg2 DEFAULT 'X' USER-COMMAND usr MODIF ID m3.

PARAMETERS: p_pre_fp TYPE string MODIF ID m1.

PARAMETERS: p_app RADIOBUTTON GROUP rg2 MODIF ID m3.

PARAMETERS: p_app_fp TYPE string MODIF ID m2.

SELECTION-SCREEN END OF BLOCK b3.

SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.

PARAMETERS: p_file(128) TYPE c MODIF ID m1.

SELECTION-SCREEN END OF BLOCK b4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_rb_rep = 'X'.

IF screen-group1 EQ 'M1' OR screen-group1 EQ 'M2' OR screen-group1 EQ 'M3'.

screen-input = '0'.

ENDIF.

ELSEIF p_rb_fil = 'X'.

IF p_pre = 'X'.

IF screen-group1 = 'M2'.

screen-input = '0'.

ENDIF.

ELSEIF p_app = 'X'.

IF screen-group1 = 'M1'.

screen-input = '0'.

ENDIF.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

Read only

Former Member
0 Likes
573

Look at the sample code below


SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: p_shp RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND ucom,
            p_inv RADIOBUTTON GROUP rad1.

SELECT-OPTIONS: s_shp FOR vttk-tknum MODIF ID shp NO INTERVALS.
SELECT-OPTIONS: s_inv FOR vbrk-vbeln MODIF ID inv NO INTERVALS MATCHCODE OBJECT vmcf .
SELECTION-SCREEN END OF BLOCK blk1.

AT SELECTION-SCREEN.

  LOOP AT SCREEN.
* If Shipment radio button is selected, make Invoice number field invisible.
    IF p_shp = x.
      IF screen-group1 = 'INV'.
        screen-input = '0'.
        screen-required = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.

* If Invoice radio button is selected, make Shipment number field invisible
    IF p_inv = wl_x.
      IF screen-group1 = 'SHP'.
        screen-input = '0'.
        screen-required = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDIF.

  ENDLOOP.

give the group name for your second block2 and use in IF screen-group1 = '***'. and make screen input as 0.