Update Routine - Reading the attribute

I am using 0PA_C01 cube (3.x flow only). I have a requirement to generate SBU field based on the 0PERS_AREA values. 0PERS_AREA is the attribute of 0EMPLOYEE. The code will be written as update routine.
I am getting difficulty in how to read 0PERS_AREA. It does not appear in COMM_STRUCTURE as this a attibute of 0EMPLOYEE.
Do we use any form for it? Please guide.

Hello,
You can write a start routine where you read the 0PERS_AREA values from the master data table of 0EMPLOYEE.You can store teh raed values in the start routine into a internal table.
Then for the  SBU field  in the update rule,write a update rouitne to calculate the same by reading that internal table.
You can find some sample code in the thraeds:
/message/5918323#5918323 [original link is broken]
Re: Look up at master data in  update routine
Regards,
Dhanya

Similar Messages

  • How to read the attribute of the xml file using jaxb

    Thanks,
    Buddy as i have a issue i have to read the xml file using jaxb and xml file contains this data and i have read the attribute like name , desc and action for a particular menu name pls tell the code how to do this it will be a great favour to me
    thanx in advance
    Rasool
    <contextmenu>
    <menu name='Lead' >
    <menuitem name='newlead' desc='New Lead' action='/leads.do?dispatch=insert' />
    <menuitem name='editlead' desc='Edit Lead' action='' />
    <menuitem name='leadinfo' desc='Lead Information' action='' />
    </menu>
    <menu name='Cases' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    <menu name='Contact' >
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    <menuitem name='' desc='' action='' />
    </menu>
    </contextmenu>

    What my program do is to get the encoding of XML files and convert them to UTF-8 encoding files, while I need this "encoding" information of the original XML document thus I can convert...
    After reading specifications and JDOM docs, the truth turns to be disappointed, no function is provided to get this information in JDOM level 2(the current released one), while it's promissed that this function will be provided in JDOM level API....
    Thanx all for your help and attention!!!

  • How to read the attribute in mapping..

    Hi,
    My source XML looks like this
    <GLDEBITACCT>
                <VALUE>0545-K-2006605-5500001</VALUE>
                <GLCOMP glorder="0">0545</GLCOMP>
                <GLCOMP glorder="1">K</GLCOMP>
                <GLCOMP glorder="2">2006605</GLCOMP>
                <GLCOMP glorder="3">5500001</GLCOMP>
      </GLDEBITACCT>
    Where glorder is the attribute of GLCOMP. Now I have requirement to read the attribute ( atleast 2 of them)
    I have to map to target field checking the value in glorder="1
    For e.g. with above XML, if the value in glorder="1 is K than map value from glorder="2 (2006605) to Target 1.
    IF the glorder="1 is P map the value in glorder="2 to Target 2 and goes on for another one
    How can i acheive this mapping. When I tried putting the value of glorder, i am not getting anything.
    Regards,

    Hi,
    You can use below UDF. Please make sure to select context parameter while creating UDF. There will be 3 input arguments for this function:
    1. GLCOMP (a)
    2 @glorder   (b)
    3 Constant   (c)  --depending upon the target node
    Also conext of attribute @glorder should be same as that of GLCOMP.
    //write your code here
    for(int i=0;i<a.length;i++)
        if(b<i>.equals("1")&&c[0].equals(a<i>))
        for(int j=0;j<a.length;j++)
              if(b[j].equals("2"))
         result.addValue(a[j].toString());
                            break;
    For target node target1 use K as 3rd argument, for target node target2 use P and so on.
    Let me know how it works.
    Regards,
    Anirudh.

  • How to read the attribute in another context node from setter method

    Hi,
    As part of the  requirement
    i need to read the STRUCT.E_MAIL ( attribute ) present  in  INDEPENDANTEMAIL context node  from  the SET_S_SRUCT method of the context node  HEADER.
    I tried th following but it didnt work out....
    Get the Custom Controller Path
    *lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
    *IF lr_cuco IS BOUND.
    Get the Entity
    *lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
    *ENDIF.
    *CHECK lr_entity IS BOUND.
    Get the Trade Event Type.
    *lv_email  = lr_entity->get_property_as_string( 'E_MAIL' ).
    also i tried ...
    data:
    *lv_value type string,
    *lr_property type ref to if_bol_bo_property_access.
    *lr_property = collection_wrapper->get_current( ).
    *lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
                                                returining  ev_result    = lv_email ).
    but it didnt workout ......
    Any suggestions   ...................
    Regards,
    Sijo...

    Hi,
    Both Context node are available in view then refer this link.
    Reading Attributes from different context nodes in the same view
    Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
    Regards
    Gaurav

  • How to read the attributes of XML file

    Hi this is ant,
    I am new to java, XML, I have a senario
    1) I have to read all the href attributes for topicref child, and then read the corresponding xml file which is mapped in href="".
    First.xml
    <map>
    <topicref nav="garage" href="task/gar/view.xml" class="..">
    <linktext class="_map/linktext">Garage</linktext>
         <topicref nav="" href="task/gar/change.xml" ..>
    <linktext class="_map/linktext">Garage</linktext>
    </topicref>
    </linktext>
    </topicref>
    </map>
    2) task/gar/view.xml file , has id attribute & need to get the id values.
    Like this I have to get the id values for all the href attributes of first xml & read correspoding id values.
    I have just read some doc using XPATH we can do, please help me.
    Thanks.
    anto

    * Try this Link, there is solution
    http://forums.sun.com/thread.jspa?messageID=9665228
    Can...Can...If we try...!

  • I love new updates; I read the information, but missed that Dashland, as with last update, does not work. Can't live without it. I've updated. Now, what to do?

    Last update clearly informed me that Dashlane did not work with the update. I read the information this morning before downloading and did not see that once again, Dashlane will not work. I must have access to my passwords. Do I have any recourse other than re-installing the last version of Firefox? Or, using Safari in the interim so I can use iCloud to reveal passwords?

    See this Dashlane support page - http://support.dashlane.com/customer/portal/articles/390903

  • Reading the Attributes

    Hi,
    I have an xml file like the following
    <?xml version="1.0" encoding="UTF-8" ?>
    - <rapidtrade>
    - <main webservice="VERMONT" applicationname="rapidtrade.exe" profilenumber="08" daystokeeporderstatus="15" supplier="Vermont" version="31821539">
      <computers />
    - <configuration>
    - <accounts>
      <account branch="0" number="8" name="NEVADA INDUSTRIAL SUPPLIES" vat="14" />
      </accounts>
    - <Options>
      <variable name="changeshipping" value="1" />
      <variable name="forcepricechange" value="1" />
      <variable name="changeprice" value="0" />
      <variable name="webaddress" value="http://196.31.215.37:80/rapidtrade/vermont/rapidtrade.aspx" />
      <variable name="detaillogs" value="false" />
      <variable name="key" value="FKOFFGFG3FFHFFDFLK3IG" />
      </Options>
      </configuration>
      </main>
      </rapidtrade>is this my XML file, i want to read the node eg Options and its attributes.
    Can any one help me...if u have some sample code pls do post it.
    this is my code so far:
    public static boolean Load(String webService,String profileID){
           // add the variables here untill the classes have been created
               try {
                   // Create instance of DocumentBuilderFactory
                    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                    // Get the DocumentBuilder
                    DocumentBuilder builder = factory.newDocumentBuilder();
                   Document document;
                   Element root;
                   // parse the XML file to be edited
                   File file = new File( "C:\\Globals.XML" );
                   // open xml file and get the root node
                   document = builder.parse( file );
                   root = document.getDocumentElement();
                   //Find the main node then get options node under it, then load all variables
                   NodeList List = document.getElementsByTagName("main");
                   String projectNum;
                   Node node;
                   System.out.println(List.getLength());
                   for(int i=0;i<List.getLength();i++){
                       node=List.item(i);
                       Element element = ( Element )node;
                       //if this is our service then load all the global variables
                       if( element.getAttribute("webservice").equals(webService) ){
                           if(element.getAttribute("profilenumber").equals(profileID)){
                               System.out.println( "\twebservice Attribute: " + element.getAttribute( "webservice" ) );
                               System.out.println( "\tprofileId Attribute: " + element.getAttribute( "profilenumber" ) );
                               Element elOptions = (Element)element.getElementsByTagName("Options").item(0);
                               System.out.println( "\tprofileId Attribute: " + element.getElementsByTagName("Options").item(0) );
                            //  Element elOptions = (Element)node;
                               //i'm stuck here
               } catch (Exception e){
                   System.out.println("Error could not find a main node" + e.getMessage());
                   return false;
               return true;
        public static void main(String[] args) {
          if (clsGlobal.Load("VERMONT","08")){
                 System.out.print( "Project loaded");
             } else {
                 System.out.print("Error");
        }thanks in advance
    JoJo

    DOM elements have an attribute method that returns the attributes.
    See http://www.mozilla.org/docs/dom/domref/dom_el_ref.html
    � {�                                                                                                                                                                                                                                                                                       

  • What do I need to get the 6.7 update [to read the CR2 canon raw files] installed in Photoshop elements 10 [new computer with Windows 8]?

    I downloaded the zip file for the 6.7 update and unzipped it. I double clicked on the .exe file and it would not install. What do I need to get the update installed?

    Is this the 6.7 camera raw updater you tried?
    It's specifically for pse 10 on windows.
    Adobe - Photoshop Elements : For Windows : Camera Raw 6.7 update for Elements 10
    What camera do you have?

  • How to read the attribute of a XML element? Please help!

    Hi experts,
            <Batch>
                  <BatchCode ID= AA>
                    <DeliveryNote>190098</DeliveryNote>
                    <LotQuantity>1560</LotQuantity>
                  </BatchCode>
                  <BatchCode ID= BB>
                    <DeliveryNote>190098</DeliveryNote>
                    <LotQuantity>1560</LotQuantity>
                  </BatchCode>
              </Batch>
            Target message:
                <BatchDelivery>
                  <DeliveryNote>190098</DeliveryNote>
                  <DNQuantity>1560</LotQuantity>
                </BatchDelivery>
           From the source message I want to pull only those batch details where ID is BB.
           How to handle thsi in mapping?
    Thanks
    Gopal

    Hi Prabhu,
             I ma sorry I have two levels of checks in my source XML.
    <Batch>
    <BatchCode ID= AA>
    <BatchLabel>Primary</BatchLabel>
    <DeliveryNote>190098</DeliveryNote>
    <LotQuantity>1560</LotQuantity>
    </BatchCode>
    <BatchCode ID= BB>
    <BatchLabel>Secondary</BatchLabel>
    <DeliveryNote>190098</DeliveryNote>
    <LotQuantity>1560</LotQuantity>
    </BatchCode>
    <BatchCode ID= BB>
    <BatchLabel>Primary</BatchLabel>
    <DeliveryNote>190098</DeliveryNote>
    <LotQuantity>1560</LotQuantity>
    </BatchCode>
    </Batch>
    So I need to pull batch details where first the BatchCode ID= AA and then where BatchLabel value is 'Primary'
    Target message:
    <BatchDelivery>
    <DeliveryNote>190098</DeliveryNote>
    <DNQuantity>1560</LotQuantity>
    </BatchDelivery>
    How to do the graphical mapping for this situation?
    Thanks
    Gopal

  • Update routine code

    Hi friends,
    I have a field YREPCURR in the update rules, it needs to updated based on the attribute of /BIC/YREPCURR in 0salesorg
    plz help me writing a routine for this field
    help will be really appreciated, points would be fully awarded
    regards,
    veer

    Hi
    I'm giving it a try as a ABAP beginner myself!?!
    TABLES: /BI0/PSALESORG.
    data: YREPCURR like /BIC/YREPCURR-/BI0/PSALESORG.
    select single /BIC/YREPCURR from /BI0/PSALESORG into YREPCURR where objvers = 'A' and
    SALESORG = comm_structure-SALESORG.
    if sy-subrc = 0.
    result = YREPCURR.
    endif.
    OR
    You can also use the option of Attribute of in the Update ruled mapping.
    Regards,

  • How to read an attribute of an xml tag in jsp.

    hi guys,
    This is murali krishna. i have a small problem,
    i have one xml file (books.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <library>
    <book id="1">
    <name>Head First Java, 2nd Edition</name>
    <author>Kathy Sierra and Bert Bates</author>
    <publication-date>09-Feb-2005</publication-date>
    </book>
    <book id="2">
    <name>Effective Java</name>
    <author>Joshua Bloch</author>
    <publication-date>28-May-2008</publication-date>
    </book>
    <book id="3">
    <name>Java How to Program, 7th Edition</name>
    <author>Harvey M. Deitel and Paul J. Deitel</author>
    <publication-date>6-Jan-2007</publication-date>
    </book>
    </library>
    I tried to read this xml file in jsp as shown below
    <%@ page language="java" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="javax.xml.parsers.DocumentBuilder" %>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory" %>
    <%
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db =dbf.newDocumentBuilder();
    Document doc=db.parse("c:\\books.xml");
    NodeList nl = doc.getElementsByTagName("book");
    %>
    <html>
    <head>
    <title>How to read XML file in JAVA</title>
    </head>
    <body>
    <%
    for(int i=0;i<nl.getLength();i++)
    NodeList nameNlc= doc.getElementsByTagName("name");
    Element nameElements=(Element)nameNlc.item(i);
    String nameTagValue=nameElements.getChildNodes().item(0).getNodeValue();
    NodeList authorNlc= doc.getElementsByTagName("author");
    Element authorElements=(Element)authorNlc.item(i);
    String authorTagValue=authorElements.getChildNodes().item(0).getNodeValue();
    NodeList dateNlc= doc.getElementsByTagName("publication-date");
    Element dateElements=(Element)dateNlc.item(i);
    String dateTagValue=dateElements.getChildNodes().item(0).getNodeValue();
    out.println("name :"+nameTagValue+"<br>");
    out.println("author :"+authorTagValue+"<br>");
    out.println("publication-date :"+dateTagValue+"<br><br>");
    %>
    </body>
    </html>
    so, my problem is I was unable to read the attribute of the tag book , that is "id".
    can any one tell me how to read this "id" attribute.
    Murali Krishna
    [email protected]

    hi,
    U r retriving the elements by tag name.So it just chks the tag name ie.<book> & gives u array of elements.But u need retrive d attribute of <book> tag itself.
    =Solution =====
    Add one more statement ----> var[]= doc.getElementsByName("book");
    Now u hav book elements as an array & can retrive id in for loop
    for(var; var.length;var++)
    doc.element[var].id.value

  • Sychronisation AD - OID: Is it possible to read the user password from AD?

    Hi.
    We are using the Oracle Internet Directory shipped with the Oracle 9i Database Rel. 2 (9.2.0.1).
    I try to synchronise the user accounts from AD to OID using JAVA JNDI. I'm able to read all necessary user information except the user password (MD5 value). Even if I connect to the AD using SSL, it's not possible to read the attribute userPassword.
    Is anybody out there who got this work or knows a way (may also be by the use of another programming language or tool) to get the user password out of AD? Is this possible? How does the Oracle Integration Agents accomplish this?
    Thanks in advance.
    Hermann S.

    Hermann,
    I am working with this as well, though from AS10g, not RDBMS. According to the OID Administrator Guide chapter 43, page 43-52:
    <snip>
    Synchronizing passwords from Microsoft Active Directory to Oracle Internet Directory is not possible in the Oracle Application Server 10g release because passwords in Microsoft Active Directory are not accessible by LDAP clients. However, if a deployment requires passwords to be available in Oracle Internet Directory, then the following two methods are recommended:
    Build a custom plug-in for Microsoft Active Directory that captures a password change and synchronizes it with Oracle Internet Directory
    Manage Active Directory passwords from the Oracle environment. This enables passwords to be available in both Oracle Internet Directory and Microsoft Active Directory because the Active Directory connector can synchronize passwords from Oracle Internet Directory to Microsoft Active Directory.
    </snip>
    As10g can however look up the password in AD using the "Active Directory External Authentication Plug-In". This is documented in the same chapter.
    Hope this helps,
    Jens

  • Is there any way to read the field name,through the property binded to it.

    Hi
    I want to know that,is there any method exits with which i can find the field names of the screen,if i have the property attribute with me.
    as my req is to make the validation for the property attr,& check  how many fields are binded with the single property attr,i have read the property attr dynamically,now need to find the fields linked,& need to check how many fields have not field value,& through the error msg.

    just read the attribute binded to properties using code wizard ( Control + F7).
    Code generalted will be like :
    DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check LIKE ls_cn_check-ca_check.
      navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
      get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
      get single attribute
        lo_el_cn_check->get_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = lv_ca_check ).
    Here i have read attribute CA_CHECK.

  • Update routine bringing wrong data in Report

    Hello Experts,
    I have a strange situation on Inventory data. We have update rules from data source 2LIS_03_BF to our inventory cube.There is a characteristic in the cube which was not doing any thing in the past(I mean not mapped),which I am filling it currenlty using a update routine. The cube data looks absolutley fine for that field, I mean its bringing what it supposed to bring from my routine.The cube data looks fine for that field, but when I run the report on this cube,the field data is getting some numbers from some where,which is totally wrong.
    I checked whether there is BADI written on this field (Virtual Characteristic), but seems there is none for this characteristic except for some key figures based on some other characteristics.
    I am confused here as why the report is bringing some wrong numbers when it supposed to get the correct values from cube.
    Please advise,
    Regards,
    JB

    Hi,
    i hope you have checked it for non cumulative objects as there will be a different way of aggregation in that case.
    also, if the inventory is modelled based on cumulative key figures and if you are sure there is no code written for virtual key figures then it could be exception aggregation in the reporting settings or in the key figure general settings.
    Also during checks you are considering the historical data as well from the cube and its effect on the report output.
    just do a check and let us know.
    regards
    Ajeet

  • MDSModelDeploy Operation Failed, clone cannot be deployed, The Attribute Value is not valid

    I've created a model containing a customer entity with various domain based attributes.  I've populated the entities via a combination of manual entry and the staging tables.  In the source system I have approx 950 customer records, all of which
    fail validation on the source system as some of the attributes will be maintained only in MDS and are not in the source systems I'm pulling the initial data from.
    I ran the MDSModelDeploy.exe to create a package containing data on the source system.  I then ran the package to apply the package using the -deployclone option on my target system.  I piped the output into a flat file for review.
    Here is the error I'm receiving.
    MDSModelDeploy operation failed. Elapsed time: 00:01:00.2314612
    Error:
    A clone of the "Subzero_1" model cannot be deployed.
    An error occurred while processing message request type 'EntityMembersMergeRequest'. See exception details for more information.
    Package deployment failed with 344 errors
    The attribute value is not valid.
    The attribute value is not valid.   (repeated 344 times)
    Any ideas what the issue might be?  I have tried verbose logging as well and did not find anything that would point me in the direction of the problem.  The end result was that the model was not deployed to the target.
    I have also created a package without data, deployed that, then applied the data.  This gets the model to the target and the data also appears to be there but I did receive this error on the deployupdate.
    This is on SQL Server 2012.

    I am seeing the same error. Created a model, Cloned the model. Made changes to the clone (Schema and Data), and used MDSModelDeploy UpdateModel to update the primary (not cloned) model.  In looking at the log, I see the error shown below, but I do not
    see anything that points to what was happening at the time.
    I tried running a SQL trace to see if one of the SQL commands received an error, but none of the commands did.
    In looking at the model that was updated, I can see all of the schema changes were made, and most of the data was updated. There is one table that did not update completely. The attributes in the table consist of Domain Specific and text attributes only. 
    I also verified that everything on both models was validated before starting.
    In the weblog I see the error listed below, but there is nothing in the data that would match that value 
    Not sure were to go from here....
    Chad
    --- MDSMODELDEPLOY ERROR RECEIVED ---
    MDS Error: 0 : Microsoft.MasterDataServices.WebUI.ServiceAdapterObjectInvalidException: An error occurred while processing message request type 'EntityMembersMergeRequest'. See exception details for more information.
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.InspectResponseForErrors(MessageRequest request, MessageResponse response)
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.ExecuteRequest[TRequestType,TResponseType](MdmServiceOperation`2 operation, TRequestType request)
       at Microsoft.MasterDataServices.WebUI.ServiceAdapter.DoEntityMembersMerge(EntityMembers entityMembers)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.BatchEntityMembersMerge(Collection`1 masterData, Boolean membersOnly, Int32 batchSize, Int32 totalBatches, Collection`1 errors)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.UpdateData(Collection`1 masterData, Warnings errorsAsWarnings)
       at Microsoft.MasterDataServices.Deployment.ModelDeployer.DeployUpdate(Package package, Boolean includeData, Identifier targetVersionId)
       at Microsoft.MasterDataServices.Deployment.Utility.ModelDeploy.DeployUpdate(String serviceName, String packageFile, String versionName)
       at Microsoft.MasterDataServices.Deployment.Utility.ModelDeploy.Main(String[] args)
        DateTime=2014-02-06T16:03:17.8405277Z
    -- WEB ERROR RECEIVED --
    MDS Verbose: 0 : Unable to convert value of query string parameter Id = VID to an integer
        DateTime=2014-02-06T17:18:00.7367274Z

Maybe you are looking for