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: 

Make check-box parameter unable for input

Former Member
0 Kudos
128

Hi all,

I want to make hide or unhide for check-box parameter based on input selection, this is for report.

For example: I have input parameter sales organization p_vkorg. If user enters sales org 'SG10', it will make that check-box is ready for input, if this is other than 'SG10', the check-box field will be disable.

How can we control this?

thanks alots

Alia

5 REPLIES 5

hymavathi_oruganti
Active Contributor
0 Kudos
90

at selection screen output

loop at screen.

if screen-name = <FIELDNAME> AND <FIELDVALUE> = 'SG10'.

screen-active = 1

modify screen.

else.

.......

endif.

Former Member
0 Kudos
90

Hi

Use similar logic

TABLES spfli.
PARAMETERS show_all AS CHECKBOX USER-COMMAND flag.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p1(10) TYPE c,
            p2(10) TYPE c,
            p3(10) TYPE c.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
<b>PARAMETERS: p4(10) TYPE c MODIF ID bl2,
            p5(10) TYPE c MODIF ID bl2,
            p6(10) TYPE c MODIF ID bl4.</b>
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF show_all <> 'X' AND
       <b>screen-group1 = 'BL2'.</b>     <b> 
       screen-active = '0'.</b>    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
  LOOP AT SCREEN.
    IF screen-group1 = 'BL2'.
      screen-intensified = '1'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

Former Member
0 Kudos
90

Hi,

Use Loop at screen.....Endloop block.

There modify the screen element according to the user input.

PARAMETERS: A type vbak-vkorg ,

B AS CHECKBOX DEFAULT 'X' modif id SC1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'SC1' AND A = 'SG10'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

endloop.

Hope this helps you.

Thank you.

Regards,

Karun.M

Former Member
0 Kudos
90

HI alia

you have to use MODIF ID

REPORT Z_SELECT_SCREEN_ACTIVE.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.

PARAMETERS: insme AS CHECKBOX MODIF ID bl2.

SELECTION-SCREEN END OF BLOCK b1.

At Selection-screen on p_vkorg.

if p_vkorg eq 'SG10.

loop at screen.

if screen-group1 = 'b12'.

screen-input = '0'.

endif.

endloop.

modify screen.

endif.

regards

kishore

0 Kudos
90

HI alia!

there is small change

parameter: p_vkorg like vbak-vkorg.

selection-screen begin of block b2 with frame.

PARAMETERS: insme as checkbox MODIF ID bl2.

selection-screen end of block b2.

At Selection-screen output.

if p_vkorg ne 'SG10'.

loop at screen.

if screen-group1 = 'BL2'.

screen-input = '0'.

modify screen.

continue.

endif.

endloop.

endif.

plz close the pervious thread ***can we change***

regards

kishore

Message was edited by: Harikishore Sreenivasulu