2013 May 10 7:28 AM
Hi guys .
i need to use select option in function.
anyone can give me an example?
Thank you.
Cagri.
2013 May 10 8:02 AM
Hi,
What you need to do is create an input (table) parameter that has a structure containing the fields
SIGN, OPTION, LOW, HIGH.
For example, look at structure LAND_RNG in SE11, which allows you to specify a range of countries.
You might be able to find a standard SAP structure for your requirements, or you may have to build your own.
Once passed in, this range table can be used in SELECT statement just like a select-option.
cheers
Paul
Hi,
What you need to do is create an input (table) parameter that has a structure containing the fields
SIGN, OPTION, LOW, HIGH.
For example, look at structure LAND_RNG in SE11, which allows you to specify a range of countries.
You might be able to find a standard SAP structure for your requirements, or you may have to build your own.
Once passed in, this range table can be used in SELECT statement just like a select-option.
cheers
Paul
2013 May 10 7:47 AM
Hi Cagri,
You have 2 options
1)Give 2 fields low & high in import parameters and u can write select in program.
In where u can write field in between low & high.
2)In tables u can create entries with low high or multiple values and write select on them
using for all entries.
2013 May 10 7:54 AM
Hi Cagri,
You need to declare an internal table of the same type you created in your program and then append the entries of the select option to this table.Now pass this internal table to your FM.
Thanks,
Namrata
2013 May 10 8:02 AM
Hi,
What you need to do is create an input (table) parameter that has a structure containing the fields
SIGN, OPTION, LOW, HIGH.
For example, look at structure LAND_RNG in SE11, which allows you to specify a range of countries.
You might be able to find a standard SAP structure for your requirements, or you may have to build your own.
Once passed in, this range table can be used in SELECT statement just like a select-option.
cheers
Paul
2013 May 10 8:06 AM
Oh yeah, you asked for an example:
FUNCTION SD_ROUTE_ALL_NODES.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" TABLES
*" O_TVROKN STRUCTURE TVROKN
*" I_TVRO_RNG STRUCTURE TVRO_RNG OPTIONAL
*" I_LAND_RNG STRUCTURE LAND_RNG OPTIONAL
(...)
SELECT * FROM TVRAB INTO TABLE XTVRAB
WHERE ROUTE IN I_TVRO_RNG ORDER BY ROUTE ANFRF.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |