‎2005 Jul 11 11:39 AM
In Dynamic internal table having 20 fields how can we format this.
can any body have idea how to process through control break statements like(AT LAST SUM, AT NEW etc).
And how to give coloumn heading etc......
‎2005 Jul 11 11:58 AM
‎2005 Jul 11 12:08 PM
Hi
I am already using field symbols.
here is my code.....
LOOP AT <FS_1> INTO <FS_2> .
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <FS_2> TO <field>.
IF sy-subrc = 0.
WRITE <field>.
else.
exit.
ENDIF.
ENDDO.
new-line.
ENDLOOP.
Now i want to do some additions while showing output.
Like i want to use AT LAST.
SUM.
END AT.
I have more than 20 fields in my Dynamic table.
And i want to use ...
AT NEW BUKRS...
SUM.
ENDAT.
so please suggest some code regarding this.
Thanking you,
Deepak.
‎2005 Jul 11 12:15 PM
Hi,
If u want to use AT LAST or AT NEW fieldname, then that fieldname should be the first field in the table u defined or it wont work.
Thanks & Regards,
Judith.
‎2005 Jul 11 12:23 PM
BUKRS is my first field.
RACCt is my second field.
remaining all are TLSVT(Amount type) now i must add these amounts....
Thanking you,
Deepak.
‎2005 Jul 11 12:05 PM
Hi,
try that
field_name = 'BUKRS'.
ASSIGN COMPONENT field_name OF STRUCTURE <dyn_wa> TO <f>.
..
field_name = 'DMBTR'.
ASSIGN COMPONENT field_name OF STRUCTURE <dyn_wa> TO <sum>.
...
AT END OF <f>.
SUM.
uline.skip.
WRITE: / <sum>.
ENDAT.regards Andreas
‎2005 Jul 11 12:32 PM
‎2005 Jul 11 3:21 PM
Hi Deepak,
try sth like that:
AT...
sum.
dO.
ASSIGN COMPONENT sy-index OF STRUCTURE <FS_2> TO <field>.
IF sy-subrc = 0
if sy-index > 2."values after position 2
WRITE <field>.
endif.
else.
Exit.
Endif.
enddo.
...
ENDAT.pls reward points when answers are useful
thanks and regards Andreas
‎2005 Jul 12 5:26 AM
Hi Andreas,
In-side LOOP SUM ia not accepting.
Is there any other possibility.
Thanks,
Deepak.