Getting the Source File name Info into Target Message

Hi all,
I want to get the Source file name Info into Target message of one of the fields.
i followed Michal BLOG /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Requirement :
1) I am able to get the Target file name as same as the source file name when i check the ASMA in Sender & Receiver Adapter , with out any UDF...............this thing is OK
2) I took One field extra in the target structure Like "FileName" & I mapped it Like
                          Constant(" " )--UDF-----FileName
I Checked the Option ASMA in Both Sender & Receiver Adapters
Here iam getting the Target File name as same as Source file name + Source File name Info in the Target Field " FileName".
I Dont want to get the Target File name as same as Source file name. I want like Out.xml as Target file name.
If i de-select the Option ASMA in Adapters means it is showing " null" value in the target field "FileName".
Please Provide the Solution for this
Regards
Bopanna

Hi All,
Iam able to do this by checking the Option ASMA in only sender adapter itself
Regards
Bopanna

Similar Messages

  • How do I map the source file name to a target table?

    I am mapping a source fixed length flat file to oracle target tables. One of the tables is a parent transaction table that stores the date, record number, status, etc. and the file name of the source flat file. The file name will change daily because the date is part of the naming convention. Is there an easy way to determine the source file name and map it?
    One option a co-worker is working on is writing a pre-mapping stored procedure. It would insert the file name into a table prior to the mapping. But I was hoping for a cleaner solution.
    Thanks!

    Hi
    Use extarnel table to load the data from the file into the table.
    Create a procedure which changes the external table definition as the filename chnages.
    Use this proceudre in the mapping as a premapping process.
    Ott Karesz
    http://www.trendo-kft.hu

  • How to get the source file name and transform into database

    Hi,
    We need to load data from source file abc.csv into oracle table. during loading, we need to keep the file name abc.csv and write into the database table as one field. Is there anyone who did the similar task? and how to make it? Pls help!

    Hi,
    If you can write the filename to a text file, you may do the following:
    (1) create a text-file containing the name of your source-file.
    (2) create an external table using that text-file as input.
    Now, you can SELECT the filename from the external table.
    Of course, you need a way to : create the flat file, handle the flat file, etc.
    Grtz.

  • 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.

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • Dynamic File Name depending on the Source File name

    Hi Experts,
    I have a problem like Dynamic File name depending on the Source File Name. I will explain with example as follwos
    Source File name                 Targer Folder/Filename
    NK01.VR59.L2007030         VR59/Rec.l200
    NK01.VR71.L2017030         VR71/Rec.l201
    NK01.VR77.L2027030         VR77/Rec.l202
    See above the exaple, Depending on the Source file name, I am deciding where i need to place my file and what name i need to name it.
    So please suggest me the solution and How can i do this with a single communication channel ? Do i need to create multiple CC for each folder??
    Points will be rewarded for Valuable anwer.
    Thanks in Advance,
    Best Regads,
    Vijay

    Hi VIjay,
    Thanks for quick reply. But i am getting error in End to End Scenarios only. If i remove the Return " "  statement from the UDF, while activating it is showing the error saying like missing return statement. I also mapped to the top most node to this UDF.
    I am getting the following error in End to End error Scenarios:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_Target_File_determined_</SAP:P1>
      <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
      <SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>During the application mapping com/sap/xi/tf/_MM_Target_File_determined_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>

  • Accessing comapny code from the source file name

    Hi,
    Iam doing FILE –FILE to scenario.
    My source file name is XXXX237061606.txt. (XXXX is company code)
    My requirement is …
    Based on company code from the source file name; I need to send the file to the corresponding receiver.
    How to retrieve the company code from the source file name?
    Thanks,
    Hem.

    hem chand wrote:>
    > Hi Varun,
    >
    > Could u please provide me detailed procedure to get the company code.
    >
    > Reg,
    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);
    This will get you the File name...TRuncate it to extract company code...
    Then have a mapping program with the receivers message type which is persent under SAP BASIS component....
    There map to the required receiver by getting the file name above..
    Create an int mapping for the above mapping and use that in ur enhanced recv determination

  • How to get the SQL file name in SQL*plus

    hi all,
         I have created two sql file at C drive as "c:\Createtable.sql" and "c:\Deletetable.sql"
    afterwards i open
    C:\>sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 30 11:37:10 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: scott/tiger
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @C:\Createtable.sql'
    Table created.
    SQL> @'C:\Deletetable.sql'
    Table dropped.
    SQL>My problem is to get the name of the file as "c:\createtable.sql" and "C:\Deletetable.sql" in sql*plus enviornment.
    Thanks & Regards
    Singh

    Dear Damorgan,
         >>your version number to three decimal places
         My Oracle DB Version i have already stated in my previous post is 10.2.0.1.0
    Actually my problem is to get the sql files name we run in sqlplus enviornment with @ symbol. like
    i have created one sql file in c drive as
    "C:\Createtable.sql"
    afterwords i have connected to sqlplus as
    sql> conn scott/tiger
    sql>@c:\createtable.sql
    Now i want some query to get the name of the file which is run.
    In actual my problem is as
    i have suppose 10 or more SQL files in some folder ( sql1.sql, sql2.sql, sql3.sql ....).
    i created one file to call all the 10 sql files (main.sql)
    i have also one track_table which will keep track that which sql file is runned.
    I want some automated script which will insert the record in that track_table....... for that i need the name of sql file which is runned.
    Hope this will help you.
    Thanks & Regards
    Singh

  • FM for getting the logical file name

    Hi,
    is there any FM for getting the logical file name.
    Thanks
    Vikranth

    Hi,
    CONSTANTS: c_mask          TYPE char9      VALUE ',.,..'.
          Pick up the file path from the application server
    FORM f1001_browse_appl_file .
      DATA:  lcl_directory  TYPE char128.
      lcl_directory  = p_direct.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = lcl_directory
          filemask         = c_mask
        IMPORTING
          serverfile       = p_f2  " Parameter File
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
       MESSAGE e000(zmm) WITH text-039.
       flg_app = 'X'.
      ENDIF.
    Then use  OPEN DATASET for data reading
    Hope this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • Ecxpert Problem in getting the original file name submitted by FTP

    hai,
    when i use the scheduled FTP Application receive mode to receive files from the remote machine, i am not able to get the original file name, Ecxpert itself maintaining it's own file name,
    Even i query the tracking table also i am not able to find the original filename.
    If anybody know how i can able to get the original file name?
    thanks....

    I don't think there is an easy to capture this information. We ended up writing our own FTP tool so we could gather better data. The other problem we had seemed to be sporadic downloads from sites where setting Passive was required.

  • How to get full source file name in Exporter SDK

    Hi,
    I'm making an Exporter Plug-in using SDK 5.5.
    I want to get the path and extension of the source file (when export file) and path of the sequence (when export sequence).
    Especially the extension of the source file, which is always be replaced by the output extension.
    I can't find it in the SDK guide and sample. Sorry if I'm being a noob.
    Thank you.

    Sequences are generally made up of multiple clips edited together.  It's rare that a user would take a single clip and reexport it.  So there isn't usually a one-to-one relationship between source file and exported file.  Because of that, PPro provides the sequence name as the default file name.
    If you did need to get at the source files, you could do it only under specific circumstances - only when exporting directly from PPro, or when loading a clip directly into AME, but not when exporting a sequence from PPro through AME.  You would need to use the Video Segment Suite to parse the timeline segments, as demonstrated in the player sample code in videoSequenceParser->ParseSequence().  This is quite a complicated process and not something worth pursuing unless absolutely necessary.
    Regards,
    Zac

  • How to get the right file name in an attachment

    I have design a program to get the attach file from an attachment. But when I click the link to save the file, the default name of the file is 'attach' whenever I get different files. Who know what is the problem, please tell me the truth.
    Here are some codes of the program.
    download.jsp
    <%="test.doc"%>
    web.xml
    <servlet-mapping>
    <servlet-name>AttachmentServlet</servlet-name>
    <url-pattern>attachment</url-pattern>
    </servlet-mapping>
    AttachmentServlet.java
    public void doGet
    Message msg = folder.getMessage(msgNum);
    // the message I get is right and the name of the file in
    // the attach in this message is right too.(I have printed)
    Multipart multipart = (Multipart)msg.getContent();
    Part part = multipart.getBodyPart(partNum);
    ContentType ct = new ContentType(sct);
    response.setContentType(ct.getBaseType());
    InputStream is = part.getInputStream();
    int i;
    while ((i = is.read()) != -1) {
    out.write(i);
    out.flush();
    out.close();

    The trick that I used is to append the URL with the name of the file. So if your url is "http://domain.com/attach", use "http://domain.com/attach/filename.doc". IE and Netscape parse the URL to determine what the filename is, so by placing this text at the end, you essentially let the browsers know what the filename is. :)
    I have design a program to get the attach file from an
    attachment. But when I click the link to save the
    file, the default name of the file is 'attach'
    whenever I get different files. Who know what is the
    problem, please tell me the truth.
    Here are some codes of the program.<< snip >>

  • In OSB file protocol, trying to get the archived file name in proxy service

    Hi,
      I have a requirement that i need to process the archived file of file protocol,  with java callout in proxy service.
    I am able to get the file name which is reading with 'tokenize($inbound/ctx:transport/ctx:request/tp:headers/file:fileName,"\\")[last()]' , but this file is getting archived to archive folder. I want to pass the archive file name as input to the Java callout.
    Please let me know if  this can achieve in OSB proxy or any other options.
    Note : I am reading a xlsx file in the file protocol

    If you're using pass by reference option in the file transport, I guess the archive filename can be obtained from $body/ctx:binary-content/@ref. Try it out.

  • How to Get the Source File Path in the Receiver Side

    Hi Experts,
    Here We are Trying to Do How to Get the Sender Information ( File Name & Path ) on the Receiver Side .
    According to the Michal Blog
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Here we Are Able to Get only the File Name.
    But If I Want to get the Total File  Path Also means What Should I Do Here ????
    Please Let Me Know
    Regards
    Khanna

    Khanna,
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey fkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    DynamicConfigurationKey dkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    String fname = conf.get(fkey);
    Sring path = conf.get(dkey);
    String final=fname""path;
    return ""final"";
    Best regards,
    raj.

  • Can the source files be loaded from target server

    Hi,
    I have owb client on windows2000 and target on linux server. The current plan is to create runtime repository connection for the target and execute mapping from windows where the source files are located.
    Is there way to put the source files on target server machine (there is no owb client install)? What's the best business practice regarding how the owb and source files are distributed? Thanks.
    Tarcy

    The problem is not the code or html.
    This: "The Java Runtime Environment cannot be loaded from <\bin\server\jvm.dll>
    indicates that you are attempting to run the server jvm, and it does not exist. This can be because either the java command option "-server" was used, or a configuration file setting.
    As shipped by Sun, the JRE does not include the server jvm; the JDK does. If you want the server jvm in the JRE, copy the \server\ directory and contents from the JDK to the JRE.
    If you installed using defaults,
    copy from: C:\Program Files\Java\jdk1.5.0\jre\bin
    copy to: C:\Program Files\Java\jre1.5.0\bin

Maybe you are looking for

  • Newstand in the Enterprise

    We're testing iPads in my company. We'd like to "push" some documents on our employee's iPad. Is there a solution for pushing a document in Newstand ? The document is purely internal. We don't want to get the doc available in "Newstand Store" for eve

  • New Web Application not creating correctly

    I'm having an odd occurrence happen about 50% of the time right now when creating new web applications during my migration from SP2010 to SP2013. During creating a web application in Central Admin, I can get through the first setup page, then get to

  • Disk Utility and Hard Drive replacement on MacBook.

    I am preparing to upgrade the hard drive on my MacBook and I was reading this document http://manuals.info.apple.com/en/MacBook13inch_HardDriveDIY.pdf and a the end after installing the hard drive and preparing to install Mac OS X the directions stat

  • Some Sales invoice is not cleared

    Hi Gurus While we tried to clear the sales invoice (release to account) in T-code VFX3 we are facing the below error, any one can help me. 2288161 Account 2991000 requires an assignment to a CO object Regards, Pavi

  • How do I create a shortcut to type a text string?

    I often need to enter my email address into various text data entry fields when online. I would like to be able to use some simple combination of keys to have the address typed automatically. How do I construct such a capability?