on 09-25-2008 3:18 PM
i have ods which has field called counter. i want to incremnet counter whenever i read records . so i am planing to put this code in DTP updated routine.
so my counter field : zcnt
please provide me some code
Hi,
do your work by yourself. In case you are facing issues come back and ask. But asking others to do your job is against the rules in here --> see also the rules of engagement.
Siggi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
counter = 1.
Loop at <itab>.
indx = sy-tabix.
itab-<counter field name> = counter.
modify itab index indx.
counter = counter + 1.
ENDLOOP.
However, if you have multiple data packets (if you look in the PSA, you see multiple packages), counter will reset for each packet and it gets much more complicated -- as in my brain starts to hurt when I have to think about all of the overhead necessary to come up with a counter across multiple packets.
Brian
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.