Skip to Content
avatar image
Former Member

Arithmatic in SAP Script

Hi All,

How to Multiply the RATE and QTY field in SAP Scripe.

e.g.

How to do

&AMOUNT& = &RATE& <b>*</b> &QTY&

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Dec 06, 2007 at 06:39 AM

    hii chetan

    this u can do it in the print program

    not in the script

    rewards point if it is helpful

    regards

    Jaipal

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 06, 2007 at 07:01 AM

    hi!!!

    At first, calculate (amount = rate * QTY) in print program and call that amount

    in the script.

    u'll get the solution..

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 06, 2007 at 08:28 AM

    To do this , from SAPscript you should call external subroutine and do all your calculations and pass the value to your SAPscript.

    Ex:

    Go through this example

    Ex.

    /: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>

    /:USING &<field name>&

    /:CHANGING &<field name1&

    /:ENDPERFORM

    Then create subroutine pool program and you have to write the code.

    FORM ><subroutine name> tables int_cond structure itcsy

    outt_cond structure itcsy.

    data : value(20), value1(20). "do your own declarations

    Read int_cond table index 1.

    value = int_cond-value.

    value1 = value1 + value.

    Read outt_cond table index 1.

    outt_cond-value = value1.

    Modify outt_cond index 1.

    ENDFORM.

    Just rough idea given above.

    Close the thread once your question is answered.

    Regards,

    SaiRam

    Add comment
    10|10000 characters needed characters exceeded