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

convert logic in ABAP.

Former Member
0 Likes
969

Hello,

I want to convert following logic in ABAP.

if i_out-belnr is between 90000000 and 99999999.

:

:

endif.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
938

hi

do this

if i_out-belnr GT 90000000 and i_out-belnr LT 99999999.

:

:

endif.

Cheers

Snehi

Hello,

I want to convert following logic in ABAP.

if i_out-belnr is between 90000000 and 99999999.

:

:

endif.

7 REPLIES 7
Read only

Former Member
0 Likes
938

Hi Rajesh,

Try this

if i_out-belnr GT 90000000 and

i_out-belnr LT 99999999.

:

:

endif.

Read only

Former Member
0 Likes
939

hi

do this

if i_out-belnr GT 90000000 and i_out-belnr LT 99999999.

:

:

endif.

Cheers

Snehi

Read only

Former Member
0 Likes
938

You can use the BETWEEN keyword

if i_out-belnr between 90000000 and 99999999.

:

:

endif.

is the piece of code you can use.

Hope this helps!

Read only

Former Member
0 Likes
938

Hi Rajesh,

Your logic also works

,

chk this

if sy-index between 0 and 1.

endif.

Read only

Former Member
0 Likes
938

You can do this...

data: r_belnr type range of belnr,
      wa_belnr like line of r_belnr.

data: belnr type belnr.

wa_belnr-low = '90000000'.
wa_belnr-high = '99999999'.
wa_belnr-sign = 'I'.
wa_belnr-option = 'BT'.
append wa_belnr to r_belnr.

if i_out-belnr  in r_belnr.

endif.

Read only

Former Member
0 Likes
938

Hi,

Check this link:

Regards

Adil

Read only

Former Member
0 Likes
938

if i_out-belnr between 90000000 and 99999999.

:

:

endif.