How to use 'for-each' in transform

Hi
I have created a BPEL process which transforms '.csv' to '.xml'
The input .csv looks like this
1,09042008,1263,80019.5,HC_D
2,01011030,J100246,00051779J1002460903,30032008,46.20,LUTON PRIME
3,01011030,SE1320/4431,46.20,00051779Payment,0.00,2
2,01011030,J100246,00051779J1002461603,30032008,46.20,LUTON PRIME
3,01011030,SE1320/4431,46.20,00051779Payment,0.00,2
2,01011030,J100246,00051779J1002462303,30032008,46.20,LUTON PRIME
3,01011030,SE1320/4431,46.20,00051779Payment,0.00,2
so the line which starts with '1' is the header
the line which starts with '2' is the voucher
the line which starts with '3' is the detail
and the input.xsd file looks like this
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
<xsd:element name="Header" nxsd:conditionValue="1">
<xsd:complexType>
</xsd:complexType>
</xsd:element>
<xsd:element name="Voucher" nxsd:conditionValue="2">
<xsd:complexType>
</xsd:complexType>
</xsd:element>
<xsd:element name="Detail" nxsd:conditionValue="3">
<xsd:complexType>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
I am facing problem when I use transform activity and transform this input .csv to .xml file having i/p and o/p xsd as same type of xsds.
Using for-each on Root-element copies the entire i/p and using for-each on Individual elements does loop individually.
Can anyone please help me
thanks
Iswarya

Hi,
Can you explain in detail, where exactly your stucked?
Umesh

Similar Messages

  • How to use For-Each Structure with Multiple node XML structure

    Hi,
      How to use for-each (BPEL 2.0) construct for Multinode XML structure.
    Here is the easy case: I have list of suppliers specified by supplier
    <supplierList>
    <supplier>1</supplier>
    <supplier>2</supplier>
    <supplier>3</supplier>
    </supplierList>
    Now there is a web service http://hostname/getsupplierdetails/wsdl which accepts one supplier at a time.
    like
    <supplier>1</supplier>
    reponse object is
    <message> notfound/found </message>
    But how can I use for each of XML node to call this service and collect the result like
    <supplierList1>
         <Suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
        <suppinfo>
            <supplier>1</supplier>
            <message> not found</message>
    </suppinfo>
    </supplierlist1>
    Thanks

    For looping you use foreach loop and , loop for the number of occurences and when constructing response, adding a new element you have to use bpelx:append.  Good sample at Enterprise Integration: Oracle SOA Suite 11g: Populating a list or an array in BPEL without using XSLT.

  • How to use For Each execution in OSB

    hi all,
    I'm confused about the 'For Each' action in OSB. Now, I have a variable('max') which equals to 3 , and I wanna to use For Each action to perform a loop execution, something like for(1 to 3)--
    The code is like below:
    For Each variable 'value' of variable 'max' ,
    Do{
    Assign value to variable tempMsg;
    Service Callout to PS with tempMsg
    What I think is the 'value' should be increased from 1 to 3 itself, and the service callout should be performed by 3 times with '1', '2', '3'. However, it's not, the service callout action was performed once with the value of 3, just like the 1 and 2 were overwritten.
    Any idea?

    Using 'For Each' activity in OSB
    Thanks,
    Vijay

  • How to use for each loop in XSLT when my source is a multilayout file and db

    How do I use a for each loop in XSLT when my source is multilayout file and db .
    My multilayout file is basically contain 2 kind of data one for employee and another for dependent.
    Now my requirement is I want to read each line of data whether it is it is employee or dependent do a join with db and write it in my target file.
    eg :  File content
    1 RichaKumari 311289 TCS INDIA
    2 KiarnKumar 456782 BRO RichaKumari 311289 INDIA
    2 Ravi            456882 BRO RichaKumari 311289 INDIA
    eg : db Content
    311289 RichaKumari TCS INDIA Bangalore [email protected]
    Now in Final File I need something like this :
    1 RichaKumari 311289 TCS INDIA
    2 KiarnKumar RichaKumari 311289 TCS INDIA
    2 Ravi            RichaKumari 311289 TCS INDIA
    here 1 and 2 are the identifier which will decide which layout to follow .

    Hi,
    I think you'll need two nested for-each's... Something like...
    <xsl:for-each select="$root/row[layout = 1]">
    <xsl:variable name="employee" select="."/>
    ... write employee ...
    <xsl:for-each select="$root/row[layout = 2 and dependentid = $employee/id]">
    ... write dependent ...
    </xsl:for-each>
    </xsl:for-each>
    Cheers,
    Vlad

  • After reopening Firefox does not remember which desktop was used for each window. Can you help, please.

    I'm using two displays and several desktops on my Mac (OS X 10.9.4).
    When I need to restart Firefox, it remembers to open windows from last session in correct display, but does not remember which desktop was used for each window. So when the application starts, it opens all windows on a desktop which is currently active instead of reopening them on desktops used during the last session. How to fix the issue?

    Hi Nerva,
    Thank you for your question, there is a add on I have been recommended to custom set up of opening windows in new monitors. It's called [https://addons.mozilla.org/en-US/firefox/addon/monitor-master/ Monitor Master].
    However, in regards to the session remembering which monitor the window was open in, in the profile folder there is a file that stores window positions and dimensions. It is called localstore.rdf.
    Please stay tuned for more investigation, as there are definitely bugs on file for similar issues. Pinpointing it is the hard part.

  • Using 'For Each' Method in re-usable ADF library application

    I'm trying to build a re-usable RSS library application from the following (using JDev Studio Edition Version 11.1.1.4.0 on Windows 2008 Server):
    http://blogs.oracle.com/dana/entry/reusable_adf_library_rssfeedre
    I'm bascially creating the application from scratch, but I run into problems when trying to drag and drop the 'output text' data controls into the jsff page fragment. The instructions say that "For Each" iterator was used as the operation to iterate through these fields but I don't see For Each appearing as any option for the Operations anywhere in the data controls. The only options i see are CREATE, DELETE, EXECUTE, FIRST, LAST, NEXT, PREVIOUS, RemoveRowWithKey, SetRowWithKey, SetCurrentRowWithKey. After droppipng the data controls and going to the 'Bindings', i can't see options for using For Each either.
    Can anyone please tell me how to add the For Each method as per the above instructions? Thank you!

    <af:forEach> will be sufficient for most user's needs, it does not work with a JSF DataModel, or CollectionModel. It also cannot be bound to EL expressions that use component-managed EL variables..
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_forEach.html.
    if you want to iterate then you have to use the programatic iteration using the rowSetIterator

  • SSHR reskin AKA 'How to Use Adobe Flash to Transform the Look and Feel...

    There was a presentation at the OHUG 2011 Conference titled 'How to Use Adobe Flash to Transform the Look and Feel of Oracle HR Self Service'. It presented a method of 're-skinning' SSHR to present a different UI to the user.
    Looking for anyone out there that has attempted to apply this to their Oracle HRSS pages. I know this company has developed (is developing?) a product based on this approach. I want to see if anyone has done it on their own and would be willing to share some details.
    Follow-up question. Has anyone availed themselves of the bespoke UI Development based on this approach from Applaud Solutions (as mentioned on their website), and care to comment on your experience?

    Any update on this please? Even we are looking for some pointers in this area.

  • Use for each operation

    how can I use for each operation in jdeveloper 11.1.1.5.0 in adf fusion web application to show images stored in database?

    How are the images stored in the database?
    If it has the path - create the VO and show the images using foreach by creating a tree/table binding in the pageDef as follows:
    <af:forEach items="#{bindings.BillToStateLOV.rangeSet}" var="item">
    <af:image id="si9" source="#{item.src}"/>
    </af:forEach>
    If the images are stored as BLOBS, take the approach as mentioned in the blog post:
    http://baigsorcl.blogspot.com/2010/09/store-images-in-blob-in-oracle-adf.html
    Thanks,
    Navaneeth

  • How to use for all entires clause while fetching data from archived tables

    How to use for all entires clause while fetching data from archived tables using the FM
    /PBS/SELECT_INTO_TABLE' .
    I need to fetch data from an Archived table for all the entries in an internal table.
    Kindly provide some inputs for the same.
    thanks n Regards
    Ramesh

    Hi Ramesh,
    I have a query regarding accessing archived data through PBS.
    I have archived SAP FI data ( Object FI_DOCUMNT) using SAP standard process through TCODE : SARA.
    Now please tell me can I acees this archived data through the PBS add on FM : '/PBS/SELECT_INTO_TABLE'.
    Do I need to do something else to access data archived through SAP standard process ot not ? If yes, then please tell me as I am not able to get the data using the above FM.
    The call to the above FM is as follows :
    CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
      EXPORTING
        archiv           = 'CFI'
        OPTION           = ''
        tabname          = 'BKPF'
        SCHL1_NAME       = 'BELNR'
        SCHL1_VON        =  belnr-low
        SCHL1_BIS        =  belnr-low
        SCHL2_NAME       = 'GJAHR'
        SCHL2_VON        =  GJAHR-LOW
        SCHL2_BIS        =  GJAHR-LOW
        SCHL3_NAME       =  'BUKRS'
        SCHL3_VON        =  bukrs-low
        SCHL3_BIS        =  bukrs-low
      SCHL4_NAME       =
      SCHL4_VON        =
      SCHL4_BIS        =
        CLR_ITAB         = 'X'
      MAX_ZAHL         =
      tables
        i_tabelle        =  t_bkpf
      SCHL1_IN         =
      SCHL2_IN         =
      SCHL3_IN         =
      SCHL4_IN         =
    EXCEPTIONS
       EOF              = 1
       OTHERS           = 2
       OTHERS           = 3
    It gives me the following error :
    Index for table not supported ! BKPF BELNR.
    Please help ASAP.
    Thnaks and Regards
    Gurpreet Singh

  • All my files just disappeared from my pages and numbers apps on my mini iPad. Under Usage, both still show 350 MBs used for each. Ideas?

    all my files just disappeared from my pages and numbers apps on my mini iPad. Under Usage, both still show 350+MBs used for each. Ideas?

    Hello r253,
    The following troubleshooting steps can help get your documents to reappear on your devices.
    Documents I've updated on my Mac or uploaded from iCloud.com don't appear on my iOS device
    If you're using an iWork for iOS app (Pages, Numbers, or Keynote), check the iCloud system requirements and make sure that you're using the latest version of iWork. For third party apps, check the documentation that came with the app, or check with the app developer to make sure the app supports iCloud. App Store application descriptions often indicate whether the app supports iCloud.
    Go to Apple () menu > System Preferences on your Mac. Click iCloud and confirm that you're signed in to iCloud and the Documents & Data checkbox is selected.
    After opening your iOS app, wait a few minutes for the documents to appear. Your iOS device may not have connected to iCloud since changes were made to the document at iCloud.com or on your other devices.
    Try creating a new document on your iOS device, then check again for the documents from iCloud to appear.
    Go to Settings > iCloud > Documents & Data and confirm that Use Cellular Data is turned on.
    Confirm that you're connected to the Internet by checking for an Edge, 3G, 4G, LTE, or Wi-Fi icon in your device's status bar. Test your connection by opening apple.com in Safari.
    Try resetting iCloud Documents & Data service.
    iCloud: Troubleshooting Documents in the Cloud
    http://support.apple.com/kb/TS3991
    Cheers,
    Allen

  • Loading accdb file using for each loop in to single target table

    I have 3 accdb file as below in single folder, in control flow I have created a for each loop to loop through all the below file.  In dataflow task I have created oledb source using connection manager to point to first file a1.accdb. I am trying
    to load all the file into single below mentioned target table, here It is only loading first file it is not looping through other two file.
    This I have tried to load .txt files and csv files it is working perfectly but similarly when I try to load access db file table it is not working, can any one of you help me?
    1. a1.accdb contains only one table  a1tab ( col1 col2 col3 )  
    2. a2.accdb  contains only one table  a2tab  ( col1 col2 col3 )
    3. a3.accdb  contains only one table  a3tab   ( col1 col2 col3 )
    I have a target table with similar structure as source
    Target table <TargetTable> Col1 Col2 Col3
    aak

    Thanks Arthur, please find below response
    How do you handle the different table names?  Cant we handle it in a similar manner, how we handle the .csv/.txt files with different name and similar structure for sources(multiple files) and target (single table)
    Is it good to drop the idea of for each loop and create a separate task for each accdb file? to be loaded to same target table( performance wise etc.. any justification would be helpful)
    You must handle the connection string dynamically?
    Can you help me with the logic for handling connection string dynamically
    aak

  • How to do "for each month in 2008 sum amount where category is cash"

    The table format is:
    Date(MM/DD/YYYY) Amount Description Category Account
    01.02.2008 -21000 benzina (C) Calatorii Cash
    01.04.2008 -2000 Mancare (C) Calatorii Cash
    01.05.2008 -2000 Mancare (C) Comisioane Cash
    05.12.2008 4706 diverse (C) Comisioane BT - Mondo
    08/25/2008 8807 diverse (C) Calatorii BRD - PFA
    08/25/2008 104000 diverse (C) Comisioane BRD - Multiplan
    10.10.2008 6385849 diverse (C) Comisioane BRD - Atucont
    10/26/2008 943699 diverse (C) Calatorii BRD - ISIC
    10/27/2008 95313 diverse (C) Comisioane Cash
    10/28/2008 -300 Comisioane (C) Comisioane BRD - ISIC
    I am trying to do the following:
    for each month in 2008
    sum (Amount) where Category is (C) Calatorii
    =>
    January -23000
    February 0
    for each month in 2009 up until now
    sum (Amount) where Category is Cash
    =>
    January 35000
    With these 2 samples I can manage the other functions I need.
    Thanks in advance.

    Question asked and responded several times.
    In column H of the first table I inserted the formula:
    =YEAR(B)*100+MONTH(B)
    In column B of the second table, the formula is:
    =SUMIFS(Tableau 1 :: C,Tableau 1 :: G,"=Cash",Tableau 1 :: H,"="&A)
    CAUTION
    I don't know your system settings.
    If your system uses the decimal comma, you will have to use:
    =SUMIFS(Tableau 1 :: C;Tableau 1 :: G;"=Cash";Tableau 1 :: H;"="&A)
    Yvan KOENIG (from FRANCE jeudi 23 avril 2009 15:04:49)

  • Using for-each for input into a database adapter

    As input to a Web service I have an XSD that has parent elements and two unbounded child elements. I want to use XSLT to loop through the child elements to include them as comma separated strings for use in an IN clause in the query of the database adapter. I have the following XSLT in the input to database adapter XSL:
    <db:child_elements>
      <xsl:attribute name="xsi:nil">
        <xsl:value-of select="/inp1:path/inp1:to/inp1:child_elements/@xsi:nil"/>
      </xsl:attribute>
      <xsl:for-each select="/inp1:path/inp1:to/inp1:child_elements/inpl:child_elements">
        <xsl:value-of select="."/>
        <xsl:if test="position() != last()">
          <xsl:text>,</xsl:text>
        </xsl:if>
      </xsl:for-each>
    </db:child_elements>I am getting three error:
    1) Error: Invalid Usage of <for-each> Element
    2) Error: Invalid Usage of <if> Element
    3) Error: This node is already mapped, repeating nodes not supported : "/db:databaseAdapterInput/db:child_elements"
    Any idea of what the problem is here? Are for-each loops and if statements simply not allowed in Oracle SOA Suite? Thanks in advance!

    For SQL Server 2005+ you can use the OUTPUT clause. E.g.
    DECLARE @Source TABLE ( ID INT, Payload INT );
    DECLARE @Destination TABLE
    ID INT IDENTITY ,
    Payload INT
    DECLARE @IdentityValues TABLE ( ID INT );
    INSERT INTO @Source
    VALUES ( 1, 1 ),
    ( 2, 2 ),
    ( 3, 3 );
    INSERT INTO @Destination
    ( Payload )
    VALUES ( 0 );
    INSERT INTO @Destination
    ( Payload )
    OUTPUT INSERTED.ID
    INTO @IdentityValues
    SELECT S.Payload
    FROM @Source S;
    SELECT D.ID ,
    D.Payload
    FROM @Destination D;
    SELECT IV.ID
    FROM @IdentityValues IV;

  • How BPS used for SAP BW

    Hi all,
    How SEM & BPS used for SAP BW.
    please provide som example scenerio's.
    how to create planning applications in BPS.
    How to create Transcational Cubes & how do they differ with Basic Cubes.
    Thanks,
    Cheta.

    Hi,
    Business Planning and Simulation is a part of Strategic Enterprise Management. Business planning enables to produce a group-wide business plan. The business data plan adds an overall plan to the detailed plans that have been put together using the transaction system’s components.
    Business Planning and Simulation – is a product from SAP that uses BW functionality to provide an integrated environment for all our business planning including budgeting and forecasting. Moreover , it is seamlessly linked into the reporting functionality that BW offers, giving a place to report Plan vs. Actuals.  BPS allows us to instantly see the effects of change in the plan in a controlled way.
    BPS started life as  SEM-BPS, but as of BW version 3.5 , it is not included with BW as BW-BPS. All development of BPS functionality will continue within BW – including the evolution of BI-IP(Integrated Planning)
    Difference between Basic Info cube and Transactional Info cube :
    Basic Infocube :
                - Basic info cube is a type of info cube that physically stores data. It is filled with data using BW staging, later it can be used in BEx reporting.
                 - Basic  info cubes are used for actual data.
    Transactional Infocube:
                           -  With a transactional Infocube, you can directly load data to it, without going through the usual transfer rules, update rules .eg. a transactional Infocube can be used to store plan data which is manually entered by the users in the planning layouts (in BPS). When the users save the data, it gets loaded to the cube directly.
                - Planning can only be carried out on Basic transactional info cube.
    check this link and try the Sales analysis scenario:
    http://help.sap.com/saphelp_sem350bw/helpdata/en/05/242537cedf2056e10000009b38f936/frameset.htm

  • How to validate for-each path

    I have following for-each path:
    <?for-each:G_ACCT/LIST_G_INVOICENUM/G_INVOICENUM?>
    However, sometimes there is no data for child group LIST_G_INVOICENUM. I want to check if no child group, then change the path to
    <?for-each:G_ACCT?>
    Is there a way to check the path exist or not?
    Thanks.

    It is like one parent have lot of kids. Now they want to show parent name for each kid.
    <?for-each:G_ACCT?>
          display acct related infor here
          <?for-each:./LIST_G_INVOICENUM/G_INVOICENUM?>
             display invoice related info here
    You can display all parent and grand parents here
          <?end for-each?>
    <?end for-each?>
    End user wants the parent elements being repeated. If I do the second for-each inside the first for-each, parent element will not be repeated.
    will be repeated if you include the element with correct path
    +<?for-each:G_ACCT/LIST_G_INVOICENUM/G_INVOICENUM?>+
    However, sometimes there is no data for child group LIST_G_INVOICENUM. I want to check if no child group, then change the path to
    +<?for-each:G_ACCT?>+
    Is there a way to check the path exist or not?
    <?if:/G_ACCT/LIST_G_INVOICENUM/G_INVOICENUM?> -- will return true if the element exists else falsewhy do you want to change the path ? i guess to display at least parent info

Maybe you are looking for

  • Weird error message. can anyone help.

    i never had a problem burning from my lacie external cd burner. but today i got this error message. the attempt to burn a disc failed. The device is not accessible, probably because it was removed. anyone know what it could be? obvioulsy i didnt unpl

  • Can't install iOS 8 on my iPad

    Can't install iOS 8 on my iPad 3, while there is 6,1 GB of free space available. Why?

  • Macbook touchpad is not working

    The touch pad on my 2008 Macbook is not working. I can scroll up and down, but cannot select. Any suggestions on if it can be fixed?

  • BOM Deletion Inconsistency

    Hello All, Deleted a BOM (ALT 1) containing a only document item in it, ALT 2 is still available. Now we are again in need of the that BOM but when tried to re-create ALT 1 system gave error message that "ALT 1 BOM already exist for the material and

  • Impact of Events

    Hello everyone, I've a doubt regarding events. In our 11gr2 PSU2 env we faced ORA-1031 errors. Contacting support, we came to know that was a bug which wasn't yet filed. Later, we were asked to set 1031 event. Whenever we set the events we received m