2008 Aug 21 6:40 AM
Hi all,
In table control (with wizard) based on checkbox selection,
multiple records has to be deleted. (in Module pool - programs)
Is it possible to do that..?
If yes how..? pl explain.
Thanks & Regards
Nagaraj.B
Hi,
Convert the relevant field to be checkbox. (using right click option)
In PAI, loop and read TC (move screen field data to program fields).
Use the below statement in a module after loop:
delete it_tc where <field_name> = 'X'.
Regards,
Wajid Hussain P.
2008 Aug 21 6:48 AM
using wizard u create the table control
after creating the table cotrol
u can find a option in the screen called check box.
click on that and paste it in the table control.
Regards
Anbu
2008 Aug 21 6:54 AM
Hi,
Multiple records can be deleted based on the value of checkbox.
But, i need to ask whether the chekbox is inside (within) the table control as a column or
outside the table control ?
Regards,
Wajid Hussain P.
2008 Aug 21 7:27 AM
Hi Wajid Hussain,
check box is inside the table control.
& check box is one of the field in RESB table..,
added to RESB table thru structure.
If possible, send coadings.
Regards
Nagaraj.B
2008 Aug 21 7:45 AM
Hi,
Convert the relevant field to be checkbox. (using right click option)
In PAI, loop and read TC (move screen field data to program fields).
Use the below statement in a module after loop:
delete it_tc where <field_name> = 'X'.
Regards,
Wajid Hussain P.
2008 Aug 21 1:35 PM
Hi,
can u explain it in a little bit elaberated way..?
I'm still unable to delete multiple records at a time based on check box selection..
Regards
Nagaraju.B
2008 Aug 22 8:09 AM
Hi,
You may go through the comments and code given below.
Regards,
Wajid Hussain P.
" * * * * * * *
Convert the relevant field to be checkbox. (using right click option).
In PAI, loop and read TC (move screen field data to program fields).
" * * * Top include
TYPES: BEGIN OF ty_itab,
resb TYPE resb,
check TYPE c LENGTH 1,
END OF ty_itab.
DATA: it_resb TYPE TABLE OF ty_itab,
wa_resb TYPE ty_itab.
" * * * PBO
PROCESS BEFORE OUTPUT.
loop at it_resb into wa_resb with control tc .
module show_tc.
endloop.
" * * * PAI
PROCESS AFTER INPUT.
loop at it_resb .
module read_tc.
endloop.
module change_tc_itab.
" -
Modules
" * * *
MODULE READ_TC.
move-corresponding RSEB to wa_resb. " RESB in screen
modify it_resb from wa_resb index tc-current_line.
ENDMODULE.
**
Use the below statement in a module after loop:
delete it_resb where <field_name> = 'X'.
**
MODULE CHANGE_TC_ITAB.
data: lv_lines type i.
delete itab where check = 'X'. " check is a column in itab
describe table itab lines lv_lines.
tc-lines = lv_lines.
ENDMODULE.
MODULE SHOW_TC.
move-corresponding wa_resb to RSEB . " RESB in screen
ENDMODULE.
2008 Aug 21 2:09 PM
Hi
After
PROCESS AFTER INPUT
LOOP
MODIFY..e.t.c (which will be modify the TC after you put the select the check box)
ENDLOOP
MODULE USER-COMMAND.
Inside the above module
Code Like This
IF SY-UCOMM= 'DELETE' --> (Your Case)
LOOP AT TC1 INTO WA_TC1 WHERE CHECKBOX = 'X'.
DELETE TC1 INDEX SY-TABIX .
ENDLOOP.
ENDIF.
Thanks & Regards
Mallikharjuna Reddy
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |