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

Query - If doesn't work with is initial

antonio_bruno
Participant
0 Likes
1,217

Hi,

I've problem with an if in a query.

In particular when the select field SS (special stock declared as selection criteria) hasn't values, the 2nd if doesn't work (if... SS is initial).

I've debbugged the query, the SS is empty but the program jump the 2nd if and goes directly to endif,

Where is the mistake?

Thanks and regards.

Antonio

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,179

HI,

try to write IF SS[] is initial and check.

Hi,

I've problem with an if in a query.

In particular when the select field SS (special stock declared as selection criteria) hasn't values, the 2nd if doesn't work (if... SS is initial).

I've debbugged the query, the SS is empty but the program jump the 2nd if and goes directly to endif,

Where is the mistake?

Thanks and regards.

Antonio

4 REPLIES 4
Read only

0 Likes
1,179

need the work area o the values in the internal table with header?

Read only

Former Member
0 Likes
1,180

HI,

try to write IF SS[] is initial and check.

Read only

Former Member
0 Likes
1,179

Hi,

To make sure that it is the 'SS is initial' condition that is getting missed, split your if into two (for testing only).

IF ( DD NE ' ' ) AND ( MAG NE ' ' ) AND (TM NE ' ' ).

IF (SS[] IS INITIAL).

....

ENDIF.

ENDIF.

Thanks,

Leena

Read only

0 Likes
1,179

Hi,

I've solved with elseif instead if.

Now the elseif works properly also without [].

Thanks for the help.