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
574

how to disable the select option in selection screen.

8 REPLIES 8
Read only

Former Member
0 Likes
553

Hi,

You have to disable a field for select option.

Check this-

At selection-screen output.

Loop at screen

Code deactivation logic here

endloop.

Or Create a variant and hide a field.

Reward if useful!

Read only

Former Member
0 Likes
553

Hi,

try this:

select-options: s_matnr for mara-matnr no-display.

Regards, Dieter

Here a short example of using:

TABLES: MARA.

*

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR NO-DISPLAY.

*

INITIALIZATION.

*

S_MATNR-SIGN = 'I'.

S_MATNR-OPTION = 'BT'.

S_MATNR-LOW = '000000000000000001'.

S_MATNR-HIGH = '000000000000000100'.

APPEND S_MATNR.

*

START-OF-SELECTION.

*

SELECT * FROM MARA WHERE MATNR IN S_MATNR.

WRITE: / MARA-MATNR.

ENDSELECT.

Regards, Dieter

Message was edited by:

Dieter Gröhn

Read only

Former Member
0 Likes
553

Hi,

Check below code

AT SELECTION SCREEN OUTPUT

LOOP AT SCREEN.

CASE screen-name.

WHEN 'RB_LAY1' OR 'RB_LAY2'.

IF rb_rep1 <> 'X'.

screen-active = 0.

ENDIF.

WHEN 'RB_REP5' OR 'RB_REP6' OR 'RB_REP51' OR 'RB_REP52' OR

'RB_REP53' .

IF rb_rep56 <> 'X'.

screen-active = 0.

ENDIF.

WHEN 'RB_REP31' OR 'RB_REP32' .

IF rb_rep3 <> 'X'.

screen-active = 0.

ENDIF.

WHEN 'RB_REP41' OR 'RB_REP42' .

IF rb_rep4 <> 'X'.

screen-active = 0.

ENDIF.

ENDCASE. " CASE screen-name.

CASE screen-group1.

WHEN 'MD1'.

IF rb_lay2 EQ 'X' AND rb_rep1 = 'X'.

screen-active = 0.

ENDIF.

WHEN 'MD2'.

IF rb_rep3 EQ 'X'.

screen-active = 0.

ENDIF.

WHEN 'MD4' OR 'MD6' OR 'MD7' OR 'MD8' OR 'M10' OR 'M12'.

IF rb_rep56 <> 'X'.

screen-active = 0.

ENDIF.

WHEN 'M11' OR 'M13'.

IF rb_rep56 <> 'X' AND rb_rep4 <> 'X'.

screen-active = 0.

ENDIF.

ENDCASE. " CASE screen-group1.

MODIFY SCREEN.

ENDLOOP. " LOOP AT SCREEN.

Regards,

Atish

Read only

Former Member
0 Likes
553

hello,

Use the at selection screen out put event.

In that try this,

loop at screen.

if screen-name = 'Your screen field name': eg so_date

screen-active = 0.

endif.

endloop.

example:



AT SELECTION-SCREEN OUTPUT.

*Making the vendor field in display mode  
 

    LOOP AT SCREEN.
      IF screen-name = 'PA_LIFNR' OR
         screen-name = 'PA_MNR'   OR
         screen-name = 'PA_MJAHR'.
        screen-input = 0.
        MODIFY SCREEN.
      ENDIF.

Please reward if found helpfull.

regards,

Rakesh.

Message was edited by:

RAKESH S R<b></b>

Message was edited by:

RAKESH S R

Read only

Former Member
0 Likes
553

Hi

Try like this

*------------------------ Selection Screen ---------------------------*
 
SELECTION-SCREEN BEGIN OF BLOCK selscr WITH FRAME TITLE text-000.
 
PARAMETERS: p_rad1   RADIOBUTTON GROUP rad1 USER-COMMAND a DEFAULT 'X',
            p_rad2   RADIOBUTTON GROUP rad1,
            p_rad3   RADIOBUTTON GROUP rad1.
 
*-- Selection Screen for radio button 1
SELECTION-SCREEN BEGIN OF BLOCK rad1 WITH FRAME TITLE text-001.
PARAMETERS:     p_date   LIKE sy-datum DEFAULT sy-datum MODIF ID one.
SELECT-OPTIONS: s_uzeit  FOR  sy-uzeit MODIF ID one.
SELECTION-SCREEN END OF BLOCK rad1.
 
*-- Selection Screen for radio button 2
SELECTION-SCREEN BEGIN OF BLOCK rad2 WITH FRAME TITLE text-002.
PARAMETERS: p_werks   LIKE t001w-werks MODIF ID two.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(6) text-003 MODIF ID two.
SELECTION-SCREEN POSITION 8.
PARAMETERS: p_chk  AS CHECKBOX DEFAULT 'X' MODIF ID two.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK rad2.
 
*-- Selection Screen for radio button 3
SELECTION-SCREEN BEGIN OF BLOCK rad3 WITH FRAME TITLE text-004.
PARAMETERS: p_matnr   LIKE mkal-matnr MODIF ID tri,
            p_verid LIKE mkal-verid MODIF ID tri.
SELECTION-SCREEN END OF BLOCK rad3.
 
SELECTION-SCREEN END OF BLOCK selscr.
 
*--------------------------
AT SELECTION-SCREEN OUTPUT.
*--------------------------
 
  IF p_rad1 = 'X'.
    LOOP AT SCREEN.
      IF  screen-group1 = 'TWO' OR
          screen-group1 = 'TRI'.
        screen-input = 0.
        screen-invisible = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF p_rad2 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'ONE' OR
         screen-group1 = 'TRI'.
        screen-input = 0.
        screen-invisible = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSEIF p_rad3 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'ONE' OR
         screen-group1 = 'TWO'.
        screen-input = 0.
        screen-invisible = 1.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.



If you want to hide all the, I mean all except the radio-buttons, then simply loop at screen and modify every entry except the radio-button entries to screen-active 0. Something like this.


LOOP AT SCREEN.
  IF SCREEN-NAME = 'RAD1' OR
     SCREEN-NAME = 'RAD2 OR
     SCREEN-NAME = 'RAD3'.
  ELSE.
    SCREEN-ACTIVE = 0.
    MODIFY SCREEN.
  ENDIF.
ENDLOOP.

Reward all helpfull answers

Regards

Pavan

Read only

former_member219399
Active Participant
0 Likes
553

Hi,

If u want to display a select option as parameter use the following code,

select-options s_matnr for mara-matnr with no-extension no intervals .

with regards,

Vamsi

Read only

Former Member
0 Likes
553

Hi,

In the AT selection screen event use modify the screen attributes of that particular field.

Modify the invisible attribute of the field.

Reward if helpful.

Regards,

Umasankar.

Read only

Former Member
0 Likes
553

hi,

use this logic

AT SELECTION-SCREEN OUTPUT.

if give condition.

when 'ss'.

LOOP AT SCREEN.

CASE screen-group1.

WHEN 'CCC'.

screen-input = 1. "Enable

screen-invisible = 0. "Disable

MODIFY SCREEN.

endloop.

endif.