Using Wildcard in Parameters
I have several columns used as parameters but the end users would like to be able to search instead of grabbing the entire column. For instance, there is a number column that has size 10. If the data is 5023495999, then they would like to be able to search for all records that begin with 50% in the parameter form. How would I do that? I set up the LOV but that only lets me select one data value.
For your example, a number column, get rid of the parameter and replace with two parameters to make up a range. When the user enters the first parameter, you can default the second parameter to the same value (so that by default they can look for an exact value) but the user can override it.
I'm assuming that in your example, since we're dealing with numbers, would expect the value 5000000000 to be returned but not the value 50 or 507. Thus in your example the user would key 5000000000 and 5099999999 to all values that begin with 50%.
For character parameters, make the prompt something meaningful to the user and let them type Sm% as the value, which you will handle accordingly in your query.
Carrie
Similar Messages
-
EJB3 QL - Selecting with wildcards and parameters
Hi,
Can you please help me create a select query which takes parameters and uses wildcards.
QL:
(List<SubjectEntity>) entityManager
.createQuery("{color:#000080}*SELECT aE FROM SubjectEntity aE WHERE aE.name like :word*{color} ")
.setParameter("word", word)
.getResultList();
I pass Corporate* to my word parameter and my TABLE has a row that contains Corporate Finance as a name and I want it matched by the parameter.
Below is an equivalent statement using SQL*
DB:
SELECT * FROM SUBJECT WHERE NAME LIKE(%?%)
Thanks.One quick fix is in the DAO method where you invoke the query, append a '%' to the end of the word before passing it to the query.
.setParameter("word", word + '%') -
Using wildcards (*) in sender file adapter - FTP type
Hi guys!
Dooes it work using wildcards in sender file adapter (FTP type(!) (filesystem obviously work))? I tried it and it failed. it works only for exact name..
I read some articles about FTP and the result is, that ftp work always only with 1 file, so I'm wondering, if this is possible.
Thanks for info!
OlianThanks for all replies..
I know of course, that * can be used, I use it in many scenarios too. But on a FileSystem. It is not working if the sender type is FTP.
*, ., *.dat, ... nothing like that works.. Just exact file name.
I am able to pick up file, if I specify it's exact name, so there should be no problem with permissions..
Please, I'd appreciate one reply with comfirmation: yes, we are using asterisk (*) , we access source files via FTP and they are processed.
Is there anybody with this experience, that it works?
Thank you!
Olian -
Using wildcards in import statement
I typically use wildcards in my import statements. For example:
import javax.swing.*;
Are there any advantages, though, in specifying exactly which classes I am importing?
For example,
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JEditorPane;
import java.swing.JProgressBar;
// etc.
Specigically, is the resulting class file any smaller if I specify exactly which classes to use and does the Java runtime engine load faster if I specify exactly which classes I use in the import statemetents?
Thanks,Import has precisely zero runtime impact. I believe it is used to help locate the specified class at runtime. Take the following 2 simple source files:
import java.util.Vector;
//import java.util.*;
public class VectorTest
public static void main( String[] args )
Vector v = new Vector();
v.add("Item 1");
v.add("Item 2");
System.out.println( v.get(1) );
public class Vector
public boolean add(Object o)
return true;
public Object get(int index)
return "doh!";
}1) Run the code as is and "Item 2" is displayed
2) Recompile the code using the generic import and "doh!" is displayed.
The point is that by fully qualifying the import statement you are sure you are executing the correct class and not just some class that happens to be lying around somewhere in your classpath. -
Is it possible to use wildcards to match cell contents in an if statement?
I need to return a ID along with some other information on a page by page basis, so that the information comes out linked by position. I use a couple of loops and if statements to navigate through the document. I am able to use exact matches of cell contents which is fine when the contents doesn't vary. But the IDs, though they have a similar pattern, are all different. In a menu driven search, I am able to find what I need with '150^9^9^9^9^9-^9^9^9' But when I try putting this (or any number of [0-9], *, ? combinations) it fails. Is it possible to use wildcards? The symbol used for the match (==) makes me suspect that it is not possible and that only literal, exact matches will work. But I wanted to check with the experts before giving up.
Thanks
pcbazThanks for the input. You're right, a GREP search is much more efficient. But what I'm trying to do and the circumstances here don't allow me, I think, to go that route. I am trying to generate a list of values coming from several textframes on a single page and have them come out so that I can tell which values belong together.
I'm using an inherited document with masters that were created 'manually'; the index numbering for textframes and tables is random. I navigate through the pages, looping through textframe indices asking ' does this textframe exist?' If so, I ask if it is a table -- if no, it is a simple textframe and I ask about the ID, if yes, I ask if the contents of cell (0,0) (invariant position and contents) are equal to the table I want.. I am sending the ID and other pieces of information from the table to one row of a new table on a new page. So the ID and other information from a single page are linked by being in the same row.
I know this a little 'off-normal' -- I'm using the search to navigate through the document and find things by location the way you do with a spreadsheet. I have devised a work-around that helps me get around the fact that the ID is not invariant. I create a list of the (exact) IDs from another document, equating them to a variable ('a'). I then loop through the list of IDs and ask if the contents of the textframe is equal to 'a'..This works o.k, unless there happens to be an extra space, a different kind of hyphen, etc. It would be so much easier if I could use the wildcards that work in a menu-driven text or GREP search in script just to ask about the contents of the textframe.
Thanks again
pcbaz (Peter BIerly)
P.S. we have since rewritten the masters so this problem will not exist in the future -- we now know exactly which textframe and/or table indices to refer to to get any particular bits of information and don't need to ask questions about the contents. -
Using SET GET parameters in ITS
Hi All,
Is it possible to use set get parameters in ITS. We want to set some parameters in a BADI and read the value in ITS Template .
Or is there any other method to do this?
Thanks,
AnubhavSure. In your abap program use the following code
* ITS macros
INCLUDE avwrtcxm.
GET PARAMETER ID 'YOUR_PARAMETER' FIELD SAVE_PARAMETER.
field-set u2018~YOUR_PARAMETERu2019 1 SAVE_PARAMETER.
field-transport.
in the template you can now use ~YOUR_PARAMETER.
regards,
Klaus
Edited by: Klaus Layer on Feb 3, 2009 5:05 PM -
How to use multiple selection parameters in the data model
Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
My data template is the following (it's very simple...I am just testing how the parameters work):
<dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
<parameters>
<parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
<parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
</parameters>
<dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
select deptno, dname,loc
from dept
&p_where_clause
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q2">
<element name="deptno" value="deptno"/>
<element name="dname" value="dname"/>
<element name="loc" value="loc"/>
</group>
</dataStructure>
</dataTemplate>
The 2 parameters are based on these LOV:
1) select distinct dname from dept (p_dep_2_param)
2) select distinct loc from dept (p_loc_1_param)
and both of them have checked the "Multiple selection" and "Can select all" boxes
The package I created, in order to use the lexical refence is:
CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
as
p_dep_2_param varchar2(14);
p_loc_1_param varchar2(20);
p_where_clause varchar2(100);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
then
p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
else
p_where_clause := 'where 1=1';
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
it works perfectly....
Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
So my questions are these:
1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
Thanks in advance for any suggestion
AlexAlex,
the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
So change your package to (you need to expand your variables)
create or replace package bip_departments_2_parameters
as
p_dep_2_param varchar2(1000);
p_loc_1_param varchar2(1000);
p_where_clause varchar2(1000);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
create or replace package body bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
p_where_clause := ' ';
if p_dep_2_param is not null then
if instr(p_dep_2_param,',')>0 then
p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
else
p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
end if;
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
end if;
end if;
else
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
end if;
end if;
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
Regards
Rainer -
How to use SET & GET Parameters in Module Pool
Hi Friends,
Can anyone please tell how to use SET / GET parameters and PARAMETER ID for a text box (Input / Output field ) in module pool? What is the purpose and where do we need to do coding for it?
Note : I will definitely give the marks for good responses.
Thanks in advance,
PradeepHi Pradeep,
You can save values in the SAP memory using a parameter ID. These
are user and terminal-session specific, but available to all internal and
external sessions.
SET Parameter copies the corresponding field contents into the SAP
System memory in the PAI processing block.
GET Parameter copies the corresponding field contents from the SAP
memory at the end of the PBO processing block, after data has been
transferred from the program, if the screen field still has its initial value
You can link an input/output field to an area of the SAP memory in the
ABAP Dictionary.
When you use an input/output field that is defined in the ABAP
Dictionary, its parameter ID is displayed in the Dictionary attribute
Parameter ID in the Screen Painter.
Usage
SET PARAMETER ID: CAR FIELD space,
CON FIELD space,
DAY FIELD space.
Here is the link that explains the usage of GET/SET in detail
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm</a>
Regards,
Sharadha -
In BAPI's why the structures are used in table parameters?
Hello sir,
what is BAPI sir? In BAPI's why the structures are used in table parameters? table parameters they are using structures but not using any customized tables ?
regards
rachu.Hello Rachu
BAPIs provide RFC-enabled interfaces to SAP business objects (e.g. like customer, sales order, purchase order, etc.).
A BAPI does basically the same like you would need to do calling the corresponding transaction (e.g. BAPI_SALESORDER_CREATE -> VA01).
Since they are RFC-enabled they can be called from external systems.
BAPIs represent an external interface for the outside world. Very often you will find within the BAPI that there is a mapping done to the (SAP-)internal structures at the beginning of the coding and vice versa at the end of the coding. Thus, you will (almost) never find any DB table name used as type of a BAPI TABLES parameter.
Regards
Uwe -
How to use wildcard in filename , in SyncRead operation in File Adapter.
Hi All,
Is this possible to use wildcard character in file name while creating file adapter for SyncRead Operation.
I used write*.txt as a file name to read. But got below error -->
file:/C:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_notification2_1.0_93d419d1ca67f87872914bf6daf16180.tmp/readfile3.wsdl [ SynchRead_ptt::SynchRead(Empty,Es) ] - WSIF JCA Execute of operation 'SynchRead' failed due to: No file to process.
File d:\temp\temp1\write*.txt to be processed was not found or not available
; nested exception is:
ORABPEL-11007
No file to process.
File d:\temp\temp1\write*.txt to be processed was not found or not available
Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable.
Best Regards
VikashYou cannot defined the wildcard for the file names. But you can provide the file name dynamically if you are on soa suite 10.1.3.4 minimum. You can get information about that in this link http://download.oracle.com/docs/cd/E12524_01/relnotes.1013/e12523/adapters.htm#CHDBBFBD
-
Hi,
I have a input filed ZPERNR and i have assigend PREMN search help on this field.
I am able to search people in the organisation and it all works great until I use wildcards
When I enter SMITH in the last name in the value help it comes back with the list of people whose last name is SMITH
Problem:
When I enter SMITH* in the last name I get no results
In the SQL trace I noticed it changed my SMITH* to smith%
Not sure if there is any sap note to this issue
Any ideas?Hi Jörg,
Yes the icon (Pattern) does appear after I enter, however I still don't get any results.
The weird thing is the value help works perfectly alright in r/3
Not sure why it is not working for me in the portal.
Thanks for your reply
Kal -
Using Wildcards in Mapping Script
Hi everybody, im new in FDM and i have some doubts about mapping scripts.
I have to recreate this Hyperion Translation Rule into FDM:
ACC_SAP tm_sap Reverse Sign UD4
N21099Z300 {NULL} FALSE CD1
D31199Z000 {NULL} FALSE CD1
????99 * FALSE CD
ACC_SAP is the source account
TM_SAP will be loaded into UD5 (as look up)
How could i manage with a like mapping?
I guess using a script but im not sure how to use wildcards within scripts, is it possible?
Another related question, in a explicit mapping, how can i manage with NULL values if i want to assign them [None] value, do i have to put NULL in th source field?
BR and thanksThanks KellyDGreen. With the exampl shown is as you say but what if tm_sap has wildcards?
F.i
ACC_SAP TM_SAP TARGET_CUSTOM4
999? 123? 198276
Suppose that TM_SAP has been stored in UD5. Source dimensions are different from target dimension so i have to do it via script, dont I?
BR
Francisco -
Hello.
I'm using WLS 5.1 with SP6 running on JDK1.2.2, platform is Windows NT
Server 4.0 SP6.
I want to know if there is a way to use wildcards to create entries for
RDBMSRealm.
The reason I want to use wildcards is that if I create an entry in the
ACLENTRIES table like this...:
A_NAME : weblogic.url
A_PRINCIPAL : testuser
A_PERMISSION : /index.html
I can restrict access for the URL http://localhost:7001/index.html to
"testuser."
However, when I create this entry, weblogic prompts for a username even if I
access a URL other than http://localhost:7001/index.html, for example,
http://localhost:7001/test.html.
When this happens, I cannot access "test.html" by using any of the usernames
that I have listed in my RDBMSRealm USERS table.
I was thinking that this works like the "weblogicURL.policy" file.
If you create one entry in the "weblogicURL.policy" file, all other URL
defaults to "everyone deny access".
I remembered that you can use wildcards in the "weblogicURL.policy" file, so
I tried changing the A_PERMISSION column to the following six patterns...:
A_PERMISSION : *
A_PERMISSION : -
A_PERMISSION : *.html
A_PERMISSION : /*
A_PERMISSION : /-
A_PERMISSION : /*.html
Using the six patterns, I tried to access http://localhost:7001/test.html
each time.
However, none of the four patterns above seemed to work, since I was
prompted and couldn't access even if I tried every username that I have in
my RDBMSRealm, in all of the six cases.
If I cannot use wildcards, this means that I would have to create entries
for every single HTML pages. (probably JSP pages, too)
Is there a way to use wildcards in the RDBMSRealm so that I can simplify
this?
Thanks ahead of time.
RYotaro.Thanks, Terry and Kishore!
I guess it's not a very smart idea to restrict access on URLs using the
RDBMSRealm...
What I was thinking was that if it was possible to put entries for Servlets,
URLs, etc... into one place, it would be easier for managers to manage
access control.
# For instance, it could cause some people confusion if access control for
URLs are listed in weblogicURL.policy and servlets are listed in RDBMSRealm.
It would be better if all of the entries are written in one place.
As a matter of fact, I have tried web-applications some time ago, and am
thinking of going back to it.
# As I recall, web-applications cannot be "hot-deployed." But there's
probably a way to get around it.
Thanks again!
Ryotaro.
"Kishore Talari" <[email protected]> wrote in message
news:[email protected]...
>
Try using a web application! Servlet spec 2.2+, WLS 510, SP6.
You can do a world of URL patterns!
The only change you will have to make is package the jsp/html,etc pagesinto a .war archive and write a web.xml file.
>
"Terry" <[email protected]> wrote:
I'm not sure that this is the way you want to go about it.
AFAICR there is no need to add aclentries in the RDBMSRealm database when
using the weblogicURL.policy file - simply add an entry to the policy
file
allowing access to all urls for all users, then add more specific entries
for those urls you wish to restrict access to. Adding stuff to the
ACLENTRIES table will not have any effect (I know because that is what I
tried first).
The documentation on wublogicURL.properties should tell you all that you
need to know
terry
Ryotaro Toda <[email protected]> wrote in message
news:[email protected]...
Hello.
I'm using WLS 5.1 with SP6 running on JDK1.2.2, platform is Windows NT
Server 4.0 SP6.
I want to know if there is a way to use wildcards to create entries for
RDBMSRealm.
The reason I want to use wildcards is that if I create an entry in the
ACLENTRIES table like this...:
A_NAME : weblogic.url
A_PRINCIPAL : testuser
A_PERMISSION : /index.html
I can restrict access for the URL http://localhost:7001/index.html to
"testuser."
However, when I create this entry, weblogic prompts for a username even
if
I
access a URL other than http://localhost:7001/index.html, for example,
http://localhost:7001/test.html.
When this happens, I cannot access "test.html" by using any of theusernames
that I have listed in my RDBMSRealm USERS table.
I was thinking that this works like the "weblogicURL.policy" file.
If you create one entry in the "weblogicURL.policy" file, all other URL
defaults to "everyone deny access".
I remembered that you can use wildcards in the "weblogicURL.policy"
file,
so
I tried changing the A_PERMISSION column to the following six
patterns...:
>>>
A_PERMISSION : *
A_PERMISSION : -
A_PERMISSION : *.html
A_PERMISSION : /*
A_PERMISSION : /-
A_PERMISSION : /*.html
Using the six patterns, I tried to accesshttp://localhost:7001/test.html
each time.
However, none of the four patterns above seemed to work, since I was
prompted and couldn't access even if I tried every username that I havein
my RDBMSRealm, in all of the six cases.
If I cannot use wildcards, this means that I would have to createentries
for every single HTML pages. (probably JSP pages, too)
Is there a way to use wildcards in the RDBMSRealm so that I cansimplify
this?
Thanks ahead of time.
RYotaro. -
Using wildcards in URL variables (very simple question, i know)
Hi all!
Pulling my hair out over this... How do I use wildcards in URL variables? I have this code in compositionReady (which is working):
var myurl = "http://www.mydomain.com/sub1/sub2/pagename";
var currenturl = window.location
if(myurl == currenturl) {
sym.getSymbol("symbolname").play();
It simply makes the symbol "symbolname" play when the current URL matches the variable 'myurl'. However, I want the symbol to play on ALL subpages to http://www.mydomain.com/sub1/sub2/ and therefore it seems logical to put in a wildcard like:
http://www.mydomain.com/sub1/sub2/* or something similar, but I just can't seem to make it work??
Any help will be greatly appreciated!
Best,
ThomasWhat about this ?
var mysubdomain = "http://www.mydomain.com/sub1/sub2/";
var currenturl = window.location.toString();
if(currenturl.indexOf(mysubdomain) === 0) {
sym.getSymbol("symbolname").play();
-Dharmendra -
Hi all, I was wondering if it's possible to use wildcards in NSStrings?
So for example say my text is:
"The quick brown fox jumps over the lazy dog".
And I want to extract the string "quick brown fox".
Something like?
(@"quick*fox");
Is there a wildcard that can be used to extract the text between quick and fox? I know I could just strip out 'quick brown fox', but what if I didn't necessarily know it was 'brown' between them, and it was some other word?
Thanks a bunch!There are a couple of regex libraries in the open source.
Maybe you are looking for
-
How to show static line?
Hi all, I try to put Two Vertical Bar and One fixes line = value 500 !http://img291.imageshack.us/img291/2725/graphsubir.png! chart: <Graph graphType="BAR_VERT_CLUST2Y" depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_
-
Output was not according to requirment?
Hi to All, I am facing a confused situation and i am unable to recognized the error where is that. Can any body help where i m going wrong in following Code? ============================================== public class test3f { public static int [] sm
-
How to run the basic list in background to generate secondary.
How to run the basic list in background to generate secondary and spool for the secondary.Please note that Basic list will run in foreground.
-
OEM 10.2.0.3 Error" java.lang.Exception
Hello, Does anyone have an idea of why I would receive error "java.lang.Exception: IOException in sending Request :: Connection refused" when I log into OEM Database Control??? Thanks, Daniel
-
Need a batch to make jpg's from raw (NEF) files
I have a map with 100 raw/nef files. How can I automate the process of making jpg's from them. I have CS3 Thanks