‎2006 Nov 23 8:56 AM
Hello Gurus,
How do you create Range Table Type?
Thanks!
Jeffrey
‎2006 Nov 23 8:57 AM
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
‎2006 Nov 23 8:58 AM
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.
‎2006 Nov 23 8:59 AM
<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
‎2006 Nov 23 8:59 AM
‎2006 Nov 23 8:59 AM
Hi Jeffrey
Please check <b>CURTO_MATNR_RANGE_T</b> via SE11.
Kind Regards
Eswar
‎2006 Nov 23 9:01 AM
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
‎2006 Nov 23 9:13 AM
Hi,
You can also do:
data:
itab type range of field.
Where <i>field</i> could be a data element, etc.
MJ
‎2006 Nov 23 9:23 AM
Hello Guys!
I'm so sorry I forgot to mention how to create it in the data dictionary.
Thanks!
Jeffrey
‎2006 Nov 23 9:25 AM
hi,
create a domain for ur data elemnt of ur fiedl.
in the domain give value range.
Rgds
anver
‎2006 Nov 23 9:25 AM
Have you checked my reply.
Check the table type that i have provided, which can help you..
Kind Regards
Eswar