cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT - Command across more than one line

Former Member
0 Kudos

Hi

In SAPSCRIPT I'm trying to code (crude I know)


IF  &V55ENAFT-KUNAG& EQ 'M002699' OR &V55ENAFT-KUNAG& EQ 'M002699CUR'
OR &V55ENAFT-KUNAG& EQ 'M002699RDE' OR &V55ENAFT-KUNAG& EQ 'M002699CUR'
OR  &V55ENAFT-KUNAG& EQ 'M002699SEA'

    blah blah blah my text
  
ENDIF

The problem is that the IF statement needs to fit onto three lines. The first line declared with the /: Command Line works ok, but I can't get the SAPSCRIPT to treat the next two lines as part of the statement. I've tried / and leaving it blank, but it just treats the lines as text.

Is there a way of chaining the lines together, or do I have to split the IF into three separate statements?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

Please keep the tag column as blank from second line of if statement. once you exit for the editor, it will treats as a single line.

Regards,

Chandra kavali

Former Member
0 Kudos

This worked for me. Thank you Chandra!!

Former Member
0 Kudos

There is a way to extend command lines beyond the 72 characters...they're difficult to edit, of course, and I'm trying to remember how to do this...I'll edit this if I find the how-to.

in the interim, you could pass the value in a perform.... in program .... using the value, changing a flag....

Former Member
0 Kudos

Hi,

In the text editor it's Shift+F8, but you can only do it once so the most you get is 144. And you're right, it does get a bit difficult to edit jumping left and right along the command.

Does work though.

Regards,

Nick

Former Member
0 Kudos

Try with /: and /= during your initial editing.

Former Member
0 Kudos

Hi,

The equals sign = is the continuation character, which should treat all parts as a single line. That said, when I entered this in the text editor and switched back to the windows editor it still displayed the second line as text. It might still work though when the form is processed.

Regards,

Nick