Extract authorization values
Hi,
Is there a way to extract specific authorization values for a particular user?
In SUIM, using "Users by Complex Selection Criteria" will display all the authorization & values. You then need to find that particular authorization, say "P_ORGIN" and go through each one of them to find the values assigned. It is very tedious if the user have a lot of the "P_ORGIN" authorization assigned.
I think in this case, SUIM is not the best way.
Is there a way to quickly zoom into and look at all the values in just that particular authorization, in this case, "P_ORGIN"?
Thanks
If your focus is on HR authroizations one of the ways :
SE16 - table name AGR_USERS
The technical name will provide the assignment coming from organizational management.
Take just those roles :
use SE16 - AGR_1251
Which will give you an output export to excel filter on P_origin.
If you are not using Organizational management:
Then use SE16 - AGR_1251 find roles having P-origin
get the role list and use AGR_USERS to find role to user relationship.
Similar Messages
-
Extract a value of a fields from an internal table
hello everyone,
i need to extract a value of a fields from an internal table, the fields is in a postion "sy-tabix" that i know, so i need to pick this value without using a loop
thank you.Like this?
DATA: FIELD1 TYPE C,
FIELD2 TYPE C.
READ TABLE T_TAB INDEX 3.
FIELD1 = T_TAB-FIELD1.
FIELD2 = T_TAB-FIELD2.
Greetings,
Blag. -
Extracting all values from multiple menus
Hello all,
Basically I have a jsp that consists of three of what FrontPage calls drop down boxes but I will hereafter call list boxes, each containing a number of options extracted from a database; these values can be moved from one box to another using java script. When I hit a submit button I wish to be able to extract all the values from two of these lists and add them into a database. I know how to extract selected values but I need all the values of both lists regardless of what the user selects and I need the contents of each kept distinct.
Any help provided will be appreciated and I apologize if this question is something all the forum vets have already seen before.
PhilipOnly the values that are selected will be submitted
with the form. So, add a call to your form tag's
onSubmit event to call a function like this:<form name='myForm' onsubmit='selectAll()'>
<script language='javascript'>
function selectAll() {
for(i=0; i<myForm.mySelectList.options.length; i++)
myForm.mySelectList.options.selected = true;
// do the same for the other two select lists
</script>
Thanks for the tip, but unfortunately this means that the two list boxes that I want will become intermingled. Is there a way to keep the information in the two lists seperate?
Philip -
How to extract the values from WPBP table
Hi experts,
We are in preparation of a custom report.
In the report we want to have a value from WPBP table.
We want to extract the value of Capacity utilization level from WPBP table.
Could you please let me know the way to extract the value.
Please advice.
Regards,
Sairam.Hi Sairam,
Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
Regards;
Okan -
NullPointerException was thrown while extracting a value from an instance
Dear all,
We have got a null point exception during commit call. According to the stack trace shown below, it seems that it is a problem due to instance variable accessor. As we know toplink use reflection to access the instance variable value. I am curious whether the exception we got is related to any class-loader setting. Thanks a lot.
=================
Stack Trace:
Exception [TOPLINK-69] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle
.toplink.exceptions.DescriptorException
Exception Description: A NullPointerException was thrown while extracting a valu
e from the instance variable [versionID] in the object [com.oocl.csc.frm.pom.tes
t.model.Company].
Internal Exception: java.lang.NullPointerException
Mapping: oracle.toplink.mappings.DirectToFieldMapping[versionID-->COMPANY.VERSIO
NID]
Descriptor: Descriptor(com.oocl.csc.frm.pom.test.model.Company --> [DatabaseTabl
e(COMPANY)])
at oracle.toplink.exceptions.DescriptorException.nullPointerWhileGetting
ValueThruInstanceVariableAccessor(DescriptorException.java:1022)
at oracle.toplink.internal.descriptors.InstanceVariableAttributeAccessor
.getAttributeValueFromObject(InstanceVariableAttributeAccessor.java:68)
at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(D
atabaseMapping.java:304)
at oracle.toplink.mappings.DirectToFieldMapping.iterate(DirectToFieldMap
ping.java:355)
at oracle.toplink.internal.descriptors.ObjectBuilder.iterate(ObjectBuild
er.java:1438)
at oracle.toplink.internal.descriptors.DescriptorIterator.iterateReferen
ceObjects(DescriptorIterator.java:258)
at oracle.toplink.internal.descriptors.DescriptorIterator.startIteration
On(DescriptorIterator.java:407)
at oracle.toplink.publicinterface.UnitOfWork.discoverUnregisteredNewObje
cts(UnitOfWork.java:1368)
at oracle.toplink.publicinterface.UnitOfWork.discoverAllUnregisteredNewO
bjects(UnitOfWork.java:1290)
at oracle.toplink.publicinterface.UnitOfWork.assignSequenceNumbers(UnitO
fWork.java:326)
at oracle.toplink.publicinterface.UnitOfWork.collectAndPrepareObjectsFor
Commit(UnitOfWork.java:664)
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeS
et(UnitOfWork.java:1130)
at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(UnitOf
Work.java:956)
at oracle.toplink.publicinterface.UnitOfWork.commit(UnitOfWork.java:771)
====================
====================
Mapping Description:
<?xml version = '1.0' encoding = 'UTF-8'?>
<project>
<project-name>POM-TEST</project-name>
<login>
<database-login>
<platform>oracle.toplink.oraclespecific.Oracle9Platform</platform>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<connection-url>jdbc:oracle:thin:@sjcngdb2:1521:cdrfrmdv</connection-ur
l>
<user-name>pomowner</user-name>
<password>BB742416276274A47F360CCDD2711570</password>
<uses-native-sequencing>false</uses-native-sequencing>
<sequence-preallocation-size>50</sequence-preallocation-size>
<sequence-table>SEQUENCE</sequence-table>
<sequence-name-field>SEQ_NAME</sequence-name-field>
<sequence-counter-field>SEQ_COUNT</sequence-counter-field>
<should-bind-all-parameters>false</should-bind-all-parameters>
<should-cache-all-statements>false</should-cache-all-statements>
<uses-byte-array-binding>true</uses-byte-array-binding>
<uses-string-binding>false</uses-string-binding>
<uses-streams-for-binding>false</uses-streams-for-binding>
<should-force-field-names-to-upper-case>false</should-force-field-names
-to-upper-case>
<should-optimize-data-conversion>true</should-optimize-data-conversion>
<should-trim-strings>true</should-trim-strings>
<uses-batch-writing>false</uses-batch-writing>
<uses-jdbc-batch-writing>true</uses-jdbc-batch-writing>
<uses-external-connection-pooling>false</uses-external-connection-pooli
ng>
<uses-external-transaction-controller>false</uses-external-transaction-
controller>
<type>oracle.toplink.sessions.DatabaseLogin</type>
</database-login>
</login>
<java-class>com.oocl.csc.frm.pom.test.model.Company</java-class>
<tables>
<table>COMPANY</table>
</tables>
<primary-key-fields>
<field>COMPANY.COMPANY_KEY</field>
</primary-key-fields>
<descriptor-type-value>Normal</descriptor-type-value>
<identity-map-class>oracle.toplink.internal.identitymaps.SoftCacheWeakI
dentityMap</identity-map-class>
<remote-identity-map-class>oracle.toplink.internal.identitymaps.SoftCac
heWeakIdentityMap</remote-identity-map-class>
<identity-map-size>100</identity-map-size>
<remote-identity-map-size>100</remote-identity-map-size>
<should-always-refresh-cache>false</should-always-refresh-cache>
<should-always-refresh-cache-on-remote>false</should-always-refresh-cac
he-on-remote>
<should-only-refresh-cache-if-newer-version>false</should-only-refresh-
cache-if-newer-version>
<should-disable-cache-hits>false</should-disable-cache-hits>
<should-disable-cache-hits-on-remote>false</should-disable-cache-hits-o
n-remote>
<alias>Company</alias>
<copy-policy>
<descriptor-copy-policy>
<type>oracle.toplink.internal.descriptors.CopyPolicy</type>
</descriptor-copy-policy>
</copy-policy>
<instantiation-policy>
<descriptor-instantiation-policy>
<type>oracle.toplink.internal.descriptors.InstantiationPolicy</ty
pe>
</descriptor-instantiation-policy>
</instantiation-policy>
<query-manager>
<descriptor-query-manager>
<existence-check>Check cache</existence-check>
</descriptor-query-manager>
</query-manager>
<event-manager>
<descriptor-event-manager empty-aggregate="true"/>
</event-manager>
<mappings>
<database-mapping>
<attribute-name>companyKey</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.COMPANY_KEY</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>contact</attribute-name>
<read-only>false</read-only>
<reference-class>com.oocl.csc.frm.pom.test.model.Contact</referen
ce-class>
<is-private-owned>false</is-private-owned>
<uses-batch-reading>false</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.NoIndirectionPoli
cy</type>
</mapping-indirection-policy>
</indirection-policy>
<uses-joining>false</uses-joining>
<foreign-key-fields>
<field>COMPANY.CONTACT_OID</field>
</foreign-key-fields>
<source-to-target-key-field-associations>
<association>
<association-key>COMPANY.CONTACT_OID</association-key>
<association-value>CONTACT.POID</association-value>
</association>
</source-to-target-key-field-associations>
<type>oracle.toplink.mappings.OneToOneMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>createdBy</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.CREATED_BY</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>creationClientID</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.CREATION_CLIENTID</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>creationTime</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.CREATION_TIME</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>employeeList</attribute-name>
<read-only>false</read-only>
<reference-class>com.oocl.csc.frm.pom.test.model.Person</referenc
e-class>
<is-private-owned>false</is-private-owned>
<uses-batch-reading>false</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.NoIndirectionPoli
cy</type>
</mapping-indirection-policy>
</indirection-policy>
<container-policy>
<mapping-container-policy>
<container-class>com.oocl.csc.frm.pom.impl.FWPersistentArra
yList</container-class>
<type>oracle.toplink.internal.queryframework.ListContainerP
olicy</type>
</mapping-container-policy>
</container-policy>
<relation-table>EMPLOYEMENT</relation-table>
<source-key-fields>
<field>COMPANY.COMPANY_KEY</field>
</source-key-fields>
<source-relation-key-fields>
<field>EMPLOYEMENT.EMPLOYER_KEY</field>
</source-relation-key-fields>
<target-key-fields>
<field>PERSON.POID</field>
</target-key-fields>
<target-relation-key-fields>
<field>EMPLOYEMENT.EMPLOYEE_ID</field>
</target-relation-key-fields>
<type>oracle.toplink.mappings.ManyToManyMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>lastUpdateClientID</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.LAST_UPDATE_CLIENTID</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>lastUpdatedBy</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.LAST_UPDATED_BY</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>lastUpdateTime</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.LAST_UPDATE_TIME</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>name</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.NAME</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>partner</attribute-name>
<read-only>false</read-only>
<reference-class>com.oocl.csc.frm.pom.test.model.Company</referen
ce-class>
<is-private-owned>false</is-private-owned>
<uses-batch-reading>false</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.NoIndirectionPoli
cy</type>
</mapping-indirection-policy>
</indirection-policy>
<uses-joining>false</uses-joining>
<foreign-key-fields>
<field>COMPANY.PARTNER</field>
</foreign-key-fields>
<source-to-target-key-field-associations>
<association>
<association-key>COMPANY.PARTNER</association-key>
<association-value>COMPANY.COMPANY_KEY</association-value>
</association>
</source-to-target-key-field-associations>
<type>oracle.toplink.mappings.OneToOneMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>persistentCtxt</attribute-name>
<read-only>false</read-only>
<reference-class>com.oocl.csc.frm.pom.impl.FWPOMPersistentContext
</reference-class>
<is-null-allowed>false</is-null-allowed>
<aggregate-to-source-field-name-associations>
<association>
<association-key>OWNERID</association-key>
<association-value>COMPANY.OWNERID</association-value>
</association>
<association>
<association-key>ROOTID</association-key>
<association-value>COMPANY.ROOTID</association-value>
</association>
</aggregate-to-source-field-name-associations>
<type>oracle.toplink.mappings.AggregateObjectMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>poid</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.POID</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>version</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.VERSION</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
<database-mapping>
<attribute-name>versionID</attribute-name>
<read-only>false</read-only>
<field-name>COMPANY.VERSIONID</field-name>
<type>oracle.toplink.mappings.DirectToFieldMapping</type>
</database-mapping>
</mappings>
<type>oracle.toplink.publicinterface.Descriptor</type>
</descriptor>
</descriptors>
</project>
====================
====================
Session Creation Method:
SessionBroker broker = (SessionBroker) manager.getSession(brokerName, Thread.currentThread().getContextClassLoader());
broker.getLogin().getPlatform().getConversionManager().setLoader(Thread.currentThread().getContextClassLoader());
====================
===================
Class Hierarchy:
Object extends> ..xxx.. extends> FWObject extends> Company
The problematic attribute -- versionID -- is defined at "FWObject" level.
===================
===================
Environment Configuration:
Application Server version: 10.1.2
TopLink version : 9.0.4.5
TopLink classpath: specified at container level
FWObject classpath: specified at container level
Company classpath: specified at application level
===================
Thanks and regards,
WilliamDear All,
We have loaded the toplink.jar to container level instead of application level. Don't know whether it is a possible source of error. Moreover, what is the purpose of loading antlr.jar? What is this jar for?
Thanks and regards,
William -
Can anybody tell me how to extract sales value and cost value for an materi
dear all,
Can anybody tell me how to extract sales value and cost value for an material sold .
All the values of cost value and sale values are getting stored in bseg-wrbtr field .
How to identify them uniquely.
Or there is another way to find the sale and cost values.
Regards
MaveHi Mave!
Normally there is no condition change, when something is sold.
But sales price depends on sales conditions (not only price, but also surcharges, discounts, taxes - if customized).
Nevertheless, after selling you have a invoice document, where correct values <i>should</i> be stored (see VBRP fields mentioned above). If here is a problem, then customizing of price determination is in question, not a programming of user-exits with MARD selection for costs (or some other tries to get a price).
When you specify your requirements more in detail, you might get better answers - but currently only general hints are possible ('see in invioce / G/L accounts').
Regards,
Christian -
Authorization value as ":" in BI 7.0
Hi All,
We are facing some authorization issue for one of the query. Some users are not able to execute the query due to authorization error on company code. We have executed the query in RSRT through users id and logs shows company code values are populated as ":" for them. We have included authorization variable in the query and authorization values are already maintained properly.
Please let us know when the authorization values populatd as ":" and how to resolve this issue.
We are using BI 7.0 authorization.
Any help on this is highly appreciable.
Thanks,
MeghanaHi,
Along with remaining values in RSECADMIN assign" :" under sales org to resolve the issue.
check the following link for more details.
Re: Authorizations missing for aggregation (":")
hope it works...
regards,
Raju -
Failing to extract xml value using Jdom & Xpath
I have a method (getSingleNodeValue()) which when passed an xpatch expression will extract the value of the specified element in the xml document refered to in 'doc'. Assume doc at this point has been initialised as shown below and xmlInput is the buffer containing the xml content.
SAXBuilder builder = null;
Document doc = null;
XPath xpathInstance = null;
doc = builder.build(new StringReader(xmlInput));When i call the method, i pass the following xpath xpression
/TOP4A/PERLODSUMDEC/TINPLD1/text()Here is the method. It basically just takes an xml buffer and uses xpath to extract the value:
public static String getSingleNodeValue(String xpathExpr) throws Exception{
Text list = null;
try {
xpathInstance = XPath.newInstance(xpathExpr);
list = (Text) xpathInstance.selectSingleNode(doc);
} catch (JDOMException e) {
throw new Exception(e);
}catch (Exception e){
throw new Exception(e);
return list==null ? "?" : list.getText();
}The above method always returns "?" i.e. nothing is found so 'list' is null.
The xml document it looks at is
<TOP4A xmlns="http://www.testurl.co.uk/enment/gqr/3232/1">
<HEAD>
<Doc>ABCDUK1234</Doc>
</HEAD>
<PERLODSUMDEC>
<TINPLD1>10109000000000000</TINPLD1>
</PERLODSUMDEC>
</TOP4A>The same method works with other xml documents so i am not sure what is special about this one. There is no exception so the xml is valid xml. Its just that the method always sets 'list' to null. Any ideas?
Edit
Here is a running program testing the above:
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.xpath.*;
import java.io.IOException;
import java.io.StringReader;
public class XpathTest {
public static String getSingleNodeValue(String xpathExpr, String xmlInput) throws Exception{
Text list = null;
SAXBuilder builder = null;
Document doc = null;
XPath xpathInstance = null;
try {
builder = new SAXBuilder();
doc = builder.build(new StringReader(xmlInput));
xpathInstance = XPath.newInstance(xpathExpr);
list = (Text) xpathInstance.selectSingleNode(doc);
} catch (JDOMException e) {
throw new Exception(e);
}catch (Exception e){
throw new Exception(e);
return list==null ? "Nothing Found" : list.getText();
public static void main(String[] args){
String xmlInput1 = "<TOP4A xmlns=\"http://www.testurl.co.uk/enment/gqr/3232/1\"><HEAD><Doc>ABCDUK1234</Doc></HEAD><PERLODSUMDEC><TINPLD1>10109000000000000</TINPLD1></PERLODSUMDEC></TOP4A>";
String xpathExpr = "/TOP4A/PERLODSUMDEC/TINPLD1/text()";
XpathTest xp = new XpathTest();
try {
System.out.println(xp.getSingleNodeValue(xpathExpr, xmlInput1));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}When i run the above, the output is
Nothing foundEdit
I have run some further testing and it appears that if i remove the namespace url it does work. Not sure why yet. Is there any way i can tell it to ignore the namespace?
Edited by: ziggy on Sep 3, 2011 4:57 PMziggy wrote:
<TOP4A xmlns="http://www.testurl.co.uk/enment/gqr/3232/1">
<HEAD>
<Doc>ABCDUK1234</Doc>
</HEAD>
<PERLODSUMDEC>
<TINPLD1>10109000000000000</TINPLD1>
</PERLODSUMDEC>
</TOP4A>
It works fine, the problem is not with namespace, it is with url have given.
Editing:
Found a way to say the program to ignore namespace.
You have to use Xpath.addNamespace(prefix,uri), and pass the prefix to your pattern string.
If not clear refer the below code:
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.xpath.*;
import java.io.IOException;
import java.io.StringReader;
public class XpathTest {
public static String getSingleNodeValue(String xpathExpr, String xmlInput) throws Exception{
Text list = null;
SAXBuilder builder = null;
Document doc = null;
XPath xpathInstance = null;
try {
builder = new SAXBuilder();
doc = builder.build(new StringReader(xmlInput));
xpathInstance = XPath.newInstance(xpathExpr);
xpathInstance.addNamespace("ns","http://www.testurl.co.uk/enment/gqr/3232/1");
list = (Text) xpathInstance.selectSingleNode(doc);
} catch (JDOMException e) {
throw new Exception(e);
}catch (Exception e){
throw new Exception(e);
return list==null ? "Nothing Found" : list.getText();
public static void main(String[] args){
String xmlInput1 = "<TOP4A xmlns=\"http://www.testurl.co.uk/enment/gqr/3232/1\"><HEAD><Doc>ABCDUK1234</Doc></HEAD><PERLODSUMDEC><TINPLD1>10109000000000000</TINPLD1></PERLODSUMDEC></TOP4A>";
String xpathExpr = "/ns:TOP4A/ns:PERLODSUMDEC/ns:TINPLD1/text()";
XpathTest xp = new XpathTest();
try {
System.out.println(xp.getSingleNodeValue(xpathExpr, xmlInput1));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}Edited by: 833545 on Sep 8, 2011 11:35 PM -
Using WQL "one-liner" to extract a value from the registry
Can I extract a value from the registry using a "one-liner" WQL command? Something like the following:
Under root\default:StdRegProv
SELECT <Data> FROM "HKLM:SOFTWARE\Toto\Version"
Please note that I am aware of how this is done via script. The problem is that I'm using a management system (SCOM), which only allows me to supply a simple WQL query to perform my evaluation.
Thanks,
LarryHi Larry,
There have a specific forum to support the scripting related question, i sugges you ask in Scripting forum there will have more
professional engineer will help you.
The Official Scripting Guys Forum!
https://social.technet.microsoft.com/Forums/en-US/9d5a7990-b975-488a-b7c0-6d866f29cf0a/change-mouse-scheme?forum=ITCG
Best Regards,
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Table that stores Analysis authorization values
Hi all,
We generated analysis authorizations for users on Profit centers. In RSECADMIN for each user we see an automatic authorization object being assigned with a name like RSR_000234 so on. We can see the values (profit centers) for this object when we double click on it. I would like to create a list of all users and the assigned profit centers. Can you please tell me if a table is available to get this list.
Thanks,
Ram.Chetan,
We are loading authorizations values to 0PROFIT_CTR from ECC and flatfile into the Authorization DSO's and generating authorizations to assing the profit centers to users. I would like to see the profit centers assigned to a user. For example suppose if a user is assigned a particular region. I would like to see all the values of the profit centers assigned to the user from a table rather than going to the hierarchy and getting the list for each region.
The tables that you specified give the userid and the technical name of the authorization(RSR_000234..) but I would like to see the actual values in the authorization.
Hope I am clear. Thank you for your assistance.
Ram. -
Extract Node Values using XPATH
This may be a repeat question.
No offence meant
I am using XPATH to extract values from the nodes.
I need to extract the value of i:RequestedBy Node using XPATH
<?xml version="1.0" encoding="UTF-8"?>
<i:Interest>
<i:Status>0</i:Status>
<i:Generation>2</i:Generation>
<i:Details xsi:type="i:vanilla.details.stock">
<i:RequestedBy>AA.MM</i:RequestedBy>
The above XML is of type Document
Document msgDoc;
XPath xpath = XPathFactory.newInstance().newXPath();
XPathExpression expr;
Object result=null;
try {
expr = xpath.compile("i:Interest/i:Details/i:RequestedBy/text()");
result = expr.evaluate(msgDoc, XPathConstants.NODESET);
NodeList nodes = (NodeList) result;
for (int i = 0; i < nodes.getLength(); i++) {
System.out.println(nodes.item(i).getNodeValue());
} catch (XPathExpressionException e1) {
e1.printStackTrace();
I am getting null/
Is my XPATH correct?I don't know if your XPath is correct or not. Your XML is not well-formed because the namespace declarations are missing. And I don't see where you set the namespace context for your XPath object; that is quite likely why it doesn't do what you want.
-
Best way to extract XML value wiith an xpath
Hello,
I wonder what is the best way to extract text value from XmlType with an xpath.
I need to insert a row inside a table where the row's data come from xpath extractions of an XmlType. I do a lot of (approximative 20) :
EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elem1').
EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elemI').
EXTRACTVALUE(var.myxmltype , '/an/xpath/to/extract/elem20').
inside the insert statement
Is this way is the best or is there a more optimal way ?
For example extracting the node '/an/xpath/to/extract/' and sarting from this node extracting "elem1", ... , "elemI", "elemN" children.
Thanks for your help,
Regards,
NicolasHi Nicolas,
The answer depends on your actual storage method (binary, OR, CLOB?), and db version.
You can try XMLTable, it might be better in this case :
SELECT x.elem1, x.elem2, ... , x.elem20
FROM your_table t
, XMLTable(
'/an/xpath/to/extract'
passing t.myxmltype
columns elem1 varchar2(30) path 'elem1'
, elem2 varchar2(30) path 'elem2'
, elem20 varchar2(30) path 'elem20'
) x
; -
RSECADMIN - Authorization Value Entry with Leading zeros
Hello All
Issue: RSECADMIN does not allow to enter a authorization value with "leading spaces". This is an issue for us.
I am using Analysis Authorizations in BI 70.
We have one object say Product Line Char 5.
We have 2 values
' 01' ==> SID 1
'01 ' ==> SID 23
Both have different SID
In RSSM based security design, I was able to enter value ' 01' and then authorization was processed and user was able to access the data ' 01'. In RSECADMIN, system does not allow me to enter ' 01'. It puts this as 01 all the time and then looks for SID 23.
Anyone have any experience on this? I am looking for specific guidance if you have found any solution.
Thanks
Pankaj GuptaHi Andreas
It seems to me that after " ' " it considers the whole field as blank. Also field is 5 character long and with Open " ' " and close " ' "I and 01 I can only have one space before 01. I wanted 3 space and then 01.
I will test this and let you know.
Following worked for us:
1) Created a custom hierarchy that keeps ' 01' on a node and then use that node to tell what value user is authorize.
2) And it worked. It sounds crazy idea but I was running out of the tricks.
3) It is simple RSECADMIN maintenance tcode bug. It trys to help in Data Entry by Left justing the value. That help was not needed and nessasary at all. Let user get Raw Data Entry screen. Anyway this is not End User Interface tool.
Thanks a lot.
Pankaj Gupta -
Extract element value from a trigger
Hi,
I would like to create an 'before/after insert' trigger on a XMLType table that
would extract a value of an element of the inserted XML.
However, I created the following trigger but failed with error :
SQL> create or replace trigger trig_po
2 after insert on purchaseorder
3 for each row
4 declare
5 v_ref varchar2(30);
6
7 begin
8 v_ref := :NEW.extractvalue('/PurchaseOrder/Reference');
9
Warning: Trigger created with compilation errors.
SQL> show error
Errors for TRIGGER TRIG_PO:
LINE/COL ERROR
5/12 PLS-00049: bad bind variable 'NEW.EXTRACTVALUE'
SQL>
The XMLType table is created as follow :
BEGIN
DBMS_XMLSCHEMA.registerSchema(
SCHEMAURL => 'http://localhost:8080/swd/XSD/purchaseOrder.xsd',
SCHEMADOC => xdbURIType('/swd/XSD/purchaseOrder.xsd').getClob(),
LOCAL => FALSE,
GENTYPES => TRUE,
GENTABLES => TRUE);
END;
And, the following SQL can successfully insert a XML into this XMLType table
without any trigger implemented.
insert into purchaseorder values (xmltype(
'<?xml version="1.0" encoding="US-ASCII"?>
<PurchaseOrder xsi:noNamespaceSchemaLocation="http://localhost:8080/swd/XSD/purchaseOrder.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<Reference>ADAMS-20011127121052815PST</Reference>
<Actions>
<Action>
<User>SCOTT</User>
</Action>
</Actions>
<Reject/>
<Requestor>Julie P. Adams</Requestor>
<User>ADAMS</User>
<CostCenter>R20</CostCenter>
<ShippingInstructions>
<name>Julie P. Adams</name>
<address>300 Oracle Parkway
Redwood Shores
CA
94065
USA</address>
<telephone>650 506 7300</telephone>
</ShippingInstructions>
<SpecialInstructions>Ground</SpecialInstructions>
</PurchaseOrder>'))
Thanks in advanced.ExtractValue is a SQL Function not a method
You'll need something along the lines of
select extractValue(:new.sys_nc_rowinfo$,'/PurchaseOrder/Reference')
into v_ref
from dual; -
Special Authorization Values for characteristics
I had a question about the authorization value '*' (asterisk)
SAP defines how this can be used as follows:
(asterisk)
.. Denotes a set of arbitrary characters
.. Used alone to grant access to all values
.. Used at the end of a value to specify a simple pattern (example: SAP*)
Here is my situation:
InfoObject A: Values can be: A,B, C, A1, B1, C1, C2, A1G, B1D, C1A, C2A etc.
If a user has authorization of C, it automatically means he is authorized to view values C1, C2, C1A and C2A. In this case can I assign values
C, C and C** (I am doubtful abt using *(double asterisk))
Please clarify.
ThanksAsterisk denotes a set of arbitary characters
Used alone to grant access to all values
used at the end of a value to specify a simple pattern(example SAP *)
+(Plus)
Denotes exactly one character
Used at the end of a value to specify a simple pattern (example - RED+)
Used to specify date patterns(only for validity (OTCAVALID))
Hope it Helps
Chetan
@CP..
Maybe you are looking for
-
Oracle 8i: Business Days Calculation in a Subquery
To Whom It May Concern: I apologize if this has been posted already, but I didn't find any threads that address my issue: I need to find the number of business days between 2 dates (excludes weekends) provided by dates from an outer query such as the
-
New Iphone 5 Cannot connect to Itunes Store
I have just got a new Iphone which is now just a week old. Since the beginning I haven't been able to download any apps due to an error message "Cannot connect to Itunes Store". I have been able to connect to the Itunes and App store on the Iphone bu
-
Video not displaying properly and not exporting.
I'm using Premiere Pro CS4 and After Effects CS4. I brought an AFX composition in via Dynamic Link, made copies of the clip, chopped it up and spliced it back together on one video layer. Within the Premiere Pro interface, the video shows up normal
-
My blackberry phone can't access my ovi.com account and it requires me to verify my password but wen I do it say my password is invalid where els I just logged in with the ame password nw
-
How to create materialized view log on remote database
How do you create materialized view logs on a remote database. I tried create materialized view log on global_express_views.vccs438_project_work_request@h92edwp with sequence, rowid ( columns...) ERROR at line 1: ora-00949 illegal reference to remote