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: 

Enable parameters on selection screen

Former Member
0 Kudos

Hi,

Can you please give your suggestions for following requirement..

I have 4 parameters ( p1 p2 p3 p4) on selection screen..

But i need to enable only 2 parameters ( p3 p4) to enter selection criteria on selection screen..

p1 p2 should not take entries ..

Your suggestions are helpfull..

Thanks,

Parnith..

1 ACCEPTED SOLUTION

abdulazeez12
Active Contributor
0 Kudos

Hi

Your question looks incomplete. When you dont want p1 and P2 to take entries, then do not create them at first place. If you want them on selection screen but in disable mode, then in what situation u want these to disable and when do u want them to get enabled and take values?

Shakir

8 REPLIES 8

Former Member
0 Kudos

declare parameters ..

and in initialization .

LOOP AT SCREEN.

IF SCREEN-NAME = 'P1' OR

SCREEN-NAME = 'P2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

abdulazeez12
Active Contributor
0 Kudos

Hi

Your question looks incomplete. When you dont want p1 and P2 to take entries, then do not create them at first place. If you want them on selection screen but in disable mode, then in what situation u want these to disable and when do u want them to get enabled and take values?

Shakir

0 Kudos

Hi ,

Thanks for your note..

My exact requirement is ....

if system id is p111 then, parameter p1 should be disabled and remaining

parameters p2 p3 p4 should be enabled..

if system id is p222 , parameter p2 should be disabled and remaining

parameters p1 p3 p4 should be enabled..

if system id is p333 ,parameter p3 should be disabled and remaining

parameters p1 p2 p4 should be enabled..

if system id is p444 ,parameter p4 should be disabled and remaining

parameters p2 p3 p1 should be enabled..

Can you please let me know how i need to code for above requirement..

Your suggestions are helpfull..

Thanks ,

Parnith..

0 Kudos

initialization.

if sy-sysid = 'P111'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P1' .

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

elseif sy-sysid = 'P222'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P2' .

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

elseif sy-sysid = 'P333'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P3' .

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

elseif sy-sysid = 'P444'.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P4' .

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endif.

0 Kudos

then use this


PARAMETERS:
  p1        TYPE c,
  p2        TYPE c,
  p3        TYPE c,
  p4        TYPE c.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    CASE sy-sysid.
      WHEN 'P111'.
        CASE screen-name.
          WHEN 'P1'.
            screen-input = 0.
            MODIFY SCREEN.
          WHEN 'P2'.
          WHEN 'P3'.
          WHEN 'P4'.
        ENDCASE.
      WHEN 'P222'.
        CASE screen-name.
          WHEN 'P1'.
          WHEN 'P2'.
            screen-input = 0.
            MODIFY SCREEN.
          WHEN 'P3'.
          WHEN 'P4'.
        ENDCASE.
      WHEN 'P333'.
        CASE screen-name.
          WHEN 'P1'.
          WHEN 'P2'.
          WHEN 'P3'.
            screen-input = 0.
            MODIFY SCREEN.
          WHEN 'P4'.
        ENDCASE.
      WHEN 'P444'.
        CASE screen-name.
          WHEN 'P1'.
          WHEN 'P2'.
          WHEN 'P3'.
          WHEN 'P4'.
            screen-input = 0.
            MODIFY SCREEN.
        ENDCASE.
    ENDCASE.
  ENDLOOP.

Former Member
0 Kudos

This will work


PARAMETERS:
  p1        TYPE c,
  p2        TYPE c,
  p3        TYPE c,
  p4        TYPE c.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    CASE screen-name.
      WHEN 'P1'
        OR 'P2'.
        screen-input = 0.
        MODIFY SCREEN.
    ENDCASE.
  ENDLOOP.

Former Member
0 Kudos

Hello,


PARAMETERS:
  p1 TYPE c MODIF-ID f1,
  p2 TYPE c MODIF-ID f1,
  p3 TYPE c,
  p4 TYPE c,

AT SELECTION-SCREEN.
  LOOP AT screen.
    IF screen-group1 = 'F1'.
     screen-input = '0'.
     screen-active = '0'.
    ENDIF.
    MODIFY screen.
  ENDLOOP.

Regards

Former Member
0 Kudos

Hi,

Use the following.

PARAMETERS:

p4(1) TYPE c,

p3(2) TYPE c,

p2(3) TYPE c NO-DISPLAY,

p1(4) TYPE c NO-DISPLAY.

Thanks

Ramesh