cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregation function for field in ALV Webdynpro ABAP

Former Member
0 Kudos

Dear all,

Can I create aggregation function on one field of ALV WDA which that is currency type field and then display the result based on currency key field?

i've tried using code as shown below


  lo_wd_field = lo_model->if_salv_wd_field_settings~get_field( 'TOTAL' ).
  DATA: lo_field_aggr TYPE REF TO cl_salv_wd_aggr_rule.
  lo_field_aggr = lo_wd_field->if_salv_wd_aggr~create_aggr_rule( ).
  CALL METHOD lo_field_aggr->set_aggregation_type
    EXPORTING
      value = if_salv_wd_c_aggregation=>aggrtype_total.
  lo_wd_field->set_reference_field_type( if_salv_wd_c_field_settings=>reffieldtype_curr ).
  lo_wd_field->set_reference_field( 'WAERS' ).

and then i've tried enabled standard function as shown below


lo_model->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).

But Why result of aggregation is not formatted based on currency key?

Best regards,

Agnis Virtinova Avency

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rahul Yadav, thanx for your respon.

But I was referencing those fields to same of Currency Key in structure of my context node.

Any solutions for my problem?

Thanks,

Agnis Virtinova Avency

Former Member
0 Kudos

Hi Virtonova,

My requirement is also simillar.

I want to aggregate total based on Currency key.

In the total for sub groups and final total with out any text or Description getting only single or double or triple ( dots ). .

Is it possible to populate / change with useful text or decription for those rows.

I am not getting Currency type after the total/sub totals.

how to fix this in ALV list after using aggregate for the ALV.

Thanks in advance.

Dav

Former Member
0 Kudos

Hi,

Can you also set the reference field of your component in structure to same currency field i.e. WAERS. the field "TOTAL" should have same reference currency field i.e WAERS