2007 Aug 22 6:58 AM
Hello friends,
Currently i am doing one report in which i want to handle events through checkbox, means i am having 5 checkboxes. on clicking on perticular checkbox
some selection fields needs to be display.Some of the fields are common while displaying selection, so i dnt want repeat declarations..
Can anyone help out of this..
2007 Aug 22 7:05 AM
hi,
try like this,
at selection screen.
if screen-name = 'C1' and C1 ='X'.
loop at screen.
screen-required = 1. // to make remaining check boxes as mandatory
modify screen.
enddloop.
else if screen-name = 'C2' and c2 = 'X'.
loop at screen.
screen-input = 0. // to disable remaining check boxes.
modify screen.
endloop.
endif.
endif.
if helpful reward some points.
with regards,
Suresh Aluri.
It will be hard to do that since this kind of call depends on the SCREEN-GROUP check and you cannot have some fields of the group as active and some inactive so easily.
Regards,
Amit
Reward all helpful replies.
2007 Aug 22 7:03 AM
It will be hard to do that since this kind of call depends on the SCREEN-GROUP check and you cannot have some fields of the group as active and some inactive so easily.
Regards,
Amit
Reward all helpful replies.
2007 Aug 22 7:05 AM
hi,
try like this,
at selection screen.
if screen-name = 'C1' and C1 ='X'.
loop at screen.
screen-required = 1. // to make remaining check boxes as mandatory
modify screen.
enddloop.
else if screen-name = 'C2' and c2 = 'X'.
loop at screen.
screen-input = 0. // to disable remaining check boxes.
modify screen.
endloop.
endif.
endif.
if helpful reward some points.
with regards,
Suresh Aluri.
2007 Aug 22 7:10 AM
Hi Siddesh,
please try the following sample coding:
REPORT ZZAVVTEST .
tables: ska1.
parameters: p_check1 as checkbox user-command comm,
p_check2 as checkbox user-command comm,
p_check3 as checkbox user-command comm,
p_check4 as checkbox user-command comm,
p_check5 as checkbox user-command comm.
parameters: p_field1 like bkpf-belnr modif id cb1,
p_field2 like t001-bukrs modif id cb1.
select-options: s_saknr for ska1-saknr modif id cb2.
at selection-screen output.
loop at screen.
if not p_check1 is initial.
if screen-group1 = 'CB1'.
screen-input = '0'.
screen-output = '0'.
screen-invisible = '1'.
endif.
else.
if screen-group1 = 'CB1'.
screen-input = '1'.
screen-output = '1'.
screen-invisible = '0'.
endif.
endif.
if not p_check2 is initial.
if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
screen-input = '0'.
screen-output = '0'.
screen-invisible = '1'.
endif.
else.
if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
screen-input = '1'.
screen-output = '1'.
screen-invisible = '0'.
endif.
endif.
modify screen.
endloop.
You may complete it to your requirements (5 checkboxes and more fields). This is just a guideline.
I hope it helps. Best regards,
Alvaro
2007 Aug 22 7:15 AM
Hi
create a 3 modif id's to visible one ,invisible one and common one
and put a logic in at selection-screen output event
at selection-screen output.
LOOP AT SCREEN.
if c1 = 'X'.
IF SCREEN-GROUP1 = 'GRP'. FOR INVISIBLE FIELDS
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'GRP1'. FOR VISIBLE FIELDS
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
endif.
reward points to all helpful answers
kiran.M
2007 Aug 22 7:42 AM
Hi,
You can use the USER-COMAND addition while declaring the Checkbox.
eg :
PARAMETER : val1 AS CHECKBOX DEFAULT 'X' USER-COMMAND chk.
PARAMETER : val2 AS CHECKBOX USER-COMMAND chk.
thus you have assigned a SY-Ucomm to the checkbox, now if a user checks or unchecks the checkbox then the sy-ucomm is raised and it takes to AT SELECTION SCREEN event where you can check as to whether sy-ucomm is the command related to your User-command.
eg :
AT Selection-screen
if sy-ucomm = 'CHK'.
perform Process_hide_unhide_logic.
endif.
in the hide_unhide_logic subroutine the code as mention by others above can be written.
Regards,
Kanchan
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |