03-30-2006 6:58 PM
Hello,
I am working on adding some logic to an Infoset created in SQ02 (Join of two customers tables key field kunnr -one to many relationship).
I need to modify the output list in order to display the total amount per customer and not to display the details.
I added a new output field and try to use "collect" statement using an internal table. But it does not work.
So Is it possible to modify the output list ?
Any help is appreciated..
Thanks.
SR.
03-30-2006 7:06 PM
what is the code you put in for this new field?
Regards,
Suresh Datti
03-30-2006 7:16 PM
Under DATA
DATA: BEGIN of i_bsid occurs 1000,
customer like bsid-kunnr,
amount like bsid-dmbtr,
end of i_bsid.
Under Additional Field/structure Code
clear i_bsid.
move bsid-kunnr to i_bsid-customer.
move bsid-dmbtr to i_bsid-amount.
collect i_bsid.
t_amount = i_bsid-amount.
I am getting the same value as bsid-dmbtr in i_bsid-amount. It's not collecting the amount per customer.
03-30-2006 7:22 PM
Hi Sara,
try this..Under DATA make
AMOUNT type P decimals 2.
Regards,
Suresh Datti
03-30-2006 9:41 PM
Hello Suresh,
I tried it, but still does not work.
I also added the code to the Record Processing section, but I still get the same results.
03-30-2006 9:58 PM
I used additional field most of the time to display some thing , like text,land,totals etc .
I am assuming if you already define the table which has some number field and you want to display its total .
you can define a P type variable .
for example !! lets say you have some field in table bsid-dmbtr ) and you are reading this table in your info set .
Define another variable and write code like
Data : amount like bsid-dmbtr.
Amount = bsid-dmbtr + amount .
you can output this field and display the total of the value .
I hope thisll give you some guide line .
Please award the points ..dont forget Encouraging part
Thanks