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

IF statement.

Former Member
0 Likes
1,028

Good morning all,

how can i write the below in ABAP

if ( a and b ) ne '1'.

write a.

elseif ( a and b ) = '1'.

write b.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,000

Hi

Try this.

if a <> 1 and b <> 1.

write a.

elseif ( a = 1 ) and ( b = 1 ).

write b.

endif.

or

if ( a ne 1 ) and ( b ne 1 ).

write a.

elseif ( a eq 1 ) and ( b eq 1 ).

write b.

endif.

thanks

Shiva

Message was edited by:

Shivakumar Hosaganiger

Good morning all,

how can i write the below in ABAP

if ( a and b ) ne '1'.

write a.

elseif ( a and b ) = '1'.

write b.

thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
1,000

Hi,

<b>if a ne 1 and b ne 1.

write a.

esleif a eq 1 and b eq 1.

write b.

endif.</b>

Regards,

Balavardhan.K

Read only

Former Member
0 Likes
1,001

Hi

Try this.

if a <> 1 and b <> 1.

write a.

elseif ( a = 1 ) and ( b = 1 ).

write b.

endif.

or

if ( a ne 1 ) and ( b ne 1 ).

write a.

elseif ( a eq 1 ) and ( b eq 1 ).

write b.

endif.

thanks

Shiva

Message was edited by:

Shivakumar Hosaganiger

Read only

Former Member
0 Likes
1,000

hi shaheen,

what u have written is absolutely right with slight modification..we follow the same thing in ABAP

if ( a ne 1 ) and ( b ne 1 ) .

write a.

elseif ( a eq '1')and ( b eq '1') .

write b.

endif.

pls reward helpful points,

siva

Read only

Former Member
0 Likes
1,000

hi,

these r the following statements u need to write in ABAP.

IF a <> 1 AND b <> 1.

WRITE a.

ELSEIF a = 1 AND b = 1.

WRITE b.

ENDIF.

reward if helpful.

Read only

Former Member
0 Likes
1,000

Hi

IF a NE 1 AND b NE 1.

WRITE a.

ELSEIF a EQ 1 AND b EQ 1.

WRITE b.

ENDIF.

PLZ REWARd POINTS

Read only

0 Likes
1,000

Thanks guys for your help it is working.