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

SAPScript - using "If" statements

I am trying to modify a SAPScript form which we use for an invoice when billing retirees for health benefits. We have recently had a scenario where a retiree paid in advance, so he basically has money on account and doesn't owe next month. My users want the invoice changed so that if there is money on account the bill says "Balance", but if the retiree owes it says "Balance due". I have tried formatting my "If" statement several ways and have even debugged it to make sure the fields are filled like I think they should be. No matter what the field's value is, it always thinks there is money on account and prints "Balance". Am I missing something??

Thanks,

Mary Kerschke

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 20, 2005 at 06:00 PM

    I have found that IF statements in SAPscripts are a little funny. I've found that making your IF statements as simple as possible seems to help.

    ie.

    IF &FIELD1& = 'A'

    ENDIF

    Please post your IF statement. Maybe we can restructure it.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2005 at 12:31 AM

    Try the following:

    IF &RF140-SALDO(C)& > '0' 
    <B1>Balance due,,,,,,&RF140-SALDO&</>
    Else
    <B1>Balance,,,,,,&RF140-SALDO&</>
    Endif
    

    The difference is the (C) within &...&.

    Brian

    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.