Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV display

Former Member
0 Likes
690

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

1 ACCEPTED SOLUTION
Read only

former_member209920
Active Participant
0 Likes
660

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

4 REPLIES 4
Read only

former_member209920
Active Participant
0 Likes
661

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

Read only

0 Likes
660

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.

Read only

0 Likes
660

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.

Read only

0 Likes
660

Thanks!