Skip to Content
avatar image
Former Member

total

hi if in a report i want the total of all the amounts that are there in a field and the grand total in words how can i do it??? can u plss help me with code!!!i dont want to use any function module

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 11, 2007 at 07:38 AM

    Hi Sushant-

    It is difficult to put the amount in words withouts using function module..the function module has only one import and one export parameter..and its easy to use..

    Shakir

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2007 at 07:43 AM

    Hi

    You can use the below code in your fieldcatalog:

    Example :

    IF f = 'DMBE2' OR f = 'WRBTR' OR f = 'DMBTR'.

    ls_fieldcat-datatype = 'CURR'.

    ENDIF.

    In the above code I want to have summation for the fields like DMBE2, WRBTR and DMBTR. So i have used ls_fieldcat-datatype = 'CURR.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2007 at 07:47 AM

    Hi

    code.

    -


    wa_layout-zebra = 'X'.

    wa_layout-subtotals_text = 'Total'.

    wa_layout-totals_text = 'Sum of Marks'.

    alv statement.

    -


    is_layout = wa_layout

    Declaration.

    -


    DATA : wa_layout type slis_layout_alv.

    Eg:2

    Try this one

    form build_layout.

    gd_layout-no_input = 'X'.

    gd_layout-colwidth_optimize = 'X'.

    gd_layout-totals_text = 'Totals'(201).

    endform. " BUILD_LAYOUT

    Also check this sample program

    http://www.sapdevelopment.co.uk/reporting/alv/alvlist_code.htm

    <b>Reward if usefull</b>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2007 at 07:47 AM

    Hi

    code.

    -


    wa_layout-zebra = 'X'.

    wa_layout-subtotals_text = 'Total'.

    wa_layout-totals_text = 'Sum of Marks'.

    alv statement.

    -


    is_layout = wa_layout

    Declaration.

    -


    DATA : wa_layout type slis_layout_alv.

    Eg:2

    Try this one

    form build_layout.

    gd_layout-no_input = 'X'.

    gd_layout-colwidth_optimize = 'X'.

    gd_layout-totals_text = 'Totals'(201).

    endform. " BUILD_LAYOUT

    Also check this sample program

    http://www.sapdevelopment.co.uk/reporting/alv/alvlist_code.htm

    <b>Reward if usefull</b>

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2007 at 07:57 AM

    hi

    good

    You can use the WRITE statement to convert the currency value to a character value.

    WRITE <curr field> TO <char field> CURRENCY <currency>.

    reward point if helpful.

    thanks

    mrutyun^

    Add comment
    10|10000 characters needed characters exceeded