How to add blank entry in PickListSearchConstraint?
Hi MDM API experts,
I and trying to add Pick List Search Constraint and want to include the blank entry also in the criteria. how to include this ?
I have added NullSearchConstraint, but still does not return blank values. Please help.
Thanks,
Deepak
Hi Sudhanshu,
I think I have found the solution. For the benefit of others, let me explain the situation and the solution,
Situation:
I needed to perform search on table1 which looks like this,
table1
--- filed1 (lookuptable1)
lookuptable
--- lookupfiled1
lookupfiled1 contains items ("allowedvalue1", "allowedvalue2", "allowedvalue3","allowedvalue4", "unallowedvalue1","unallowedvalue2").
Default value is empty / blank / null.
So in my PickListSearchConstraint I was adding the allowedvalues (which was working fine) but I must also
include the default entry. This is where I was having issue.
My Solution:
Very Simple, I have added NullValue to the PickListSearchConstraint. Here is my method:
private void addPickListSearchConstraint(Search search, String tableName,
String fieldName, int[] filterValue, boolean addNullValue){
//field id
FieldId filedid = null;
try {
filedid = getFieldId(tableName, fieldName);
} catch (ConnectionException e2) {
e2.printStackTrace();
} catch (CommandException e2) {
e2.printStackTrace();
// Values
int valuesLength = filterValue.length;
MdmValue[] mdmValues = null;
if (addNullValue){
mdmValues = new MdmValue[valuesLength + 1];
} else {
mdmValues = new MdmValue[valuesLength];
for (int i = 0; i < filterValue.length; i++) {
mdmValues<i> = new LookupValue(new RecordId(filterValue<i>));
if (addNullValue){ //Add Null Value also in the PickListSearchConstraint
mdmValues[valuesLength] = NullValue.NULL;
// Add value constaint
if (mdmValues != null) {
PickListSearchConstraint tscMainTypeRoot =
new PickListSearchConstraint(mdmValues);
if (filedid != null){
//Create a FieldSearchDimension for the entered field
FieldSearchDimension fsdMaintableType =
new FieldSearchDimension(filedid);
search.addSearchItem(fsdMaintableType, tscMainTypeRoot);
If someone has a better approach then please let me know.
Regards,
Deepak
Similar Messages
-
How to add the entries and how to delete the entries from custom Z-table?
Hi Experts,
My requirement is I need to add the entries from program to three custom z-tables . Assume as zabc1,zabc2,zabc3.
Here how to add the entries from program to Z-table.???
And one more requirement is I want to provide a deletion checkbox in selection screen . Initial it was unchecked. If I am giving tick mark then the entries should be deleted from above custom Z-tables. this all will done in backgroung job?
Could you please guide me the logic how to crack this???
Let me know if you need more Info
Thanks
SanjuHi Sanjana,
What you can do is to use the ABAP keyword INSERT or MODIFY to add or modify records to a given database table. Here are the syntax taken from SAP documentation:
*Insert Statement
INSERT dbtab
Syntax
INSERT { {INTO target VALUES source }
| { target FROM source } }.
Effect
The INSERT statement inserts one or more rows specified in source in the database table specified in target. The two variants with INTO and VALUES or without INTO with FROM behave identically, with the exception that you cannot specify any internal tables in source after VALUES.
System Fields
The INSERT statement sets the values of the system fields sy-subrc and sy-dbcnt.
sy-subrc Meaning
0 At least one row was inserted.
4 At least one row could not be inserted, because the database table already contains a row with the same primary key or a unique secondary index.
The INSERT statement sets sy-dbcnt to the number of rows inserted.
Note
The inserted rows are finally included in the table in the next database commit. Up until this point, they can still be removed by a database rollback.
*Modify Statement
MODIFY dbtab
Syntax
MODIFY target FROM source.
Effect
The MODIFY statement inserts one or several lines specified in source in the database table specified in target, or overwrites existing lines.
System fields
The MODIFY statement sets the values of the sy-subrc and sy-dbcnt system fields.
sy-subrc Meaning
0 At least one line is inserted or changed.
4 At least one line could not be processed since there is already a line with the same unique name secondary index in the database table.
The MODIFY statement sets sy-dbcnt to the number of processed lines.
Note
The changes are transferred finally to the database table with the next database commit. Up to that point, they can be reversed using a database rollback.
Hope it helps...
P.S. Please award points if it helps... -
How to add blank page to existing Document In Adobe Dc
how to add blank page to existing Document In Adobe Dc Pro
Hi thashrifs16749461,
You can add a blank page using Adobe Acrobat DC by following the below instructions :-
1) Open your existing pdf document in Acrobat DC.
2) Choose the 'Organize Page' option form the Tools pane on the right as shown below in the screen shoot.
3) Now at the top you will see all the tools to Organize the page, Click on 'Insert' & select 'Blank Page' from the drop-down to insert blank pages.
*Shortcut : If you are using windows computer you can use ' Shift+Ctrl+T ' key to insert blank pages.
In case if you experience any issue or have any query please let us know. We will be happy to help you.
Regards,
Aadesh -
How to Add multiple entry to the group policy security filtering
How to Add multiple entry to the group policy security filtering
Is there any way we can add multiple entry to the Domain group policy Security filtering tab.Currently its not allowing to add more then one entry at a time.
Getting Error like "only one name can be entered,and the name cannot contain a semicolon.Enter a valid name"Hi
Are you trying to add more users or groups through Group Policy Management Security Filtering tab?
Try right clicking on the policy and then edit
Then in Editor Right click on the name of the policy and Properties
Security tab and add user or group from this tab. Just make sure if you are adding user or groups "Select this object type" has
the correct option also "From this Location" is set to your entire directory not the local server.
Update us with the above.
Thanks -
How to add tns entry in names server
Hi,
Can anyone tell us, How to add tns entry in names server
ThanksIn the Net Manager utility, in the left-hand pane left click Oracle Names Servers, left click on your nameserver.
Click the "+" button in the upper left, that should be enough to get you started- sorry, all our 9i installs have gone away, can't exactly recall the nix X gui version of client program, but I think* its netmgr, should be in OH/bin.
If you're running a java OEM console that cames with 9i clients, Net Manager is available on that little Butler tab.
And for the command line version, running the namesctl utility- you can save a tns entry with the connect string and run it in a file, just like sqlplus, with an @filename:
vi newtns.txt
register newtns -d (DESCRIPTION=(ADDRESS_LIST=...(SERVICE_NAME=NEWTNS.MYCO)))
$ namesctl
@newtns.txt
query newtns *
reload -- nameserver sync
query newtns *
exit
$ Edited by: clcarter on Jul 7, 2011 3:26 PM
added cmdline version -
Hi folks
I'm trying to simulate an LDIF file into JNDI attribute set but cant make it
dn: dc=fifa,dc=com
objectclass: dcObject
objectclass: organization
o: Football Org
dc: fifa
dn: cn=Manager,dc=fifa,dc=com
objectclass: organizationalRole
cn: Manager
This LDIF works fine on the command line ldapadd. Highly appreciate your help if anyone can tell me how to simulate these LDIF entries in JNDI way. I'm using openldap on solaris. I can add other entries if this entry is already created using command line ldapadd.
Thanks in advanceOk i made it... there we go...
import javax.naming.directory.*;
import javax.naming.*;
import java.util.*;
public class AddEntry {
final static String ldapServerName = "localhost";
final static String rootdn = "cn=Manager,dc=fifa,dc=com";
final static String rootpass = "secret";
final static String rootContext = "dc=fifa,dc=com";
// obtain initial directory context using the environment
public DirContext createContext(String name)
Properties env = new Properties();
DirContext ctx = null;
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" + name);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put( Context.SECURITY_PRINCIPAL, rootdn );
env.put( Context.SECURITY_CREDENTIALS, rootpass );
try
ctx = new InitialDirContext( env );
catch(Exception ex)
ex.printStackTrace();
return ctx;
public static void main( String[] args )
AddEntry ae = new AddEntry();
try
DirContext ctx = ae.createContext(rootContext);
Attributes root_Dn = null;
Attributes cn_Dn = null;
Attribute root_objclass = null;
Attribute oAttr = null;
Attribute cn_objclass = null;
Attribute cnAttr = null;
root_Dn = new BasicAttributes();
root_objclass = new BasicAttribute("objectclass");
root_objclass.add("dcObject");
root_objclass.add("organization");
root_Dn.put(root_objclass);
oAttr = new BasicAttribute("o");
oAttr.add("Fifa Company");
root_Dn.put(oAttr);
ctx.createSubcontext("", root_Dn);
cn_Dn = new BasicAttributes();
cn_objclass = new BasicAttribute("objectclass");
cn_objclass.add("organizationalRole");
cn_Dn.put(cn_objclass);
cnAttr = new BasicAttribute("cn");
cnAttr.add("Manager");
cn_Dn.put(cnAttr);
DirContext ctx1 = ae.createContext(rootdn);
ctx1.createSubcontext("", cn_Dn);
catch ( NameAlreadyBoundException nabe )
System.err.println( rootContext + " has already been bound!" );
} catch ( Exception e )
System.err.println( e );
} -
How to add blank rows between groups of duplicate rows?
here is my setup
create table #tmpA(rowID int identity(1,1), fName varchar(10), lName varchar(10))
insert into #tmpA
select 'a', 'b' union all
select 'a', 'b' union all
select 'c', 'd' union all
select 'c', 'd' union all
select 'e', 'f' union all
select 'e', 'f' union all
select 'g', 'h' union all
select 'g', 'h'
select distinct fName, lName
into #tmpB
From #tmpA
select t1.* from #tmpA t1 Join #tmpB t2 on t1.fName = t2.fName and t1.lName = t2.lName
--output
rowID fName lName
1 a b
2 a b
3 c d
4 c d
5 e f
6 e f
7 g h
8 g h
I want to add blank rows between rows 2 & 3 and between rows 4 & 5 and between rows 6 & 7 in the join query above. Is there Tsql that can accomplish something like this to make the join query result look like the following output?
rowID fName lName
1 a b
2 a b
3 c d
4 c d
5 e f
6 e f
7 g h
8 g h
or if this is not possible I could go with an output like this:
rowID fName lName
1 a b
2 a b
3
4 c d
5 c d
6
7 e f
8 e f
9
10 g h
11 g h
Rich PI came up with the following on my own. I was just hoping there might be a fancier way to do this - like without looping -- and yes, I could/should do this in a presentation layer, but I just wanted to do this in Query Analyzer (or whatever they call
it now -- SSMS ...) -- BTW, thanks CELKO for the suggestion about how to insert multiple rows using Values -- works great.
If (object_id('tempdb..#tmpA') is not null) drop table #tmpA
If (object_id('tempdb..#tmpC') is not null) drop table #tmpC
create table #tmpA(rowID int identity(1,1), fName varchar(10), lName varchar(10))
insert into #tmpA
values
('a','b'),
('a','b'),
('c','d'),
('c','d'),
('e','f'),
('e','f'),
('g','h'),
('g','h')
create table #tmpC(rrowID int Identity(1,1), rowID int, fName varchar(10), lName varchar(10))
declare @i int, @s varchar(10), @t varchar(10), @u varchar(10), @v varchar(10)
select @i = min(rowID) from #tmpA
set @u = 'xx'
While (@u != 'yy')
Begin
select @s = fName, @t = lName from #tmpA Where rowID = @i
if exists(select 1 from #tmpA Where rowID = @i + 1)
select @u = fname, @v = lName From #tmpA Where rowID = @i + 1
else
set @u = 'yy'
if @s = @u And @t = @v
begin
Insert Into #tmpC(rowID, fName, lName) Select * from #tmpA Where rowID = @i
Insert Into #tmpC(rowID, fName, lName) Select * from #tmpA Where rowID = @i + 1
end
else
begin
Insert Into #tmpC(rowID, fName, lName) Select null, '', ''
end
set @i = @i + 1
End
select * from #tmpC
--output from #tmpC
rrowID rowID fName lName
1 1 a b
2 2 a b
3 NULL
4 3 c d
5 4 c d
6 NULL
7 5 e f
8 6 e f
9 NULL
10 7 g h
11 8 g h
12 NULL
Rich P -
How to add environment entry in EJB3 ejb-jar.xml
Hi,
Is that a build in way of add environment entries in JDev for EJB 3 beans? For EJB 2 beans you can do that using properties. But the bean properties is not available in EJB 3. Please help.
Thanks
KennyThank you for the reply. But I need a way to enter env-entry value in ejb-jar.xml for EJB 3 in Jdev. In EJB 2, Jdev generate ejb-jar.xml for the bean and also let you add env-entry through bean's properties menu. But in there in no properties menu for EJB 3, also generated ejb-jar.xml is only a empty file doesn't contain any EJB depolyment information. That means you have to code ejb-jar.xml all manually.
If I am wrong, can someone show me how to do this right? -
How to add blank lines (in column) in SQLplus
I get error when doing below insert, how do I add blank lines in column (via SQLplus)?
insert into a values(1, '78 ABC house,
Some Road
London E34');
ThanksJust set "SQLBLANKLINES" to ON:
SQL> set sqlblanklines on
SQL>
SQL> insert into dept values (50, 'This department
2
3 has several
4
5 blank lines','This
6
7 Loc') ;
1 row created.
SQL> select * from dept where deptno = 50 ;
DEPTNO DNAME LOC
50 This department This
has several Loc
blank lines
1 row selected.
SQL> -
How to add users/entry in the oracle internet directory using XML file
hi friends,
i need to know how to add entries, attributes in the oracle internet directory using the XML file.I could able to execute the ldapadd command with out error as
ldapadd -h islch-532.i-flex.com -p 389 -D "cn=orcladmin" -w password -X mypath/filename.xml
but the data entry is not added in OID. can any one help me out. -
How to add manual entry?
Hi,
Can anybody tell me how to add the manual to solaris , what`s the name of the packege.
Thanks a lot.Hi Matt,
if you speak about CLASSPATH you mean the environment-parameter PATH?
If yes,
D:\oracle\MIM\102\BIN>set PATH
Path=D:\oracle\MIM\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wb
em;C:\j2sdk1.4.2_17-x64\bin;C:\j2sdk1.4.2_17-x64;C:\j2sdk1.4.2_17-x64\jre;C:\j2s
dk1.4.2_17-x64\lib;D:\usr\sap\MIM\SYS\exe\uc\NTAMD64
In D:\oracle\MIM\102\BIN i see the follow files:
06.01.2009 23:27 539.648 OraOLEDB10.dll
06.01.2009 23:27 1.712 OraOLEDB10.tlb
06.01.2009 23:27 24.576 OraOLEDB10d.dll
06.01.2009 23:27 7.168 OraOLEDB10us.dll
06.01.2009 23:27 146.944 OraOLEDBgmr10.dll
06.01.2009 23:27 12.800 OraOLEDBpus10.dll
06.01.2009 23:27 9.216 OraOLEDBrfc10.dll
06.01.2009 23:27 7.168 OraOLEDBrmc10.dll
06.01.2009 23:27 187.904 OraOLEDBrst10.dll
06.01.2009 23:27 17.408 OraOLEDButl10.dll
Mfg
Rainer -
How to add backdated entry to calender
I am trying to add an entry in the past and it just disappear from the screen after a couple of seconds, i have just updated my ipad and iphone could the new update have caused this clich!!
thank you
SimoneSettings>Mail, Contacts, Calendar>Calendars>Sync>All Events
-
How to add DNS entry Post Installation in Solaris 10?
Hi, I have installed Solaris 10 without mentioning the DNS entry while installation. How do I add that now in order to make that Solaris 10 to get connected to Internet ?
Thanks in Advance.
Girish Prabhakara.Solaris 10 changed the way that some things work regarding networking, but this should still work.
1. Change the hosts: line in /etc/nsswitch.conf to include dns.
For example, change:
hosts files
to
hosts files dns
2. Create /etc/nsswitch.conf with the IP addresses of your DNS servers:
Example:
nameserver 192.168.1.100
nameserver 192.168.2.100
3. kill -HUP 1
4. Run nslookup or ping another server via host name (not IP address) to determine if the system is properly communicating with your DNS servers. -
How to add new entry, in table on button click.
i have 2 input ,witch i am taking from numeric controls. this 2 input are use to calculat my output.
on button click i want these 4 things should go in the table.
now my problem is when i click the button previous entry in the table get lost...
plz help me to slove this problem.When you want to preserve the existing values in a table or array, you need to use "Array -> Build Array". Wire the local variable of the table or array to top entry, and wire your new entry to the bottom. Depends on the dimension of the array and the postion you want to add. You might need to some array manupilations. Try out some of the array VIs to see how they work.
Joe -
How to add an entry to TNSNAMES.ORA?
Hello,
if I add the following entry to the TNSNAMES.ORA:
test1_10.121.34.56 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.34.56)(PORT = 1521))
(CONNECT_DATA =
(SID = test1)
(SERVER = DEDICATED)
how could I activate it please without rebooting?
I'm using Oracle 9i Release 9.2.0.8.0 at CentOS 4.7
Linux machine (which is compatible to RHEL 4.7).
Thank you
AlexHello all, thank you for your support.
Could we please start from the beginning?
(and I'll use the real IP addresses this time, sorry)
{color:#0000ff}oracle@ablora01:admin> <strong>host ablora01.internal.XXX.com</strong>
ablora01.internal.XXX.com has address 10.121.42.100
{color}
I have neither sqlnet.ora nor listener.ora and
I have the following 2 entries in my tnsnames.ora:
{color:#0000ff}oracle@ablora01:admin> <strong>ll /abl/apps/oracle/9.2/network/admin/</strong>
-rw-r--r-- 1 oracle oinstall 825 Jul 26 2003 libnk59.def
drwxr-xr-x 2 oracle oinstall 4096 Nov 5 16:25 samples
-rw-r--r-- 1 oracle oinstall 130 Mar 18 2002 shrept.lst
-rw-r--r-- 1 oracle oinstall 24 Aug 7 2000 snmp_ro.ora
-rw-r--r-- 1 oracle oinstall 717 Nov 5 17:15 sqlnet.log
-rw-r--r-- 1 oracle oinstall 756 Nov 5 17:08 tnsnames.ora
oracle@ablora01:admin> <strong>cat /abl/apps/oracle/9.2/network/admin/tnsnames.ora</strong>
# TNSNAMES.ORA Network Configuration File: /abl/apps/oracle/9.2/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
TEST1_10.121.42.81 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))
(CONNECT_DATA =
(SID = test1)
(SERVER = DEDICATED)
BOCHUM_10.121.42.100 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))
(CONNECT_DATA =
(SID = BOCHUM)
(SERVER = DEDICATED)
{color}
When I try to tnsping the first entry it works:
{color:#339966}oracle@ablora01:admin><strong> tnsping BOCHUM_10.121.42.100</strong>
TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:19:34
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.100)(PORT = 1521))) (CONNECT_DATA = (SID = BOCHUM) (SERVER = DEDICATED)))
<strong>OK (0 msec)</strong>
{color}
When I try to tnsping the 2nd entry it fails:
{color:#ff0000}oracle@ablora01:admin> <strong>tnsping TEST1_10.121.42.81</strong>
TNS Ping Utility for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:20:21
Copyright (c) 1997, 2006, Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.121.42.81)(PORT = 1521))) (CONNECT_DATA = (SID = test1) (SERVER = DEDICATED)))
<strong>TNS-12541: TNS:no listener</strong>{color}
When I look at the listener I get:
{color:#339966}oracle@ablora01:admin> <strong>lsnrctl status</strong>
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 05-NOV-2008 17:21:55
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.8.0 - Production
Start Date 04-NOV-2008 17:35:04
Uptime 0 days 23 hr. 46 min. 50 sec
Trace Level off
Security OFF
SNMP OFF
Listener Log File /abl/apps/oracle/9.2/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ablora01.internal.XXX.com)(PORT=1521)))
Services Summary...
Service "BOCHUM" has 1 instance(s).
Instance "BOCHUM", status READY, has 1 handler(s) for this service...
Service "test1" has 1 instance(s).
<strong>Instance "test1", status READY, has 1 handler(s) for this service...</strong>
Service "test1XDB" has 1 instance(s).
Instance "test1", status READY, has 1 handler(s) for this service...
The command completed successfully{color}
When I try sqlnet it first fails and I have to reenter password:
{color:#339966}{color:#ff0000}oracle@ablora01:admin> <strong>sqlplus scott/tiger@TEST1_10.121.42.81</strong>
SQL*Plus: Release 9.2.0.8.0 - Production on Wed Nov 5 17:10:42 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
{color:#ff0000}ERROR:
{color}<strong>{color:#ff0000}ORA-12541: TNS:no listener
{color}</strong>{color}
{color:#ff0000}{color:#ff0000}Enter user-name: scott
Enter password:{color}
Connected to:
Oracle9i Release 9.2.0.8.0 - Production
JServer Release 9.2.0.8.0 - Production
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
{color}
Do you please know, why it complains about the missing listener?
And my actual target is to allow a program from 10.121.42.81
to connect to the "test1" instance.
Regards
Alex
Edited by: user10507116 on Nov 5, 2008 12:29 PM
Maybe you are looking for
-
How to remove the border from an AWT Component (specifically a ScrollPane)
I've been trying to remove the border from an AWT ScrollPane, but having no luck. I've tried setting the bounds on the ScrollPane to get rid of the border: ScrollPane scrollPane = new ScrollPane(); scrollPane.setBounds(-2, -2, getSize().width+4, getS
-
Where should I put the DB?
I have been working on a local instance of RoboHelp - copying files to my laptop to work on them, then uploading to the server for someone else to download and work with. Now finally have a server environmen set up and was able to successfully connec
-
I have a MacBook Pro and I created a movie using imovie but once I put the DVD back into my computer it said it was blank! Why? Please HELP!!!!
-
Running iTunes 8 on Windows Server 2003, avoiding 2096 error
Since QuickTime 7.5,nor iTunes neither QuickTime would run on my Server 2003, and the famous 2096 error came up. Unfortunately the new 2+ iPod firmware required iTunes 8 so I had to do something about it. The solution by apple was to turn off compati
-
Print Dynamic Content with printJob
I recently developed a help resource application that builds the interface and loads all the main and sub navigation items, pages contents, and related resources dynamically. This was to make it easy to provide search and print functionality, as well