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

disable the parameter

Former Member
0 Likes
850

iam working on financial report.In this report i want to disable one parameter when i click on particular check box,the parameter should be enabled.

It is not a Module pool program.

Helpfula nswer will be get rewarded.

Regards

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
812

You should LOOP at SCREEN in the AT SELECTION-SCREEN OUTPUT event.

Regards

Rich Heilman

iam working on financial report.In this report i want to disable one parameter when i click on particular check box,the parameter should be enabled.

It is not a Module pool program.

Helpfula nswer will be get rewarded.

Regards

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
813

You should LOOP at SCREEN in the AT SELECTION-SCREEN OUTPUT event.

Regards

Rich Heilman

Read only

0 Likes
812

Here is an example.



report zrich_0001.




parameters: p_chk1 as checkbox user-command chk,
            p_fld1 type c,
            p_fld2 type c.


at selection-screen output.


  if p_chk1 = space.
    loop at screen.
      if screen-name = 'P_FLD2'.
        screen-input = '0'.
        modify screen.
      endif.
    endloop.
  endif.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
812

Hi,

I hope following code will solve your problem.

AT SELECTION-SCREEN OUTPUT.

IF checkbox_name = 'X'.

LOOP AT screen.

IF screen-name = 'parameter_name in uppercase'.

screen-input = 0.

ENDIF.

ENDLOOP.

MODIFY screen.

ENDIF.

Reward points if the answer is helpful.

Regards,

Mukul

Message was edited by:

Mukul R. Kulkarni

Read only

0 Likes
812

Hi,

This should help :


PARAMETERS     : p_matnr    AS CHECKBOX USER-COMMAND flag.
SELECT-OPTIONS : s_matnr FOR mara-matnr MODIF ID mtn.

(...)
AT SELECTION-SCREEN OUTPUT.
  IF p_matnr EQ space.
    LOOP AT SCREEN.
      IF screen-group1 = 'MTN'.
        screen-input = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
  IF p_matnr EQ 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MTN'.
        screen-input = '1'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

Erwan

Read only

Former Member
0 Likes
812

This should do the task .

REPORT Zvij5 .

parameters : p_matnr like mara-matnr.
parameters : cb as checkbox user-command r ."modif id abc.


selection-screen begin of block b1 with frame.
parameters : p_werks like marc-werks modif id abc,
             p_lgort like mard-lgort modif id abc.
selection-screen end of block b1.

at selection-screen output.
if cb ne ' '.
loop at screen.
if screen-group1 = 'ABC'.
screen-active = '1'.
modify screen.
endif.
endloop.


elseif cb eq ' '.

loop at screen.
if screen-group1 = 'ABC'.
screen-active = '0'.
modify screen.
endif.
endloop.

endif.

regards,

vijay.

Read only

Former Member
0 Likes
812

Hi skk,

Run this code,

<b>REPORT ZEX33 .

PARAMETERS : field1(10) modif id md1,

field2(10) modif id md2.

parameters : c1 as checkbox USER-COMMAND R DEFAULT 'X',

c2 as checkbox USER-COMMAND R .

AT SELECTION-SCREEN output.

if c1 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD1'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

elseif c2 = 'X'.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'MD2'.

SCREEN-INPUT = '0'.

MODIFY SCREEN.

CONTINUE.

ENDIF.

ENDLOOP.

endif.

start-of-selection.</b>

when u select check box 1 first parameter field will be disabled , when u select second check box second parameter field will be disabled