Application Development 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: 

Query - If doesn't work with is initial

antonio_bruno
Participant
0 Kudos

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

Former Member
0 Kudos

HI,

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

4 REPLIES 4

0 Kudos

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

Former Member
0 Kudos

HI,

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

Former Member
0 Kudos

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

0 Kudos

Hi,

I've solved with elseif instead if.

Now the elseif works properly also without [].

Thanks for the help.