‎2018 Feb 07 12:04 PM
Hi experts,
I have a problem within a SAP Script form while checking a value to add a SO10 text.
In the header text I want to check if VKORG = '0005'.
In debugging mode I can see that the value is correct filled, but the statement is skipped.
Thats the Code:
/: IF TVKO-VKORG = '0005'.
* INCLUDE &VBDKA-TDNAME& OBJECT VBBK ID 1234 PARAGRAPH ZD.
/:
/: ENDIF.
/: INCLUDE &VBDKA-TDNAME& OBJECT VBBK ID 1235 PARAGRAPH ZD.
At the moment the debugger is standing on the if-line, the value of TVKO-VKORG is 0005.
Any ideas on that?
Thanks in regards for helping
‎2018 Feb 07 1:01 PM
‎2018 Feb 07 1:09 PM
Just now as you asked.
The same problem. It just skipps the line as the requirement wouldn´t be fulfilled.
Could it be something with the prefixes in the lines?
Is '/:' even correct?
Do I have to consider something in the lines above?
I also tested:
/: IF 1 = 1.
That worked... but the other statement is still being skipped.
‎2018 Feb 07 2:10 PM
‎2018 Feb 07 1:08 PM
The paragraph format * means that the line is a text to output. You should use /: for all SAPscript commands, i.e. in your case:
/: INCLUDE &VBDKA-TDNAME& OBJECT VBBK ID 1234 PARAGRAPH ZD.
‎2018 Feb 07 1:12 PM
Thanks for your reply.
I tried both. The basic problem is, that the coding is not reacting correct on the if statement.
As I answered to raymond, I tried it with IF 1 = 1. That works.. even with * at the beginning of the line.
‎2018 Feb 07 2:00 PM
Problem solved. TVKO-VKORG was wrong.. &TVKO-VKORG& works instead.
thanks