Package Variable Values in For Each Contaner

I have a For Each File Container that loops through Excel files, executing a child package for each file found. I am using the RowCount transform to log the number of rows at various points in a DataFlow. When one file is processed the numbers are correct
but when multiple files (e.g. 5) are processed some counts are zero when they shouldn't be. I have tried a 1 second sleep in the loop but that didn't fix the problem.
R Campbell

Please share more technical details
numbers of what where, what Data Flaw how a package reports on the counts?
Arthur
MyBlog
Twitter
Actually, the title IS misleading.
I have a parent package with a For Each File container
and within that a child package is called, passing the file path and name. The child package has a
DataFlow with quite a few branches in the flow. On some of those branches I have
RowCount "transforms" each linked to its own
package variable.
At the CotrolFlow level a script is executed immediately after the DataFlow which writes the package variable values to the dts log.
If I place one file at a time into the folder that the For Each Container is looking at and wait for it to be processed, the numbers are correct. If I place a number of files (say 5) in the folder at one time, some of the numbers logged are correct
and some are zero.
I did try a 1 second sleep at the start of the logging  script but, when I think about it, the package variables probably being read before the script starts to execute. If this is a timing issue (which I don't think that it should be) it might need
to be a separate script between the DataFlow and the existing script, with a sleep in it.
Because each loop of the parent package executes a new instance of the child package I am puzzled as to how there can be a timing issue. No matter how tight the loop might be, a new instance of the child package is executed each time.
R Campbell

Similar Messages

  • Different Asset Value Dates for each Asset

    Hi,
    A very interesting and unique requirement.
    We are attaching multiple assets in the settlement rule of wbs elements and run CJ88, but as per standard SAP, all assets under each WBS Element are capitalized on the same Asset Value Date.
    My client wants to capitalize assets at different asset value dates for each of these assets without needing to run CJ88 multiple times.In CJ88, however, we have only one asset Vale date option.
    Is this possible to have different asset value dates asset wise when we run CJ88 ? I did not find any option to define an asset value date in CJIC either.In Settlement rule neither.
    Thanks for any help.
    Regards,
    Manis

    Try and explore the option of using Asset Value date on the sender WBS, you can find this under settlement parameters.
    This option depends on your project (WBS) strcture and the number of assets being capitalised on back on one WBS element.
    Refer note OSS 98496 for more information
    Regards
    Sreenivas

  • Variable Use in For-Each statement

    Hello Gurus-
    I am having an issue using a variable i've created in a for each statement. Here is the code i'm using
    My objective is to create a variable based on the kind of invoice. If the invoice is a proof or reprint, one copy should be printed. If it's a final invoice, I need two copies.
    <?xdoxslt:set_variable($_XDOCTX, 'x', 0)?>
    for-each<?if: Print_Additional_Header_Text_ID238='PROOF'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
    <?if: Print_Additional_Header_Text_ID238='REPRINT'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
    <?if:not ( Print_Additional_Header_Text_ID238)?><?xdoxslt:set_variable($_XDOCTX, 'x',2)?><?end if?>
    <?xdoxslt:get_variable($_XDOCTX,'x')?><?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
    for-each is the loop i'm using to repeat sections of the invoice.
    When I run the preview with the last for-each print, i get an error that says "variable not defined:'x' "
    But when i remove the last for each the correct variable, 1 or 2, will show in the invoice.
    My question is: How can I use the variable 'x' in <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
    TIA
    Darius
    Edited by: 852460 on May 24, 2011 8:31 AM
    Edited by: DEK17 on Jul 20, 2011 1:15 PM

    Probably, this will help
    http://winrichman.blogspot.com/search/label/multiple%20copy
    Try
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,get_variable($_XDOCTX, 'x'),1)?>
    or
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'x'),1)?>

  • Last() not returning correct value within for-each-group

    I've found inconsistent results between JDeveloper and SOA Suite using the xslt 2.0 for-each-group construct.
    &lt;xsl:for-each-group select="Po/PoLine" group-by="itemId"&gt;
    &lt;xsl:if test="position()=1"&gt;
    &lt;GroupCount&gt;
    &lt;xsl:value-of select="last()"/&gt;
    &lt;/GroupCount&gt;
    &lt;/xsl:if&gt;
    &lt;/xsl:for-each-group&gt;
    What I expect is the function last() to give me the number of groups which is the unique number of itemIds.
    In JDeveloper 10.1.3.4, testing this construct gives me what I expect.
    At run-time (deployed to 10.1.3.3 SOA Suite), the value returned is the total number of records, not the number of groups.
    For example, given the following XML
    &lt;Po&gt;
    &lt;PoLine&gt;
    &lt;itemId&gt;<strong>001</strong>&lt;/itemId&gt;
    &lt;description&gt;Hammer&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;PoLine&gt;
    &lt;itemId&gt;<strong>001</strong>&lt;/itemId&gt;
    &lt;description&gt;Hammer&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;PoLine&gt;
    &lt;itemId&gt;<strong>002</strong>&lt;/itemId&gt;
    &lt;description&gt;Nail&lt;/description&gt;
    &lt;quantity&gt;10&lt;/quantity&gt;
    &lt;/PoLine&gt;
    &lt;/Po&gt;
    Grouping by <strong>itemId</strong>, last() should return 2 as there are two groups (001 and 002). JDeveloper does this.
    When deployed to SOA Suite, last() returns 3.
    Any ideas?

    Hi,
    if JDeveloper is doing the right thing then this issue should be reported to the SOA Suite forum or BPEL BPEL , what do you think ?
    Frank

  • Setting bind variable value programmatically for master and child VO's

    Defined following BC:
    Serv VO - Master VO, has Bind_cNum (bind variable)
    ServDetail VO - Child VO, has Bind_cNum2 (bind variable)
    ServViewLink VL - View link between Serv VO & ServDetail VO
    in AMModule Impl have custom WS:
    public List<ViewRowImpl> getMyServices(String cNum)
    List<ViewRowImpl> result = new ArrayList<ViewRowImpl>();
    ViewObjectImpl vo1 = getServ(); //Master VO
    vo1.setNamedWhereClauseParam("Bind_cNum", cNum);
    vo1.setForwardOnly(true);
    ViewObjectImpl vo2 = getServDetail(); //Child VO
    vo2.setNamedWhereClauseParam("Bind_cNum2", cNum);
    vo1.executeQuery();
    while (vo1.hasNext()) {
    result.add((ViewRowImpl)vo1.next());
    return result;
    I am passing same cNum parameter to both Serv VO (Master VO) and ServDetail VO (child VO) as above. (this is in addition to view link bind variable :Id)
    It shows in the logs that it is setting the values correctly:
    <ViewRowSetImpl> <setNamedWhereClauseParam> [382] Serv ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum, 11771370)
    <ViewRowSetImpl> <setNamedWhereClauseParam> [383] ServDetail ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum2, 11771370)
    <ViewRowSetImpl> <doSetWhereClauseParam> [383] Serv ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum, 11771370)
    <ViewRowSetImpl> <execute> [385] Serv ViewRowSetImpl.execute caused params to be "un"changed
    <OracleSQLBuilderImpl> <bindParamValue> [394] Binding param "Bind_cNum": 11771370
    <ADFLogger> <addContextData> Execute query
    -- when executing view link
    <ViewRowSetImpl> <setParamValues> [425] ServViewLink_0 ViewRowSetImpl.setParamValues params changed
    <ViewRowSetImpl> <doSetWhereClauseParam> [426] ServViewLink_0 ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum2, null)
    <ViewObjectImpl> <bindParametersForCollection> [436] For RowSet : ServViewLink_0
    <OracleSQLBuilderImpl> <bindParamValue> [437] Binding null of type 12 for "Bind_cNum2"
    <OracleSQLBuilderImpl> <bindParamValue> [438] Binding param "Bind_Id": 5018
    from above log, when ServViewLink_0 is executed, it is changing Bind_cNum2 bind variable to null.
    how can i pass same bind variable value to both Master and Child view objects from AM Impl.java
    Edited by: bsrao on Oct 11, 2012 6:07 PM
    Edited by: bsrao on Oct 11, 2012 6:10 PM
    Edited by: bsrao on Oct 11, 2012 6:12 PM

    Try executing the vo1 query before setting the bind variable for vo2, then execute the vo2 query (if that's what you want to do).

  • Using static variable in orchestration for each message

    Once a file is dropped to our Biztalk server I am capturing data from each message. However, I need to assign a batchID for this file that I will write to the database along with the data. How do I build my orchestration so that the code I'm using to generate
    the BatchID doesn't create a new ID for each message? I want each message to use the same ID.
    Thanks.
    Raymond

    Shankycheil,
    I think you've pointed out my primary issue. I'm fairly new to Biztalk and I just kind of let it do its thing when it comes to EDI processing. So, I guess my issue is due to the fact that I'm letting the EDI Disassembler debatch the file and pass messages
    into the orch one at a time. I have code in an expression shape that generates a BatchID, but of course if I'm debatching it creates a new BatchID for each message. How do I deal with the file as a whole inside the orchestration so that once I generate a BatchID
    it uses it for all of the messages in file? I've done what Prabhdeep suggested and promoted a field in the schema so that I can set the BatchID, but it needs to be the same for each message in a file.
    Thanks.
    Raymond

  • HOW DO I REASSIGN A PACKAGE VARIABLE VALUE FROM WITHIN JAVA BEANSHELL PROC

    Hi all
    I am trying to something that I would consider quite normal in programming applications.
    create a variable - systemId
    create a procedure that runs some code (Java BeanShell), and then sets the varable to a value depending on that code
    create a second procdure that runs some code(Java BeanShell), but uses the value of the variable set from the previous stage
    In the package editor I have created a declare variable step, two procedures, and a flow: declare variable -> procedure 1 -> procedure 2
    If I declare the variable with a vue of 10 initially then try #systemId = 400, I get an error along the lines of '10 = 400'
    I am probably doing something basically wrong
    regards
    Terry

    My friend it depends on you. What ever you mentioned that can be achieved in package level but in procedure level.
    For example:
    Odi procedure: Java beanshell techonlogy
    <@
    String empname="ALEX";
    @>
    odivariable1: refresh mode in package
    select sal from emp where empname='<@=empname@>'
    Package diagram:
    ODIprocedure------ok--->ODIvariable inrefreshmode
    if you will execute this then the odivariable will have value 2000( alex salary)
    Till now it was easy to achieve. But tell me how to assign the alex salary inside the 1st procedure without taking the help of a package. You just have to execute only the procedure.Hmmm nail on your head ? you might be thinking of something like this #odivariable=<@=empname@> which is not correct.
    In this scenario you have update the snp_var_data table. So that the underlying value can be updated. Another approach could be to generate a scenario of the odi variable given above and invoke the scenario inside the procedure(this way you can refrsh it without using a package)
    Ok my friend. Seems to be a long explanation.
    Let me know if it is helpful or not.
    Bhabani
    http://dwteam.in

  • Comma separated column into rows for each value

    experts,
    I have a two column table. The second column has comma separated string values. How can I put the values separate for each comma separated and make one row for each value?
    example,
    column1 |   StringColumn
    s1          |   test, joy, happy
    s2          |  USA, England, India
    I want the result to be like below
    column1   |     StringColumn
    s1            |      test
    s1            |      joy
    s1            |      happy
    s2            |     USA
    s2            |     England
    s2            |     India
    thanks in advance
    ebro

    Hello ebro,
    See the following for a possible solution:
    http://gallery.technet.microsoft.com/scriptcenter/Convert-Small-CSV-Value-to-ffc142ff
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Generate every hour event 2331 for each DP after Software update Deployment Package deletion

    We have an organization build on SCCM 2012 R2 with 270 DPs configured with DP Pulls function. The centralized point contains DP sources available for all DP Pull.
    We have some problems with Windows Update deployment package, and we decide to delete them. We first remove them from all DPs. After more than a month we delete the deployment package. From this day, we see that the SMS_Distribution_Manager service generate
    every hour logs for contacting each of the 270 DPs to ask them for deleting the package.
    Remark: At the time we run the delete, some of the DPs were not connected. After 3 weeks all of them were connected. A month later, the SMS_Distribution_Manager
    generate always these events every hour.
    Each DP responds with a 2331 event that seems OK. Every hour the system begin with two events (2301 and then 2300 for this package, after a 2331 for each
    DP). All these events are also present in the application log of the Event Viewer. After the last DP connection that respond with 2331 event, there are no event that generalize a task for the package to definitively remove it from the database.
    Could anyone help me to correct the system?

    There are no error messages. There are only messages generated in Distribution_manager logs and Event Viewer, showing us server processing and network activity on package that was deleted over 40 days, and that happened every hours. The Microsoft support
    give us directives to delete orphan records in 4 tables
    pkgServers_L,pkgServers_G,PkgStatus_L,PkgStatus_G)
    At this time the correction has positive effect.
    A sample of event generated
    Log Name:      Application
    Source:        SMS Server
    Date:          26.02.2014 09:56:19
    Event ID:      2331
    Task Category: SMS_DISTRIBUTION_MANAGER
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Computer:      wwww.xxxx.yyyy.zzz
    Description:
    On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  Distribution Manager successfully removed package "PS100066" from distribution point "["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=xxx"]\\aaa.bbb.ccc.dddd\".
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="SMS Server" />
        <EventID Qualifiers="16384">2331</EventID>
        <Level>4</Level>
        <Task>12</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2014-02-26T08:56:19.000000000Z" />
        <EventRecordID>825362</EventRecordID>
        <Channel>Application</Channel>
        <Computer>wwww.xxxx.yyyy.zzz</Computer>
        <Security />
      </System>
      <EventData>
        <Data>PS100066</Data>
        <Data>["Display=\\aaa.bbb.ccc.dddd\"]MSWNET:["SMS_SITE=PS1"]\\aaa.bbb.ccc.dddd\</Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>
        </Data>
        <Data>On 26.02.2014 09:56:19, component SMS_DISTRIBUTION_MANAGER on computer wwww.xxxx.yyyy.zzz reported:  </Data>
        <Data>
        </Data>
      </EventData>
    </Event>
    Regards

  • Determine variable value based on characteristic row value

    Hi all,
    Am basically looking for a bit of advice from those wiser than myself.
    I have a requirement to build an Activity per Driver report which is essentially a list of cost centres down the page, with Productive Hours (an SKF) in one column, the driver (another SKF) in the next column, and then a calculation.
    Sounds easy, however the SKF for the driver differs depending on the cost centre. . . .
    For example, cost centre 100 might be driven by ACTIV1 whereas cost centre 200 might be driven by ACTIV2 and then cost centre 300 might also be driven by ACTIV1.
    I have come up with 2 possible solutions ;
    1) Set the SKF as an attribute of the cost centre and then use this as the restriction in the report.  Easiest, most standard way of setting it up, however the problem here is that some cost centres use a number of SKFs (represented by a hierarchy node) as their activity driver.  I can't set a hierarchy node as an attribute, so I don't know how this could work for those cost centre with more than one SFK accumulating as their driver.
    2) Maintain a Cost Centre to SKF Driver mapping table in R/3 which is loaded into an ODS in BW.  Create the report using an exit variable for the driver, which queries the ODS to retrieve the appropriate SKF value(s) for each cost centre.  Could this work - not sure how I know which cost centre to retrieve the driver for in the exit coding ?
    Any suggestions would be welcomed.  Surely this can't be a unique problem.
    Many thanks,
    Blair

    I should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
    Thanks

  • How can I keep responses for each question of quiz.

    For auditing purposes, I need to be able to record the user's answers for each of the 35 quiz questions.
    How can I accomplish this?
    Perhaps I can have the answers generated to a final answer page.

    Normally this is done by the LMS...
    If you need to do it in CP: there is a quizzing system variable cpQuizInfoAnswerChoice (Secrets of cpQuizInfoAnswerChoice and.... - Captivate blog)
    Because this variable is reused for each question slide, you'll have to store its value in user variables, one for each question slide. But beware: depending on the type of question, this system variable doesn't have the full answer, but maybe only the number or character identifying the answer (A,B,...).

  • Package Variable accessing...

    Hi all,
    When I try to access a packaged variable from frontend, Its giving a compile-time error :
    Cannot directly access remote package variable or cursor
    Why is it so? Is there any way to directly access them by means of some qualifier, etc.??
    Its working fine when I try to do the same from SQL*Plus session.
    Thanks
    RK Raju

    Package variables cannot be directly accessed from a Form, since it runs on the client, and your package is on the server. Each time your code checked or set a package variable, it would require a network round trip, and it wouldn't take much to ruin your response times.
    The only way is to create a function or procedure in the package that you can call from the Form to set or retrieve the package variable values.

  • Filling up a variable value from another variable

    Hi,
    I have two date fields, one calmonth characteristic ZCALMON (as char) and other calmonth charactaeristic 0CALMON as time dimension (standard bw).
    But at query level, I would like to user enter only one variable value 0PCALMON for 0CALMON (say only for date characteristic as time dimension). This date variable value should get copied to other date characteristic ZCALMON (as char).
    I can do this by using the customer exit varibale (without writing any abap code) and using the copy variable from other variable options. But I am not able to use the offset on ZCALMON.
    How can i Use offset using customer exit variable on ZCALMON.
    cheers
    raj

    Hi,
    you can use customer exit variable which will read the value of the 0calmonth variable and pass it to the zcalmonth.
    While populating the value, do the calculation or the off-set and send the value to zvcalmonth (Variable).
    WHEN 'ZVCALMON'.
       IF i_step = '2'.
      Loop at i_t_var_range into i_s_var_range where vnam = '0PCALMON' .
        zdat = i_s_var_range-low.
      endloop.
          CALL FUNCTION 'GO_BACK_MONTHS' *Sample Function
            EXPORTING
              currdate   = zdat
              backmonths = '012'
            IMPORTING
              newdate    = from_period.
          CALL FUNCTION 'GO_BACK_MONTHS' *Sample Function
            EXPORTING
              currdate   = zdat
              backmonths = '000'
            IMPORTING
              newdate    = to_period.
          CLEAR l_s_range.
          lyear  = from_period+0(4).
          lmon   = from_period+4(2).
          lday   = from_period+6(2).
          CONCATENATE lyear lmon lday INTO l_s_range-low.
    Hope you got it
    Regards
    Happy Tony

  • Urgent !!Report Fiscal year for each Month i.e.12mnths

    Hi All,
      I have a cube with following details.
    1.Revenue Value ==1200
    2.Fiscal year==2007
    3.Product type==A
    But If i need to create a Dashboard Report with this Cube,
    But it has display tht Fiscal Year Value 2000 for each month
    Like ..KF=1200/12(months)
    So i need display as follows for the graph...
    MONTH        JAN     FEB   MAR...............................DEC
    REVENUE     100    100    100...................................100
    THIS IS HOW MY REPORT SHLD BE EXECUTED..
    But I dont have any date or month field in my cube,how can I get it for Each month as above..??????
    Can any one explain me & suggest me how to proceed..???
    Thnx
    BI Learner

    Hi Voodi,
    That is the only solution... which i have in my mind...Let me try it out & get back to u..
    But as well I have another KF under that Revenue which display for each month & we need to run a dashboard with line diagram where one line for Revenue & another for PO which shld give a comparison for all the months...
    Does this work out??
    Thanks a lot for ur ideas.

  • For Each atoms

    Hello Experts:
      Is there a way to update local variable within the for each loop. I would like to update failure / success on DI object within the loop activity. Thank You!

    Hello Experts:
      Is there a way to update local variable within the for each loop. I would like to update failure / success on DI object within the loop activity. Thank You!

Maybe you are looking for

  • My ipod Wont Switch on Or Charge

    i bought an i pod just in november last year and its been fine using it and everything just now it was working i unplug it from its chager take it to my room then i wont work or switch on i put it back on charge and nothing comes up its just blank no

  • Itunes window so big i cant register my new ipod

    I already have a nano and now i got the new 3rd generation (fat) nano videos and when i tunes loads up i cannot scroll over and down to the bottom right hand corner of my screen - tried pulling the window up so that i can make it wider but no dice...

  • Retrieving xpath in any xml type service

    Hi, We have any xml service type proxy which receives 2 different types of XML messages.In one of the XML messages,we need to branch out based on value of certain element. But xpath doesn't seem to work.Xpath retrieved using messaging type service is

  • Webdynpro Application is not Deploying into Netweaver 2004s From NWDS CE

    Hi, I Developed Webdynpro Application in NWDS CE 7.1 SP5. I Am using Netweaver 2004s AS JAVA . After Deploying application i will get page can not be displayed and in the browser url is following below http://localhost:-1/webdynpro/dispatcher/demo.sa

  • Indesign CS4 drop shadow fail

    I have numerous .psd photos in on each page, all closecropped in Photoshop using a mask. I have applied a drop shadow to these in Indesign and most look great  - but the odd one has the dropshadow cut off abruptly for no apparent reason. Any ideas wh