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

how to separate amount in script

I copied standard layout into zform.

amount(wrshb) is coming from standard printprogram Rfkord10.

i want to print separately total debit amount sum which is ( + ) sign

and total credit amount sum which is ( - ) sign.

the filed is Rf140-wrshb.

final i want to display difference between debit and credit amount.

debit - credit = netbalance.

how to do this in scripts.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 05, 2007 at 09:26 AM

    Call sub-routine inside your SAPscript , do your calculation and display the required value...

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