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

Similar Messages

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

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

  • Windows Easy Transfer (WET) Issues with External Hard Drive - "Can't read from the source file or disk"

    I work for Office Depot, in the tech department. Basically, one of our associates was supposed to do a data backup, and re-install Windows 7, then transfer the files back. He used Windows Easy Transfer and compacted everything into a 163 GB file. 
    Now comes the hard part. When we try to put it back on his computer ((drag-and-drop to the desktop) which has been wiped back to factory settings using the recovery partition), it stops at 79.5 GB remaining (you know how it doesn't give you a % of completion,
    it just shows how many GB are remaining) and then says "Can't read from the source file or disk" and gives you an option to try again, or cancel. It gets hung up on the same point each time.
    Normally, this wouldn't be a huge issue, but the contents on the drive are his wife's architect blueprints and interior design stuff, along with wedding photos, etc, which are the only copies they have. On top of those, they have court documents and other
    important files that we are unable to access now.
    I wasn't involved with this transfer, so I'm trying to clean up the mess as best I can. I remembered that the customer's wife was Russian, and had some files typed with a Russian keyboard, so on and so forth. I wonder if that's the issue? If not, I really
    have no idea how to manually extract things from a ".mig" file, or how to diagnose what area is potentially corrupted.
    In light of this situation, we tried using "Recuva" to recover the files post-wipe, but everything was corrupted or unable to be opened, and it also extracted and recovered all of the "useless" photos, such as the skype logos, up and
    down arrows for browsers, etc (it was 160,000+ photos).
    Trying to avoid a potential lawsuit, unhappy customer, and costing the company lots of money to see if professionals can get into this external hard drive.
    Other relevant information:
    We used a Toshiba 500 GB (465 GB) external hard drive.
    Customer's computer is an HP Pavilion P6000 Series (Model No. p6520y) running Windows 7 Home Premium 64-bit Service Pack 1.
    Any other information that is needed can be provided, thanks in advance, and hopefully we can find a solution to this issue quickly!
    -John

    I think there's a lack of understanding somewhere.
    "If you even can't start the process, please unplug it from your new PC. Then head back to your new computer and plug
    the external drive back in to your new computer. "
    Unplug from new, head back to new, plug it back in? That doesn't make much sense! Haha.
    I knew what you meant though, somewhat. When I search through the drives after clicking yes (Has windows easy transfer
    already saved your files blah blah blah) I click on the transfer file and it says "Windows Easy Transfer could not open the file".
    Rather than drag-and-drop the file to the desktop, I now tried to double-click on the file itself while it was plugged
    into the computer. It opened, and it started transferring until it was about 70% completed, and then an error popped up saying "WET can't open the easy transfer file, make sure your USB device is plugged in or check your internet connection". 
    I checked, and the USB hard drive's light wasn't on. Now, I unplug it and plug it back in, and the light comes back on,
    so I click Retry, and it resets the bar back to nothing and says "Transfer time: 1 minute".
    Rather than continue trying, I clicked "Cancel" instead of Retry, and it says "Your transfer did not complete successfully."
    It says to click "view report" for more information, but there's no "view report button".
    At the moment, I am scanning the External Drive for bad sectors using the check disk tool in properties. It's frozen
    at "0 USN bytes processed".

  • 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

  • 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

  • Cannot read from the source file or disk

    I had to get a new hard drive for my Satellite A665 old one kept freezing up; had a recovey disk from Geek Squad when I got it but they did not work.  So I ordered a Recovery Disc set from Toshiba. 
    A few minutes after I insert the 3nd disc, I get the following message:
    Cannot read from the source file or disk
    PREINST14.SWM
    Type: SWM File
    Size:  670 MB
    Modified: 10/29/2010 11:24pm
    Clicking [Try Again] or [Skip] clicked try again twice. Gave same message so clicked skip. Got another message.
    Cannot read from the source file or disk
    PREINST18.SWM
    Type: SWM File
    Size:  372 MB
    Modified: 10/29/2010 11:24pm
    Clicking [Try Again] or [Skip] clicked try again twice. Gave same message so clicked skip after checking do it for next one. Got error message.
    An error has occurred.
    Error:  10-FC06-0002
    Recovery Error.
    Please press [OK] to turn off the computer.
    I tried erasing the disk, then running the Recovery Wizard again, but wind up in the same place.

    It's hard to know exactly what the problem is. You might want to contact customer support because it could just be a faulty disc.
    - Peter

  • How to output a file showing visible time code from the source tape

    Can someone tell me which settings to use to output a file that has a visible time code readout from the source tape.  I shot an interview and now I want to make a video file for a transcriber so they can include the time code reference numbers from the source video on the written transcript.  Also, does the file need to be output from the timeline, or can this be done directly from a clip in the project.
    Thanks.
    Specs:
    PC with Windows Vista
    Premier Pro CS4

    Hi,
    You could try maybe selecting all your clips on the timeline and drag the "timecode" video effect onto it ( type the word timecode at the top of effect panel on left to find it fast )...
    Then you can change it from smpte if you want -----to source or media ...something like that...or to 'generate'...use what you like best..
    you can also change the codes position in the clip...
    Rod

  • Encore CS4 error "could not read from the source file"

    - Source File: C:\Users\Anil\AppData\Local\Temp\2013 11 08 c Big Budha_9.prproj
    - Output File: F:\Adobe Encoded Blu-ray\For Disk #013\Disk#013-B\2013 11 08 c Big Budha.m2v
    - Preset Used: Full HD 1080i [MPEG] 30 MBPS
    - Video:
    - Audio:
    - Bitrate:
    - Encoding Time: 01:49:53
    25-Jan-14 2:50:32 PM : Encoding Failed
    Could not read from the source. Please check if it has moved or been deleted.
    i have tried creaeted a NEW Premiere Pro project and still get the same error again ... can someone help me to figure out what is wrong ...

    Hi Neil
    I have been using file names with spaces and it has been working fine. As stated in reply to Jones, uninstall and reinstall of Premiere Pro CS4 has helped to get rid of this error.
    also i did not use Dynamic link, but was trying to create MPEG file using Media Encoder and then import it in Encore.
    your suggestion for H264 seems good and will try it.
    x264 Pro is for CS5 and above versions, so it seems i can not use it and have to manage with Adobe Media Encoder's default. Hope i will not have any major technical issues.
    please suggest me for below:-
    1) i have 4 hours of Full HD footage and made 1080i MPEG2 files of 30mbps to fit in 2 seperate Bluray Disks.
    2) now i plan to put all in one Single Bluray Disk by reducing MPEG2 file average data rate to 15mbps. will that work or is there any limitation of time in Bluray Disk.
    3) Will it be ok to create H264 files at 30mbps [as you mentioned H264 reduces file size to half of MPEG] and still be able to fit 4 hours footage in one BR Disk ?
    4) even though i specify Min 10 Target 25 Max 30 data rate for MPEG files creation, it creats file at data rate of 30 mbps, can you explain why it is happening as i thought my target rate should be 25 mbps and not the maximum rate specified.
    Thanks ...
    PS...
    my source file is .mov 1920 x 1080i 29.97 fps from Canon 6D. first i tried to create progressive file in Encoder but while imported in Encore realised at 29.97 fps, it allows only interlaced file and had to transcode back to interlaced. so i stick to interlaced file.
    Canon 6D also allows me to shoot in 24fps [motion movie] which Encore can handle as progressive file for authoring. What are the pro and cons of shooting in 24fps, if you can suggest.
    Message was edited by: AnilHVarma

  • Keeping the time code from the source material

    Hi - I have a camera that generates TC.  I have it set to free run and the clock so that it records the actual time of the event as it takes place (doing this because it's meetings and such).
    Problem is, when I import this footage (camera is AG-HMC40P by Panasonic) I'm not sure how I can display the footage time code in Premiere.  Premiere just shows the numbers at all 00's as the source code.
    Can someone explain to me what I need to do in Premiere to display the footage with its time code?
    Thanks - Mike W.

    Actually, I may have spoken too soon. Do you have any experience with this filter? I downloaded it and installed it. It works to provide a localized time code, but I still can't figure out how to see the time code from the clip/sequence from the capture file. For example, I have a tape that I play back on my TRV310 and it says September 7, 2009 and gives me the time at the bottom of the on-cam display. However the filter you suggest never seems to pick that up, even if I tell it to use "Source Time Code" as a value for the "Timecodes" property. Any idea how to get that time/date code embedded in the file?
    Thanks.

  • After updating I ended up with 4 icons on my desktop - I cannot delete any of them. The error message reads; "Cannot read from the source file or disk".

    I updated from the original version to 6.0.1 and when I re-started FF there were 4 icons on my desktop. I managed to delete one of them, but I cannot delete the other two - to leave me with just one.
    I get the error message of "Cannot delete file: Cannot read from the source fie or disk".

    Here's the meaning of the error that you received.
    "An error has occurred. ERROR :10-FC06-0002" -- may be caused by damaged recovery media or faulty hard drive"
    Possible that the problem is on the recovery also.
    Hope this helps.

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How to SQL*loader to skip some columns from the source file?

    I am using oracle9i sqlldr to load some .csv files into db.
    If I want to skip the first two columns in the source file, can I do that?
    If yes, how should I specify it in the ctl file?
    Thanks
    Wendy

    Hello Dave,
    Here is a sample of what you'll need to have in your control fileLOAD DATA
    APPEND
    INTO TABLE <target_table>
    FIELDS TERMINATED BY ','
    ( column_1  FILLER
    , column_2
    , column_3
    , column_4  FILLER
    )Hope this helps,
    Luke

  • How to hide the source code from the .class file

    Hi,
    By some jad tool we can recompile the .class files and get the java file corresponding to it. How to protect it?
    Anyone please help me..
    Thanks & Regards,
    N.Ravasankar

    An obfuscator can for example rename classes, variables to meaningless names, like one-letter names. And it can make some bytecode that is hard to decompile or just makes the code less readable when decompiled. Some obfuscators might even be able to do something to the code that makes decompilers not work or incorrect decompile code.

  • Error: cannot read from the source file ....... the file cannot be accessed by the system. (Exception from HRESULT: 0x80070780)

    I have sync toy set up to sync my Skydrive with some folders on my local drive.
    I'm running windows 8.1, 64 bit
    I can copy files from my local drive to the Skydrve folder with no problems,
    but if I add files to my Skydrive, and then when Sync Toy runs it will not copy the files from Skydrive to the local drive and throws up the error in the title.
    I have tried changing permissions on both folder pairs with no luck.
    Any ideas?

    Try making the OneDrive files available offline.
    See
    http://windows.microsoft.com/en-gb/windows-8/onedrive-online-available-offline?woldogcb=0.

Maybe you are looking for