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

Text in alv grid

Hi,

i have a scenario like this.In alv when we total columns i want to get some text like 'TWH' followed by the totals.

for ex.

5

10

15

twh 30

is that possible that to populate our own text in alv grid.iam using CLASSIC ALV not classes one.If yes kindly send me the code how to do it.

thanks in advance

kiran

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2005 at 12:48 PM

    Hi kiran,

    It is possible.

    If you are using 'REUSE_ALV_LIST_DISPLAY',

    then before calling it use

    data : lv_layout TYPE slis_layout_alv,

    LV_LAYOUT-TOTALS_TEXT = 'twl'.

    and pass lv_layout in the export parameter of the function - IS_LAYOUT.

    just see the code below for better understanding

    LV_LAYOUT-TOTALS_TEXT = TEXT-TTL.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    IS_LAYOUT = LV_LAYOUT

    IT_FIELDCAT = LV_FIELDCAT[]

    IT_SORT = LV_SORT[]

    I_DEFAULT = 'X'

    I_SAVE = 'A'

    TABLES

    T_OUTTAB = IT_OUTTAB

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    IF SY-SUBRC <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Regards,

    Pradhiba

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Actually this twh which we pass thru layout will come in the first column as column heading and the total wil be displayed in the column which u r summing up. like,,

      material value

      a 5

      b 10

      c 15

      -


      twh 30

      -


      am not sure of two headings...

      regards

      Pradhiba

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.