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

Creating a range table type

Former Member
0 Likes
25,929

Hello Gurus,

How do you create Range Table Type?

Thanks!

Jeffrey

10 REPLIES 10
Read only

anversha_s
Active Contributor
0 Likes
4,739

hi,

<i><b>Define a range:</b></i>

Ranges: r_field for <table>.

if not field1 is initial.
r_field-sign = 'I'.
r_field-option = 'EQ'.
r_field-option-low = field1.
append r_field.
endif.

if not field2 is initial.
r_field-sign = 'I'.
r_field-option = 'EQ'.
r_field-option-low = field2.
append r_field.
endif.

if field1 is initial and field2 is initial.
r_field-sign = 'I'.
r_field-option = 'EQ'.
append r_field.
endif.

select * from <table> where field1 in r_field.

rgds

anver

Read only

0 Likes
4,739

data: zip(6) type n.

data: year(4) type c.

ranges: r_zip for zip.

ranges: r_year for year.

clear r_zip.

r_zip-sign = 'I'.

r_zip-option = 'EQ'.

r_zip-low = '301526'.

append r_zip.

clear r_zip.

r_zip-sign = 'I'.

r_zip-option = 'BT'.

r_zip-low = '30111'.

r_zip-high = '301136'.

append r_zip.

clear r_year.

r_year-sign = 'E'.

r_year-option = 'LT'.

r_year-low = '2005'.

append r_year.

if p_zip in r_sip

and p_year in r_year.

endif.

Read only

Former Member
0 Likes
4,739

<b>Hi

Range is nothing but like SELECT_OPTIONS in Reporting

Like

Ranges: sdate for sy-datum occurs 1.

sdate-sign = 'I'.

sdate-option = 'EQ'.

sdate-low = sy-datum - 1.

sdate-high = sy-datum.

append sdate.

Then

in SELECT use IN operator.

Regs

Manas Ranjan Panda</b>

Message was edited by:

MANAS PANDA

Read only

Former Member
0 Likes
4,739

hi,

Check

Regards,

Santosh

Read only

Former Member
0 Likes
4,739

Hi Jeffrey

Please check <b>CURTO_MATNR_RANGE_T</b> via SE11.

Kind Regards

Eswar

Read only

former_member404244
Active Contributor
0 Likes
4,739

Hi,

for example.

Ranges: R_field for Vbak-vkorg.

r_field-sign = 'I'.

r_field-option = 'EQ'.

r_field-option-low = '1000'.

append r_field.

r_field-option-low = '2000'.

append r_field.

r_field-option-low = '3000'.

append r_field.

In this way u can do it.

regards,

nagaraj

Read only

michael-john_turner
Active Participant
0 Likes
4,739

Hi,

You can also do:


data:
itab type range of field.

Where <i>field</i> could be a data element, etc.

MJ

Read only

Former Member
0 Likes
4,739

Hello Guys!

I'm so sorry I forgot to mention how to create it in the data dictionary.

Thanks!

Jeffrey

Read only

0 Likes
4,739

hi,

create a domain for ur data elemnt of ur fiedl.

in the domain give value range.

Rgds

anver

Read only

0 Likes
4,739

Have you checked my reply.

Check the table type that i have provided, which can help you..

Kind Regards

Eswar