2005 Nov 29 10:00 AM
Hi all,
In an internal table i have 5 fields.
My requirement is for the last record i have to delete entries only for 3 fields .
Ex: In itab
f1 f2 f3 f4 f5
12 18 19 20 24
09 24 32 25 26
25 26 28 29 30.
So for the last record i want to delete entries for f1 f2 f3(25 26 28) only i need f4 and f5(29 30) for display.
Please kindly help me.
regards
chandu.
2005 Nov 29 10:03 AM
Hi all,
In an internal table i have 5 fields.
My requirement is for the last record i have to delete entries only for 3 fields .
Ex: In itab
f1 f2 f3 f4 f5
12 18 19 20 24
09 24 32 25 26
25 26 28 29 30.
So for the last record i want to delete entries for f1 f2 f3(25 26 28) only i need f4 and f5(29 30) for display.
Please kindly help me.
regards
chandu.
2005 Nov 29 10:03 AM
2005 Nov 29 10:04 AM
Sai,
read itab into waTab index 3.
Clear: waTab-f1, waTab-f2,waTab-f3.
modify iTab from waTab index 3.
Thanks
Kam
2005 Nov 29 10:21 AM
Hi sai,
try this way.....
data last_record type i.
last_record = sy-dbcnt - 1.
loop at itab into wa.
if sy-tabix = last_record.
*use clear
endif.
endloop.
hope this also helps you.
regards,
venu.
2005 Nov 30 1:29 PM
Hi,
to get the number of entries in the internal tab use:
DATA: rows_in_itab TYPE i.
DESCRIBE TABLE itab LINES rows_in_itab.
Then you can read the last row in the itab and modify the fields:
READ itab INTO wa INDEX rows_in_itab.
CLEAR: wa-f1, wa-f2, wa-f3.
MODIFY iTab FROM wa INDEX rows_in_itab.
Kind Regards
Mathias
Message was edited by: Mathias Lange
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |