2007 Jul 06 2:02 PM
hello everybody
I need a small information about at new control ..like when i'm using this control to get every new vendor details ...in the out put its coming the related data like ********** .why its comin like this .can i know .please help me out .
thanks®ards
Lavanya
2007 Jul 06 2:04 PM
after AT NEW , READ the itab
Loop at itab.
at new lifnr.
<b>READ TABLE ITAB INDEX SY-TABIX.</b>
endat.
endloop.
hello everybody
I need a small information about at new control ..like when i'm using this control to get every new vendor details ...in the out put its coming the related data like ********** .why its comin like this .can i know .please help me out .
thanks®ards
Lavanya
2007 Jul 06 2:04 PM
after AT NEW , READ the itab
Loop at itab.
at new lifnr.
<b>READ TABLE ITAB INDEX SY-TABIX.</b>
endat.
endloop.
2007 Jul 06 2:10 PM
Thank you for your response sir.
but the thing is why those ****** are coming in place of my data . i want to know .can u please help me.
thanks & regards
lavanya
2007 Jul 06 2:15 PM
The reason for such happening is,
Suppose the records are like
100 abc
100 def
100 ghi
200 abc
200 def
200 ghi.
You want the output to be displayed as
100 abc
def
ghi
200 abc
def
ghi.
But when you use Control events, you are reading the value of first field as 100 and then you have 3 different values to be printed(i.e., abc, def, ghi). So the system will not be able to judge which value to print and it prints that ***** sequence.
To avoid this we use READ TABLE...
Regards,
Pavan P.
2007 Jul 06 2:18 PM
One way to get the original values is to use a temporary work area for the loop:
LOOP AT lt_tab INTO lw_temp.
Copy work area to avoid dataloss during AT command
lw_tab = lw_temp.
AT NEW some_field.
At this point use the original work area lw_tab instead of lw_temp to avoid *****
ENDAT.
ENDLOOP.
Hope it helps
2007 Jul 06 2:11 PM
AT for group change
Change of group when processing loops of extracts and internal tables.
Syntax
AT NEW <f>.
AT END OF <f>.
AT FIRST.
AT LAST.
AT <fg>.
The statements are used to process group levels within a loop using an extract dataset or an internal table. They introduce statement blocks that must be closed with ENDAT. The statements between AT and ENDAT are only executed if the corresponding group change occurred.
When ever you use the control events and display the data you get some scrapped values.
So, to avoid it use <b>READ TABLE <table name> INTO <WA></b>. and then print the values.
Regards,
Pavan P.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |