Variable Substitution for File Name Scheme

Hi all,
Please clarify the following issue.
I have two source fields
Transfer Order number  -  0000000222
Transfer Order line item - 0001
Both i map it into one target field
The target field output is  - 0000000222#0001
I need a file name which starts with ABC <TranferOrderNumber>.txt
The problem is, when i try to use payload i get output
(ABC0000000222#0001.txt). The reason is i use the target field which was concatenated. I don't have any target field with only transfer order no.
Please give me a solution where i would get output
(ABC0000000222.txt).
Thanks in advance,
Jose Augastine

Hi,
Other way may be like this ..Create a one more segment in your target structure with field name as Transfer Order No. And populate only this no. And in the Reciever File adapter , in the variable sub, use only this field. But this new segment will come in the file. To avoid this, you can make use of " Cut "  Parameter in the File Content Conversion.
This will hold good, if you have content conversion-
/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12
Otherwise, you can think of Bhavesh's suggestion
Regards,
Moorthy

Similar Messages

  • Variable Substitution in file name on the sender CC in PI 7.1

    Hi
    I am working on a File to File scenario, where I need to shorten the file name to something like mode1, mode2 or mod3,
    How can i achive this, Please let me know if there is any example
    Thanks
    PR
    Edited by: PR on Oct 29, 2009 1:08 PM
    Edited by: PR on Oct 29, 2009 1:09 PM

    Hi,
    Mode1, mode2 and mode3 are file names?
    You can achieve this by using 'Advanced Selection for Source File' in Communication channel in ID.
    Refer the advanced selection of Source file concept from following link:
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
    -Supriya.

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • ORA-04054 : using variable substitution for the database link name

    Hi,
    I need to use variable substitution for the database link name.
    Here is my command :
    declare
    GET VARCHAR2(50);
    begin
    select OIA_GET_DESIGNATION into GET from INFODRI.OMA_IN_ARTICLES;
    for rec in (select * from [email protected]_GET_DESIGNATION)
    LOOP
    dbms_output.put_line('TEN_CODE vaut : '||rec.ten_code);
    END LOOP;
    exception
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERREUR ORACLE DETECTEE : '||rec.OIR_CUR);
    DBMS_OUTPUT.PUT_LINE('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    :crd := -1;
    end;
    When I run this programm, I receive the error :
    ORA-04054: database link REC.OIA_GET_DESIGNATION does not exist
    When I replace :
    for rec in (select * from [email protected]_GET_DESIGNATION)
    by :
    for rec in (execute immediate 'select * from tensions@'||rec.OIA_GET_DESIGNATION)
    I receive the error :
    PLS-00103 : Encountered the symbol "IMMEDIATE" while parsing.
    What can I do to resolv my problem ?
    Regards,
    Rachel

    What is the name of the DB Link and the name of the object you are selecting
    from?
    I find it easier to create a view on the remote object then use that in selects.
    e.g,
    Link Name = MyLink
    Object_name = Addr_Loc
    create or replace VIEW Rem_Addr_Loc AS
    select * from addr_loc@mylink;
    In the code I then use the view
    begin
      for C_Rec in (select * from Rem_Addr_loc)
      loop
         dbms_output.put_line('Rec: '|| C_Rec.Col1);
      end loop;
    end;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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

  • Abap mapping and variable substitution in File adapter

    Hi experts!!.
    I am new in abap mapping, but I can do one abap mapping succesfully, but my problem is:
    I need to do a variable substitution in my file receiver adapter:
    Target directory = %cliente&/out
    File Name Scheme = TC%Fecha%.EFI
    ¿Using abap mapping is this possible? How I can do it?.
    Please is very urgent.
    Thanks in advance, and best regarts.

    Yes you can,.
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    will become
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “Directory”);
    In the receive file adapter all you would need to do is select Adapter Specifc Attributes --> File Name and Directory and givce some dummy values for the filename and directroy. In the runtime values will be taken from the SOAP header which you set in the mapping.
    Regards
    Bhavesh

  • Changing file name schema

    In my receiver adapter the file name schema is intern_pay%var1%.dat and in variable substitution var1 is defined as message:message_id_hex.According to this i can see the file in the target directory as intern_payb0ba03a0904711dbbb9e00000e252c96.dat
    Can any one please help me out to change the format of the file in the target directory to intern_pay_yyyymmdd.dat
    Briefly, can any one please explain me how to change the file name schema in the receiver adapter.
    Many Thanks,
    Smith.

    Hi Paul,
    You can use DynamicConfiguration in a user defined function to achieve this.
    Go thro these threads, they will provide you the solution.
    Dynamic Directory and File Naming in Receiver Adapter
    In the above thread look at the post that answered the question. It will certainly help you.
    And go thro this also.
    Dynamic  File Name for Receiver File Adapter
    Regards,
    P.Venkat

  • Variable Substitution for Source Directory

    Hello,
    I have seen several threads about using a UDF and variable substitution for dynamically determining the Target Directory.
    Is anyone familiar with (or had to implement) a solution where the Source Directory is dynamically determined.
    My challenge is to connect to a different Source Directory name (sy-datum format, ex:  20070920 ) each day on an ftp site and download all the files in the folder to a know target directory.  I am doing a simple file-to-file transfer, so no mapping is involved.
    Your comments, suggestions and feedback is greatly welcomed.
    Thanks,
    Ralph

    Hello Carme,
    I have not found a solution for this type of event.
    I was attempting this because the FTP site I was connecting to would DELETE a file the moment XI touched it.  So when XI (using FTP Transfer protocol) configured with a DELETE or ARCHIVE (Processing Mode), it would error off because the file was no longer on the FTP site.  I contacted the site but they refused to deactivate their script to auto-delete files.  Using TEST processing mode is not recommended per SAP in a server pool environment.  You would think SAP XI would provide a fourth option in which a DELETE command is not issued back to the FTP site.
    The FTP site did have sub-directories in which copies of the original files were stored, but I could not figure out how to dynamically change the XI Source Directory as the current date changed. 
    I settled on using File NFS (Transfer Protocol) and running the FTP commands from a .bat (batch file).  I put the command I run down at the bottom of the XI page with a 60 second timeout.
    I still do not change to each folder dynamically because the standard FTP  (GET and MGET) commands do not attempt a Delete after file retrieval.
    Perhaps using a batch file is an option you may want to consider using.
    Cheers,
    Ralph

  • File Name Scheme - Receiver Adapter

    Hi,
    I have a File Receiver Adapter which is using content conversion to take in XML and output a file. I want the output file to be called EOD286ccyymmdd.txt where ccyymmdd is the current date. Seems to be 2 options for file names:
    1. Add Time Stamp: No use as this adds the Date & Time. I only want the date.
    2. Variables: Don't think I can use this as it only seems to work if the data is part of the XML message packet. The date in ccyymmdd format is not contained in the XML anywhere.
    Is there anyway of getting the File Scheme Name I want ?
    Cheers,
    PaulC.

    Hi,
    You have one option in the File adapter receiver channel: 'Run Operating System command After message processing", where you can give any std OS command or you can give batch file (.bat) to run after the message processing. In batch file, you can write a set of commands which would rename the file according to your name format.
    Another bit complex solution is create your own custom adapter module and change the file name scheme.
    Thanks,
    RK

  • Temp File Name Schema in Receiver File adapter

    Hi,
    I have a scenario where i have to write the file in the temperaory location before writing it to the FTP loacation, I have selected the Processing Parameter as "Use Temperory File" but when the file gets created it is padded with the Message Id, is thr any option to get the file name as the temp file name without the Message Id or timestamp.
    Please let me know if any one has come across such scenario.
    thankx,
    shree

    Hi,
    Under Write Mode, specify whether the target file is to be written directly in the specified directory. If an additional step is to be added using a temporary file, choose Use Temporary File.
    You can specify a naming scheme for the temporary file under Temporary File Name Scheme.
    This schema is used to determine the prefix and extension of the temporary file; to ensure a unique file name, a time stamp is also added to the name during processing.
    The schema xitemp.tmp, for example, results in the file name xitemp<timestamp>.tmp
    So you have to customise the file name in schema.
    see below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    Regards
    Chilla

  • Regarding  File name schema in  Receiver  com. Channel

    Hello,
    I have gone thru  the blog
    The specified item was not found.
    "The same filename from a sender to a receiver file adapter - SP14 for Dynamic configuration"  by Michal Krawczyk....And here in this Scenario in ID (in Reeiver communiation channel)what should we give as file name.(or) can we leave it blank.
    If my client wants the name ,then instead of assigning it to the root can I consider a element and assign the udf...In this case how it will effect the Receiver file name schema in Rec Communication channel in ID

    Hi,
    Pass it as %FileName% which will come from dynamic configuration.
    SAP note may give some hints- 746393 and also this thread has got the answer
    Module Processor : Module exception java.lang.ClassCastException
    Thanks
    Swarup
    Edited by: Swarup Sawant on Aug 22, 2008 11:19 AM

  • How to use variables in logical file name definition FILE

    Hi Friends,
    How can I use variables in logical file name definition (tcode FILE). The requirement is to pass value in these variables (based on selection criteria), and use it as part of file name. You quick response will be highly appreciated.
    Thanks,
    Kuldeep Joshi

    Hi,
    Thanks for your reply.
    In detail, the scenario is like I have created an Open Hub. Its working fine. Now I am planning to execute this open hub using process chain and for that I have to define the file output on application server along with logical file name (using tcode FILE). The logical file name contains two variables (defined in FILE) i.e. z_dept and z_fiscperiod.
    Filter value in DTP ( I will read these values from Ztable using routine )
    Dept = R&D
    Fisc period = 004/2009
    Variables defined in tcode FILE:
    z_dept for Dept
    z_fiscperiod for Fiscal Period
    Logical file name : <z_dept>_<z_fiscperiod>.csv
    Now the challenge is to populate filter values in these two variables so that the filter value can be used for naming the output file.
    My last option is to read/update SAP standard table used for storing variable values (i.e. PARAMVALUE)
    Please let me know if you can help me in this issue OR is there any standard method/FM to populate value in these variables
    Thanks,
    Kuldeep

  • Report Script : Parameter for file name?

    hi all,
    I am using a report script to generate a text file with budget data. This works fine in AAS console but I am automating this process by usning an ESSCMD and batch script.
    tha batch script will call the ESSCMD script which in turn executes the follwoing command
    RUNREPT 2 "RepScripName" "c:\Otputfile.txt"
    Now here I am hard coding the Output file name and location.But my requirement is that when I run the script it should prompt for file name and location.
    Any Idea on this
    Thanks

    Another solution I have tried is simply writing a small VB app that has a dialog that allows you to type in a file name or even navigate a file system directory. If I understand you correctly, you just want to be able to output the file anywhere you want. This works well and you can add more features to, just depends on if it is worth the effort. Other wise you can just write MXL and supply your script with position variables. You just need to type it in and hope you type typed it in correctly. Good luck, there are several ways to accomplish this.

  • Ver.9.5 The volume for file name cannot be found

    HI,
    My work Mac Book pro was recently upgraded to Mavericks from 10.6.8, with iPhoto 11 (ver. 9.5) also an included upgrade. One album of photos is no longer accesible - clicking on each thumbnail provokes the following window "The volume for <file name> cannot be found. The "Try again" option doesn't work, and the alternative, which is to use the finder to locate the file is useless, as the files are buried in a library spare bundle. When I copy the file name, and search on the volume with the library via finder, it pulls up tiny thumbnail size files.
    I have a primary iphoto library on a dedicated USB external drive, which I back up not everytime I update the library (200 gbs spare bundle over USB2!), but regularly. I fear these recently imported files, have not been backed up before up erasing cards, and upgrading system OS, have gone.
    Is there any way of getting into the library via finder, or elsewhere in iphoto to refind the original master files which are in there somewhere? These files opened perfectly in iphoto before the recent upgrade.

    Thanks for the fast response. I've followed your directions and can't find the file in there, in Masters, Originals, or Modified folders. I found files in Thumbnails folder though. Some of the files from the same event are fine, so its not consistent. I'm also noticing that another file in the event has a totally blurred preview (Its a 24mbs Jpg from a Nikon D800) - not sure if this is at all connected.
    The positive news is that my NeoFinder database of drives indicates I should have the 'missing' files on another computer in the office, but I'm still scratching my head on this.

  • " the volume for (file name) cannot be found. Insert the disk or connect to the server volume and wait for it to appear on the desktop, then try again."

    I get an error message in iPhoto when I click on thumbnails of pictures in certain albums. It reads 'the volume for "(file name)" cannot be found. Insert the disk or connect to the server volume and wait for it to appear on the desktop, then try again.'  What does this mean and how do I fix it?

    It means that you imported the files in Referenced mode and have now remvoed them from the Mac. Put the disk or card back.
    For more on iPhoto and file management see this User Tip:
    https://discussions.apple.com/docs/DOC-6361

Maybe you are looking for

  • To Include Standard Text in TEXT Field of SMARTFORM

    Hi,          I  have a requirement to include a Standard text inside a TEXT field. The name of standard text is ZSD_CMR_&VSTEL&_STATISTICAL  where for VSTEL we should put the respective work area field like ZSD_CMR_&W_LIKP-VSTEL&_STATISTICAL . But wh

  • Looking for a script that will find broken links

    I create long documents in InDesign, and I often have 50-75 Indesign documents in my InDesign book. Because what I do is production publishing, at any one time I'll have a half dozen similar books under construction. All the books contain the same ch

  • How Much Time to Convert Files?

    I'm trying to convert a 700.5MB .avi file to something that my TV's DVD player can use by way of iMovie HD 5.0.2 and it is taking what seems to be a lot of time (hours). When it starts the import it says it will take about 80-90 minutes, but after a

  • Finder search doesn't work

    Hi there, on my system (Mac Pro, Tiger, 10.4.11) the search function in the finder doesn't work anymore. I tried almost everything: Onyx, all the mdutil stuff for re-indexing, everything worked fine but it doesn't solve the problem. Spotlight itsself

  • Oracle report or crystal report ?

    hello, I am in the process of choosing a reporting tool to access an oracle database, I end up with two tools , oracle report and crystal report. i hear that oracle report is too complicated and is not flexible. Is that true, i need some advisement t