‎2006 Oct 10 2:50 PM
Hi All,
When I use control break statements in the loop, I could get * in the output display for the field, which I set the AT New operation.
I sorted the internal table with the primary key, consequently with the other fields in order.
Still, I get * in the output.
Kindly, guide me in this regard. Thanks.
‎2006 Oct 10 2:56 PM
hi,
assaign it to a work area before control brk statemnt.
loop at itab.
wa =itab.
at new ..
write wa-...
endloop.
rgds
anver
pls mark all hlpful answers
‎2006 Oct 10 2:52 PM
hi,
Use READ table statement after that ..
AT NEW.
READ TABLE it_combined INDEX v_tabix.
WRITE : IT_COMBINED-FIELD1.
ENDAT.
REgards,
Santosh
Message was edited by: Santosh Kumar P
‎2006 Oct 10 2:52 PM
Hi Cartesian,
Whenever you use Control Breaks at a field,
all the fields after that gets *.
So before using Control Break stmt, pass the data into another work area of same type and use for printing.
Reward point if it helps.
Manish
‎2006 Oct 10 2:53 PM
Simply move the data to a work area and write the data that is in the workarea instead.
data: begin of itab occurs 0,
fld1 type c,
fld2 type c,
fld3 type c,
end of itab.
data: wa like line of itab.
loop at itab.
wa = itab.
at new fld1.
write:/ wa-fld1, wa-fld2, wa_fld3.
endat.
endloop.Regards,
RIch Heilman
‎2006 Oct 10 2:54 PM
Please note that when an AT event is fired (i.e. AT NEW, AT FIRST, AT END OF ) etc..the columns to the right of the defined field are all asteriked out hence if you try and display the value of that field it would be asterik.
Example.
Itab Structure
matnr
werks
lgort
qty
loop at itab.
at new werks.
=>here the value of lgort and qty would be *
endat.
endloop.
If you want to read the value...you can do the below.
loop at itab.
fs_tab = itab.
at new werks.
=> here you can use fs_tab values
endat.
‎2006 Oct 10 2:56 PM
hi,
assaign it to a work area before control brk statemnt.
loop at itab.
wa =itab.
at new ..
write wa-...
endloop.
rgds
anver
pls mark all hlpful answers
‎2006 Oct 10 3:49 PM
‎2006 Oct 10 4:02 PM
‎2006 Oct 10 2:56 PM
Hi,
after at NEW
read table itab index sy-tabix.
and then use write statements...
Regards
vijay