Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error ! sap script pc editor

Former Member
0 Likes
1,848

Hello friends ,

I am changing a form but when i try to open in graphical pc editor . It is not able to do so and takes me to the normal editor .

My IF ...condition is really long . I have written the command as

/: IF a = b or c = d

/ or e = f ....

/ or g = h .

The second line after the command line is not getting excecuted as a command but getting printed on the form as is .

Please advise on this . What should be the next line after the command line if it is the continuation of the IF ....

Thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,708

Make sure that you are using the right paragraph format code before it. Should be /: for all the statements.

/: IF a = b or c = d 
/: or e = f ....
/: or g = h .

Regards,

Rich Heilman

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,709

Make sure that you are using the right paragraph format code before it. Should be /: for all the statements.

/: IF a = b or c = d 
/: or e = f ....
/: or g = h .

Regards,

Rich Heilman

Read only

0 Likes
1,708

Or if it will not except that long of an IF statement(with mulitple lines) you can put this logic in your print program and set a single flag, then in the sapscript, just check that flag.

/: IF flag = 'X'

/: Endif

Regards,

Rich Heilman

Read only

0 Likes
1,708

Hi Rich ,

Thanks for the suggestion . Well it still dosent recognize the second line . This is how i have written in the editor .

/:IF &EKKO-EKORG& EQ 'ccc' OR &EKKO-EKORG& EQ 'ddd'

/:OR &EKKO-EKORG& EQ = 'abc'

Am i missing a perdiod after the second line above . please let me know . Thanks

Read only

0 Likes
1,708

If your IF statement is very long, it may be better to put this logic in your print program, and set a flag. Then just check that flag with a simple IF statement.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,708

Hello Hari,

Press Shift+F8 the editor line will be exetended. there u can continue with the if condition.

To return back press the same key.

Hope this will solve ur problem.

Dön't forget to reward points,

Regards,

Vasanth

Read only

Former Member
0 Likes
1,708

hi hari,

/: IF a = b or c = d

/: or e = f ....

/: or g = h .

Read only

Former Member
0 Likes
1,708

hi Hari,

do this way i.e, fetch these values from the print/Driver program

<b>/: IF &a& = &b& or &c& = &d&

/: or &e& = &f& ....

/: or &g& = &h& .</b>

Regards,

Santosh

Read only

Former Member
0 Likes
1,708

hi,

do this way:

/: IF a = b or c = d

/: or e = f

/: or g = h

/:endif.

regards,

keerthi.

Read only

0 Likes
1,708

Sorry, but this will fail:

/: IF a = b or c = d

/: or e = f

/: or g = h

/:endif.

There is no way I have found to continue a SapScript command line: max 130 chars available.