For-each loop atom not executing in B1if processing step

Dear All,
I have designed scenario in B1if in which Inbound is SAP ERP(ECC) IDOC and Outbound is UDO object. In this scenario I have loop placed in it, on the basis of IDOC fields I am executing query but it's not going inside the loop, I have entered correct path in loop. Please see attached image of processing, for loop path and inbound message.
for-each path : /vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/ZSD_IDOC_B1_JW_ASN/IDOC/ZSD_SEG_B1_ASN_SO
Inbound Message :
- <Payload Role="S" mode="0">
- <ZSD_IDOC_B1_JW_ASN xmlns="">
  <?msgid 150402232456625499260A1301F349C4?>
- <IDOC BEGIN="1">
- <EDI_DC40 SEGMENT="1">
  <TABNAM>EDI_DC40</TABNAM>
  <MANDT>120</MANDT>
  <DOCNUM>0000000000425819</DOCNUM>
  <DOCREL>731</DOCREL>
  <STATUS>30</STATUS>
  <DIRECT>1</DIRECT>
  <OUTMOD>2</OUTMOD>
  <EXPRSS />
  <TEST />
  <IDOCTYP>ZSD_IDOC_B1_JW_ASN</IDOCTYP>
  <CIMTYP />
  <MESTYP>ZSD_MSG_B1_ASN</MESTYP>
  <MESCOD />
  <MESFCT />
  <STD />
  <STDVRS />
  <STDMES>ZSD_MS</STDMES>
  <SNDPOR>SAPJED</SNDPOR>
  <SNDPRT>LS</SNDPRT>
  <SNDPFC />
  <SNDPRN>JED120</SNDPRN>
  <SNDSAD />
  <SNDLAD />
  <RCVPOR>B1IFPORT</RCVPOR>
  <RCVPRT>LS</RCVPRT>
  <RCVPFC />
  <RCVPRN>B1IFSYS</RCVPRN>
  <RCVSAD />
  <RCVLAD />
  <CREDAT>20150402</CREDAT>
  <CRETIM>175415</CRETIM>
  <REFINT />
  <REFGRP />
  <REFMES />
  <ARCKEY />
  <SERIAL>20150221173915</SERIAL>
  </EDI_DC40>
- <ZSD_SEG_B1_ASN_SO SEGMENT="1">
  <SO_CREATE_DATE>04000205</SO_CREATE_DATE>
  <DELIVERY_DATE>04000205</DELIVERY_DATE>
  <CARD_CODE>04000205</CARD_CODE>
  <CARD_NAME>04000205</CARD_NAME>
  <SO_POSTING_DATE>04000205</SO_POSTING_DATE>
  <CUST_REF_NO>04000205</CUST_REF_NO>
  <PO>04000205</PO>
  <PO_ITEM>04000</PO_ITEM>
  <PO_MATERIAL>0400020504000205</PO_MATERIAL>
  <PO_QUANTITY>040002050400020</PO_QUANTITY>
  <PO_UOM>400</PO_UOM>
  <BOM_COMPONENT1>04000205</BOM_COMPONENT1>
  <BOM_COMPONENT2>04000205</BOM_COMPONENT2>
  <_--357F4>04000205</_--357F4>
  <ITEM_CODE>04000205</ITEM_CODE>
  <ITEM_NAME>04000205</ITEM_NAME>
  <QUANTITY>04000205</QUANTITY>
  <GROSS_WT>04000205</GROSS_WT>
  <NET_WT>04000205</NET_WT>
  <PCSPERPKT>0400020504000205</PCSPERPKT>
  <CUST_REQ_PKTWT>04000205</CUST_REQ_PKTWT>
  <ECC_BATCH>04000205</ECC_BATCH>
  <ECC_BATCH_QUALITY>04000205</ECC_BATCH_QUALITY>
  <SO_NO>04000205</SO_NO>
  <SO_ITEM>040002</SO_ITEM>
- <ZSD_SEG_B1_ASN_CHARS SEGMENT="1">
  <S_PROD_TYPE>S_CRCACF</S_PROD_TYPE>
  <S_PROD_FORM>S_CRCACF</S_PROD_FORM>
  <S_PLANT>S_CRCACF</S_PLANT>
  <S_SUB_CON_SENDING_MAT>S_CRCACF</S_SUB_CON_SENDING_MAT>
  <S_JSW_GRADE>S_CRCACF</S_JSW_GRADE>
  <S_THICK_MM>S_CRCACF</S_THICK_MM>
  <S_WIDTH_MM>S_CRCACF</S_WIDTH_MM>
  <S_EQ_SPEC>S_CRCACF</S_EQ_SPEC>
  <S_UNITISATION>S_CRCACF</S_UNITISATION>
  <S_EDGE_CON>S_CRCACF</S_EDGE_CON>
  <S_COIL_ID_MM>S_CRCACFS_CRCACF</S_COIL_ID_MM>
  <S_PACKAGING_TYPE>S_CRCACF</S_PACKAGING_TYPE>
  <S_OIL_TYPE>S_CRCACF</S_OIL_TYPE>
  <S_OILING_CODE>S_CRCACF</S_OILING_CODE>
  <S_OIL_REQ>S_CRCACF</S_OIL_REQ>
  <S_END_APPN>S_CRCACF</S_END_APPN>
  <S_INT_EDGE_CON>S_CRCACF</S_INT_EDGE_CON>
  <S_SKINPASS_REQ>S_CRCACF</S_SKINPASS_REQ>
  <S_SURFACE_FINISH>S_CRCACF</S_SURFACE_FINISH>
  <S_ROUGHNESS_CODE>S_CRCACF</S_ROUGHNESS_CODE>
  <S_TOL_TYPE>S_CRCACF</S_TOL_TYPE>
  <S_THICK_TOL_TYPE>S_CRCACF</S_THICK_TOL_TYPE>
  <S_THK_TOL_MM_UPPER>S_CRCACF</S_THK_TOL_MM_UPPER>
  <S_THK_TOL_MM_LOWER>S_CRCACF</S_THK_TOL_MM_LOWER>
  <S_WDTH_TOL_MM_UPPER>S_CRCACF</S_WDTH_TOL_MM_UPPER>
  <S_WDTH_TOL_MM_LOWER>S_CRCACF</S_WDTH_TOL_MM_LOWER>
  <S_LENGTH_TOL_MM_UPPER>S_CRCACF</S_LENGTH_TOL_MM_UPPER>
  <S_LENGTH_TOL_MM_LOWER>S_CRCACF</S_LENGTH_TOL_MM_LOWER>
  </ZSD_SEG_B1_ASN_CHARS>
  </ZSD_SEG_B1_ASN_SO>
- <ZSD_SEG_B1_ASN_SO SEGMENT="1">
  <SO_CREATE_DATE />
  <DELIVERY_DATE />
  <CARD_CODE />
  <CARD_NAME />
  <SO_POSTING_DATE />
  <CUST_REF_NO />
  <PO />
  <PO_ITEM />
  <PO_MATERIAL />
  <PO_QUANTITY />
  <PO_UOM />
  <BOM_COMPONENT1 />
  <BOM_COMPONENT2 />
  <_--357F4 />
  <ITEM_CODE />
  <ITEM_NAME />
  <QUANTITY />
  <GROSS_WT />
  <NET_WT />
  <PCSPERPKT />
  <CUST_REQ_PKTWT />
  <ECC_BATCH />
  <ECC_BATCH_QUALITY />
  <SO_NO />
  <SO_ITEM />
- <ZSD_SEG_B1_ASN_CHARS SEGMENT="1">
  <S_PROD_TYPE />
  <S_PROD_FORM />
  <S_PLANT />
  <S_SUB_CON_SENDING_MAT />
  <S_JSW_GRADE />
  <S_THICK_MM />
  <S_WIDTH_MM />
  <S_EQ_SPEC />
  <S_UNITISATION />
  <S_EDGE_CON />
  <S_COIL_ID_MM />
  <S_PACKAGING_TYPE />
  <S_OIL_TYPE />
  <S_OILING_CODE />
  <S_OIL_REQ />
  <S_END_APPN />
  <S_INT_EDGE_CON />
  <S_SKINPASS_REQ />
  <S_SURFACE_FINISH />
  <S_ROUGHNESS_CODE />
  <S_TOL_TYPE />
  <S_THICK_TOL_TYPE />
  <S_THK_TOL_MM_UPPER />
  <S_THK_TOL_MM_LOWER />
  <S_WDTH_TOL_MM_UPPER />
  <S_WDTH_TOL_MM_LOWER />
  <S_LENGTH_TOL_MM_UPPER />
  <S_LENGTH_TOL_MM_LOWER />
  </ZSD_SEG_B1_ASN_CHARS>
  </ZSD_SEG_B1_ASN_SO>
  </IDOC>
  </ZSD_IDOC_B1_JW_ASN>
  </Payload>

Hi Bastian,
Thanks for response.
In Graphical For-Each Loop I have used xpath </vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/ZSD_IDOC_B1_JW_ASN/IDOC/ZSD_SEG_B1_ASN_SO> and its correct as per the input message which I have shown in discussion, please correct me if I have done wrong inn xpath expression.
As per my understanding I can not write loop in xslt because on the basis of some fields I am querying from database, if there is another way to achieve this please let me know.
Thanks

Similar Messages

  • How can I enable for-each loop in Creator update 1?

    I try to use for-each loop, but I got error message from compiler is
    " for-each loops are not supported in -source 1.4. (try -source 1.5 to enable for-each loops)"
    How can I switch my source to 1.5.. I am using jdk 1.5. Confusing.
    Thanks .
    Richard

    Hi!
    Actually Sun Java Studio Creator doesn't support Java EE 5 projects. If You want to create Java EE 5 project, try to use NetBeans with Visual Web Pack installed.
    Thanks,
    Roman.

  • For-each loops

    while working in jbuilder2005 i want to use for-each loops i see following error;
    " for-each loops are not supported in -source 1.2 (try -source 1.5 to enable for-each loops) "
    i configured the jdk libraries source to jdk1.5 even then i found problem
    do any body know
    Message was edited by:
    citymodel

    What it says: Java 1.2 does not have for-each loops. You configured it to use 1.5, but you also configured the compiler to check for 1.2-code compliance. Read the JBuilder manual or help about how to find and change the setting. It's probably somewhere in the project settings.

  • Studio Creator 2 for-each loop error

    Hi,
    I am using Studio Creator 2 early Access 2. The JDK is using 1.5. But when I use for-each loop. There is an error - source 1.4 for-each loop is not support, try -source 1.5.
    Why ?
    Thanks
    Wilson

    Hi Wilson,
    Please take a look at the following threads in the EA forum at the Feedback Programs Portal.
    https://feedbackprograms.sun.com/project/forum/thread.html?cap={3F4DA363-16D3-4D4C-920C-992ECB054B6D}&forid={CC6B8562-F896-4A44-ACB6-4684BDD05E19}&topid={8D824969-544E-407A-8D4A-C375CC577169}
    https://feedbackprograms.sun.com/project/forum/thread.html?cap={3F4DA363-16D3-4D4C-920C-992ECB054B6D}&forid={CC6B8562-F896-4A44-ACB6-4684BDD05E19}&topid={C124D2B1-562A-4638-AD52-A6954A2112E0}
    As youcan see JDK 1.5 is not completely supported and the engineers are aware of this and are working hard on the issue.
    We also request you to post Creator 2 EA 2 related queries at the Feedback Programs Portal for which the URL is:
    https://feedbackprograms.sun.com/login.html
    Cheers
    Giri

  • SQL Agent Permssions With SSIS for each loop not looping through files

    Hi I am Having trouble getting a ssis package to iterate through a file directory using a proxy account set up in Sql Server.
    So I have a package that loops over csv files. If I run the package manually or set the sql agent job to run as Sysadmin the pakage runs fine all files are processed.
    However if I use the proxy account. the package completes but no files are processed. there are no failures, there is no error handling set up in the control flow. the for each loop container simply does not recognise any files when run under a proxy.
    Note: the proxy is set up with credentials to access the folder. the credential is also set up with the server admin server role... still nothing
    i'm not sure is this is a ssis or permissions problem?
    Any comments will be appreciated

    Can you check this and see if you've configured all the steps correctly
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    Also enable logging in package and see if you're getting any error messages obtained in output table/file based on the logging option you chose.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • For each loop container executing multiple times....

    Hi,
    We are using SQL SERVER version 2005.
    I am having a For each loop container and inside that container there are multiple Sequence containers and inside each sequence containers there are Execute SQL Tasks (which are just stored procedures).
    Now, when i run sequence containers individually they are running perfectly fine.
    But when I run the whole For each loop container, it is just running and running multiple times without ending the process.
    I really couldnt figure out what would be the issue?
    Any ideas????
    Thanks....

    Hi grk666,
    To check whether the values stored in the object type variable are correct, you can disable all the Sequence Containers within the Foreach Loop Container, and add a Script Task with the following code to display the string type variable value (supposing
    you use the string type variable StrVar to store the value retrieved from the object variable):
    MsgBox(Dts.Variables(“StrVar”).Value.ToString())
    It would be helpful if you could post a screenshot to show the package execution at runtime in BIDS.
    Regards,
    Mike Yin
    TechNet Community Support

  • For each loop not working

    My trace statements inside my for each loop won't show.
    Please someone check my code. I"m getting no errors in flex
    builder. When i debug all vars are holding prober data. Thanks so
    much

    "essa tkinen" <[email protected]> wrote in
    message
    news:gr27rt$3sb$[email protected]..
    > yes there is data there a commas delimited list of
    keywords that are
    > catagorys. the selectedCatArray holds at list one
    element. I want to
    > return true if element is in that list
    For one thing, you're going to exit the function in the first
    iteration,
    because you return the result inside the loop. Return
    immediately exits the
    function. For another, I'd be tempted to switch it to
    something more like
    this:
    for (var i = 0; i<_item.cats.length; i++) {
    var iCat=item.cats
    //do your stuff here
    I have had really bad luck getting for each in to work the
    way I think it
    should.
    HTH;
    Amy

  • For Each Loop Issue In SSIS

    Hi All,
    I have a SSIS Package which unzips the folder and then imports the files and then moves *.zip folders into processed location. If this task is executed as a part of total package its not moving the *.zip folders into processed location, but when we execute
    for each loop alone this *.zip folders are moved into processed location. I am unable to figure out the issue here.
    ZippedFile variable holds fully qualified file name..
    Rohan
    Rohan

    Can you put a OnPreExec breakpoint on the file system task (Right click on the file system task > Edit Breakpoint... > Select the first (OnPreExec breakpoint) and when the pkg pauses @ the breakpoint, chk the value of the ZippedFle and FilePathDestination
    variable values in your Local window (should be available at the bottom of the SSIS window as one of the tabs and you will need to expand the variable tree and find these two variables and their values). Are you seeing the appropriate values here?

  • 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

  • For Each Loop for XML Task

    Hello Everyone,
    Please assist with a step by step guide on how to setup a For Each Loop for XML Task
    I'm trying to convert XML to XSLT
    I have tried more than 10 times and i just do not know what i am doing wrong - no error, my package just runs for a few seconds but nothing happens
    Thanks in advance
    Dee

    I managed to get my XML to XSLT to work but now when i run my package to import the data into SQL table,
    it stops after a few records, i get the following error: 
    [XML Source [1]] Error: The component "XML Source" (1) was unable to process the XML data. The element "Errors" cannot contain a child element. Content model is text only.
    Please assist
    Check this:
    http://social.msdn.microsoft.com/Forums/en-US/80726e0c-9e85-43ca-87bc-7cf90fd7fb31/xml-source-data-flow-throws-cannot-contain-a-child-element-content-model-is-text-only-error?forum=sqlintegrationservices
    Chaos isn’t a pit. Chaos is a ladder. Many who try to climb it fail and never get to try again. The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm, or the gods, or love. Illusions. Only the ladder is real.
    The climb is all there is.

  • "for each" loop - under the hood question

    Question about the for each loop. Is it optomized? I think this is a poor use of memory management -
    for (int i = 0; i < stop; i++) {
    Object obj = new Object();
    doSomething(obj);
    }And this is the ideal, using the same object -
    Object obj = new Object();
    for (int i = 0; i < stop; i++) {
    doSomething(obj);
    }So underneath the hood, which is the for each loop comparable to? I love the syntax, it's very clean-looking in the code, but at the same time I don't want to hurt performance.

    Question about the for each loop. Is it optomized? I
    think this is a poor use of memory management -
    for (int i = 0; i < stop; i++) {
    Object obj = new Object();
    doSomething(obj);
    }And this is the ideal, using the same object -
    Object obj = new Object();
    for (int i = 0; i < stop; i++) {
    doSomething(obj);
    }So underneath the hood, which is the for each loop
    comparable to? I love the syntax, it's very
    clean-looking in the code, but at the same time I
    don't want to hurt performance.That depends on YOU. You CANNOT write a for-each loop for the code you provided. A for-each loop requires an Iterable. (I think that's what it requires--it at least requires something to iterate over, not just an index variable as you have.)
    Consider the following, however:
    Object o1 = new Object();
    for (Foo foo : fooList) {
        Object o2 = new Object();
         foo.doStuff(o1, o2);
    } It will be equivalent to this:Object o1 = new Object();
    for (Iterator iter = foo.iterator(); iter.hasNext();) {
        Foo foo = (Foo)iter.next();
        Object o2 = new Object();
        foo.doStuf(o1, o2);
    } How could it be any different? It has to keep the behvior of the "old fashioned" iteration.

  • For each loop and modification of a LinkedList

    When going thourhg my LinkedList with a for each loop, I want to do a modification. I just saw that it cast a ConcurrentModification Exception, so it seems I can't do that.
    How should I do then? I don't want to go through all the list each time an object is removed, I want it to restart where it stopped.

    Not the best solution but something like thisshould work:
    if( linkedList.get(i) == "modification")No: don't compare Strings with the == operator.
    http://access1.sun.com/FAQSets/newtojavatechfaq.html#9
    You are correct, must be .equals() my bad.

  • For Each Loop - Urgent

    Hi,
    I am trying to use a For each loop:
    FE Agreement_No
    Customer
    0.00
    0.00<?end for-each?>
    This does not work. Does the code FE need to be grouped?
    Can anyone help?
    Thanks

    Hi,
    I have created a repeating group:
    <?for-each-group:ROW;./Agreement_No?>
    This places an F in front of agreement_no field
    and places E in front of the following field customer.
    I would also like to add a condition where installment = 'Under 1'
    Would that be <?for-each-group:ROW;./Agreement_No[../Installments='Under 1']?>

  • For Each Loop Load Dynamic Excel Files

    Hi All,
    SSIS 2005
    I want to load excel file .xls one at a time files that have different names without having to select the file in the connection manager, every time. So a user can easily place the excel file in the folder and right the sql job and it loads the file data.
    The data flow tasks all work when I manually select the excel file, but I am unable to get this to work dynamically.
    I have setup a for each loop with multiples data flow tasks and sql tasks to load my data from file.
    Variables:
    @filename d:\new file\*.xls
    For Each Loop:
    ForEachFile Enumerator
    Folder: d:\new file\
    Files: *.xls
    Retrieve File Name: Fully Qualified
    Variable Mappings:
    User::filename (index 0)
    Connection Managers:
    Excel Connection Manager: Expressions, ConnectionString @[User::filename]
    Error Message: Error at new buyer(package name) the connection string format is not valid. it must consist of one or more components of the form X=Y, seperated by semicolons.
    Can anyone assist thanks.

    You still need the file name variable.
    ExcelFilePath is the fully qualified file name of your Excel file. ie. it contains both the path and file name.
    e.g. D:\inbox\myExcelFile.xls
    All the steps you mentioned are correct, except you need to set the property of ExcelFilePath of the Excel connection to the variable that you map to in the ForEach Loop:
    Connection Managers:
    Excel Connection Manager: Expressions, ExcelFilePath @[User::filename]
    Hope this helps.
    ~ J.

  • For Each Loop: Truncation error on excel field

    In my SSIS package, I'm using a WMI file watcher combined with a ForEach loop to process excel files and load them into a SQL Server database as they are deposited in a drop box folder. Recently I've been getting truncation errors on one of my fields (Comments).
    I know that this is because Excel is scanning the first 8 rows to determine column length and there are several records that have a comments field that is greater than what excel determined.
    I've tried going to the excel editor in my advanced editor and setting the data type length of my external and output columns to a larger length (500 W_STR vs 255 W_STR) but I get a warning saying that the data type is not valid. I've tried adding IMEX=1
    to my extended properties in my excel connection string but no dice. Still getting truncation errors.
    I was wondering if anyone had any thoughts or suggestions? I'm always getting new files so the comments field will potentially always encounter this type of error. This SSIS package runs on a production server so making a Registry change to the excel drivers
    regarding the scanning of the first 8 rows is not an option for me.
    Migince

    I wound up making the registry change for # of rows scanned by excel and that seemed to solve the issue.
    I tried utilizing an excel template but every time my for each loop scanned for a new file, the metadata was updated with whatever column length was in the first 8 records of my new file. If you've got a good example of building an excel template to set
    the column length metadata in my excel source (For Each Loop) I would love to take a look at it. Good information to know.

Maybe you are looking for