08-23-2011 11:24 AM
Hello Guys ,
I have a problem about at new and at end statements, basically I want to use them in a loop with assigning like this :
loop at ti_itab assigning <wa_itab>.
at new of kunnr.
endat.
at end of xref1.
endat.
endloop.
xref1 and kunnr are fields of my table itab , this is the correct form of do this ? I don´t know why the at statements are doing control breaks for every single register in my table ( even when both have the same value of the previous register ) , could you give me an example please. should i use at new of <wa_itab>-kunnr it doesnt work either ?
thank you very much,.
08-23-2011 11:28 AM
In your ti_itab internal table, kunnr is at which position?
Basically it checks all the columns till kunnr if any of the value changes, At new will be triggered.
08-23-2011 11:28 AM
In your ti_itab internal table, kunnr is at which position?
Basically it checks all the columns till kunnr if any of the value changes, At new will be triggered.
08-23-2011 11:33 AM
Hi,
Try to bring the KUNNR field as first colum in your ti_itab table , So that AT new will work perfectly.
Then you can use the at end for XREF1 field.
08-23-2011 11:31 AM
Hi
It can depend on the postions of those fields in the structure of your internal table, because those events can be triggered if a value of the field and/or of a field on the left is changed.
Max
08-23-2011 12:39 PM