Skip to Content
avatar image
Former Member

Runtime Error in Total ammount calculations in smartforms.

Dear Friends,

In my PO smartform i am calculating TOTAL AMOUNT in the CODE .

INPUT PARAMETER -


OUT PARAMETER

I_EKPO-MENGE V_BASICAMT(like ekpo-netpr)

I_EKPO-NETPR

in the editor.

v_basicamt = i_ekpo-menge + i_ekpo-netpr.

while executing its goes for a shart dump saying :-

"the result field of typr p is too small for the result."

Please advice...

thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jul 13, 2009 at 07:12 AM

    I generally use floating point value

    data: lv_f type f. for total value... and then use Float to character convert FM and use that for display.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 13, 2009 at 07:09 AM

    Hi,

    The type used for v_basicamt is not long enogh to store the result of the calculation v_basicamt = i_ekpo-menge + i_ekpo-netpr.

    Use a longer type like data element WERTV13.

    Regards,

    Ankur Parab

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 13, 2009 at 07:32 AM

    Change the declaration of the variable v_basicamt to hold the bigger values.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 13, 2009 at 07:37 AM

    Hi,

    v_basicamt = i_ekpo-menge * i_ekpo-netpr.

    Declare Menge in Quantity fields.

    Add comment
    10|10000 characters needed characters exceeded