Fill an array which is initially empty

Hi,
My array is defined by the variable:
<variable name="array" element="imp1:array">
where the array is:
<element name="array" type="tns:ArrayType"/>
<complexType name="ArrayType">
<sequence>
<element name="offer" type="tns:LoanOfferType" maxOccurs="unbounded" />
</sequence>
</complexType>
I want to fill this variable with one value at a time through a while activity and without using a Java exec.
I read the DataManipulation Tutorial and the Array sample but they don't help me!
Which ora:function should I use? and in which assign construct?
Because the following snippet returns a bpws:selectionFailure fault:
<assign
<copy>
<from variable="inServiceOffer" part="payload" query="/auto:loanOffer"/>
<to variable="array" query="/imp1:offert[bpws:getVariableData('index')]"/>
</copy>
</assign>
Where 'index' is an integer variable.
The problem is that the child node doesn't exist, so the above query returns a bpws:selectionFailure fault.
Maybe I can use the ora:addChildNode or ora:appendToList function, but I don't know where...
Thank you for your reply

What I want to say is that with the ora:addChildNode function I can add a DOM child element without any relationship with the child type defined in a XML Schema array. In short, my array could be the follow:
<element name="array" type="tns:arrayType"/>
<compexType name="arrayType">
<element name="para" type="anyURI:NCName" maxOccurs="unbounded"/>
</complexType>
and the following snippet works all the same!!!
<assign name="FillArray">
<copy>
<from expression="ora:addChildNode(bpws:getVariableData('array','/imp1:array'),bpws:getVariableData('inServiceOffer','payload','/auto:loanOffer'))">
</from>
<to variable="array" query="/imp1:array"/>
</copy>
</assign>
In fact, in the above example, the source child type is "auto:loanOfferType" while the target child type can be "anyURI:anyType".
So I think the ora:addChildNode function doesn't fill an array but adds children of any type to an element.
Can you help me?
Thanks and sorry for my english.

Similar Messages

  • Counting number of elements in an array which aren't empty?

    i tried using this method to count an array which has 100 elements but it doesn't go past the while statement which i cant figure out?
    public static void countCust()
    int cntr = 0;
    int z;
    for (int c = 0; c < 100; c++)
    while (customer[c].indexOf(':') != -1)
    cntr++;
    javax.swing.JOptionPane.showMessageDialog(null, "There are " + cntr + " customers on record");
    }

    Are you getting NullPointerExceptions?
    Are you sure customer[] has been allocated?
    Are you sure each element in the array is non-null?
    BTW, it's traditional to use variables in loops that are closer to their mathematical usage. I mean, for an array index, usually you'd use variables named i or j, unless the indices map to coordinates in space, in which case you'd use x, y, and z.
    If neither of these is applicable, use a variable with a more meaningful name.

  • How to fill the "budget" in an initiative in SEM BSC

    Good Afternoon for all!
    We have a Balanced Scorecard implemented in SAP SEM BSC, using SAP BW.
    Our Balanced Scorecard actually manages ratios, objectives, perspectives, strategy and scorecard.
    Now, we are trying to use "iniatiatives" and we have using the SEM BSC wizard, through the web interface.
    When defining the initiative everything goes ok, we define the initiative , and then we assign it to an objective.
    We have also installed the infocube "0SEM_C02" which we have the understanding that it stores the information concerned to initiatives.
    I have also build a SEM BPS layout and planning area for this infocube (0SEM_C02) in order to fill the infocube with information (manually entered).
    But after all these, the information does not appear for the "budget" when displaying the Balanced scorecard.
    When displaying an initiative it displays:
    -Definition
    -Duration
    -Priority
    -Status and score
    -Milestones
    -Team members
    -Objectives
    -Budget (<-----E M P T Y !! )
    I do not understand, how to fill the "Budget" data for an initiative. Because we have fill all the information regarded to the initiative included above, but the budget is very important for us, and as i said before, we have installed the infocube 0SEM_C02, we also created a planning area for this infocube in BPS, we have created a planning layout for this infocube, and we have entered some values to this infocube.
    Is there any special condition or something special to do, in order to fill the budget for an initiative in SAP SEM BSC??
    How can we see in the BSC the budget for an initiative, or fill the value???
    We will appreciate any help for this issue.
    Thanks in advance for your valuable help.
    Carlos Espana
    Cementos Progreso
    Guatemala

    Carlos,
    This is the Forum for SAP Strategy Management.
    There is another Forum specifically for SEM-BSC questions.
    Go to the SAP Community Network Forums > SAP Solutions > SEM-BSC
    Please repost your question there for an answer.
    Regards,
    Bob

  • Error on a simple function to fill an array plz hlp

    Hi guys.
    I'm trying to fill in an array with a simple function, here is the code
    public class rekener {
        int getal;
        int counter=-1;
        int[] getallen= new int[5];
        StringBuffer buffer= new StringBuffer();
        public void getGetal(int getal){
            this.getal= getal;
            counter++;
            getallen[counter]= getal;
        public String getArray(){
           for(int i: getallen){
               buffer.append(i);
           return buffer.toString();
    }i'm calling this function from a console application in this way....
    import java.util.Scanner;
    class venster{
       public static void main(String args[]){
           int getal;
           rekener rekener= new rekener();
           Scanner input= new Scanner(System.in);
           System.out.println("Voeg toe een nummer A.U.B");
           getal= input.nextInt();
           rekener.getGetal(getal);
           System.out.println("voeg nog een nummer toe");
           getal= input.nextInt();
           rekener.getGetal(getal);
           System.out.println("voeg nog een nummer toe");
           getal= input.nextInt();
           rekener.getGetal(getal);
           System.out.println("voeg nog een nummer toe");
           getal= input.nextInt();
           rekener.getGetal(getal);
           System.out.println("voeg nog een nummer toe");
           getal= input.nextInt();
           rekener.getGetal(getal);
           System.out.println("voeg nog een nummer toe");
           getal= input.nextInt();
           rekener.getGetal(getal);
           String list= rekener.getArray();
           System.out.println(""+list);
    }the problem is that the last function "getGetal();" which should deliver the StrinBuffer in a string format, does not do so, but gives me this error
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
            at rekener.getGetal(rekener.java:22)
            at venster.main(venster.java:37)
    Java Result: 1the line 22 is this :
    getallen[counter]= getal;this makes me think that the function that should fill the array isn't really doing it,
    Even if i change the volume of the array to 4 or 6 "even though 5 is the correct ammount since i'm inserting 6 integers", keeps on giving me the same error
    Do you now any other solution in order to fill in an array from an external function?
    Thank you and have a nice day
    Edited by: classboy on Dec 12, 2009 11:01 PM

    classboy wrote:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at rekener.getGetal(rekener.java:22)
    at venster.main(venster.java:37)The error message is telling you exactly what's wrong. On linke 22 of rekener.java (should be Rekener--class names conventionally start with uppercase), you are trying to access the 6th element, at index 5, of an array that has at more 5 elements, at indices 0..4
    the line 22 is this :
    getallen[counter]= getal;
    So counter is 5. But getallen has only 5 elements at indices 0..4, or fewer.
    this makes me think that the function that should fill the array isn't really doing it, It has nothing to do with whether the array is being "filled." Rather, it's just that the size of the array is less than what you're trying to access.
    Even if i change the volume of the array to 4 or 6 "even though 5 is the correct ammount since i'm inserting 6 integers", keeps on giving me the same errorNo idea what you're saying here, but the compiler doesn't lie. You're trying to access an array element that doesn't exist.
    Put print statements in your code so you can see what's happening at each step of the way, and figure out what you did to tell it to access elements that don't exist.

  • How to return a array which be created in native method?

    i wrote my native method like this:
    jintarray array=env->Newintarray(10);
    jint* p=env->GetIntArrayElements(array,0);
    for(int i=0;i<10;i++){
    p=i;
    return array;
    the result is that i got a array which has ten elements and all the elements are 0.
    it seems the value of the array never be chenged.
    how can i do? where is the mistake? how can i get the correct result?

    Not quite clear what you are trying to do.
    o You create a java in array, which will be initialized to zeroes.
    o You then asked to access that array (as p), but you didn't pass a pointer to a boolean so it can tell you whether p points into the java array, or is a separate memory area.
    o You assigned a bunch of int values to p - not p[0], p [1], ....?
    o You returned to java the original array.
    Here's some (untested) code that will likely work:
    jBoolean isCopy;
    jintarray array=env->Newintarray(10);
    jint* p=env->GetIntArrayElements(array,&isCopy);
    for(int i=0;i<10;i++){
    p=i;
    if (isCopy == JNI_TRUE)
    env->ReleaseIntArrayElements(array, p, 0);
    return array;

  • The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.

    got event ID 4015 and source DNS-Server-Service. please suggest how to fix this issue
    The DNS server has encountered a critical error from the Active Directory. Check that the Active Directory is functioning properly. The extended error debug information (which may be empty) is "". The event data contains the error.
    Raj

    Hi
     first run "ipconfig /flushdns" and then "ipconfig /registerdns" finally restart dns service and check the situation,also you can check dns logs computer management ->Event viewer->Custom Views->Server roles->DNS.

  • How to pass an array which in the jsp to a javascript file

    now i have 2 files: jsp and js(javascript)
    i want pass an array which in the jsp to another file--> js file
    how can i do it ???
    can u give me some related links or some source codes as the references???
    thx

    bcos ....my senior has resigned!!! so i take over his job !!!!!
    depend on the talent and the project ....only that way to implement to whole project !!!!
    but , i had settled it already ....
    it is very simple
    in the middle.jsp
    Collection result = menuManager.getUserRoleMenu(webSessionUser.getGnuserId());
    String menuname[]=new String[110];
    int menucounter=0;
    Iterator vi = result.iterator();
    while(vi.hasNext())
    HashMap hm=(HashMap)vi.next();
    menuname[menucounter]=hm.toString();
    menucounter++;
    int i;
    String tempstr="";
    for(i=0;i<menuname.length;i++)
    tempstr+=menuname[i]+",";
    session.setAttribute("menuname",tempstr);
    %>
    <script language="javascript">
    menu123("<%=tempstr %>");
    </script>
    in the body,js
    function menu123(string123)
    //doing
    so ....through the script --menu123
    i can get the string from jsp to the js!!!!!
    is it very simple, but it spends my 2 days!!!
    i just learn javascript ....about 1 month !!!

  • How to fill an array with random numbers

    Can anybody tell me how I can fill an array with thousand random numbers between 0 and 10000?

    import java.util.Random;
    class random
         static int[] bull(int size) {
              int[] numbers = new int[size];
              Random select = new Random();
              for(int i=0;i<numbers.length;i++) {
    harris:
    for(;;) {
    int trelos=select.nextInt(10000);
    numbers=trelos;
                        for(int j=0;j<i;j++) {
    if(trelos==numbers[j])
    continue harris;
    numbers[i]=trelos;
    break;
    return numbers;
    /*This method fills an array with numbers and there is no possibility two numbers to be the
         same*/
    /*The following method is a simpler method,but it is possible two numbers to be the same*/
    static int[] bull2(int size) {
         int[] numbers = new int[size];
    Random select = new Random();
    for(int i=0;i<numbers.length;i++)
              numbers[i]=select.nextInt(9);
              return numbers;
         public static void main(String[] args) {
    int[] nikos = random.bull(10);
    int[] nikos2 = random.bull2(10);
    for(int i=0;i<nikos.length;i++)
    System.out.println(nikos[i]);
    for(int i=0;i<nikos2.length;i++)
    System.out.println(nikos2[i]);

  • I have down loaded a track which was initially missing 1min 30 seconds. iTunes enabled my to reload the rack which is complete on the PC. However, syncing with my Ipad2 does not seem to replace the incomplete version with the full version. Thanks S

    I have down loaded a track which was initially missing 1min 30 seconds. iTunes enabled me to reload the rack which is now complete on the PC. However, syncing with my Ipad2 does not seem to replace the incomplete version with the full version.  Can anyone out there help?
    Thanks S

    Thanks for the response. Unfortunately, I've un-checked the track and re-synced the Ipad as suggested, but then re-checking and re-syncing han no effect. The track is still missing the final minute and a half or so. I've tried it twice, but the effect is the same.
    Any other ideas? Would un-checking the entire music collection and staring again work, or is that a road to disaster?

  • Child tag initializer for type 'Array' may not be empty?error.

    hey,
    I imported this file from illustrator into catalyst. WE assume the error is caused by the filters tags but we can't delete them in the code view. The project is unable to run with this error. Is there a way to resolve this?

    Hey,
    I am also getting this error message and reads: "Errors (1 item) Child tag initializer for type 'Array' may not be empty. There is no way to edit anything in Code view, and I've been working this project for a little while. Imported items from Photoshop CS4. What to do? Thanks.

  • Fill an Array from textFields

    Hi, I'm very new to this so bear with me... I need to fill an array from values that are submitted from textfields. Can anyone help me out? Thanks in advance.

    Sounds like you might be dealing with a servlet or a jsp. If so,
    array[0] = request.getParameter("textfield1");
    array[1] = request.getParameter("textfield2");
    The names of the textfields correspond to elements in the form that's being submitted. i.e,
    <form...>
    <input type="text" name="textfield1">
    ...

  • [svn] 1922: Changed "is" to " is " in the tokenToString array, which is only used by authoring.

    Revision: 1922
    Author: [email protected]
    Date: 2008-06-03 06:56:36 -0700 (Tue, 03 Jun 2008)
    Log Message:
    Changed "is" to " is " in the tokenToString array, which is only used by authoring. This is to fix an autoformat bug. Reviewed by Paul Reilly.
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/Tokens.java

    http://forums.iis.net/
    The above forum is where you should post.

  • How can I stop my information from automatically filling in.  Which it does incorrectly.

    How can I stop my information from automatically filling in.  Which it does incorrectly.

    one u log in to a wi fi..it will save. delete it... and off your wifi on you playbook. hope it helps

  • Initial, empty #-value in fields in the new abap debugger

    Hi,
    after using the logical database with the get statement, I have a value in a field which is shown in the new debugger for the field ldb_structure-bukrs like this: '####'.
    If I use the if-clause like:
    IF ldb_structure-bukrs IS INITIAL.
    <do-something>
    ENDIF.
    <do_something-else>
    The <do-something>-part is left out in this case, because there are #-values in the empty field.
    Where does this behavior come from? Just because there was a select and the field could not be filled? Why isn't it just empty?
    Kind greetings,
    Mario
    Message was edited by: Mario Schmidt

    Perhaps it would be
    IF ldb_structure-BUKRS IS INITIAL.
    <do-something>
    ENDIF.
    <do_something-else>
    Normally it is visualization subject, if you click in structure, in debugging you would be able to see the value of the fields of structure.
    Regards

  • How can fill javascript array from list in jsf backing bean

    Hello
    i have an array in javascript and i want to fill in from the list which is coming from the backing bean how can i do that.
    Regards

    Hi,
    using the ExtendedRenderkitService class you can send JavaScript calls from a managed bean to the client. So in your case you call a client side javaScript method and pass the array information as an argument. The way you pass the array data is up to you. You may just pass a character delimited list, or use JSON object notation in case the list shows objects. Note that this is for JDeveloper 11.In 10.1.3 there is no server side JavaScript API. Here you would have to add the JavaScript to the page when rendering it.
    Frank

Maybe you are looking for

  • URGENT help needed in creating external xml video plalist. Please help!

    I was given an assignment to  create and external video playlist using an xml file.  I have never used  flash before, know nothing about encoding and all that was given to the  class in terms of instuctions was a short tutorial that has no  resources

  • Img Does not appear in Design View

    Dreamweaver 8 Have an image that I would presume has a simple enough presence in the page... <table width="985" border="1" cellspacing="0" cellpadding="0" height="100">    <tr>       <img src="Includes/Images/ButtonsNBanners/bnrPrimaryTop.png" alt="t

  • Line Break for the column

    Hi, I have a BIP Report. The report includes the layout of a free text column. This text goes towards the right side for sufficient length. I want to wrap the text or line break this text. In the rtf template, I am using the following formula: <?html

  • Selfservice option is not coming up in Home workcenter in portal

    Hi Experts, The following 'Self Service views' are not available in the path in portal Home ==>Self-Services==> Self-Services Overview action i have taken 1) Set the evryone group permission in system admininstration. Is this issue related to uploadd

  • Reg: replacement of i-way with PI in ECC 6.0

    Hello Experts currently we are using R/3 4.7 version and middle ware we are using is i-way and we are planning to upgrade to ECC 6.0 and i would like to know how compatible is i-way is with SAP ECC 6.0 and is there any neccessity to replace the same