2008 Apr 24 3:33 AM
hey ABAP gurus
does SY-TABIX automatically increments when 'AT NEW' statement is used? if yes, then when does it increment....at the failure of condition or at the non failure??
please help me out with this. it is really urgent.
points will be rewarded
thanks rohit
hey ABAP gurus
does SY-TABIX automatically increments when 'AT NEW' statement is used? if yes, then when does it increment....at the failure of condition or at the non failure??
please help me out with this. it is really urgent.
points will be rewarded
thanks rohit
2008 Apr 24 4:01 AM
Hi,
sy-tabix is used to count the number loops.
at new <field> event is triggered inside the loop if the field value is changed.
generally this event used for sort the field and sum of that particular field at top etc.
Regards,
2008 Apr 24 4:09 AM
Hi Rohit,
SY-TABIX does not increment with AT NEW statement.
it increments only in the internal tables. for everry loop pass of internal table the SY-TABIX increments.
AT NEW is a control break command.
there is no effect on any system field with AT NEW statements. These Control Break statements are only used in loops.
reward if helpful
raam
2008 Apr 24 4:13 AM
Hi,
We will use AT NEW in LOOP only.
So irrespect of AT NEW failure or success, each and every loop of internal table records sy-tabix will get increase.
Pls. reward if useful....
2008 Apr 24 4:23 AM
Hi,
there are 2 system defined variables sy-tabix and sy-index.
Sy-tabix is incremented with in the loop. It indicated iteration number.
Sy-index is imcremented with in do and enddo.
There is no relation between sy-tabix and at-new.
At-new is the loop control statement.
It is triggered when the fields before the control level changes.Means that if you write
at-new field3.
It is triggered when The data present in the fields before field3 changes or the data present in field3 changes.
I think it is useful for you.