Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

AT NEW and AT END events

$
0
0

hi

 

i got stuck at one point. can you please suggest me on the following code

 

loop at internal table.

at new invoice.

...

...

endat.

 

read statement.

 

at end of invoice.

...

...

endat.

endloop.

 

internal table has only one record of the invoice- 1234. in this case both "at new" and "at end" events both are triggered right?...

so, if this happens then program should proceed to next iteration of loop. we can proceed to next iteration by using CONTINUE statement but based on what condition this should be done.

 

i used the condition based on sy-tabix.

after AT NEW event, i assigned sy-tabix value to lv_line. in AT END event, i compared lv_line against sy-tabix.

but this is failing because after read statement sy-tabix is getting changed.

 

i hope you understood my question. if so, suggest how to proceed further.

 

thanks in advance.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>