How to get the file name in one of the Xml node field?

Hi Experts,
i have one requirement with file name in xml file.
i need to get <b>the file name of file</b> in one of the node in xml content of that file.
how can i achieve that req?
treat this as Very Urgent.

Hi Bheem,
Explain your scenario in detail..
>>i need to get the file name of file in one of the node in xml content of that file.
1. Create an node <b>Filename</b> in the target datatype.
2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
3. Use the following UDF and map it to the Filename field in the target message type.
public String getFileName(Container container)
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
San

Similar Messages

  • How to store data file name in one of the columns of staging table

    My requirement is to load data from .dat file to oracle staging table. I have done following steps:
    1. Created control file and stored in bin directory.
    2. Created data file and stored in bin directory.
    3. Registered a concurrent program with execution method as SQL*Loader.
    4. Added the concurrent program to request group.
    I am passing the file name as a parameter to concurrent program. When I am running the program, the data is getting loaded to the staging table correctly.
    Now I want to store the filename (which is passed as a parameter) in one of the columns of staging table. I tried different ways found through Google, but none of them worked. I am using the below control file:
    OPTIONS (SKIP = 1)
    LOAD DATA
    INFILE '&1'
    APPEND INTO TABLE XXCISCO_SO_INTF_STG_TB
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    COUNTRY_NAME
    ,COUNTRY_CODE
    ,ORDER_CATEGORY
    ,ORDER_NUMBER
    ,RECORD_ID "XXCISCO_SO_INTF_STG_TB_S.NEXTVAL"
    ,FILE_NAME CONSTANT "&1"
    ,REQUEST_ID "fnd_global.conc_request_id"
    ,LAST_UPDATED_BY "FND_GLOBAL.USER_ID"
    ,LAST_UPDATE_DATE SYSDATE
    ,CREATED_BY "FND_GLOBAL.USER_ID"
    ,CREATION_DATE SYSDATE
    ,INTERFACE_STATUS CONSTANT "N"
    ,RECORD_STATUS CONSTANT "N"
    I want to store file name in the column FILE_NAME stated above. I tried with and without constant using "$1", "&1", ":$1", ":&1", &1, $1..... but none of them worked. Please suggest me the solution for this.
    Thanks,
    Abhay

    Pl post details of OS, database and EBS versions. There is no easy way to achieve this.
    Pl see previous threads on this topic
    SQL*Loader to insert data file name during load
    Sql Loader with new column
    HTH
    Srini

  • 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

  • How to get Sequence File Name ?

    Hello everybody !!
    I'm using TestStand 3.1 and i would like to get sequence file name. I've tried to use NameOf() function, but without success.
    Of course, I've searched previous posts about the same question, but nothing works.
    Is there someone able to tell me how to get sequence file name ?
    Thanks a lot.
    MrOrange

    MrOrange,
    first of all, the solution i will present only works for saved sequence files.
    you got all information you need within TestStand itself, just browse for RunState.SequenceFile.Path. here you can find the filename. but the path of the file is also included in the string, so this is a part you have to get rid off.
    you can use statements to extract the filename from the path. just search the string for the last occurence of "\\" (searchinreverse!) and then you can retrieve the right() part of the path. beware that right() needs the number of characters you want to extract, not the startindex!!
    hope this helps,
    Norbert B.
    NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to get full file name on MAC?

    Hi,
    In my plug-in, I have to get the full file name of the file opened in illustrator on MAC OS X. The following code works fine:
    SPPlatformFileSpecification theFileSpec;
    AIErr error = sAIDocument->GetDocumentFileSpecification(&theFileSpec);
    theFileSpec.name gives the file name of the open AI File.
    But, if the filename is greater than 31 characters (including extension), the returned filename is turncated to 31 characters in the format: {FIRST_22_Characters}#{5_DIGIT_NO}.ai. for example: if the file name is: 3896420_Sports_Football_Training_Top_II.ai
    The returned fileName is: 3896420_Sports_Footbal#3240A.ai
    Is there any other Illustrator API or a native MAC API to get the actual file name?
    Please Help
    Thanks,
    Hitesh

    Hi,
    hopefully I am steering you in the right direction, but if I recall, SPPlatformFileSpecification is an FSSpec, have you tried FSpMakeFSRef and seeing if the problem persists once converted to an FSRef?
    http://developer.apple.com/technotes/tn2002/tn2078.html
    Cheers,
    Garvan.

  • How can I view information about an image, such as the file name and exposure,  on the Ipad?

    how can I view information about an image, such as the file name and exposure,  on the Ipad?

    You can't with the built-in Photos app, but there are apps such as iPhoto which allow you to see the exposure details (aperture, shutter speed, focal length, ISO). PhotoMeta also shows you that info

  • Saving a file pdf file and the file name appears on a PC with + signs in the name of the file - How do I eliminate the file name coming up with the + signs?

    A pdf file is created from a word document and then posted to our dealer portal.  It allows the dealer to open the pdf file and then either print and/or save off to a hard drive.  The issue is the file name has + signs in between all the words.  Is there a way to eliminate the file names coming up with the plus signs?  It is not being saved that way.  Any help you can provide would be appreciated.

    Use a proper file name for the WORD document. MS decided several years ago to allow spaces, but that is not standard and is likely what the issue is. A good alternative is to replace spaces in file names with underbars, "_".

  • My own package of the same name as one in the repo...

    In a nutshell, how does pacman handle a user-created package of the same name as one in the repo?  I ask because I'd like to customize the build options on a package that's in the official repo.  Is it best to simply change the name of my package or is pacman smart enough to know that package xyz installed locally is not to be upgraded to package xyz from the repo?

    thayer wrote:What I typically do is bump the release number to 99, such as foopackage-1.0-99.  By doing it this way pacman won't upgrade the package unless a new upstream release is made, such as 1.1 in the previous example.
    Similarly, if you build a package locally to fix some packaging bug, and you expect that you'll be interested in any updates at all, I bump the release number by 0.1 so it's bigger than the version I'm fixing but smaller than whatever the Arch maintainer will supply next.

  • Is there any way to show the file name super imposed on the slides?

    Is there any way to show the file name super imposed on the slides in Premiere Elements 9?
    I am setting up pictures as slide show along with some movie clips but wanted the desctiptive file names appearing with each picture.
    Thanks!

    Yes. In Timeline mode, you add it to an upper video track as a title.
    I show you the basics of titles in the Basic Training tutorials at Premiere Elements support site Muvipix.com.
    http://forums.adobe.com/thread/537685?tstart=0

  • How can I get the Organizer in Elements 12to display the file name and date of the thumbnail images?

    The View menu option to display the File Name is grayed out and thus I cannot display the file name.

    Hi,
    You need to go to View menu and check Details as well.
    You may even have to make the thumbnails larger by using the zoom slider at the bottom
    Good luck
    Brian

  • How to get IDL file name from CORBA IOR string

    hi, is it possible to get IDL file name from the IOR string? how?
    regards

    Hi,
    I don't think so.
    And if it was possible, which interface should be returned if
    the referenced object implements more than one?
    Regards.
    Karl

  • How to get music file name in itunes

    OK I have some music files on pc side. wav files mostly. Some of them have proper id tags, some don't. When I try to import tagged ones to itunes I get only partial info preserved. So either I have to edit tags manually, which is tedious work, either I have to burn to cd and then import. The best is last way, but there is tremendous cd waste involved. Is there easier way to import files? Is there something like virtual cd for mac? I tried using disc utility, but nothing happens. Itunes doesn't recognize files...
    There are verbatim 32x cd-rw too, has anyone any experience with them? Speed is good and would solve waste problem too.
    For burning I use BURN version 1.71u

    Hi Bheem,
    Explain your scenario in detail..
    >>i need to get the file name of file in one of the node in xml content of that file.
    1. Create an node <b>Filename</b> in the target datatype.
    2. Check the Option Filename in the Adapter Specific Message Attributes in the sender file CC.
    3. Use the following UDF and map it to the Filename field in the target message type.
    public String getFileName(Container container)
    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
    San

  • File Upload, how to get full file name

    Hi Experts,
    I have to get the complete file path when I use fileupload UI Element. but I am not able to achive this.
    I used a File Upload UI, with filename property mapped to string variable filename and Data mapped to a binary variable filedata.
    I tried to get the file name in below ways
    1. wdContext.nodefile().currentfileelement.getfilename();
    and
    2. through modifiablebinary type also.
    but in both cases I am getting only the file name, but not the complete path.
    Is there any way that I can get the file path.
    If I uplod a file in D drive (example.txt),
    I am getting the file name as example.txt but I want to get it as D://example.txt
    Please help me,
    Regards,
    Srinivas

    Hi
    What Stream are you using for read a file ?
    InputStream inputStream = resource.read(false);
    File  filePath = new File(inputStream.toString());
    wdComponentAPI.getMessageManager().reportWarning(filePath .getAbsolutePath());
    Best Regards
    Satish Kumar

  • How to get a file name with file description

    Hi guys!
    I'm receiving the error message : Too many file open. So, i want the file name opened by process in /proc/PID/fd.
    Now, how can i do this ?
    Thanks!

    Hi guys!
    I'm receiving the error message : Too many file open.
    So, i want the file name opened by process in
    /proc/PID/fd.
    Now, how can i do this ?The easiest way is to use pfiles(1) on the process. Alternatively, on Solaris 10, look in /proc/PID/path...
    - Bryan
    Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc

  • How do I batch the file name (without extention) into the keyword in the metadata

    I am trying to use a keyword into sets of images, each of the images on the set contains in the file name what I want for keyword and an extension.
    Example,
    File names:   
    WD111_main
    WD111_01
    WD111_02
    I want all of them to have on the metadata just WD111.
    help?!?!

    You will need to do this with a text field and a Javascript that executes on open.

Maybe you are looking for