2012 Jun 12 3:59 PM
Dear Experts,
Iam outputting some datas on to the screen using ALV.
The code used is as follows:
DATA: go_alv_grid TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE slis_layout_alv.
gs_layout-lights_fieldname = 'TRAFFIC'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_structure_name = 'ZOFFPOS'
is_layout = gs_layout
TABLES
t_outtab = gt_offpo.
Please refer the attached image to see the output.
Now I have the following reqirements.
1. I want to claculate the number of "Kreditor"(Field Name in the image)
I sorted the field according to kreditor.Is there a way to show the Number(In this example 3).
2.
Want to calculate the number of lines per "Kreditor".
3.The "Betrag" field need to be summed up per "Kredior" ,when it is sorted per Lieferant
or
4.The "Betrag" field need to be summed Per "Soll/Haben" Field.(S and H)
Is there any way in ALV to achive this.
Thanks a lot
P
2012 Jun 13 11:15 AM
Hi Arun
You can calculate the number of 'Kreditor' (and all other required calculations which you want ) using your internal table. But ALV could not be used for the same.
Where do you planned to display the number in the ALV ?
Regards,
Manu B
2012 Jun 13 11:15 AM
Hi Arun
You can calculate the number of 'Kreditor' (and all other required calculations which you want ) using your internal table. But ALV could not be used for the same.
Where do you planned to display the number in the ALV ?
Regards,
Manu B
2012 Jun 13 12:35 PM
Okay,If I have to calculate all the requirements looping through the itab,What would be elegant way to display it.
Can I display it in the same dynpro(alv Dynpro) using write statement.
2012 Jun 14 5:11 AM
You can display the these details in TOp_OF_PAGE.
Or I guess the better way would using events like "CLICK' on some column give details of that column i.e. suppose if you click on the column 'KREDITOR', it will give the umber of Distinct 'KREDITORS' etc.
2012 Jun 14 10:01 AM