Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

subtotals on tech field in reuse_alv_grid_display

I have a report that is using reuse_alv_grid_display

Ihave a requirement to have a subtotal for a field that includes both numeric and alpha content (the subtotals should ignore the alphas). See below for details

key field data field

a 1

a 0

a 3

a text


total for a 4

What I had done was defined an additiona field (data_tech) as numeric - and populated it with all the data from my data field - but where there was a text - populated it with 0.

I set this numeric field as tech, and dosum.

I also had an aditional key field (key_tech) which contains the same data as my key field.

In my report I set the sort to up on key and key_tech. I set key_tech as subtot.

I set dosum on both data and data_tech.

I define a subtotal_text form which is triggered when the subtotal for the tech field key_tech is reached. At this point I move the values calculated from es_data for field data_tech into data.

This all works fine - until I set the field data_tech to tech. The second I do that - there are no values in ANY of my fields in es_data. It still gets to subtotal_text - but there are no values in the fields. If I take the tech out - then all fields have the correct values - but I really do need to hide the duplicate coloums.

The frustrating thing is this DID work yeterday - and then I went and cleaned up my code and added comments. Not sure what I changed and now no matter whayt I try it does not work.


Former Member
Not what you were looking for? View more on this topic or Ask a question