SAPScript – Error in ‘IF’ statement

pts.
Tags:
SAP ABAP
I need to display my values in 2 separate columns for debit and credit. The source is from the same location (RF140-WRSHB) so I've added a condition for displaying : *********************************** IF &RF140-WRSHB& LT 0 &RF140-BELEGNUM&,,&BSID-BLDAT&,,&SPACE&,,&RF140-WRSHB& ENDIF IF &RF140-WRSHB& GE 0 &RF140-BELEGNUM&,,&BSID-BLDAT&,,&RF140-WRSHB& ENDIF *********************************** However,even when the value is +ve/debit, it will still go to the first clause. I'm new to SAPScript, appreciate anyone's advice and suggestion. Thanks!

Answer Wiki

Thanks. We'll let you know when a new response is added.

First I would check to see that there are 3 tabs accross on the line that you are using. Just putting in a “,,” will not move the output if there is not another tab on the line.
Next, I would change the code to
if
elseif
endif
This is always safer than 2 ifs.
If this does not work I would create a 2 text variables in the program and put the value, positive or negative, into one of them and clear the other. Then print both in the SAP Script without any if’s there.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following