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

Read only fields in selection screen

Former Member
0 Likes
9,568

Hi,

I have a parameter in a selection screen and wanted it be read only, mean only values could be displayed but it should not allow the user to either enter or modify existing values. Can any one please suggest how to do this ?

Thanks and best regards,

Kulwant Singh

1 ACCEPTED SOLUTION
Read only

Former Member
3,706

Hi,

Check this..

PARAMETERS: P_MATNR TYPE MATNR DEFAULT 'TEST' MODIF ID M1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M1'.

SCREEN-INPUT = 0.

<b> MODIFY SCREEN. " Disable for input.</b>

ENDIF.

ENDLOOP.

Thanks,

Naren

8 REPLIES 8
Read only

Former Member
3,707

Hi,

Check this..

PARAMETERS: P_MATNR TYPE MATNR DEFAULT 'TEST' MODIF ID M1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M1'.

SCREEN-INPUT = 0.

<b> MODIFY SCREEN. " Disable for input.</b>

ENDIF.

ENDLOOP.

Thanks,

Naren

Read only

kiran_k8
Active Contributor
0 Likes
3,706

Kulwant,

Try this.

loop at screen.

if screen-name = p_matnr.

screen-input = 0.

modify screen.

endif.

endloop.

K.Kiran.

Message was edited by:

Kiran K

Read only

Former Member
0 Likes
3,706

Hi,

Using Modif Id You can do it. The Syntax is,

PARAMETERS <p> ...... MODIF ID <key> ......

See the Sample code,

PARAMETERS: TEST1(10) MODIF ID SC1,

TEST2(10) MODIF ID SC2,

TEST3(10) MODIF ID SC1,

TEST4(10) MODIF ID SC2.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1'.

SCREEN-INTENSIFIED = '1'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

IF SCREEN-GROUP1 = 'SC2'.

SCREEN-INTENSIFIED = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks.

Read only

Former Member
0 Likes
3,706

<b>Refer the following code:</b>

PARAMETERS: p_mode TYPE ctu_params-dismode DEFAULT 'N' MODIF ID ctu.

*---------------------------------------------------------------------
* AT SELECTION-SCREEN OUTPUT
*---------------------------------------------------------------------
AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
      IF screen-group1 = 'CTU'.
        screen-active = 0.
      ENDIF.
     MODIFY SCREEN.
  ENDLOOP.

Read only

Former Member
0 Likes
3,706
parameters : p_matnr like mara-matnr default '100000'.


at selection-screen output.
loop at screen.
 if screen-name eq 'P_MATNR'.
       screen-input = '0'.
      modify screen.
endif.
endloop.
Read only

Former Member
0 Likes
3,706

Hi Kulwant,

You can change the selection screen attribute by looping at structure screen.This structure screen contains all the attributes i.e. invisible,input only,output only etc.

loop at screen.

if screen-name = p_matnr.

screen-input = 0.

modify screen.

endif.

endloop.

Reward points if helpful.

Regards,

Hemant

Read only

Former Member
0 Likes
3,706

Hi,

PARAMETERS: P_MATNR TYPE MATNR DEFAULT 'TEST' MODIF ID M1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward points if it is helpful.

Regards,

Sangeetha.A

Read only

Former Member
0 Likes
3,706

Hi,

Please close the thread if problem is solved.

Thanks,

Naren