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: 

convert logic in ABAP.

Former Member
0 Kudos

Hello,

I want to convert following logic in ABAP.

if i_out-belnr is between 90000000 and 99999999.

:

:

endif.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

do this

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

:

:

endif.

Cheers

Snehi

7 REPLIES 7

Former Member
0 Kudos

Hi Rajesh,

Try this

if i_out-belnr GT 90000000 and

i_out-belnr LT 99999999.

:

:

endif.

Former Member
0 Kudos

hi

do this

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

:

:

endif.

Cheers

Snehi

Former Member
0 Kudos

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!

Former Member
0 Kudos

Hi Rajesh,

Your logic also works

,

chk this

if sy-index between 0 and 1.

endif.

former_member188685
Active Contributor
0 Kudos

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.

former_member705122
Active Contributor
0 Kudos

Hi,

Check this link:

Regards

Adil

former_member181995
Active Contributor
0 Kudos

if i_out-belnr between 90000000 and 99999999.

:

:

endif.