Need to genereate Target file name same as Source File Name thru Local J2SE

Hi Everyone,
I want to genereate Target file name exactly same as Source File Name. I know how to handle this in Central Adapter Engine(Sender & Receiver Communication Channel).
But I need to do this in Local J2SE adpater engine.
Please help me in this regard.
Thanks & Regards,
Nagaraju

U can use the parameter to save the filename in the message header
file.messageAttributes=<name,directory>
This is similar "Adapter-Specific Message Attributes" concept.
http://help.sap.com/saphelp_nw04/helpdata/en/6f/246b3de666930fe10000000a114084/frameset.htm
Regards,
Prateek

Similar Messages

  • Need Target File  Name  Timestamp  is  same  as Source File name Timestamp

    Hi ,
           I want to genereate Target file name (Target_09062008082030.xml)   but  this time stamp is exactly Sorce FileTime stamp..(Source_09062008082030.xml)..
         so, i want to create a  target file  with the same source file time stamp.. 
    for this.. i sed Message Specific attributes... in both sender and receiver side.. but  that was creating with the complete name.of source file name.. but i want only Timestamp of the source filename... and remaing is the constant.. for this  how can i proceed  ..
    Thanks
    Jain

    See in Sender CC when you set the Adapter Specific Message Attr  for file name it will send the filename in the header of the XI Message.
    To acces this file name inside mapping you need to create a UDF . The type can be any thing as you desire.
    You dont need to pass any variable .if suppose you want the file name (constant) e.g ABC_<timestamp>.xml
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String fileName= conf.get(key);
    //see above your key is FileName which will be sent by the sender CC automatically... You are simply accessing it here using get() method.
    //now ur filename will contain name of the source file... you need to perform a substring operation to get the timestamp and create a new file name as you desire.
    fileName = "New_<timestmp>.xml"; //for e.g
    //set this file name again in header message using put()
    conf.put(key, fileName);
    //when you check on the adapter specific message attr for fileName in the receiver CC ,it will automatically take this new file name value.
    return fileName;
    // if you want to use this new fileName inside your mapping payload (for other fields) you can assign this to any target field,else just assign it to the root tag which will make no difference if this file name is not used anywhere.

  • How to set default PDF print locations to be same as source file

    Is it possible to make the "Save to" location for files created using the Adobe PDF print driver to be the same location as the source file?
    When I checked the prefs dialog box in the Adobe PDF print driver, the only setting I found was to make "PDF Output Folder" either the "My Documents" folder or "Prompt for PDF File Name." I wish there were a third option that said "Same as source file."
    -Danny

    Hi Daniel,<br /><br />Yes, it is possible to do so.<br /><br />Here is the solution:<br /><br />1) Open the PDF.<br />2) File->Print<br />3) Click the Properties button available on Print Dialog Box.<br />4) Select the Adobe PDF Settings Tab and you will find static text "Adobe PDF Output Folder", Go for "Browse" button available against that and select your preferred location.<br />5) Now the drop down menu will display all the options i.e. "My Documents" , "Prompt for PDF File Name" and "<Your selected Option>".<br /><br />I hope this will help resolve your issue.<br /><br />Thanks,<br />Atul Agarwal<br />Adobe Systems

  • Unexpected problem; recently upgraded to version 3. Export of multiple tracks makes each file length same as longest file. Didn't do that in Vers2

    Unexpected problem; We rrecently upgraded to version 3. Export of multiple tracks in a multitrack session makes each file length same as longest file. Didn't do that in Vers 2 of soundtrack

    Hmm... Ok, so I took that project and tried importing it to a new project, still with no luck. Then I tried taking that project and creating a new timeline by dragging one of the stills to the new item icon so that I'd get whatever PrPro decided was the best timeline, and still no luck. Then I tried creating a new project and importing different footage and it worked. Tells me perhaps there's something wrong with the stills? I know not to use overly-large stills in a project, but they're all around 4k resolution or smaller... so surely that's not too big, right? 412 stills total 1.5GB which means an average of about 2.5 MB per file... certainly not too big. I even had a couple video clips in the timeline that were shot with a point-and-shoot still camera, and I tried taking those out just in case it was something in those, and still no success.
    So, ultimately this project got exported without CUDA, and I'm okay... but I also am wondering what caused the problem? I do a fair amount with stills (not a lot, but enough) and I need it to work... do I just go on with life, assuming that it was some weird fluke? Or do I try a complete wipe and reinstall of OS and Programs?
    Oh, one other tidbit... whenever PrPro crashed and closed, the application itself wouldn't close. I have to go into the program manager and force quit it...
    Thoughts? Recommendations?

  • Picking source file A first if source file A and source file B both appear

    I have a situation where two source file with two different data format. Hence I will need to create two different mapping
    and then different parameters at file sender adapter FCC.
    However there is such a condition where source file A will need to process first before picking and process source file B.
    if both appear at folder at the same time else  source B will be process if no source file A.
    Beside using the scheduler at availiablity times at Runtime workbench, if there any other options ?
    Regards
    Fred
    I

    There are two different send file adapters involved due to different data format between source file A and B.
    Beside using BPM is there any other method.
    If doing at adapter module or operating command, how to do it ?

  • Require output file name same as input file without extension

    I am doing a POC where I require that my output file name should be same as input file name. The input is a XML and output is Flatfile. If I use %SourceFileName%,
    i am getting the output with extension. How can I remove the extension? Do I need to write a custom pipeline component?

    I don't think Orchestration or custom Pipeline can help you on this as  you are setting
    %SourceFileName% Macros at your send Handler which comes after Pipeline Processing .
    As you are converting xml file to Flat file I would suggest to use  Macros  as
    %SourceFileName%.txt 
    %SourceFileName% Macro gives the file name along with extention. This won't work!

  • Trying to write an Automator program to find files with same time created and change file names to matching source folder names

    I am failrly green when it comes to automator.
    I am trying to write an Automator program:
    Not sure where to post this
    trying to write an Automator program to find files and alter their names
    I have a source folder with correct named master files in it.
    eg. A0001_1234.mpeg
    time created 14:02:03
    date 07/07/2012
    Another folder where there will be copies of the master files in a different format with different names but created at the same time as a file in the source directory.
    they are created with a seperate device but they are
    A0000001.mp4
    time created 14:02:03
    date 07/07/2012
    I need it to then take the name from the source fies and apply the correct name to the matching file based on the time it was created.
    I can't seem to find actions in automator that reference time crated.
    Is this something I will be able to Do in automator?
    Any help would be great
    Thanks
    R

    Hi,
    It's impossible to do this without any script in Automator.
    Use this AppleScript script :
    set source to choose folder with prompt "Select the source folder"
    set anotherfolder to choose folder with prompt "Choose the another folder"
    tell application "Finder"
        repeat with tfile in (get files of source)
            set cDate to creation date of tfile
            set findFiles to (files of anotherfolder whose creation date is cDate)
            if findFiles is not {} then
                set tName to name of tfile
                set name of item 1 of findFiles to tName
            end if
        end repeat
    end tell

  • Keeping table name same in source and target

    is it possible to keep the table name the same in source and target (they're on sepearte databases). Seems like OWB wants to rename the output table (usually adds 1 on the end). When I tried to rename I got a message saying that table name exists.

    In my mapping.
    First I defined a source and a target. The table on the target doesn't exist yet.
    I open mapping editor...drag the table from my source. Let's call it TABLE_A. Then I add Table operator to the mapping (choose create unbound operator with no attributes option). For the name I choose TABLE_A...however when I click OK it then changes the name to TABLE_A_1.
    So I double click on the table and change the name to TABLE_A and then I get the message that the table already exists.

  • Reading Multiple files of same kind wth File adapter  urgnt plz solve this.

    Hi evry one
    i am new to BPEL and i am in need of file adapter functionality. I have a folder which has files of naming convention
    NSD 123-222 090714T01:23:23 if i suppose i have some hundred files in that folder and i am pointing the file adapter to read files from that folder.The pois all the files have same naming convention with different time stamp and at the same time if all the files have same start name all of the files get picked up at the same time my concern here is if i want to process each file in a while loop as soon as the file get picked up according to the target schema.what can be the condition inthe while loop so that each file gets processed in the loop.
    Is there any process where i can count the number of files in the folder so that i can make use of that count in the while process.The files in the folder are in xml format these multiple files of same target schema.
    please help me in figuring out this issue.
    Regards,
    P

    There is no direct solution in my opinion. What you can do is - write some java code (either embedded activity or through WSIF). In this code you access the directory and count the files, return that count to your bpel process...then use the while loop with sync read

  • Need to re-burn a DVD, but some source files are missing. But Media Cache folder has them all.

    hi all. I have PE3 and the issue is this: I needed a DVD of a project I'd completed a year ago, and I didn't have an old copy of the DVD. So I decided to re-burn it. But on opening the project, it seems some of the source files have been misplaced on my computer, so it says 'media offline'.
    I figured I'd still be able to burn it though, because the Media Cache folder contained all the required files...
    However it starts to burn the DVD and then stops at 49% saying transcoding error.
    Q1: can you still burn a DVD if it says 'media offline' but you know all the source files are present in the Media Cache folder?
    Q2: what's the transcoding error?
    thx

    The Media Cache folder contains files that are only of use to PE during internal editing and will NOT solve your lost video problem.
    Once a Project is completed, that have no outside value.
    The contents are CFA and PEK files, which is the Conformed Audio and Waveform Display, respectively (no video here to my knowledge).
    And I'm not aware of any way to make them useful (outside of PE).
    If you happen to have your Project and source video/audio files intact, and then delete the contents of the Media Cache folder, upon re-opening the Project, PE will regenerate the CFA and PEK files. Again this is only if you have the Project and all the source files (Assets)...

  • Login Name same as BBID Screen Name?

    Greetings all!
    I am trying to figure out if when I created my login name to this community, I made it unavailable to use as my new BBID screen name....could it be because I created this login name prior to receiving my new device??
    I went without a BB for a couple years - my BBID is the same - but my screen name has been changed (several numbers were added to it).
    Sorry for what may be an obvious thing....but I would really like to have that screen name (MiaCam) and don't want to use it here on the Forums if it might offend whoever may already have that as their BBID screen name.
    Thank you very much for humoring me and for any answers and/or solutions in advance!!
    All my best to you,
    "MiaCam"
    Solved!
    Go to Solution.

    My guess is that someone had the screen name already and the BBID creation process just "suggested" a screen name based on the one you wanted. It happens to me all the time when I use "John Clark" as a screen name as there are thousands of John Clarks.
    The BBID screen name and screen names on this forum and not tied together.
    Hope that helps.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • HD & SD from same 1920x1080 source files?

    Sorry if this subject has been covered already,
    but I couldn't figure out ... how to -search- for it : )
    I want to burn (.img) two renditions of a DVD project.
    One in HD ... and one in Standard res ... 720p
    I'm willing to use two separate Project files if I have to.
    I just don't want to have to create separate source file if I can help it.
    Can I get a project file that's been setup for 1920x1080
    to create a SD rendition .img?
    Thanks
    Michael North

    You will have to create two separate projects. One with the preferences set for SD DVD, and another with the preferences set for HD DVD.
    You could just bring the 1920x1080 file into both projects, but you would be better off bring that file into Compressor and creating three separate compressed files. One H.264 for your HD DVD, one 16x9 MPEG-2 for your SD DVD and a AC3 file for your audio (can be used in both projects).
    You are aware that the HD DVD will only play on Macs and a few, now defunct, HD DVD players?

  • What the.. where the.. Can't reconnect media files??? Source file info gone

    This is bizarre. Many files went offline and now it won't tell me what is offline to reconnect.
    picture....
    http://www.redmoonlight.com/Picture3.png
    Out of this 90 minute video, there are two 5 minute sequences that went offline. (I'm color grading every 5 minutes of the whole project using Color.) At some point without realizing it, it went offline and now the auto save doesn't have the file old enough for me to recover. (In the auto save vault, I just changed my # of copies per project from 40 to 100!)
    My files are still on the drive (they were never moved!) but the source names are lost in Final Cut's sequence. A couple of files within the sequence with the offline file are still online. I don't know how 95% of the sequence went offline while the other 5% didn't.
    I'm able to look at my original sequence (before exporting to Color) to compare I'll have to import the file one by one and then sync it up. HUGE TIME CONSUMING!
    How did the media source name from my clips vanish? (I still love FCP.....)

    Thanks for the response.
    I haven't moved any media files. Even if I did, I could easily reconnect the files.
    The problem is the clips in the timeline and browser lost it's metadata on the name of it's source file. The clips has no idea what the original file's name was. In the picture, the list of offline files won't list. It has no idea what to look for.
    I'm reconnecting them one by one. Here are the steps I have to take to get back on track:
    1 - Go to last sequence (before send to Color seq.) and see what the clip looks like
    2 - Find the media on the drive and get it's original name
    3 - Go back to FCP and manually relink it.
    This has happened before but only to a couple of clips which was quick to fix with this same method. I'm wondering how the clips lost it's info?

  • File Adapter found error,source file can't delete

    I have configured scenario File to File, the target file is also created,but can't delete source file
    I checked the path of source file,it's correct.

    Hi,
    Please check
    1) whether you have sufficient permissions on the folder to delete the file.
    2) Also check the Processing mode parameter
    Regards,
    Edited by: Vijaya Lakshmi MV on Sep 5, 2008 5:22 PM

  • How to debug byteCode? Can cap file convert to java source file?

    Are there tools can debug byteCode?
    Are there tools can convert cap file to java source file?
    Are there tools can convert jca file to java soure file?

    I think it's little bit difficult to give you a correct answer. Frankly speaking, cap file debugging is possible if you have sufficient devices and knowledge to do that. Converting cap file to java source code is also possible only if the cap file has descriptor component in it. Names of variables, functions will not be completely restored because cap file doesn't have the names in it. But I am not sure that there is a publicly opened tool to do that. JCVM chapter 6 may show you the way even it's not the direct one.

Maybe you are looking for