cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable the parameter ??

Former Member
0 Kudos

hai..

my parameter is like this:-

PARAMETERS: S_ORG LIKE S706-VKORG default '1234'.

Now i want to disable this parameter such that the user should not change the default value.

plz help me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

try this

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'S_ORG'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Answers (5)

Answers (5)

Former Member
0 Kudos

If you want a parameter but want to disable it, then why even define a parameter? You can simply define a constant right?

Do you want to show the parameter but display only? In that case you should SCREEN-INPUT = 0. If you want a parameter but don't want to show it on the screen, then you can define your parameter with NO-DISPLAY option, you don't have to go through the logic of AT SELECTION-SCREEN OUTPUT.

Srinivas

Former Member
0 Kudos

Hi HariKrishna,

As you want to disable the parameter with your default value and want to stop the user to enter value further,Pleae check the code below.

Hope This Info Helps YOU.

<i>Reward Points If It Helps YOU.</i>

Regards,

Raghav

PARAMETERS: S_ORG LIKE S706-VKORG default '1234 MODIF ID SC1.

Initialization.

LOOP AT SCREEN.
  IF SCREEN-GROUP1 = 'SC1'.
    SCREEN-input = '0'.
    MODIFY SCREEN.
    CONTINUE.
  ENDIF.

ENDLOOP.

Former Member
0 Kudos

Hi Friends,

Thank u so much for your replies..

Everyone is correct..To whom should i give the points.?

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I would say, Max was first with a complete code sample.

Regards,

RIch Heilman

Former Member
0 Kudos

Hi

You should choose the solution is better for you or you prefer and if you haven't any preferences you can choose the first one.

Anyway only you can know your rules to assign the points.

Max

Former Member
0 Kudos

Hi Hari,

Just paste this code in your progrm and try

PARAMETERS: S_ORG LIKE S706-VKORG default '1234' MODIF ID sg1

AT SELECTION-SCREEN OUTPUT.

*To Input disable the field

LOOP AT SCREEN.

IF screen-group1 = 'SG1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

******

If it works , pls give point

Thanks,

Pramod

Former Member
0 Kudos

Hari

Use <b>MODIF ID modid</b> addition.

Example:

PARAMETERS: S_ORG LIKE S706-VKORG default '1234' MODIF ID M123.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'M123'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Thanks

Kay

Former Member
0 Kudos

Hi.

Write a code at the AT SELECTION SCREEN OUTPUT event.

To disable to screen fields.

Thanks and regards,

Maheshwari.V

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Try this.



report zrich_0003 .

parameters: s_org like s706-vkorg default '1234'.


at selection-screen output.


  loop at screen.
    if screen-name = 'S_ORG'.
      screen-input = '0'.
      modify screen.
    endif.
  endloop.

Regards,

Rich Heilman