Xpath retrieve parent attribute

Given this XML structure.
<root>
<C cmd="a">
<T>text 1</T>
</C>
<C cmd="b">
<T>text 2</T>
</C>
<C cmd="c">
<T>text 3</T>
</root>
How would I write an xpath statement to return the <C> cmd attribute for a single found <T> element? 
For example if text 2 is found then return "b"... if text 1 is found then return "a".. you get the idea.. I need the parent attribute of a found child element.
TIA
Solved!
Go to Solution.

Hello FunkyMonk,
This website talks about how to select the parent of an element in an XML expression:
http://www.tizag.com/xmlTutorial/xpathparent.php
Does that answer your question?
Colden

Similar Messages

  • "LPX-00601: Invalid token in:" when retrieving namespaced attribute

    I'm trying to retrieve an attribute value from an XML document as follows:
    declare
       l_url varchar2(500);
       l_xml xmltype;
    begin
       l_xml := xmltype('<WMT_MS_Capabilities version="1.1.1">
                          <Capability>
                             <Layer>
                               <Layer>
                                  <Style>
                                    <Name>default</Name>
                                    <Title>default</Title>
                                    <LegendURL width="233" height="141">
                                       <Format>image/png</Format>
                                       <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink"
                                                       xlink:type="simple"
                                                       xlink:href="http://very_long_url"/>
                                    </LegendURL>
                                  </Style>
                              </Layer>
                              </Layer>
                              </Capability>
                          </WMT_MS_Capabilities>');
       select extractvalue(l_xml
                          ,'//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
                          ,'xmlns:xlink="http://www.w3.org/1999/xlink"')
         into l_url
         from dual;
         dbms_output.put_line(l_url);
    end;This code executes fine in a 9.2.0.5 database but on Oracle 10.2.0.4 I get:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource@xlink:href'
    ORA-06512: at line 26What am I doing wrong?

    Found the bug. there is a / missing before the @ in the xpath expression. 9R2 does not seem to care about this.
    Correct path=
    '//WMT_MS_Capabilities/Capability/Layer/Layer/Style/LegendURL/OnlineResource/@xlink:href'

  • Persistance of the Parent attribute

    Hi - I have a 8 applications (appxxx.ear)in OC4J (9.0.3) and uses the parent attribute between them.
    However - redeployment of .ear file with Enterprise Manager removes the parent attribute and changes the sequence of applications in server.xml
    How do I keep this attribute without re-applying it everytime after redeployment.

    See what happens when ya don't read the spec's backing the API's ya use? I haven't read that spec in over 2 years, and apparently it didn't jump out at me at that time as importand and/or major. Guess it all depends on what you're looking for when you read something.
    Thanks for the quick help; I'm off to implement my own personal version...erm...vision of versioning...um...anyway, back to it.
    Thanks again!
    -dSn

  • Retrieve all attributes for a specific objectClass using ldapsearch

    Hi everybody,
    Question : is it possible to retrieve all attributes for a specific objectClass (by example person) using ldapsearch tool ?
    I tried something like that, but it doesn't work :
    ldapsearch -v -h XXX -p XXX -b "cn=schema" -s base "objectclass=person" attributetypes
    Thanks a lot,
    Franck

    Ok, Thanks for you help,
    But my question is : For a specific objectClass, by example, I would like to have all attributes for the objectClass called "inetOrgPerson"
    something like that :
    ldapsearch -D "cn=Directory Manager" -w pwd -h host ...objectClass="inetOrgPerson"
    and the response could be :
    audio || businessCategory || departmentNumber || displayName || givenName || initials || jpegPhoto || labeledUri || manager || mobile || pager || photo || preferredLanguage || mail || o || roomNumber || secretary || userPKCS12
    I dont't know how to do ????
    Thanks
    Franck

  • How to retrieve Parent product category based on Product name selection.

    Is it possible to retrieve Parent Product category based on the Product name of the Product.
    Our Product catalog is set up as follows
    Product:
    Product name Product category
    TA30 TA30
    TA300 TA30
    Product categories
    Category Name Parent Category
    TA30 Lawn Mower.
    I would like to retrieve the Parent category "lawn Mower" when I select the product TA30 from the product list on the custom object 9. Any ideas or suggestions?
    Thanks,
    SKJ

    Hi Akila,
    I am assuming you query runs on a cube that loads data from the source system. In that case cube will contain only valid cobminations of Product Family & Product Line.
    In order to make sure that if a cetain Product Family is chosen you want to see only the relevant Product Line as available in the cube do the following:
    Go to Query Designer Filter
    Pick Product Family > Properties> Advanced. Under the Tab Filter Value Selection during Query Execution choose 'Only Values in InfoProvider'
    Do the same setting for Product Line as well.
    Hope this helps.
    Regards,
    Amrita
    Edited by: Amrita Goswami on Jun 23, 2009 7:26 AM

  • JAZN-LDAP : retrieve inetOrgPerson attributes from principal object

    Hello.
    I 've extended callerInfo demo (in OC4J distrib :j2ee/home/jazn/demo) :
    1. use of JAZN-LDAP
    2. now the servlet prints the "HttpServletRequest.getUserPrincipal()" object attributes (class implementation : oracle.security.jazn.oc4j.JAZNUserAdaptor) : the servlet prints LDAP attributes like user DN, subscriber name, groups member, ....
    Is it possible to retrieve other attributes of the LDAP object user (like description, businessCategory) by the java.security.Principal interface ?
    Thanks.

    Try this
    public String getCompanyByUserDN(String userDN) throws Exception
    String result = null;
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://<<LDAP HOST>>:<<LDAP PORT>>");
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, <<User DN>>);
    env.put(Context.SECURITY_CREDENTIALS, <<User Password>>);
    DirContext dirCtx = new InitialDirContext(env);
    DirContext userCtx = (DirContext)dirCtx.lookup(userDN);
    Attributes attrs = userCtx.getAttributes("", new String[] {"o"});
    result = (String)attrs.get("o").get();
    return result;
    }

  • In a child opportunity, How to retrieve parent opportunity ID

    Hello,
    I know that in account object, there is a way to retrieve parent account id.
    Now, I would like to know if it is possible to retrieve the Parent Opportunity ID, while being in the chilf opportunity.
    I tried many syntax which all brings me a syntax error :
    JoinFieldValue('<Opportunity>',[<OpportunityId>],'<ParentoptyIntegrationId>')
    JoinFieldValue('<Opportunity>',[<OpportunityId>],'<ParentOpportunityId>')
    JoinFieldValue('<Opportunity>',[<OpportunityId>],'<ParentoptyExternalSystemId>')
    Thanks a lot for your help.
    Best regards,
    Julien

    Hi Julien,
    We cannot get the Row Id of the parent opportunity in the child object. However if you can convey what the requirement is, there could be another way of fulfilling the requirement.
    Regards,
    Paul

  • [svn] 1447: Add parent attribute to the newly added "console" security constraint

    Revision: 1447
    Author: [email protected]
    Date: 2008-04-28 17:23:41 -0700 (Mon, 28 Apr 2008)
    Log Message:
    Add parent attribute to the newly added "console" security constraint
    Modified Paths:
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.xml

    Hi,
    you have to grant the Group "TESTGROUP" at leas the "View Object" right on the Root Level of all Users and All groups - then you see the snap in in the CMC.
    Regards
    -Seb.

  • Retrieve xml attribute value of nth xml node using xpath query

    I have an xml with following stucture...
    <xml>
    <header>
     <DocumentReference OrderId="order001">
     <DocumentReference OrderId="order002">
     <DocumentReference OrderId="order003">
    I have to loop through this xml and retrieve the orderId values inside Biztalk orchestration.
    In the expression shape, I get the count of 'DocumentReference' nodes using an xpath query and then
    Added a loopshape to make sure it loops thru all nodes
    Loop condition:   n<=nodeCount     (where n is an integer variable, n=0 to begin with, incremented by 1 thru each loop, nodeCount is # of DocumentReference nodes)
     I try retrieve to the orderId in the following expression shape using the below xpath query
      xpathQuery = System.String.Format("//*[local-name()='OrderReference'][{0}]/@orderID)",n);
      sOrderId = xpath(MsgSingleInvoice,xpathQuery);
    And I get the following exception:
    Inner exception: '//*[local-name()='OrderReference'][1]/@orderID)' has an invalid token.
    Exception type: XPathException
    Appreciate any help!   thanks!

    Thanks for the quick response. I got rid of it.
    And I see a different error:
    Inner exception: Specified cast is not valid. Exception type: InvalidCastException
    Source: Microsoft.XLANGs.Engine  
    Target Site: System.Object XPathLoad(Microsoft.XLANGs.Core.Part, System.String, System.Type)
    Since variable 'n' is of integer type, I suspected it and changed it to n.ToString() and tested again and still see the same error.

  • Error while extracting values from SOAP Body using XPath (Retrieve from Message filter)

    Hi,
    I am using 'Retrieve from Message' filter to extract element value from the following SOAP response envelope:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:math="http://example.com/math.xsd">
    <soapenv:Header/>
    <soapenv:Body>
    <math:DivideResponse>
    <iResult>10</iResult>
    </math:DivideResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    I am using the XPath expression - /soapenv:Envelope/soapenv:Body/math:AddResponse/iResult
    soapenv = http://example.com/math.xsd
    math = http://schemas.xmlsoap.org/soap/envelope/
    ERROR
    4/19/15, 19:29:03.016
    Empty attribute retrieved from message via XPath
    ERROR
    4/19/15, 19:29:03.016
    The message [Id-59643455b76a00000000000045edd6a6] logged Failure at 04.19.2015 19:29:03,015 with log description: Failed to extract attributes via XPath
    ERROR
    4/19/15, 19:29:03.017
    Retrieve math result from SOAP response
    Could you please help me resolve it?
    Thanks,
    Aneesh.

    Hi Aneesh,
    XPath Expression: /soapenv:Envelope/soapenv:Body/math:DivideResponse/iResult
    You are using AddResponse in your XPath there is no element named like that.
    Cheers,
    Stefan

  • XPath selection Problem - Attribute with value ???

    Hi All,
    I am having the following xml and i need to retrieve the value "1.23423" from the xml...I tried with the following XPath but couldn't achieve..
    String xpath = "//Attribute[@name='SegmentDelimiter']";
    Can you please help me ??
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:Sample xmlns:xs="http://kathir.com" xs:version="1.0" xs:build="20805" xs:jvmVersion="1.1.1">
    <xs:Test>
    <xs:Source xs:id="FIRST">
    <xs:Attribute xs:name="structure" xs:value="sample.xml" />
    </xs:Source>
    <xs:Target xs:id="SECOND">
    <xs:Attribute xs:name="FirstFormatter" xs:value="sample2.xml" />
    </xs:Target>
    </xs:Test>
    <xs:Testing>
    <xs:Properties xs:name="SecondFormatter" xs:id="sample3">
    <xs:Attribute xs:name="indent" xs:value="4" />
    </xs:Properties>
    <xs:Properties xs:name="ThirdFormatter" xs:id="sample4">
    <xs:Attribute xs:name="FormattedValue" xs:value="1.23423" />
    </xs:Properties>
    </xs:Testing>
    </xs:Sample>
    Thanks,
    J.Kathir

    nothing to do with java!
    find an Xpath forum, or try http://www.w3schools.com/xpath

  • Problem with Retrieving Parent records

    Hi
    I am facing some problem with Relation ship tables
    I am able to retrieve all child relation record by using Parent record id, but the other why around is not working that is
    I am unable to retrieve  all parent records by using a child record.
    Please can you help out this..
    find the below sample method which i was trying
    public HashMap<String, Record[]> getMemberRecords(Record[] rec,
                   RetrieveRelationshipsCommand relation,
                   RepositorySchemaEx repositorySchema, String code,
                   HashMap<String, Record[]> returnMap) throws MDMException {
              LOG.debug("calling getMemberRecords");
              HashMap<String, Record[]> returnVal = returnMap;
              LOG.debug("Assigning returnType to default HashMap.");
              try {
                   for (int recordCount = 0; recordCount < rec.length; recordCount++) {
                        LOG.debug("For recordCount = " + recordCount);
                        Record tempRec = rec[recordCount];
                        relation.setAnchorRecord(tempRec);
                        LOG.debug(" setting AnchorRecord = " + tempRec);
                        relation.setLoadRecords(true);
                        LOG.debug(" setting LoadRecords = " + true);
                        relation.setGetChildren(false);
                        LOG.debug(" setGetChildren has setup with  = " + true);
                        relation.setAnchorRecordId(tempRec.getId());
                        LOG.debug(" setting AnchorRecordId = " + tempRec.getId());
                        relation.setRelationshipId(repositorySchema
                                  .getRelationshipId(code));
                        LOG.debug("Before execution relation execute.");
                        relation.execute();
                        LOG.debug("After execution relation execute.");
                        RelationshipGroup group = relation.getRelationshipGroup();
                        LOG.debug("Retrieved Relationship Group.");
                        Relationship[] relat = group.getMembers();
                        LOG.debug("Length = "+relat.length);
                        Record[] tempRecords = null;
                        if (relat != null) {
                             int length = relat.length;
                             LOG.debug("Length = "+length);
                             tempRecords = new Record[length];
                             for (int count = 0; count < length; count++) {
                                  tempRecords[count] = relat[count].getMemberRecord();
                        if (tempRecords != null) {
                             LOG
                                       .info("Records size is not equal to Null So Calling recursive getMemberRecords.");
                             returnMap = getMemberRecords(tempRecords, relation,
                                       repositorySchema, code, returnMap);
                        LOG
                                  .debug("Setting HashMap Value Values with Parent ID, records[]");
                        returnVal.put(tempRec.getId().getString(), tempRecords);
              } catch (SessionException se) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(se.getMessage());
                   ec.setErrorCode("MetadataException : " + se);
                   LOG.fatal(se, se.getCause());
                   se.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (IllegalArgumentException iae) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(iae.getMessage());
                   ec.setErrorCode("MetadataException : " + iae);
                   LOG.fatal(iae, iae.getCause());
                   iae.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (CommandException ce) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(ce.getMessage());
                   LOG.fatal(ce, ce.getCause());
                   ce.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              LOG.debug("Before returning from getMemberRecords");
              return returnVal;

    Hi
    I am facing some problem with Relation ship tables
    I am able to retrieve all child relation record by using Parent record id, but the other why around is not working that is
    I am unable to retrieve  all parent records by using a child record.
    Please can you help out this..
    find the below sample method which i was trying
    public HashMap<String, Record[]> getMemberRecords(Record[] rec,
                   RetrieveRelationshipsCommand relation,
                   RepositorySchemaEx repositorySchema, String code,
                   HashMap<String, Record[]> returnMap) throws MDMException {
              LOG.debug("calling getMemberRecords");
              HashMap<String, Record[]> returnVal = returnMap;
              LOG.debug("Assigning returnType to default HashMap.");
              try {
                   for (int recordCount = 0; recordCount < rec.length; recordCount++) {
                        LOG.debug("For recordCount = " + recordCount);
                        Record tempRec = rec[recordCount];
                        relation.setAnchorRecord(tempRec);
                        LOG.debug(" setting AnchorRecord = " + tempRec);
                        relation.setLoadRecords(true);
                        LOG.debug(" setting LoadRecords = " + true);
                        relation.setGetChildren(false);
                        LOG.debug(" setGetChildren has setup with  = " + true);
                        relation.setAnchorRecordId(tempRec.getId());
                        LOG.debug(" setting AnchorRecordId = " + tempRec.getId());
                        relation.setRelationshipId(repositorySchema
                                  .getRelationshipId(code));
                        LOG.debug("Before execution relation execute.");
                        relation.execute();
                        LOG.debug("After execution relation execute.");
                        RelationshipGroup group = relation.getRelationshipGroup();
                        LOG.debug("Retrieved Relationship Group.");
                        Relationship[] relat = group.getMembers();
                        LOG.debug("Length = "+relat.length);
                        Record[] tempRecords = null;
                        if (relat != null) {
                             int length = relat.length;
                             LOG.debug("Length = "+length);
                             tempRecords = new Record[length];
                             for (int count = 0; count < length; count++) {
                                  tempRecords[count] = relat[count].getMemberRecord();
                        if (tempRecords != null) {
                             LOG
                                       .info("Records size is not equal to Null So Calling recursive getMemberRecords.");
                             returnMap = getMemberRecords(tempRecords, relation,
                                       repositorySchema, code, returnMap);
                        LOG
                                  .debug("Setting HashMap Value Values with Parent ID, records[]");
                        returnVal.put(tempRec.getId().getString(), tempRecords);
              } catch (SessionException se) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(se.getMessage());
                   ec.setErrorCode("MetadataException : " + se);
                   LOG.fatal(se, se.getCause());
                   se.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (IllegalArgumentException iae) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(iae.getMessage());
                   ec.setErrorCode("MetadataException : " + iae);
                   LOG.fatal(iae, iae.getCause());
                   iae.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              } catch (CommandException ce) {
                   MDMException exception = new MDMException();
                   ErrorContext ec = new ErrorContext();
                   ec.setErrorMessage(ce.getMessage());
                   LOG.fatal(ce, ce.getCause());
                   ce.printStackTrace();
                   exception.setContext(ec);
                   throw exception;
              LOG.debug("Before returning from getMemberRecords");
              return returnVal;

  • ISSUE  Retrieve ViewRowImpl attributes using ExpressionLanguage

    Hello,
    In my page JSPX I use a popupFetchListener to store my ROW in pageFlowScope, when I try to retrieve one of attributes I encountered this error :
    <font color="red">
    PropertyNotFoundException The class fr.annuaire.model.views.annuaire.EdpViewRowImpl does not have the property NbUti.
    </font>
    the error comes from the line disabled="#{pageFlowScope.currentEdpRow.NbUti > 0}"
    The attribute exists in the ViewRowImpl, see code below
    How can i access to attributes via ExpressionLanguage ?
    IN JSPX :
    <af:table value="#{bindings.EdpViewSearch.collectionModel}" var="row"
         id="tabEdp"
         rowSelection="none"
         contentDelivery="immediate"
         clientComponent="true"
         contextMenuSelect="true">
        <f<colon>facet name="contextMenu">
          <af:popup id="popupEdp" contentDelivery="lazyUncached" popupFetchListener="#{backingBeanScope.backing_entiteUtilisateurTab.popupMenuEdpFetchListener}">
         <af:menu id="m6">
           <af:commandMenuItem id="cmiSupprimerSingleEdpCM"
                         text="Supprimer"
                         disabled="#{pageFlowScope.CurrentEdpRow.NbUti > 0}"
                         actionListener="#{backingBeanScope.backing_entiteUtilisateurTab.actionOpenPopSupEdp}"/>
    IN BACKING BEAN : backing_entiteUtilisateurTab
    public void popupMenuEdpFetchListener(PopupFetchEvent fetchEvent) {
      JUCtrlHierNodeBinding nodeRoot = (JUCtrlHierNodeBinding)this.getTabEdp().getRowData();
      Map<String, Object> mpPageFlowScope = AdfFacesContext.getCurrentInstance().getPageFlowScope();
      SgtiEdpViewRowImpl row = (SgtiEdpViewRowImpl)nodeRoot.getRow();  
      mpPageFlowScope.put("CurrentEdpRow", row);
    IN MODEL :
    public class EdpViewRowImpl extends ViewRowImpl {
        public enum AttributesEnum {
            NbUti {
                public Object get(EdpViewRowImpl obj) {
                    return obj.getNbUti();
                public void put(EdpViewRowImpl obj, Object value) {
                    obj.setNbUti((BigDecimal)value);
        public static final int NBUTI = AttributesEnum.NbUti.index();
        public BigDecimal getNbUti() {
            return (BigDecimal)getAttributeInternal(NBUTI);
        public void setNbUti(BigDecimal value) {
            setAttributeInternal(NBUTI, value);
    }Thank you
    Edited by: a_badr82 on 28 févr. 2011 08:46

    Although it's probably not the cause of your problem, you should not be sticking a ViewRowImpl into page flow scope, the reason being is that ViewRowImpl is not Serializable, and page flow scope is a map in session scope. Does it work if you put the attribute into page flow scope directly?
    John

  • Re: Retrieve operational attributes

    Dear all,
    Do you have any concrete Java program example using standard Java API provided by JDK1.3.1 to retrieve the operational attributes of a entry stored in Sun One Directory Server?
    Thanks!
    Calvin

    There is no "+" pseudo attribute name that will retrieve all operational attributes in an entry, like OpenLDAP has. You must specify all of the operational attributes you want to get back in your search attribute list. If you need to get a list of all possible operational attributes, you have to query the schema - the attribute definition will tell you if the attributeType is operational.

  • How to retrieve url attributes in a bsp ?

    Hi,
    I would like to create a BSP and then to be able to get and use an attribute from an url in it. Below an example because i think i'm not clear enough:
    I create a bsp ztest. And i want to access to this bsp with the following url:
    http(s)://
    Then, in the bsp i want to retrieve the parameter pmsgnb to be able to use it.
    Is this possible ? How can i do that ?
    Thanks in advance.
    Best regards,
    Stéphane.

    Hi Stef,
    because you are just starting out with ABAP I would like to give you a few tips. You may of course already know about some of this.
    When in that ABAP editor you can hit F1 at any time to get online help on the ABAP language. This is context-sensitive so if you place your cursor on an ABAP statement F1 will take you to the online help for that statement. The online help often contains sample syntax so you can see how to use the statements in your code.
    Inside the ABAP Workbench (transaction SE80) you can navigate to Environment->Examples to see a lot of ABAP coding samples with supporting documentation. For example under "Environment->Examples->ABAP Examples->ABAP Database Access->Open SQL->Read data" are over 20 sample programs showing various ways of retrieving data from the database.
    If possible go on an Introduction to ABAP training course. If not, at least buy some books on the subject. The ones that are published most recently will be more focused towards object-oriented programming and so they are more relevant than the older ones which tend to focus on SAPGUI programming and reporting.
    When learning the ABAP language remember that BSP is a special use-case for ABAP and therefore has characteristics and behaviours that are unique to it. Essentially BSP combines two different development techniques - namely ABAP and the web.
    In the SDN forums it is not a great idea to ask too many "newbie" questions. For a while you will get responses but later on the useful people will put you on their "do not respond" list. When using the SDN forums make sure you search for an anwser to your problem before posting, make sure you post in the correct forum and beware the "points junkies". These people just blast you with a huge copy and paste from their "knowledge base" in the hope you will allocate them points. They often don't really bother to read your question.
    For your specific issue I think the INTO clause needs to come before the WHERE clause.
    Try..
    SELECT GUID FROM CRMD_ORDERADM_H  INTO ls_guid_ticket WHERE PROCESS_TYPE = pmsgnb.
    Your question does raise another issue. You should try and avoid directly reading, and especially updating, the SAP database tables. This is how traditional ABAP programmers had to work, but contemporary SAP developments expose persistent data through classes, methods, function modules, etc. When trying to manipulate SAP data you should always try and find the proper way to do it, the way SAP does it, rather than directly accessing the database. This ensures you process any configured "business rules" that apply to that data, makes your program more maintainable, and minimised the chances of other changes to the system effecting the reliability of your program.
    By way of example, lets say you wanted to change a user's class to 'TESTER'. You could write code to directly modify the field CLASS in the table USR02 to do this. But the correct way to do it would be to call the BAPI for this purpose, like this.
    username = 'MUSTER'.
    logondata-class = 'TESTER'.
    logondatax-class = 'X'.
    call function 'BAPI_USER_CHANGE'
          exporting
              username          = username
              LOGONDATA         = logondata
              LOGONDATAX        = logondatax
         tables
               return           = return .
    Now, if SAP change the data model for user master records in any way you can be sure that your code will still work because they will also maintain the standard interfaces to the data model, in this case the suite of BAPI_USER* function modules.
    The other by-product of this strategy is that you maximise code-reuse and minimise the amount of code you have to write. Of course sometimes direct database access is unavoidable, even with the latest SAP delivered code. For example I am currently working for a customer in the Auto industry and I have found the SAP delivered code around Warranty Claims to be so inefficient that I have to use direct database access to get reasonable performance.
    I hope this helps you. Good luck with your ABAP.
    Cheers
    Graham Robbo

Maybe you are looking for

  • Lightdm and KDE shutdown, restart

    I use KDE and want to use fingerprint-gui to login. This isn't possible with kdm, so I ended up with lighdm. Login with fingerprint reader works, but with lightdm shutdown and restart buttons disappears from menu. After playing with lightdm from AUR,

  • Tidal vs Powershell

    Hi, Visited this one before with limited success but now its time to try again. Platform is TES 6.1.0.212 running on Solaris x86, CM is on RH linux, agent on windows server 2003. I'm attempting to automate some MS excel work via powershell. I have a

  • Wireless sometimes not working: "dhcpcd: wlan0 reject NAK"

    HI, Normaly my wireless works fine (I have a FritzBOX wlan router). But sometimes, when connection, I get this: dhcpcd: wlan0: reject NAK The wlan still works for other computers ... What could cause this problem? I use the iwl3945 kernel driver for

  • Connecting ipod quits itunes.

    I just switched from pc to mac and was just switching my ipod doing a full restore. after the ipod restored and itunes reopened it automatically quit itunes. Itunes works fine when my ipod is disconnected. but itunes doesn't even stay open long enoug

  • Convert video filmstrip to a picture

    How do you covert a video to a picture with an iphone 4?