Read XML in BPEL and assign values to variables

Hello,
I need to read an xml message in BPEL and assign variables created in BPEL the values of elements in XML message. Whats the best possible way to do this.

When you say"*read an xml message*", is the xml coming as input message or you need to read from file ?
If you want to read from file, you can make use of the below function.
Returns the string value of an element defined by lookupXPath in a XML file (docURL) given its parent XPath (parentXPath), the key XPath (keyXPath) and the value of the key (key). Usage: oraext:lookup-xml(docURL as string, parentXPath as string, keyXPath as string, lookupXPath as string, key as string)
Example: oraext:lookup-xml('file:/d:/country_data.xml', '/Countries/Country', 'Abbreviation', 'FullName', 'UK') returns the value of the element FullName child of /Countries/Country where Abbreviation = 'UK' in the file d:\country_data.xml
Thanks,
Vijay

Similar Messages

  • Define and assign values to variables in calc manager

    Hi all,
    I have created a smartlist in data form for user to select the start month and end month.In BR,based on the smartlist ID,i need to assign the months to a variable,which i will later use it in the same BR.
    For Eg:In data form,from the smartlists,user has choosen "Jul" for start month and "Nov" for end month,hence the smartlist ID is 7 for start month and 11 for end month.Now in calc manager,i have created 2 variables as "DateFrom" and "DateTo" of type "member" for dimension "Period"
    Note: "Jan" to "Dec" are period dim level 0 members
    IF(start month==1)
    DateFrom="Jan";
    ELSEIF(startmonth==2)
    DateFrom="Feb";
    ELSEIF(start month==7)
    DateFrom="Jul";
    ELSE
    DateFrom="Dec";
    ENDIF;
    Similarly for end month as below:
    IF(end month==1)
    DateTo="Jan";
    ELSEIF(end month==11)
    DateTo="Nov";
    ELSE
    DateTo="Dec";
    ENDIF;
    Above method of assigning a value to a variable is not working and no values assigned to the 2 variables "DateFrom" and "DateTo"
    Kindly help me on any additional steps required to use variables in calc manager.
    Thanks!

    Cant you use the values from RTP directly? What is the logic you are trying to build?
    One of the ways to achieve this is to use Calc TP Index member, if you are not sure of this, create a workforce application and you will get the formula for calc TP index member in Essbase.
    Edited: I just checked other question from you, will revert on that in some time.
    Cheers..!!
    Rahul S.

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Read Xml, Manipulate it and write it

    I need a simple Example of reading XML, manipulate it and write it out.

    I need a simple Example of reading XML, manipulate it and write it out.

  • Reading a text file and transferring values into array

    Hi,
    I have a problem. So what I am trying to do is that, I read a text file and insert specific values from the text file into an array for future needs.
    But I have to make sure that there is no duplicate entries. So thats what I have but, my method takes forever to finish...
    here is my code:
    String nomFichier = "Test_" + numTest + "_" + date + ".txt";
            String ligne = "";
            int z = 0;
            int j = 0;
            BufferedReader lecteurFichier = new BufferedReader(new FileReader(nomFichier));
            while ((ligne = lecteurFichier.readLine()) != null) {
                if (z > 3)
                    String valeur = "";
                    String dist = "";
                    boolean unique = true;
                    String [] chiffre = ligne.split(";");
                     if (intervalleAnalyser == 1)
                        valeur = chiffre[3];
                        dist = chiffre[4];
                    if (intervalleAnalyser == 2)
                        valeur = chiffre[2];
                        dist = chiffre[4];
                    if (intervalleAnalyser == 3)
                        valeur = chiffre[1];
                        dist = chiffre[4];
                    if (z == 4) {
                        intervalleDiagramme[j] = valeur;
                        j++;
                    if (z > 4) {
                        for (int i = 0; i < intervalleDiagramme.length; i++)
                             for (int x = 0; x < i; x++)
                                 if(intervalleDiagramme[i] == intervalleDiagramme[x])
                                    unique = false;
                        if (unique)
                            intervalleDiagramme[j] = valeur;
                        j++;
                z++;
            lecteurFichier.close(); // toujours fermer le fichier

    Hi,
    Thanks for your reply,
    1) Yeah I have a method that asks the question and assigns it to a variable.
    2) Well the z will stop once there is no lines to read no?
    for the set.add(), I am not that familar...
    I changed bit a code and I have this now:
    if (z > 4) {
                        for (int i = 0; i < intervalleDiagramme.length; i++)
                            System.out.println(intervalleDiagramme);
    if(intervalleDiagramme[i].equals(valeur))
    System.out.println(intervalleDiagramme[i] + " " + valeur);
    unique = false;
    if (unique)
    intervalleDiagramme[j] = valeur;
    EDIT:
    I figured a way to assign " " to all the values in my array. But I get this error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 380
    at TP3.lireFichier(TP3.java:305)
    And my line 305 is: intervalleDiagramme[j] = valeur;
    EDIT2:
    So ok I found my mistake and corrected it. But I want to know is there a way of doing this without setting the size of the array? because sometimes there needs to be 21 values sometimes 19 and sometimes 20....
    If I take out: = new String [21] out I get a NullPointer error...
    Edited by: Ara1992Habs on Dec 13, 2009 7:29 AM
    Edited by: Ara1992Habs on Dec 13, 2009 7:37 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Budget Availability control and Assigned Value in Project

    Hi,
    Project is so structured that it is similar to the product structure. Assume a simple case with two level BOM where a sub assembly M1 includes another sub assembly M2.
    In project, these two sub assemblies are assigned under two different WBS elements W1 and W2 respectively where hierarchically W1 is assigned under W2.
    After release we have two Production Order P1 and P2 account assigned to W1 and W2 respectively.
    Assume M2 stnd price is 100 and M1 stnd Price is 150.
    My process output ultimately is only M1 so I would prefer to give a Budget of 150 Rs. However, since P1 and P2 production Orders are accoun assigned, a total 100+150 =250 Rs is showing up under assigned value and error of Budget over run is being encountered.
    One solution can be to give budget of 250 Rs, which not logical as I am producing only M1.
    We tried by un flagging Additional and Assign funds in plan indicators for Order category 20 and 10 in OPSV. But that did not help.
    Once P2 prod order is confirmed, the assigned value for W2 is becoming to actual cost of P2 and remains even after setting TECO and Settling P2. It becomes Zero only when W2 is removed from acct assignment of P2, which again can not be a solution as WBS and Prod Order will loose the linkage.
    We desire avaialbility control to verify only against the actual cost Project. No assigned value should be considered.
    Need your help to resolve it.
    Thanks
    Saikishore ganga.

    Hi Sudhir,
    Thanks for the valuable input.
    As you rightly said we can not produce M1 without M2. But budget has to be only 150 Rs. Because
    Cost M1 = Cost M2 + other mat Cost in assly + Assly operations Cost.
    Cost M1 = 100 + 10 (assume) + 40 = 150 Rs.
    Physically I am Producing only M1. So my budget would be atmost the cost of the item that is 150 Rs.
    But in project we had to assign M1 and M2 under two diff WBS elements because it takes considerable amount of time to completed entire qnty structure i.e BOM and Routing of M1 and then release. Till them M2 has to wait for M1 BOM and Routing to be completed. In order again time , M1 is assigned under W2 , W2 is released and in MRP W2-M1 BOM explodes and manufacturing begins.
    When M1 bom gets ready, it is assigned under W1 and then W1 will be released. Duplication of Prod Orders are taken care.
    However, by using exempt cost elements feature I think we can resolve the above.
    Will update once I do my experiments on this.
    Thanks for the input.
    Saikishore. Ganga

  • Assigning value to variable in ODI

    Hi
    TotalCount(datatype is numeric)--->Action is (Latest value)
    And i want to assign value it by using following query
    select count(*) from Investment_ato
    i am writing this in a refresh tab
    And i am using this variable in another variable(var_account)
    but value of TotalCount variable is not coming in var_account
    so plz suggest regards the same
    thanks

    You can set the refreshing mode in the variable var_account and in the refreshing tab put the query as: select #TotalCount from dual.
    Hope it helps!

  • Assigning value to variable of type time

    Hi,
    I want to assign value '8:00:00' to a time variable (w_time like sy-uzeit).
    How do i do this? Do i need to do any casting?
    w_time = '8:00:00' didnt work.
    I am trying to use this in a customer exit.
    Thanks,
    Arun KK

    Gotcha!
    Thanks!!

  • Assigning Value to Variable in Sapscript

    Hi,
    To initialized value of the variable when I tried to assign 0 to variable (like in the following statement) it comes up with error 'Command Expected'.
    &RF140-ZALBT&= '0'.
    Please let me know where and what I am doing wrong in assigning value to a variable?
    Regards,
    Shabbar

    Hi,
    Still its not working. The statement I am writing is
    /: &NET& = &RF140-WRSHB& - &RF140-MSATZ&
    but the system gives error on that.
    NET is the local variable declared with Define statement and both the others are defined in print program.
    Even I tried
    /: &RF140-ZALBT& = &RF140-WRSHB& - &RF140-MSATZ&
    but still the same error.
    Any comments?
    Regards,
    Shabbar

  • How to import values from txt and pass values to variables

    I need to export some variables from Indesign and import them in Illustrator.  I can export a txt file from InDesign but I don't know how to import and pass the values to variables in Illustrator.
    Can someone help?

    Well from you ID script Im presuming that you are simply writing a few lines of info to a plain text file like so…
    writeFile('SomeData');
    writeFile('AnotherData');
    writeFile('LastData');
    function writeFile(info) {
         try     {
              var log = File('~/Desktop/ID_Data.txt');
              log.open('a');
              log.write(info + '\r');
              log.close()
         catch (e) {
              alert(e);
    So you would just read this back where or when ever you need to use it in your Illustrator script…
    var log = File('~/Desktop/ID_Data.txt');
    log.open('r');
    var a = log.readln();
    var b = log.readln();
    var c = log.readln();
    log.close();
    alert(a);

  • Save  layout and not values of variables

    When I use SAVE_PERSONALIZATION, the values of variables are also saved. I want only the layout is saved and not the values of variables. is that possible?
    Note: version 7 of the wad
    Thanks,
    IKA

    Hi
    Save personalization is for saving variables not for saving layout. If you are doing any changes to layout you can directly save by clicking save button.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/6f6b52f5981c91e10000000a11466f/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/01/42c73c13b0ce5be10000000a114084/frameset.htm
    Regards
    Ravi
    Edited by: Ravi Naalla on Apr 3, 2009 3:47 AM
    Edited by: Ravi Naalla on Apr 3, 2009 3:49 AM

  • How to Create Pop up window and assign values to the table in it

    Hi All,
      I have a code which checks for duplicate value in the database and displays that duplicate record. I want to put the duplicate record value in a table of a popup window. Can you please tell me how do i acheive this?
    I tried the below code for creating a popup but most of the methods used here are deprecated. Please help
    IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
    "MyWindowName");
    // create the Window
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
    window.setWindowPosition(WDWindowPos.CENTER);
    window.setTitle("WindowTitle");
    // Save WindowInstance in Context
    wdContext.currentContextElement.setWindowInstance(window);
    // and show the window
    window.open();
    Regards
    Suresh

    Hi Suresh,
    "createModalWindow" is not a depricated method.
    Check this code.
    IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
              "SalesAreaWindow");
    //             create the Window
              IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
              window.setWindowPosition(WDWindowPos.CENTER);
              window.setTitle("Sales Window");
              window.setWindowSize(100,100);
    //             Save WindowInstance in Context
              wdContext.currentContextElement().setWindowInstance(window);
    //             and show the window
              window.show();
    "WindowInstance" is the context attribute of type "com.sap.tc.webdynpro.services.session.api.IWDWindow"
    Re: opening a new window on lead select in a table!!!
    Regards,
    Mithu

  • How to pass a function with the same argument multiple times and return values in variables?

    The problem I have is I created a function which really is some kind of database.  Basically a bunch of:
    if (a.value == "this number"){
    b.value = "this expression";
    Inside the form are 2 dropdown lists that return numerical values which I want to process through that function and put the return value inside separate variables.
    var a = this.getField("OPE003.EVEN.1.MIP");
    Mip(a);
    var result1 = Mip();
    I tried to overwriting *a* to process the second field
    a = this.getField("OPE003.EVEN.2.MIP");
    Mip(a);
    var result2 = Mip();
    result1 and result2 are put in an array, joined as a string.
    Doing so, I always get the last processing twice as the final result.
    Can I use a function as a batch processing tool that way?

    You are right, I changed the code to what you said but how do I pass another value through my fonction so I can get Result1 and Result2?
    is it
    var a = this.getField("OPE003.EVEN.1.MIP");
    var b = this.getField("OPE003.EVEN.2.MIP");
    var result1 = Mip(a);
    var result2 = Mip(b);
    var c = new Array[result1, result2]

  • Input a string and assign to a variable in the console window

    i'm absolutely and completely new to java
    i need to be able to input a string and then assign it to a variable, entirely using the console window, basically i'm looking for the Java alternative to C++'s "cin"
    i've tried the System.in. method but nothing seems to work
    i know this should be simple, but i cant find it anywhere
    cheers

    i've tried the System.in. method That thing is not a method: it's an object, an intstantiation of the InputStream
    class. If you read the API documentation for that class you'll notice that it
    isn't much more sophisticated than C's file IO. You can wrap an
    object if this class in a more high level class (see InputStreamReader
    and BufferedReader).
    The latter allows you to read an entire line of characters. If you really want
    to go fancy you can wrap the first class in a Scanner which is only
    available in Java 1.5
    kind regards,
    Jos

  • Any way to assign value for  variable of type Class List String ?

    I'm puzzled why I can declare a variable:
    Class<List<String>> clazz;but I cannot assign a value to it as
    clazz = List<String>.class;The compiler also complains about
    Class<List<?>> clazz0 = List<?>.class;yet it has the nerve to warn about raw types when I give up and use
    Class<List> clazz0 = List.class;Even using a dummy instance does not work.
            List<String> dummy = new ArrayList<String>();
            Class<List<String>> clazz1 = dummy.getClass();I only care because I've declared a method like
    public String useless( Class<List<String>> unSetable){
      return  unSetable.getName();
    }And now there seems to be no way to call it.

    Hello chymes,
    there is no way to get an instance of Class<List<String>> without at least one unchecked warning. Otherwise you could get away with the following:
    List<Integer> ints = new ArrayList<Integer>();
    Class<List<String>> clazz = List<String>.class;
    List<String> strings = clazz.cast(ints);
    strings.add("No Good");
    int i = ints.get(0); // CCETherefore the only way to get it is via unchecked cast:
    Class<List<String>> clazz = (Class<List<String>>) (Object) List.class;With kind regards
    Ben

Maybe you are looking for

  • Editable data in excel view of alv grid

    hi friends.. now i am displaying the data in alv grid.. my requirement is i want to display the data in excel format.. (not in seperate excel..) i want to display the excel sheet with data within the screen itself. for this i tried this scenario by f

  • Open cursors exceeded - common problem, different scenario

    I searched both the web and the java forums and found the "maximum open cursors exceeded" to be a very common problem, one in which I have, but I can't seem to solve it and I was wondering if the way I am doing certain things are causing it. Here is

  • Trying to make a WrappingComboBox

    Inspired by a fairly straightforward WrappingList, I thought I'd try to make a Wrapping JScrollPane. The goal is a ScrollPane that automatically wraps the text inside it. I've just about got it, but I have one thing that's not working. If I just put

  • External drive (Time Machine) password is spontaneously incorrect

    I've been making Time Machine backups to a Seagate 1.5TB USB-2 attached external drive for about 2 years, and about 3 weeks ago the backups began to fail due to "incorrect password" for the external drive.  I thought the drive connection might have j

  • Fees for Third Party Hosting

    Is theri an Adobe fee to export/publish a Muse designed site with a third party host?