2011 Nov 09 12:18 PM
I have table Control , In which There are two Check box Fields, The first one is Dependent on second one. when I click on 2nd one the first one should be checked automatically its corresponding 1st CheckBox only.
MODULE ZSET_DEP INPUT.
loop at itab_dep.
if sy-ucomm = 'ZPH' and ITAB_DEP-ZPHYC1 = 'X'.
ITAB_DEP-DEPDT1 = 'X'.
Modify ITAB_DEP INDEX sy-tabix."<TABCNTRL>-CURRENT_LINE.
ENDIF.
ENDLOOP.
ENDMODULE.
Here itab_dep is the name of internal table, The 2nd CheckBox Field's FactCode is 'ZPH'.
Now it is working.
Problem is When i remove the 2nd field ie.itab_dep-zphyc1 checkbox then the corresponding Checkbox of 1st'field should should be removed. But it is Removing All.
Please suggest. <removed by moderator>
For Requirement Help You Can follow this Link. <removed by moderator>
[https://picasaweb.google.com/106952500585093627368/SapScreenShot?authuser=0&feat=directlink]
Edited by: Thomas Zloch on Nov 9, 2011 1:20 PM
2011 Nov 10 10:02 AM
Hi,
Please change the code as below.
MODULE ZSET_DEP INPUT.
loop at itab_dep.
if ITAB_DEP-ZPHYC1 = 'X'.
ITAB_DEP- ZPHYC2= 'X'.
else.
ITAB_DEP- ZPHYC2= ' '.
Modify ITAB_DEP INDEX sy-tabix."<TABCNTRL>-CURRENT_LINE.
ENDIF.
ENDLOOP.
ENDMODULE.
Regards
Chitra
Hi,
Please change the code as below.
MODULE ZSET_DEP INPUT.
loop at itab_dep.
if ITAB_DEP-ZPHYC1 = 'X'.
ITAB_DEP- ZPHYC2= 'X'.
else.
ITAB_DEP- ZPHYC2= ' '.
Modify ITAB_DEP INDEX sy-tabix."<TABCNTRL>-CURRENT_LINE.
ENDIF.
ENDLOOP.
ENDMODULE.
Regards
Chitra
2011 Nov 10 10:02 AM
Hi,
Please change the code as below.
MODULE ZSET_DEP INPUT.
loop at itab_dep.
if ITAB_DEP-ZPHYC1 = 'X'.
ITAB_DEP- ZPHYC2= 'X'.
else.
ITAB_DEP- ZPHYC2= ' '.
Modify ITAB_DEP INDEX sy-tabix."<TABCNTRL>-CURRENT_LINE.
ENDIF.
ENDLOOP.
ENDMODULE.
Regards
Chitra
2011 Nov 10 11:52 AM
Hi Chitra Thank you.
But Problem is When m unchecking from One Row it is making uncheck for all rows from its dependent field.
2011 Nov 11 10:56 AM
Hi Jithender,
Please use the below code still if it is not soved means send me all the column names of the internal table.
MODULE ZSET_DEP INPUT.
loop at itab_dep.
if ITAB_DEP-ZPHYC1 = 'X'.
ITAB_DEP- ZPHYC2= 'X'.
else.
ITAB_DEP- ZPHYC2= ' '.
Modify ITAB_DEP INDEX sy-tabix TRANSPORTING ZPHYC2.
ENDIF.
ENDLOOP.
ENDMODULE.
Regards
chitra
2011 Nov 11 11:18 AM
HI Chitra the internal table is refreshing b4 it enter into the Module.
Here is a link Which will make you understand the problem clearly.
https://picasaweb.google.com/106952500585093627368/SapScreenShot?authuser=0&feat=directlink
Thanks With Regards.
Jitendra Nayak
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |