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

alv

hi ,

i have 3 fields of amount , 3 fields of currency and a key field.

key amo cur amo cur amo cur

aaa 456 usd

bbb -


-


567 EUR

ccc -


-


-


-


789 INR

-


total

-


i need total of amo based upon currency for each key .

i am using set_table_for_first_display .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 08:59 AM

    be clear

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 09:06 AM

    be specific with ur query

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 09:07 AM

    In fieldcatalog pass 'X' to do_sum parameter for Amt.

    like.

    DATA: l_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.

    CLEAR l_fieldcat.

    l_fieldcat-fieldname = 'AMT'.

    l_fieldcat-tabname = 'ITAB' .

    • L_FIELDCAT-COL_POS = 1.

    l_fieldcat-seltext_l = 'Amount'.

    l_fieldcat-do_sum = 'X'.

    APPEND l_fieldcat TO p_fieldcat.

    CLEAR l_fieldcat.

    Fill the Sort table and pass it to to main fm

    DATA: SORT1 TYPE SLIS_T_SORTINFO_ALV.

    DATA :SORT2 TYPE SLIS_SORTINFO_ALV.

    SORT2-SPOS = '01'.

    SORT2-UP = 'X'.

    SORT2-FIELDNAME = 'CURR'.

    SORT2-SUBTOT = 'X'.

    • SORT2-GROUP = '*'.

    APPEND SORT2 TO SORT1.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER = ' '

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = REPID

    I_CALLBACK_PF_STATUS_SET = SLIS_EV_PF_STATUS_SET

    I_CALLBACK_USER_COMMAND = L_C_USERCOMMAND

    • I_CALLBACK_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_END_OF_LIST = ' '

    • I_STRUCTURE_NAME =

    • I_BACKGROUND_ID = ' '

    • I_GRID_TITLE =

    • I_GRID_SETTINGS =

    IS_LAYOUT = G_S_LAYOUT

    IT_FIELDCAT = FIELDCAT

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    IT_SORT = SORT1[]

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = ' '

    • IS_VARIANT =

    • IT_EVENTS =

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • I_HTML_HEIGHT_TOP = 0

    • I_HTML_HEIGHT_END = 0

    • IT_ALV_GRAPHICS =

    • IT_HYPERLINK =

    • IT_ADD_FIELDCAT =

    • IT_EXCEPT_QINFO =

    • IR_SALV_FULLSCREEN_ADAPTER =

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = IT_SPART

    • 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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2007 at 09:11 AM

    Hi,

    Set the do_sum = 'X" in the fieldcatalog for the amount fields.

    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.