2006 Oct 01 8:06 AM
hi all,
i wana delete selected rows from the table control with the follwing code.
loop at itab.
if itab-mark = 'X'.
delete itab.
endloop.
problem is even after selecting the the rows itab-mark is not conatining X.
when im defining mark in itab, i have done it as mark(1) type c.
Is that rite?
If not how?
Thanks a lot.
2006 Oct 01 8:16 AM
hi,
chk this link.
it will solve ur issue.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
regrds
anver
if hlped mark points
2006 Oct 01 8:16 AM
hi,
chk this link.
it will solve ur issue.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
regrds
anver
if hlped mark points
2006 Oct 01 12:53 PM
Hi,
Hope this code will help you out.
LOOP AT itab WHERE mark = 'X'.
DELETE itab.
ENDLOOP.
If so, please mark it.
Best Regards
Renjan
2006 Oct 01 1:47 PM
hi,
this will help you to solve your prob.
LINE is the name assigned to the selection button(in screen) in table control.
In PAI
loop with control table-control(name).
itab-chk = LINE.
endloop.
loop at itab.
if itab-chk = 'X'.
delete itab.
endif.
endloop.
award points if found useful.
2006 Oct 01 2:00 PM
Hi
In PAI process you have to store the value of mark field in your iternal table:
PROCESS PAI.
LOOP AT ITAB.
FIELD <FIELD MARK>.
MODULE MODIFY_ITAB.
ENDLOOP.
MODULE USER_COMMAND.
MODULE MODIFY_ITAB.
if the name of field mark in table control is
different from ITAB one, you need this line:
ITAB-MARK = <FIELD MARK>.
Save data from table control to ITAB
MODIFY ITAB INDEX <TABLE CONTROL>-CURRENT_LINE.
ENDMODULE.
MODULE USER_COMMAND.
CASE OK_CODE.
WHEN 'DELE'. DELETE ITAB WHERE MARK = 'X'.
ENDCASE.
ENDMODULE.
Max
2006 Oct 01 2:26 PM
Hi,
follow below logic and try
modify itab index tc-current_line
loop at itab.
if itab-mark = 'X'.
delete itab.
endloop.
regards
amole
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |