Application Development 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: 

How to set a field inactive at selection screen?

dev_parbutteea
Active Contributor
0 Kudos

Hello, here is the definition of my selection screen.

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

SELECT-OPTIONS : s_typcmd FOR EKKO-BSART DEFAULT text-003, "Type de commande

s_grpe FOR EKPO-MATKL ,

s_ebeln FOR EKPO-EBELN. "Numéro de commande

SELECTION-SCREEN END OF BLOCK b1.

I want to set s_grpe to inactive.thx

13 REPLIES 13

raymond_giuseppi
Active Contributor
0 Kudos

Static

Add the NO-DISPLAY option.

PARAMETERS: pxxxx TYPE xxxx NO-DISPLAY.

The parameter will only be reachable by SUBMIT WITH.

Dynamically

assign a MODIF ID xxx to the parameter, and in PBO (AT SELECTION-SCREEN OUTPUT) do a

PARAMETER param TYPE xxxx MODIF ID XXX.
(...)
AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
        CASE screen-group1.
          WHEN 'XXX'..
            IF <test>.
              screen-active = '0'.
            ELSE.
              screen-active = '1'.
            ENDIF.

So you can choice when to display or not the parameter.

Regards

Former Member
0 Kudos

use the code:

At selection-screeen output.

loop at screen.

IF screen-name = 'S_GRPE''.

screen-active = '0'.

ENDIF.

Modify screen.

endloop.

Former Member
0 Kudos

Hi,

You want to inactive one of your screen fields, but you are not giving the condition, on which condition you want to deactivate this field..

Rgds,

Bujji

dev_parbutteea
Active Contributor
0 Kudos

no, i want it to display and there are values in it but the user should not be able to change it.I mean the field must be greyed out.

EDIT: It should always stay inactive.The purpose is to show the user the default values.

Edited by: Sooness Munogee on Feb 8, 2008 2:01 PM

0 Kudos

declare s_grpe as ..

SELECT-OPTIONS: s_grpe FOR EKPO-MATKL MODIF ID dat.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'S_GRPE'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

0 Kudos

Use the dynamic way, and replace the

screen-active = '0'. " respectively '1'

With

screen-input = '0'. " respectively '1'

Regards

0 Kudos

I am getting an error popup when i run it srinivas.

0 Kudos

change the name in group1 as

LOOP AT SCREEN.

IF screen-group1 = 'DAT'. <----


change this

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

0 Kudos

should i put it in PBO or can i put it in initialization?

0 Kudos

in the event ..

AT SELECTION-SCREEN OUTPUT.

0 Kudos

If you are working in module pool program then select the field in the layout and add group(ABC) for that field in selection screen attributes tab and place the below code in PBO.

loop at screen.

if screen-group1 = 'ABC'.

screen-active = '0'.

modify screen.

endif.

Former Member
0 Kudos

Hi,

At selection-screeen output.

LOOP AT screen.

IF screen-name = 'S_GRPE''.

screen-active = 0.

ENDIF.

ENDLOOP.

Rgds,

Bujji

Former Member
0 Kudos

Hi,

try out this.

SELECT-OPTIONS: s_grpe FOR EKPO-MATKL MODIF ID ABC.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'ABC'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Reward points if useful.

Cheers,

Sowmya