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

SAP Script - Logical expression in multi lines

surya_gupta3
Explorer
0 Likes
1,720

Hi Friends,

How can I write logical expression in more than one lines in SAP script editor?

Case:

I have to write:

IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X' AND &J_1BPRNFHD-SHPUNT& = ' '

I am writing in first line

/: IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X' AND

and &J_1BPRNFHD-SHPUNT& = ' ' is not coming in the same line. How to write it in more than one line?

What I mean is that:

Can I write like:

/: IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X' AND

/: &J_1BPRNFHD-SHPUNT& = ' '

In fact, above is not working. Please help.

Regards,

Surya

but the rest of the things, that is, &J_1BPRNFHD-SHPUNT& = ' '

1 ACCEPTED SOLUTION
Read only

Former Member
993

shift->F8

5 REPLIES 5
Read only

Former Member
994

shift->F8

Read only

Former Member
0 Likes
993

I'm not an SAP script expert but this is just a suggestion.

Write 2 seperate conditions.

You can replace this:

IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X' AND &J_1BPRNFHD-SHPUNT& = ' '.

.....

ENDIF.

by this:

IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X'.

IF &J_1BPRNFHD-SHPUNT& = ' '.

....

ENDIF.

ENDIF.

Read only

Former Member
0 Likes
993

even you can write like this :

/: IF &J_1BPRNFHD-DIRECT& = '1' AND &J_1BPRNFHD-MANUAL& = 'X' AND

= &J_1BPRNFHD-SHPUNT& = ' '

else shift->F8 function will work..

Reward Points if it is helpful

Thanks

Seshu

Read only

Former Member
0 Likes
993

You can use SHIFT F8 when you reach to the end of the line it will give you more space to write. However you can also write your expression in the new line.

Insted of /: leave it blank. blank means its a continuation of the previous line.

Shreekant

Read only

0 Likes
993

Thanks all~

Issue got resolved. Thanks again.