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 when regarding from other program

Former Member
0 Likes
368

Hi all

i am passing one input to selection screen of zreport from my module pool program.

I have to enter another input at the selection screen as one input is retrieved from module pool.

my problem,

the user can still change the input that has been retrieved from module pool which i don't want to change.

You can say that to remove that field from selection screen but the problem is that sometimes the zreport is run directly in that case the user

has to enter two input fields in selection screen.

Is there a way that when i come to zreport from module pool the field for which i am bringing value from module pool can be greyed out.

pls let me know the solution.

Thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
314

Sure, all you need to do is set up a selection-screen flag, then you can set this flag when SUBMITing the program, then check this flag and then turn the field to output only. HEre is what I mean.



report zrich_0001.

parameters: p_fld1(10) type c,
            p_fld2(10) type c.
parameters: p_flg type c no-display.

at selection-screen.
  if p_flg = 'X'.
     loop at screen.
        if screen-name = 'P_FLD2'.
           screen-input = '0'.
           modify screen.
        endif.
    endloop.
  endif.
  

See here that P_FLG is the flag which is NO-DISPLAY, when it is "X", we will deactivate the P_FLD2. So when you submit it, set the flag.



  submit zrich_0001 via selection-screen
            with p_fld1 = 'Value1'
            with p_fld2 = 'Value2'
            with p_flg  = 'X'.
         

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
315

Sure, all you need to do is set up a selection-screen flag, then you can set this flag when SUBMITing the program, then check this flag and then turn the field to output only. HEre is what I mean.



report zrich_0001.

parameters: p_fld1(10) type c,
            p_fld2(10) type c.
parameters: p_flg type c no-display.

at selection-screen.
  if p_flg = 'X'.
     loop at screen.
        if screen-name = 'P_FLD2'.
           screen-input = '0'.
           modify screen.
        endif.
    endloop.
  endif.
  

See here that P_FLG is the flag which is NO-DISPLAY, when it is "X", we will deactivate the P_FLD2. So when you submit it, set the flag.



  submit zrich_0001 via selection-screen
            with p_fld1 = 'Value1'
            with p_fld2 = 'Value2'
            with p_flg  = 'X'.
         

Regards,

Rich Heilman

Read only

0 Likes
314

Hi,

Thanks Rich

I awarded full points.

Thanks