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

hi every1

Former Member
0 Likes
656

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.

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
635

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

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.

5 REPLIES 5
Read only

anversha_s
Active Contributor
0 Likes
636

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

Read only

Former Member
0 Likes
635

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

Read only

Former Member
0 Likes
635

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.

Read only

Former Member
0 Likes
635

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

Read only

Former Member
0 Likes
635

Hi,

follow below logic and try

modify itab index tc-current_line

loop at itab.

if itab-mark = 'X'.

delete itab.

endloop.

regards

amole