2007 Jun 01 8:00 PM
Hi experts,
I am calculating subtotal for a column in ALV but I want to manipulate the default calculated subtotal value by dividing it by a number before displaying it in ALV.
Please help.Its urgent.
Thanks in advance.
Regards,
Vinaya.
2007 Jun 02 12:39 AM
Hi Vinaya,
You cannot do that.
If you want the AVERAGE instead of total, then you have to set
DO_SUM = 'C'. in the field catalog for that value.
Regards,
Ravi
Hi experts,
I am calculating subtotal for a column in ALV but I want to manipulate the default calculated subtotal value by dividing it by a number before displaying it in ALV.
Please help.Its urgent.
Thanks in advance.
Regards,
Vinaya.
2007 Jun 02 12:35 AM
I am not clear about ur requirement,in alv subtotals,it is possible only column wise and not in row wise.
Let me take one example
On the subtotal and grand total line want to do arithmatic calculations on two fields to be displayed as the total of the third field.
The above case ALV is not possible.
Thanks
Seshu
2007 Jun 05 7:30 AM
yes, it's possible by calling dynamic form SUBTOTAL_TEXT in IT_EVENT of the alv display:
Follow the following steps:
1. Call dynamic form FORM subtotal_text USING p_sub_final TYPE ts_final
p_subtottxt TYPE slis_subtot_text.
Where p_sub_final work area contain the subtotal values , ts_final is the final int table
Modify the field which u want to modify.
Also dont forget to code the following at the time of event handling.same as top-of-page
2.READ TABLE it_events INTO is_event WITH KEY name = slis_ev_subtotal_text
BINARY SEARCH .
IF sy-subrc = 0.
For TOP_OF_PAGE Event, the Subroutine to be Called is SUB_TOP_OF_PAGE
MOVE SUBTOTAL_TEXT TO is_event-form.
MODIFY it_events FROM is_event INDEX sy-tabix .
CLEAR is_event .
ENDIF.
ENDIF.
try this.......it will work
thanks
PR R
2007 Jul 18 7:54 PM
Hi,
I am working with the SUBTOTAL_TEXT but i've an error with
TYPE ts_final, when i run the program this is giving me an error, the system show the next message: "This type ts_final it`s unknown". Please i need urgent help with this. If you can give me the abap code to have a work reference.
thanks. .:Liordi:.
2007 Jun 02 12:39 AM
Hi Vinaya,
You cannot do that.
If you want the AVERAGE instead of total, then you have to set
DO_SUM = 'C'. in the field catalog for that value.
Regards,
Ravi
2007 Jun 12 11:01 AM
Hi,
Me too faced the same problem, but was not able to trigger the dynamic form SUBTOTAL_TEXT,
Is any prerequiste to trigger this event?
Thanks
sandeep