‎2006 May 31 9:47 AM
I tried to create a Ranges Table Type as per SAP Help. It does get created,
But the warning message occurs when create line type for this table type.
I had been through standard help of Creating a Ranges Table Type:
URL:
http://help.sap.com/saphelp_47x200/helpdata/en/4f/991f82446d11d189700000e8322d00/frameset.htm)
The warning message is as under:
Field name OPTION is reserved (Do not use structure as include in DB table)
I replaced this field with another name, then it asks for fieldname "OPTION".
Your valuable suggestions please!
‎2006 May 31 9:49 AM
Hi,
the message is warning so you need not worry about this.
Regards
vijay
‎2006 May 31 9:52 AM
Hi
You can't do nothing there are some words are reserved and they can be used.
That message isn't a warning, the system don't generate the structure if it doesn't change the name.
What do you really want to do?
You can do the std structure SRANGE (has only field sign and option) or SELOPT (has all fields for a range).
Max
‎2006 May 31 9:55 AM
‎2006 Jun 03 10:54 AM
Hi Vijay,
If object is created with warning message, it shows an error message durinf transports.
‎2006 Jun 03 11:35 AM
Hi Max,
Thanx for valuable reply. I tried this way also.
Purpose why I am asking this ...
My report program is having select-options: s_matnr FOR mara-matnr. I need to pass this parameter to FM & in turn, the FM will give me the list of materials. Reason is I need to fetch materials from another R/3 System.
As you said I tried with SELOPT as line type, but I am not able to give "matnr" as data element while defining ranges table type.
Instead of ranges table type, I used "General Table Type" as FM type it shows run time dump message.
Please suggest.
With Regards,
Bapu Aher
‎2006 Jun 03 11:46 AM
Hi
Which fm are you using? Std or custom?
In dictionary try to create a structure like this:
.INCLUDE SRANGE
LOW MATNR
HIGH MATNR
Max
‎2006 Jun 03 12:12 PM
Hi Andreas,
I tried with SELOPT. please see my reply to Max.
Regards,
Bapu
‎2006 May 31 9:52 AM
Hi,
OPTIONS is a key word because of which its throwing a warning. You need not worry about the same as its a part of the RANGES table.
Regards,
Ravi
Note : Please mark all the helpful answers and close the thread if the issue is resolved.
‎2006 Jun 03 10:55 AM
Hi Ravi,
If object is created with warning message, it shows an error message durinf transports.
Regards,
Bapu
‎2006 May 31 9:54 AM
Hi,
Select-option and ranges are built on similar ground.
it used mainly for select query with in clause.
ur not allowed to rename the field of the ranges ; if u do it will not work with select query.
<b>how to declare ranges</b>.
data lit_range type ranges of <any_data type>
then internal table will have following field.
sign option low high
data type of low and high will same type; which u have used for creating ranges.
Mark helpfull answers
Regards
Message was edited by: Manoj Gupta
‎2006 Jun 03 12:10 PM
Thanx Manoj,
Purpose why I am asking this ...
My report program is having select-options: s_matnr FOR mara-matnr. I need to pass this parameter to FM & in turn, the FM will give me the list of materials. Reason is I need to fetch materials from another R/3 System.
Please suggest.
With Regards,
Bapu Aher
‎2006 May 31 10:05 AM
HI,
*Range for Sales document type
RANGES: R_AUART FOR VBAK-AUART.
R_AUART-SIGN = 'I'.
R_AUART-OPTION = 'EQ'.
R_AUART-LOW = 'TA'. "Standard Order
APPEND R_AUART.
PLEASE SEE HOPE HELP.
RAMA
‎2006 Jun 03 12:13 PM
Hi Ram,
please see my reply which I given to max.
It's not working.
Regards,
Bapu
‎2006 Jun 03 2:09 PM
Hi
What is the function module? any way you can declare rangse as follows..
ranges: r_matnr for mara-matnr.
r_matnr[] = s_matnr[].
Regards,
Suresh Datti
‎2006 Jun 03 5:41 PM
Thanx Suresh,
But how do define Tables Parameter corresponding to "r_matnr". Because I need to pass it to FM. How do I define it?
With Regards,
Bapu Aher
‎2006 Jun 03 5:56 PM
Hi
Just I said in my prevoius answer you can define a dictionary structure like this:
FIELD DATA ELEMENT
-
.INCLUDE SRANGE
LOW MATNR
HIGH MATNR
In this way you have a structure like the range R_MATNR, and you can use it to define your paramenter in TABLE PARAMETER of Function:
FUNCTION ZTRANSFER_RANGES.
*"----
""Interfaccia locale:
*" TABLES
*" RMATNR STRUCTURE ZMATNR
*"----
DATA T_MARA LIKE STANDARD TABLE OF MARA.
SELECT * FROM MARA INTO TABLE T_MARA WHERE MATNR IN RMATNR.
ENDFUNCTION.
But you can also define a table parameter without definition:
FUNCTION ZTRANSFER_RANGES.
*"----
""Interfaccia locale:
*" TABLES
*" RMATNR
*"----
DATA T_MARA LIKE STANDARD TABLE OF MARA.
SELECT * FROM MARA INTO TABLE T_MARA WHERE MATNR IN RMATNR.
ENDFUNCTION.
Max