Get File name of the inbound file during mapping

Scenario: to read the file name of the inbound file (which has date required for the mapping) during runtime.
The requirement is to read the date of the inbound file (passed to the XI pipline by the file adapter) and populate the same in the outbound mapping structure.
Any idea about how to do this?
(I went through few options of using java.util.map. not successful yet)

Hi Anand,
I posted the same question a time ago, without any help....
Can I find out the full filename of input file in message mapping?
Posted: Nov 23, 2004 1:00 PM
I have in XI 2.0 the following scenario :
In the inbound fileadapter I read my input file. The filename of the input file is part fixed, part variable (Like INDATA01.txt, INDATA03.txt, etc).
So in my Adapterconfiguration, I specify the filename with a wildcard (INDATA*.txt).
What I now want to do, is in my Message Mapping use the full filename , so I can do something different for every filenumber. Is there a way where I can get the full filename available in my message mapping (I did not find the filename in the XML in the message trace).

Similar Messages

  • How write the Outbound file name in the Inbound file

    Friends,
    I have a scenario like this.
    Outbout filename - sample.txt
    In sample.txt, i have having data like 20
    Inbound filename - vivek.txt
    i need data the like sample, 20
    (NOTE: sample is the outbound file)
    How to get this scenario.
    Thanks in advance.
    regards,
    Vivek.

    Hi Vivek,
      If your PI is of SP14 and more you have an option called Adapter Specific Message Attributes.(ASMA) in communicatoin channel configurtaion, Which will help you in capturing the Sender file name during runtime.
    So you will have to enable that option (ASMA) in Commchannel and capture file name  in UDF using Java Code with the help of sap related API and map it to the target field which u would like to get populated.
    follow the thread it has the discussion about acessing the Source file name.
       Re: Getting file directory using dynamic configuration:Code needed
    Thanks,
    Ram.

  • File-2-Proxy: Get file name in the inbound proxy?

    Hi,
    I need to know the file name in the inbound proxy. After a search I found that's possible mapping the file name to the target structure as it's explained in that link: [http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417200)ID1731350750DB00274596951164745615End?blog=/pub/wlg/2664]
    But I need to know if there is another way to access the file name in the inbound proxy without modifying the mapping.
    Thanks.

    this is possible by a dynamic configuration (there is no other easy way)
    some references -
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417500)ID1159980350DB00296046510040545862End?blog=/pub/wlg/13704
    the idea is to get the file name in runtime using the dynamic conf code and poulating it to any field that will be part of the proxy message

  • When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the original file name being replaced during the downloading process?

    When someone other than myself downloads an image from my web album, a dynamically generated file name replaces the original file name.  How I can prevent the file name being changed during this downloading process?

    Hi Glenyse,
    Here are my steps.
    1.  I upload multiple image (jpg) files onto my photo album.
    2.  I select the "sharing" by email option for this album.
    3.  I enter the recipient's email address.
    4.  The recipient receives my message and clicks on the link.
    5.  The recipient accesses my photo album and clicks on one of the images.
    6.  The image opens up to its own screen.
    7.  The recipient selects the "download" and then save file option.
    Here is the part I do not understand.  For some reason, during this "download" process, the original name which I have given to the file is replaced by different name.  So I was hoping that someone knows how to prevent the file name from being changed during the "download and save" process.
    Much appreciated if you can help me find a solution to this problem.
    Mary  

  • Assign Logical file name for the physical file path through Program

    Hi all,
    I am having a physical file which is getting generated dynamically. It is having the date and time stamp in its name which is added at runtime.
    Now I need to assign a logical file name for the physical file path through the program.
    Is there any FM or any other method to assign the same.
    Gaurav

    I think it is not possible. becuase the date & time added at runtime. so if you check the table  PATH you can find filename and their definitions

  • Different log file name in the Control file of SQL Loader

    Dear all,
    I get every day 3 log files with ftp from a Solaris Server to a Windows 2000 Server machine. In this Windows machine, we have an Oracle Database 9.2. These log files are in the following format: in<date>.log i.e. in20070429.log.
    I would like to load this log file's data to an Oracle table every day and I would like to use SQL Loader for this job.
    The problem is that the log file name is different every day.
    How can I give this variable log file name in the Control file, which is used for the SQL Loader?
    file.ctl
    LOAD DATA
    INFILE 'D:\gbal\in<date>.log'
    APPEND INTO TABLE CHAT_SL
    FIELDS TERMINATED BY WHITESPACE
    TRAILING NULLCOLS
    (SL1 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL2 char,
    SL3 DATE "Mon DD, YYYY HH:MI:SS FF3AM",
    SL4 char,
    SL5 char,
    SL6 char,
    SL7 char,
    SL8 char,
    SL9 char,
    SL10 char,
    SL11 char,
    SL12 char,
    SL13 char,
    SL14 char,
    SL15 char)
    Do you have any better idea about this issue?
    I thought of renaming the log file to an instant name, such as in.log, but how can I distinguish the desired log file, from the other two?
    Thank you very much in advance.
    Giorgos Baliotis

    I don't have a direct solution for your problem.
    However if you invoke the SQL loader from an Oracle stored procedure, it is possible to dynamically set control\log file.
    # Grant previleges to the user to execute command prompt statements
    BEGIN
    dbms_java.grant_permission('bc4186ol','java.io.FilePermission','C:\windows\system32\cmd.exe','execute');
    END;
    * Procedure to execute Operating system commands using PL\SQL(Oracle script making use of Java packages
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
    import java.io.*;
    public class Host {
    public static void executeCommand(String command) {
    try {
    String[] finalCommand;
    finalCommand = new String[4];
    finalCommand[0] = "C:\\windows\\system32\\cmd.exe";
    finalCommand[1] = "/y";
    finalCommand[2] = "/c";
    finalCommand[3] = command;
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String buff = null;
    while ((buff = br_in.readLine()) != null) {
    System.out.println("Process out :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process output.");
    ioe.printStackTrace();
    }).start();
    new Thread(new Runnable() {
    public void run() {
    try {
    BufferedReader br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
    String buff = null;
    while ((buff = br_err.readLine()) != null) {
    System.out.println("Process err :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    catch (IOException ioe) {
    System.out.println("Exception caught printing process error.");
    ioe.printStackTrace();
    }).start();
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    public static boolean isWindows() {
    if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
    return true;
    else
    return false;
    * Oracle wrapper to call the above procedure
    CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    * Now invoke the procedure with an operating system command(Execyte SQL-loader)
    * The execution of script would ensure the Prod mapping data file is loaded to PROD_5005_710_MAP table
    * Change the control\log\discard\bad files as apropriate
    BEGIN
    Host_Command (p_command => 'sqlldr system/tiburon@orcl control=C:\anupama\emp_join'||1||'.ctl log=C:\anupama\ond_lists.log');
    END;Does that help you?
    Regards,
    Bhagat

  • Error: Enter either the physical file name or the logical file name

    Hi Expert,
    I have error: Enter either the physical file name or the logical file name, when upload BP with external data transfer.
    My Step:
    1. Define Sender Structure
    2. Define Transfer Rules
    3. Start Transfer
    When execute step 3, there's displaying error:  Enter either the physical file name or the logical file name
    Can you help my problem?
    Any document/link for upload BP with external data transfer.
    Thanks and Regards,

    Hi,
    See thread: [CO-PA External Data Transfer|CO-PA External Data Transfer]
    Regards
    Leon

  • I have a keynote presentation that i built a while ago. How do identify the file names of the video files that are in the presentation?

    I have a keynote presentation that i built a while ago. How do i now identify the file names of the video files that are in the presentation?

    With your presentation open, click on each movie element and read the name in the Metrics Inspector > File Info.

  • UDF to capture the source file name or the source folder for mapping

    Hi All,
    i have 2 files -  File1 from File2 from 2 different folders- single comm channel FTP (FCC). i have to pass a constant A and B respectively to a field in target structure.
    my options are -
    either create a new field in source str populating different constants and  then map to the target str
    or a udf to get the source file name or the source folder so that i can map the constant using the value mapping/FixValue mapping.
    please suggest. thanks.
    rajib

    Hi,
    please use the UDF to determine the file name. Then based on file name either pass A or B to your target field.
    The code is as given below. Just tweak the code to pass either A or B as per your requirement.
    public String G_GetFileName(Container container) throws StreamTransformationException{
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Regards,
    Deepak.

  • Locating source file NAME from the executable file?

    Hi all, 
    I wrote a vi a couple of year ago (call it file.vi), and created an executable out of it using the Application Builder (call it newfile.exe). I know I renamed the file
    when I created the executable and now I cannot remember what I called the source file (I have hundreds in my PC, and cannot go through them one by one).
    Is there anyway I can get the name of the original file from the executable? Notice that I am not asking to recreate the source file from the executable, which I understand is not possible. 

    murchak wrote:
    Dennis, 
    I must come clean and admit that I don't really know what source control is. Is it a back up of source codes in one place like a server? I am not a programmer but use some LabVIEW to 
    automate a few simple tasks (mostly related to test data). I work solo in this area and there's not a group of people working on different pieces of the same project. 
    I can Google and learn what source control is. I am assuming that the concept itself is not specific to LabVIEW, unless LabVIEW has build-in funtionality for source control
    It is more like a database of files.  It keeps versions on each file so that you can revert back to a previous version if needed.  If working in a team environment, it helps to merge code and keep everybody up to date with everybody else.  But the versioning is the most important part.  I then recommend keeping the repository on a server that is regularly backed up.
    For a simple SCC software, take a look at Tortoise SVN.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to obtain the file name of the cached file

    Hi All,
    I am using JMF to play a MP3 file from an HTTP link and I need to know the file name of the locally cached file. I found that I can obtain the cache directory using Manager.getCacheDirectory() and I can see the cached file there but its file name is changed.

    I once had a similar task for creating a webpage that I only use on my computer--a webpage that accesses PDF's and SWF's font previews from a list of fonts as "a href's".  What you must do is utilize the power of the command line, whether on a Mac on a PC or on Linux, Linux being the most powerful (although Mac IS Unix).  You must utilize variables, variable replacement, and then a command to print out the results of a "for" or "while" loop to a text file which will be your HTML file with each individual link automatically built into the HTML code.  You will have a list of 50 links.  If you are simply looking for a GOOGLE type functionality where you click on "Next" and "Previous" you will have to dig deeper into variable replacement--this I don't know how to do yet but there are books for command-line shell interpreters.  One shell interpreter is called "bash" (born-again shell) and there is a book on the market which gives a detailed example of how to replace variables in a shell script.  Again, I don't know how it works.  I will try to learn this at a later time when I am more seasoned with the basics of shell scripting.

  • Dynamic file name inside the ZIP file

    Hi Experts,
    I have done proxy to file scenario, reciever side is the file ZIP file, i have done successfully done Zip file using adapter modules in Communication Channel.
    The file name is hard coded like this.
    contentType-----Transform.ContentType--
    text/plain;charset="UTF-8";name="Billing.txt"
    Is there any possible to do dynamic file name instead of hardcoded like add time stamp.
    Kind Regards,
    Praveen.

    hi,
    you can always do it using an adapter module like shown in my blog:
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    Regards,
    Michal Krawczyk

  • File name in the target file field

    Hi,
    In this below particular blog we are creating the UDF and assigning the output of UDF to a filed in the target file structure.
    /people/sravya.talanki2/blog/2006/12/20/accessing-system-parameters-in-mapping-runtime
    And even we are entering the target file name manually in the UDF. Whatever the filename that we enter in the UDF that will also be displayed as the target file name. To do this even we are selecting the adapter specific attributes.
    Please correct if my understanding is wrong.
    thanks
    kumar

    Hi Kumar,
    <i>Whatever the filename that we enter in the UDF that will also be displayed as the target file name</i>
    Yes
    <i>To do this even we are selecting the adapter specific attributes.</i>
    "We could be" instead of "we are". If u want to access sender metadata, u should use ASMA.
    Check this out
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
    <i>[Reward if useful :)]</i>
    Regards,
    Prateek

  • How to print .sql file name in the same file using sqlplus

    Oracle 10g on Linux platform.
    I am trying to print the name of .sql script file in that file but could not. Following is the file:
    test.sql
    select '&0' from dual;But instead of printing, it is asking for input:
    SQL> @test.sql
    Enter value for 0: Can any body give me a hint as how can i print the file name.

    Use this
    SELECT FNAME_KRBMSFT AS name FROM X$KRBMSFT
    and see
    SQL> create or replace procedure get_dir_list
    2 (p_directory varchar2)
    3 is
    4 l_null varchar2(100);
    5 l_directory varchar2(100);
    6 BEGIN
    7 l_directory := p_directory;
    8 sys.dbms_backup_restore.searchfiles(l_directory, l_null);
    9 FOR x IN (select fname_krbmsft fname from x$krbmsft) LOOP
    10 dbms_output.put_line(x.fname);
    11 END LOOP;
    12
    13 END;
    14 /
    Edited by: HuaMin Chen on Jun 26, 2012 12:26 PM

  • Where (drive, folder, file name) are the database files that store catalog information such as tags and changed dates in Elements 13?

    I want to backup just the datebae file that holds catalog data.  I can't find it in Elements 13 but could in Elements 10.  Is it hidden in a secret file with a secret name?  Why?

    The catalog is a folder containing the main database (catalog.pse13db), the thumbnails cache (thumb.5.cache) and other files and subfolders. To save a catalog, you save the whole catalog with its subfolders. Note that if you don't save the thumbnail cache (which is the biggest item in the catalog), it will be rebuilt automatically.
    In all versions of Elements, Win or Mac, you find its location from the menu: Help/System information.
    By default it's in a hidden folder in Windows.
    Why? I don't know, but you can tell the Windows Explorer to show hidden files. That's up to you; I always do that.
    Should the catalog always be in the default location? Not at all. You can move it elsewhere. For instance you can hold your image library and your catalog to an external drive. Then, the catalog manager shows it as beeing in 'custom location'.
    The following is not in your question, but I assume you are asking that for backup purposes. If you have an external backup system, you should include the catalog folder. That is not enough if you want to restore to another computer or drive because the original is dead. The catalog stores the picture files location with reference to the path, but also to the internal serial number of the drive. Changing drive means that all files will be shown 'missing' or 'disconnected', and you'll have to run a 'reconnect' procedure. You don't need the reconnection if you use the internal backup/restore process in the Organizer.
    Use Backup, Restore to move catalog | Organizer | Elements 6 or later
    If you are not in the situation of a crash, but you simply want to update (includinge updating PSE version), the integrated system is ideal.
    Other backup systems have their advantages. I do use Windows SyncToy after each significant editing session, and the Organizer backup at regular intervals.

Maybe you are looking for

  • How to Print GIF image in XML RTF Report

    Hi All, I have one requirement like to print the GIF image in Oracle Report. The report is an XML Report. The image file stored in database, the table is fnd_attached_docs_form_vl. select distinct file_name from fnd_attached_docs_form_vl Front end Na

  • Stop firefox from prompting to open jnlp file

    Love JWS!! Works great for me on both IE and FF browsers using a little bit of JavaScript. The only drawback I see is that Firefox will prompt the user to open file.jnlp with the default download/open dialog. Anyone know how to prevent this? Do you i

  • Double service entry sheet

    Dear friends, I have a probem in the shipment costs. Service entry sheet is created twice for the same shipment cost document. First time the service entry sheet is created for one PO and invoice and payment to vendor is completed for the same. Secon

  • Best way to update osx security updates with ARD?

    What's the best way to manage OSX security updates to have them install auto from a local location instead of downloading from Apple. This also applies to adobe updates. Is ARD designed for this?

  • Handling Credit Sales at a Store

    Dear all, I am struggling with some very basic POS level store operations fundamentals and would appreciate any insight on them. FACTS: u2022SAP Retail is implemented at the back end u2022There is no SRS (Retail Store) in the store u2022The Customer