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: 

selection sentance in ABAP

Former Member
0 Kudos

Hi,

I would like to write the sentance like this.

If parameter 1 (cost centre) OR parameter 2 (order) on selection screen is entered.

DO THIS.

ELSE.

DO THAT.

ENDIF.

******

Now my code is like this, but the system doesn't recognize it ....

IF S_KOSTL OR S_AUFNR IS initial.

do this.

ELSE

DO THAT.

ENDIF:

**********************

Your coleagues suggested this.... what []???

if s_kostl[] is initial.

Select.........

else.

Select from EKKN and then add EKPO and EKKO as left outer join.

endif.

1 ACCEPTED SOLUTION

amit_khare
Active Contributor
0 Kudos

IF <b>S_KOSTL[] is not initial OR S_AUFNR[] IS not initial</b>.

do this.

ELSE

DO THAT.

ENDIF:

3 REPLIES 3

Former Member
0 Kudos

IF S_KOSTL[] is not initial OR S_AUFNR[] IS not initial.

do this.

ELSE

DO THAT.

ENDIF:

amit_khare
Active Contributor
0 Kudos

IF <b>S_KOSTL[] is not initial OR S_AUFNR[] IS not initial</b>.

do this.

ELSE

DO THAT.

ENDIF:

0 Kudos

Uh, if i typed this you suggested, there is Error message...

IF S_KOSTL[] is not initial OR S_AUFNR[] IS not initial.

and the error message is:

Incorrect logical expression: Comparison / SELECT-OPTION can only be

followed by "AND", "OR" or ")".

if i put [] out of the Sentence, there is no abap error, but nothing happend ))

Saso