Variable being overwritten in the Variable Substitution (File Adapter)

In the File adapter Receiver Communication Channel, I am using variable substitution.
The problem is that the first variable I use (userid) is being overwritten by the second variable (filenumber). How can I fix this problem?
File Name Scheme: %userid%_%filenumber%.xls
Target XML:
============
<?xml version="1.0" encoding="UTF-8"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="FileName">
<Table x:FullColumns="1" x:FullRows="1">
  <Row>
    <Cell><Data ss:Type="String">0209519</Data></Cell>
    <Cell><Data ss:Type="String">32226v2 v1.1</Data></Cell>
  </Row>
Variable Substitution:
=======================
userid          payload:Workbook,1,Worksheet,1,Table,1,Row,1,Cell,1,Data,1
filenumber    payload:Workbook,1,Worksheet,1,Table,1,Row,1,Cell,2,Data,1
Expected Output:
==============
0209519_32226v2 v1.1
Actual Output:
============
32226v2 v1.1_32226v2 v1.1
Thanks for your help.

Thank you for all your suggestions. I decided to modify my target XML and concantinate all the fields into one string so I don't have to worry about the variables being overwritten in the variable substitution.
Target XML:
============
<?xml version="1.0" encoding="UTF-8"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="FileName">
<Table x:FullColumns="1" x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">0209519_32226v2 v1.1</Data></Cell>
</Row>
Variable Substitution:
=======================
filename payload:Workbook,1,Worksheet,1,Table,1,Row,1,Cell,1,Data,1
Expected Output:
==============
0209519_32226v2 v1.1
Actual Output:
============
0209519_32226v2 v1.1

Similar Messages

  • Preprocessor command, assigned the variable and then compare the variable to int. How can I get around this?

    #define ON 1
    #define OFF 0
    in seperate code
    int variable = ON;
    variable is globally define for that module.
    in seperate code
    if (variable == ON)
    the complier errors off on the if (variable==ON)
    My guess variable is variable in of type int and ON is a preprocessor command. Therefore it is a mismatch and complier doesn't like it. How can I get around this.
    thank
    Mahen

    Mahen
    What is the exact message of the compiler?
    I think the error is, that the compiler does not find the definition of ON
    and OFF. Is it in the same source file?
    If not, try to put it into an .h file and include it where you need it.
    Stephan
    "Mahen" schrieb im Newsbeitrag
    news:[email protected]..
    > Preprocessor command, assigned the variable and then compare the
    > variable to int.
    >
    > How can I get around this?
    >
    > #define ON 1
    > #define OFF 0
    > in seperate code
    >
    > int variable = ON;
    > variable is globally define for that module.
    > in seperate code
    > if (variable == ON)
    > {
    >
    >
    > }
    >
    > the complier errors off on the if (variable==ON)
    > My guess variable is variable in of type int and ON is a preprocessor
    > c
    ommand. Therefore it is a mismatch and complier doesn't like it. How
    > can I get around this.
    > thank
    > Mahen

  • Is there a way to find out which CSS rules are being used by the different html files?

    Is there a way in Dreamweaver CS3 to find out which CSS rules are being used by the different html files, sitewide?
    Thanks - Dave

    Firefox add-on "Web Developer Toolbar" is a must have.  Information > Display Div & Class details.
    https://addons.mozilla.org/en-US/firefox/addon/60
    Another  handy Firefox Add-on  to add to your tool chest is called "Dust-Me Selectors."
    http://www.sitepoint.com/dustmeselectors/
    "It extracts all the selectors from all the stylesheets on the page you're viewing, then analyzes that page to see which of those selectors are not used. The data is then stored so that when testing subsequent pages, selectors can be crossed off the list as they're encountered.
    You can test pages individually, or spider an entire site, and you'll end up with a profile of which selectors are not used anywhere."
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Session variable being lost between parent and include file

    I am running into the following scenario: Page 1 includes page 2, on both pages a session variable is returned to the screen. On occasions, page 2 throws an error on the session variable even though it was successfully called on page 1.
    It only happens occassionally, and is very difficult to recreate in order to debug it in realtime. Has anyone run into something like this before? Thanks!

    semi star gazer wrote:
    I am running into the following scenario: Page 1 includes page 2, on both pages a session variable is returned to the screen. On occasions, page 2 throws an error on the session variable even though it was successfully called on page 1.
    It only happens occassionally, and is very difficult to recreate in order to debug it in realtime. Has anyone run into something like this before? Thanks!
    I suspect it has less to do with page-inclusion, more to do with the code on page 2. Suppose, instead of using cfinclude, you had copied the code from page 2 into page 1, and made 1 page of it. Then the error would still have occurred. That's at least my theory.
    Have a look at how the code in page 2 handles the session. There is bound to be something not quite right about it. What kind of error do you get anyway?
    Runtime debugging can be as simple as this:
    <cftry>
    <cfinclude template="page2.cfm">
    <cfcatch type="any">
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    <cftry>

  • Using a variable in "arrayTerminatedBy" clause while using a file adapter

    Hi All,
    How can read a file of sample shown below using a file adapter.
    ABC|20081010|
    2008|xxxxxxx|
    2007|yyyy|
    2009|zzzzzzz|
    3|20081010|
    first line is the header
    last line is footer
    middle portion is the body
    '3' in the footer is the total no of record count in the body
    I am able to read the header and body.
    The problem i am facing is; when it is reading the footer it is treating the footer as a record in the body and is throwing an error stating - expected the format as "yyyy"
    I have to use "arrayTerminatedBy" to indicate the end of the body. But that terminating field is a varying field. How can i use this variable field in the "arrayTerminatedBy" clause.
    Can any one help in reading this file
    Thanks in advance
    Edited by: user10308218 on 11-Oct-2008 02:23
    Edited by: user10308218 on 11-Oct-2008 02:24

    See if this helps, I haven't tested it but it will give you a hint in how to achieve it. As you can see I use the startsWith command. I'm not sure how to handle your detail as it seems to start with different elements every time.
    cheers
    James
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
    targetNamespace="http://TargetNamespace.com/Write_File"
    xmlns:tns="http://TargetNamespace.com/Read_File"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
    <xsd:element name="FileRecord">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Header" nxsd:startsWith="ABC|" maxOccurs="1">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="FileDate" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    <xsd:element name="Record" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="DetailData1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>
    <xsd:element name="DetailData2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    <xsd:element name="Footer" nxsd:startsWith="3|" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence nxsd:style="array" nxsd:arrayTerminatedBy="${eol}">
    <xsd:element name="FooterData" type="xsd:int" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

  • Why are active menus and dialog boxes disappearing/being overwritten by the active tab/page content?

    Frequently when selecting a download directory/filename in the "save to" dialog the entire dialog is overwritten with the active page content. It appears the dialog has closed, but if you tab through the dialog the active field/control is written but the rest of the dialog remains hidden/overwritten. This has also happened with the "open file" dialog. The the drop down menus on the menu bar are occasionally being overwritten after being activated/pulled down. I have not been able to determine a common/specific event causing this problem.

    I seem to have fixed it by putting <div  class="clearfloat"></div> after the navigation bar?

  • What can I do when I'm trying to reinstall iTunes and I'm being told that the old bonjour file can't be removed eventhough I managed to remove the bonjour folder?

    Ok - I'm using MS Vista. I wanted to update iTunes for a long time but it always failed because it said something about missing access to the Network where Bonjour is stored. I figured that I wanted to solve this now once and for all by reinstalling the current version of iTunes. This didn't work, because I was being told that the old version of Bonjour could not be removed. Therefore I tried to remove Bonjour and after a long quest I found a way to (seemingly) remove it. There's no more Bonjour folder in my Programm Files. Anyway - I tried to install iTunes again and it didn't work. It told me that there was still the old Bonjour that could not be removed.
    I'm at my witts end. I'd really like to use iTunes, especially since I also own an iPhone.
    I'm thankful for your replies and send you many greetings from Switzerland!
    Marco

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any Bonjour entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • I created an Execute SQL Task in ssis package to get the counts and store it in the variable and I use the variable in the control flow

    I always get the count as 0 for the variable. I am not sure what I am doing wrong. Please let me know if any of you know the fix.
    Thanks

    Here is the query I used now. Still same result
    SELECT (select  count(*) from usr_all_mbrs where PREMIER_YN = 'Y') AS count1
    SELECT
    (select 
    count(*)
    from usr_all_mbrs
    where PREMIER_YN
    =
    'Y')
    AS count1

  • How to run the variable exit without calling the variable selection screen?

    Hi all
    I have a query with 2 variables 0P_PRQUA (Previous Calendar Quarter (SAP Exit)) and ZCCDAT02.
    ZCCDAT02 is a Key Date variable that is derived based on the last day of the quarter that is entered in 0P_PRQUA. The exit code works correctly when calling up the variable screen and ZCCDAT02 is derived properly.
    The problem is that 0P_PRQUA is set to "Can be changed in query navigation". So if the user changes the value of the quarter the exit is not triggered and the value of ZCCDAT02 does not change.
    Is it possible to trigger the exit or is there another way to do it? Ideas would be appreciated. I am trying to create a Web Template with a Dropbox box for the Quarter.
    Query is written in BW 3.X.
    Regards
    Chami

    Hi guys
    Just to restate the requirement. I want the user to be able to change the value of the variable, WITHOUT calling the variable selection screen.
    I want the user to be able to change the value of the quarter by using a dropdown box from within the web template. Once that is selected I want the value of ZCCDAT02 to be derived from the new value of the quarter.
    Regards
    Chami

  • ESB - Global Variables? access of the variables outside the transformation

    I am working on one of the ESB services for my project(not looking for BPEL).
    1. Database adapter polls the data table (Say X and Column C1, C2, C3....Cn,CountofRecordsof Other table Y)
    2. Routing Service calls other database adapter for pulling the data from other table(Say Y) in another schema based on the C1,C2,C3 from X.
    3. After getting the count(i only need the count of records based on the C1, C2 and C3 conditions from Y table), I have to update the table X which corresponds to the row C1.
    The trouble what I have is
    1. How do I update the records which is for the C1 as the return of the value (which is the count) from the second adapter gives only the record count but it doesn't store the identifier from the first table.
    2.Is there anything called global variable concept in the ESB?
    3.How to access the varilable which are outside the schema in the current transformation. i.e, consider I have two schemas, Schema A and Schema B,where I am mapping the variables in the transformation, and considering I need a variable which is the schema which was populated with values during runtime in Schema C.
    Let me know if needs more clarification!
    thanks,
    Prashanth

    Hi,
    >>
    1. Database adapter polls the data table (Say X and Column C1, C2, C3....Cn,CountofRecordsof Other table Y)
    2. Routing Service calls other database adapter for pulling the data from other table(Say Y) in another schema based on the C1,C2,C3 from X.
    3. After getting the count(i only need the count of records based on the C1, C2 and C3 conditions from Y table), I have to update the table X which corresponds to the row C1.
    >>
    I suppose your RS at step 2 gives C1, C2, C3 as input and you invoke DB adapter to get count and forward response to other service.
    >>
    The trouble what I have is
    1. How do I update the records which is for the C1 as the return of the value (which is the count) from the second adapter gives only the record count but it doesn't store the identifier from the first table.
    >>
    If I understand your task correctly, try to use ESBREQUEST to accomplish your task.
    >>
    2.Is there anything called global variable concept in the ESB?
    >>
    No, there are no global variables in ESB, such in BPEL.
    I think, this should be known when you first starting a design your ESB processes.
    You can accomplish your task in next way:
    add global variable to your XML payload.
    For example, your XML payload looks like:
    <payload><some content/></payload>
    You can extend your XML schema to include global variable, so you payload may looks like:
    <payload><some content/><global_var>value</global_var></payload> (I think this's the best way, if you really need something that can be accessed in many parts of your ESB process)
    >>
    3.How to access the varilable which are outside the schema in the current transformation. i.e, consider I have two schemas, Schema A and Schema B,where I am mapping the variables in the transformation, and considering I need a variable which is the schema which was populated with values during runtime in Schema C.
    >>
    Sorry, I didn't understand. What schema do you mean? XML schema or DB schema?

  • Zipping the payload using File adapter

    Hi Experts,
    I have a 620 MB xml file, which need to be archived on daily basis.
    but the XI server shows 503 service unavailable message, while trying to process the huge file.
    also used the Zippayloadbean module in the file adapter, but no luck.
    Please suggest on how to archive 620 MB xml file.
    Thanks in advance.

    Hi mk,
    I know that there is a bean for the adapter module that unzips attachments. Have a look if there is a module for zipping.
    Zip or Unzip your Payload with the new PayloadZipBean module of the XI Adapter Framework
    /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
    and check the CASE 2 in this blog:
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    Regards Mario

  • About the Rejection Handler (File Adapter)

    I use file Adapter to get the information form other applications and transform the data format to XML . I want to kown ,when will the Rejection Handler of the file Adapter take action ,can i do some predefine to the Rejection Handler to reject the specifically data ?

    Hi,
    The rejection handler only comes into the picture when the input data is invalid as per the schema definition. i.e. you can reject invalid data so that it can be corrected and enqueued again. You can choose to set up your rejection handling mechanisms in bpel.xml.
    See the fllowing post for config info on rejection handlers:
    Re: How can I make my read file server still work when it read a wrong file?
    Regards,
    Narayanan

  • Run Variable values out of the "variable values window" in a excel workbook

    Dear experts,
    I am working on BI 7.10.
    Our workbooks are made of several data providers based on the same query and require many different variable values, which give us a long and unconvenient (for the users) "select values for variables" window (ex : we have a Profit and Loss report to run on different consolidation versions, fiscal years etc...)
    So I wonder if there is another way to enter these values, out of this window...(macro?)
    Many thanks for your help.
    Armelle

    my variables are global for all data providers since I use the same query for my data providers.
    It's just the values (some of them : ex: conso version) that differ from one data provider to another.
    ex : here for 2 diff Data providers based on the same query i need to enter the following values for mandatory variables
    Different versions / different years but same conso group / data entry year/ posting period.
    i would like to have the possibility to enter these values out of the "select values for variable" window (not convenient when we have 7 or 8 DP...), but directly in the workbook.
    But maybe this is not possible...
    In DP1                 
    conso version = A_PL                         
    conso group = FR01
    data entry year = 9999
    fiscal year = 2010
    Posting period = 12
    In DP2
    Conso version = P4_MAG
    Conso group = FR01
    Data entry year = 9999
    fiscal year =2011
    Posting period = 12

  • Problem in Variable Substitution (Receiver File Adapter)

    Hi,
    I am facing problem in the variable substitution in receiver file Communication channel. My expected file name is A_C.xml; but my actual output filename obtained is C_C.xml for the below example target file:
    <ProductionSch>
    <CustomField>
    <value>
    <ValueString>A</ValueString>
    </value>
    </CustomField>
    <CustomField>
    <value>
    <ValueString>B</ValueString>
    </value>
    </CustomField>
    <CustomField>
    <value>
    <ValueString>C</ValueString>
    </value>
    </CustomField>
    </ProductionSch>
    I have used the following parameters in the file communication channel:
    File Name Schema: %var1%_%var2%.xml
    Variable Substitution:
    Variable Name                     Reference
    var1                                     payload:ProductionSch,1,CustomField,1,value,1,ValueString,1
    var2                                     payload:ProductionSch,1,CustomField,3,value,1,ValueString,1
    When I try using either of the one in the file name schema and the corresponding variable reference in the variable substitution I am getting the correct output filename as A.xml or C.xml. However, when I give either of the one variable in file name schema and both the variable references in the variable substitution I am getting only C.xml as per the example file.
    Can any of you suggest me where I am wrong or any other suggestion which I can try?
    I cannot use dynamic configuration as I am using multimapping. Multiple file names cannot be generated using dynamic configuration.
    Regards
    Sowmya

    hi Sowmya,
    refer you to this [Note 1581988 - Variable Substitution option does not work properly|https://service.sap.com/sap/support/notes/1581988] (2011.05), as SAP says " when there is more than one variable using the same name as the last element, File Adapter does not select the correct one.... ".
    regards.
    Mickael

  • Is there any way to prevent fields from being overwritten when importing data via xdp-file?

    In an pdf-form designed with LCD everytime the form gets merged with an xdp-datafile content of all fields get overwritten, regardless which data-binding (normal, global, none) is assigned to the fields and regardless if the fields are exluded in the xdp-datafile. Is this normal behavior and is there any way to prevent fields from being overwritten?

    The xdp-file is first exported from Acrobat Professional 8 (export data as *.xdp) to get the complete structure. Then in the xdp-file some fields are removed manually and other fields are filled with data. When the modified xdp-file is opened again with Acrobat Professional 8 it grabs the original pdf-form and merges the manually filled fields into the form. With the merge all other fields in the form are overwritten, even if they are not defined in the xdp-file. And that is what I want to avoid. I want to merge the xdp-file into the form and keep the data in fields not defined in the xdp-file.

Maybe you are looking for

  • Regarding Delivery related problem

    Hi All, when i am creating outbound delivery ,i am getting error like this"16 Copying is not poss.because an entry is missing in Table TVCPL: ZOR"how can i solve this problem. its very urgent.can u pls suggest me. Thanks & Regards Ramesh chandra

  • Problem in Appraisal Document, in ESS

    hi all, we are getting problem in Appraisal document in career and job service in Employee self service. when we give the Administration Role to Ess user at portal level i am able to see the appraisal document but when we trying to see the document w

  • Help with fillable form

    How do you convert a word doc into a fillable form?

  • What does it mean when I get this message:  "Battery is critically low"

    I am suddenly getting a message "the battery is critically low" - am I in danger here?????

  • Ipod touch touch screen not responsive

    well i went home sick monday from work and i put my ipod touch and my phone in my lunchboxi made sire there was no kind of moisture in the lunch before i put it in my ipod was in my lunch box from about one til atleast 6 at night when i took it out t