‎2009 Jul 02 10:07 AM
Hi ,
i am populating data using dynamic internal table,
data is coming properly
i can't able to total the column wise data .
how to total the column.
regards,
Mohd.
‎2009 Jul 02 10:15 AM
If u are using the dynamic internal table then your data should be in field-symbols.
Use the below statements to read the data of field symbols
ASSIGN COMPONENT sy-index OF STRUCTURE <wa> TO <comp>.
now <comp> will have the value of that field and u can do whatever u want.
‎2009 Jul 02 10:16 AM
loop at that internal table.
you can use a variable in which you keep adding the value of that field inside loop.
‎2009 Jul 02 10:17 AM
HI ,
After filling the internal table , again loop at this internal table and use AT LAST (control statement) and make another internal table .
Thanks
Shambhu
‎2009 Jul 02 10:45 AM
Hi ,
Use Alv to display dynamic internal table so that u have standard option for Summation.
‎2009 Jul 02 10:57 AM
we dont know exactly how many columns are there in the
internaltable .
regards,
mohd.
‎2009 Jul 02 11:03 AM
hi
u can do it . if able to populate the values in dyanamic internal table you can do totals also .
use AT LAST block on which field you want to do totals .
try it will work..
cheers .
~linagnna
‎2009 Jul 02 11:09 AM
while looping through the dynamic internal table it is considering as charcter value fields also .
regards,
mohd.
‎2009 Jul 02 11:14 AM
<table> is dynamic internal table for totals i declare one more dynamic internal table <table1>.
In which month is an month value that is 2009.01,2009.02.2009.03....,
for calculating the every column total so i am clearing month value ..,
but everytime it is appending one more row to <table1> table .
b'coz it is considering all the fields as character fields ..
LOOP AT <TABLE> inTO <STRUC>.
ASSIGN COMPONENT 'MONTH' OF STRUCTURE <STRUC> TO <FIELD>.
<FIELD> = IFINAL1-WEEK4.
clear: <FIELD>.
collect <struc> into <table1>.
ENDLOOP.
in fieldcatalog i am passing these values..,
IS_LVC_CAT-TABNAME = 'IFINAL'.
CONCATENATE IFINALT-VKGRP IFINALC-ZCARD INTO IS_LVC_CAT-FIELDNAME.
IS_LVC_CAT-SELTEXT = IS_LVC_CAT-FIELDNAME.
IS_LVC_CAT-OUTPUTLEN = 18.
IS_LVC_CAT-CURRENCY = 'WAERK'.
IS_LVC_CAT-CFIELDNAME = IS_LVC_CAT-FIELDNAME.
need to pass any othere values also.
regards,
mohd.
Edited by: abdul gaffar on Jul 2, 2009 12:15 PM
‎2009 Nov 18 10:28 AM