Skip to Content
author's profile photo Former Member
Former Member

Sub Total Text in an ALV using FACTORY Method

Hi Gurus,

My requirement is simple, but I couldn't find any answers under SDN or any other forums. Some of you may ask me to check for the SCN posts, but I almost checked everything.

My requirement is - When I get the Sub-total in my ALV, it should print a text other than the field which has got sub-total value.

My ALV Schema:

-----------------------------
Field1  |  Field2 |  Field 3 |
____   |______ |______ |
           |             |             |
           |             |             |
------------------------------
          Tot. Qty  | 1000.00|
------------------------------- 

.

I have sorted and added the subtotal = 'X' for the field which I need the Subtotal. Added Aggregations to Field3. But where and how to the field 'Tot. Qty', so that it should appear at the Sub-Total Level.

Please guide me if I've missed any of the forums. Again my requirement is to print the Field Name.

Regards,

-Wahid Hussain Syed.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 19, 2012 at 01:07 AM

    I dont think its possible, i also wanted this requirement before i have searched a lot. Not found any useful information.

    But there might be a way. If i found i will post here.

    I always use CL_SALV_TABLE for ALV, so it would be better if we found answer now...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 19, 2012 at 07:32 AM

    Hi,

    You can view this thread for example as it says that this is a limitation in SALV that "The output of totals and subtotals is handled solely by ALV. You can neither pass the results to your application nor manipulate them in any way.". But you can see a work around done for this problem, to be frank that I have not done that and I am only providing this link for your reference.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.