Advise on complex scenario. Correlation based on file name

I need to process all *.xml files in a folder, but I should only process a specific .xml file if I find another one .ctl with the same name.
That is. I may have 3 .xml files in a folder (a.xml, b.xml and c.xml), but as I have only one .ctl in the same folder (b.ctl), I should only process b.xml and do something with it.
I've been struggling to find out a possible way to solve this scenario. I think it's only possible using NFS with the option of "additional files", but I have to use FTP, and it doesn't have that option.
Of course I could implement it using a java module adapter in the sender comm channel for *.ctl files which establishes the ftp connection for the other file (.xml), but I'm trying to avoid this.
Thanks!

Hi,
Hopefully this blog will solve your problem..(you have to set your parameter as per your need)
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
Sorry Jorge, I misunderstood your question.. above blog will not help in your case..
Update:-
How about writing a script which will scan the source folder  and check if there is a file with .ctl extension then it will move the same name file with extension .xml into some other folder and then you can configure your adapter with this second directory path to simply pick the files.
Edited by: Sarvesh Singh on Feb 12, 2010 2:07 AM

Similar Messages

  • Receiver File adapter: dynamic folder name based on file name

    Hi there,
    is it possible to set up one communication channel that will use different target folders based on file name?
    E.g.
    File abcdef will be saved to /root/abcdef/abcdef or /root/abcdef/abcdef.txt
    File xyz will go to /root/xyz/xyz or /root/xyz/xyz.txt
    I know I could use Sender/Receiver Service, Interface/namespace or data from message for variable substitution but could not find an easier solution for this scenario than to create multiple communication channels.
    Thanks.

    If you haven't a message mapping, then you can create only an interface mapping with an abap mapping.
    In your abap mapping:
      DATA l_record type mpp_dynamic.
      l_record-namespace = 'http://sap.com/xi/XI/System/File'.
      l_record-name = 'FileName'.
      l_record-value = "your filename"
      dynamic_configuration->add_record( l_record ).
      l_record-namespace = 'http://sap.com/xi/XI/System/File'.
      l_record-name = 'Directory'.
      l_record-value = "your directory ".
      dynamic_configuration->add_record( l_record ).
    Afther that, you must activate Adapter Specific Message Attributes (directory and/or filename) in your target communication channel .
    Regards,
    Carme.

  • I want to create xml file using photoshop script and also i can easily add, modify, delete based on file name

    Hi,
    Please help me for this.
    I need to create XML file for mentioned below. when i run the photoshop script i need deatails for active document name, date, time and status.
    <?xml version="1.0" encoding="UTF-8"?>
    <sample>
    <filename>Cradboard_Boxes_Small.tif</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    <sample>
    <filename>Cardboard_Boxes_Student_Vaue_Pack.jpg</filename>
    <date>today date</date>
    <starttime>now</starttime>
    <status>delivered</status>
    </sample>
    I need read that xml after creating and modify based on file name. i need to modify status after file finished.
    if the file name is already exist i want to modify or delete or add whatever i need.
    Kindly help me simple way

    You may want to look into getting Xtools ps-scripts - Browse Files at SourceForge.net then.  Most of the support is for ActionManager script code where XML code is use as an intermediate step.  There are quite a few Photoshop script in XTools .   Ross Huitt is an expert javascript programmer though is is fed up with Adobe's lack of support for Photoshop scripting particularly the bugs in ScriptUI he is still maintaining tool he  has created for us free of charge. Tools like Image Processor Pro. None of his scripts are save as binary so you can read all of his code there is a wealth of knowledge in there....
    Also there is a scripting forum Photoshop Scripting

  • BPM - merge files based on file name

    Hi All,
    i need to collect two source files based on the file name in BPM and then process it.
    Lets say, i need to collect a header file and a items file. but any point of time, there can be more than one header and more than one item file in the source folder. and i need to collect the header and its corresponding/related item file.
    can anyone help me how to achieve it in BPM? whats the correlation i need to give? is it possible to have a java code executed in BPM?
    Is it possible to take care of this at adapter level itself while picking the file? if so, whats the file name scheme can i give?
    Faster reply is very much appreciated.
    Thanks n regards,
    Rashmi

    hi,
    we can have the header file as header and item file as item. basically based on our convenient we can suggest the file name to the sender. so scheme can be anything that fits our requirement

  • File Channel sequential processing based on file names

    Hi,
    I have a requirement in a sender file channel.
    There are mulitple files with different file names, I want these files to be processed in sequence based on the file name.
    For example.
    The files lets say are A3_1, A2, A1,A3_2.
    I want to process A1 then A2 and then A3.
    Please suggest methods to implement the same, I think an adapter module should help, please throw some light on the same.
    Regards,
    Varun.

    Varun,
    In that case I think you need to consider BPM. The file adapter does not support 'advanced' techniques for the sequence in which it polls files.
    The process would then be:
    - Use the adapter specific identiers for the file adapter to include the file name (/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions)
    - Create a message mapping that puts the file name from the dynamic configuration into a field in the message type
    - Create an integration process that receives the files from this adapter inside a loop step (/people/daniel.graversen/blog/2006/09/07/using-a-bpm-to-collect-messages-for-a-set-interval-of-time)
    - You can now create an interface mapping that sorts the messages according to their filename and then send the messages to the receiver one by one (EOIO?).
    Kind regards,
    Koen

  • Create Directories based on File Names

    I have a Folder with all of my digital photos. All of the photos are named using a %Y%m%d_%H%M%S.jpg format. I am trying to write a script that would go through, and create folders based on the %Y%m%d portion of the name. Then move the photos into the appropriate folders. Then, create folders named according to %Y%m of the newly created folders, and move the %Y%m%d folders into the %Y%m folders. So that my folders would be organized as /%Y%m/%Y%m%d/%Y%m%d_%H%M%S.jpg or 200809/20080905/20080905_083026 - for a photo taken today.
    Any tips for getting started on this? As always, thanks in advance.

    There are a number of ways of doing this, here's one model:
    set topFolder to (choose folder with prompt "Please select the folder containing your images")
    tell application "Finder"
      repeat with eachFile in (get files of folder topFolder)
        -- get the file name and date elements
        set filename to name of eachFile
        set YMD to characters 1 through ((offset of "_" in filename) - 1) of filename as text
        set YM to characters 1 through 6 of YMD as text
        -- make sure the subfolders exist. If they don't then create them
        if not (exists folder YM of topFolder) then
          make new folder at topFolder with properties {name:YM}
        end if
        if not (exists folder YMD of folder YM of folder topFolder) then
          make new folder at folder YM of folder topFolder with properties {name:YMD}
        end if
        -- now move the file
        move eachFile to folder YMD of folder YM of folder topFolder
      end repeat
    end tell

  • Crearte folders based on file name and then do action

    I've written this in the best possible step to step way as possible buti've no idea how to pull it altogether as a script. Hopefully its all there, just let me know if its still not clear, I would love the help if anyone can help sort this out for me.
    Many Thanks
    Matt
    -there is a folder on the desktop called Season_SSxx_PSD where xx = a number
    --This folder contains a quantity of PSD files that need to be processed the same but placed in different locations.
    set theDesktopFolder to "Hal 9000:Users:matthew:Desktop"
    set folderName to (folder of theDesktopFolder whose name starts with "SE")
    --From the folderName
    --set the seasonNumber to the item that follows Season_ and is before _PSD (the Season number should be SS13  but can change)
    --Look at all files of folderName
    --Files can be named like the following.
    -- SE_BH70NW01234BM4BM
    -- SE_BU40NW01234BM4BM
    -- SE_ES20NW01234BM4BM
    -- SE_DV25NW01234BM4BM
    -- SE_DJ30NW01234BM4BM
    -- SE_RA30NW01234BM4BM
    -- SE_FR10NW01234BM4BM
    -- SE_TM15NW01234BM4BM
    -- SE_WA35NW01234BM4BM
    -- Now set the brandIdentifier to Item that follows SE_ of the file names of the folderName
    --Convert brandIdentifier to realName
    --BH = BigandHuge
    --BU = Buttons etc..
    -- Now create the folders
    --set up names to destination folders and create over Network for FTP collection (based on a mounted drive)
    --set this_ftp_folder to "Impulse:"
    --set ftpSeasonNumberFolder to my getFolderPath(seasonNumber, this_ftp_folder)
    --Or Impulse:SS13:
    --set ftpBrandFolder to my getFolderPath(realName, ftpSeasonNumberFolder)
    --Or Impulse:SS13:BigandHuge:
    --set ftpBrandFolder_High_Res to my getFolderPath(realName & seasonNumber & "_HR", ftpBrandFolder)
    --Or Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:
    --set ftpBrandFolder_High_PNG to my getFolderPath("_PNG", ftpBrandFolder_High_Res)
    --Or Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:PNG:
    --then the following
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_HR:JPG:
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_LR:PNG:
    --Impulse:SS13:BigandHuge:BigandHuge_SS13_LR:JPG:
    --Its these last 4 that will be used later.
    --then all files begining with BH in the folderName  do this photoshop action and save in the folders created from --above, then move on to the next file begining with BU create the relevant folders and then do the action as --before and so on.

    Cool that sorted the folder creation out without an issue, many thanks.
    Just struggling to pin the photoshop part in.
    property type_list : {"8BPS"}
    property extension_list : {"psd"}
    script o
              property theseNames : {}
    end script
    -- empty log file
    do shell script "echo  'Files not processed in Photoshop :'  > ~/Desktop/LogPhotoshopError.txt"
    set noError to true
    --at the beginning of the script, ask whether to replace or skip existing files? to apply to all?
    --use the result for the if file exists?
    display dialog "Should I replace or skip exisiting files?" buttons {"Replace", "Skip (Faster)"} default button 2 with icon 1
    set skipFiles to (button returned of the result) is "Skip (Faster)"
    set theDesktopFolder to "Hal 9000:Users:matthew:Desktop"
    tell application "Finder" to set seFolder to (folders of folder theDesktopFolder whose name starts with "SE")
    if seFolder is not {} then
              set seFolder to item 1 of seFolder
              tell application "Finder" to set tName to name of seFolder
              set seasonNumber to my getText(tName) -- get Season Number
              if seasonNumber is not "" then
                        set list1 to {"BH", "BU", "ES", "DV", "DJ", "RA", "FR", "TM", "WA"}
                        set list2 to {"BHS", "Burtons", "DaisyAndEve", "Diva", "DorothyPerkins", "DorothyPerkins", "Freedom", "TopMan", "Wallis"} -- you must complete this list ***
                        set tc to count list2
                        repeat with i from 1 to tc
                                  set brandIdentifier1 to item i of list1
                                  set brandIdentifier to item i of list2 -- the real name
      --first item = all files begining with BH
                                  tell application "Finder" to set theseFiles to (files of seFolder whose name starts with "SE_" & brandIdentifier1) as alias list
                                  if theseFiles is not {} then
      --local Folders
                                            set this_local_folder to "Images:2012-2013"
                                            set localSeasonNumberFolder to my getFolderPath("SS" & seasonNumber, this_local_folder)
                                            set localSeasonFolder to my getFolderPath(brandIdentifier, localSeasonNumberFolder)
                                            set localSeasondFolder_PSD to my getFolderPath("PSD", localSeasonFolder)
      --  *** Now create the folders ***
                                            set this_ftp_folder to "Impulse:"
                                            set ftpSeasonNumberFolder to my getFolderPath("SS" & seasonNumber, this_ftp_folder)
                                            set ftpBrandFolder to my getFolderPath(brandIdentifier, ftpSeasonNumberFolder)
                                            set ftpBrandFolder_High_Res to my getFolderPath(brandIdentifier & "_SS" & seasonNumber & "_HR", ftpBrandFolder)
                                            set ftpBrandFolder_Low_Res to my getFolderPath(brandIdentifier & "_SS" & seasonNumber & "_LR", ftpBrandFolder)
      --Use the folders below within Photoshop
                                            set ftpBrandFolder_High_PNG to my getFolderPath("PNG", ftpBrandFolder_High_Res)
                                            set ftpBrandFolder_Low_PNG to my getFolderPath("PNG", ftpBrandFolder_Low_Res)
                                            set ftpBrandFolder_High_JPG to my getFolderPath("JPG", ftpBrandFolder_High_Res)
                                            set ftpBrandFolder_Low_JPG to my getFolderPath("JPG", ftpBrandFolder_Low_Res)
      --- *** end create the folders ***
                                            repeat with i in theseFiles
                                                      set tFile to i as string
      --taking the folder identify which process it must follow.
                        if brandIdentifier is equal to "BHS" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
                                            --    B H S    Folder Photoshop Process
                                            set thisName to (item j of o's theseNames)
                                            tell application "Finder"
                                                      set t_ext to name extension of file thefile
                                                      if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
                                                      set b to exists file (localSeasondFolder_PSD & thisName & ".psd")
                                            end tell
                                            if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
                                                      tell application "Adobe Photoshop CS5.1"
                                                                -- I remove the command activate, Photoshop stay in background
                                                                set ruler units of settings to pixel units
                                                                try
                                                                          open (alias thefile) showing dialogs never
                                                                          set origName to name of current document
                                                                          set myOptions to {class:JPEG save options, quality:12}
                                                                          set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                          tell current document
                                                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                                    if (quick mask mode) then delete channel ¬
                                                                                              "Quick Mask"
                                                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                                    if (exists layer "Original Layer") then ¬
                                                                                              tell layer "Original Layer" to set name to "Original Image"
                                                                                    save in (localSeasondFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                                    (delete layer "Original Image") flatten
                                                                                    resize image resolution 300 resample method none
                                                                                    --sharpen image
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    save in (ftpBrandFolder_High_JPG & name) as JPEG with options myOptions without copying
                                                                                    --Prepare for Low RES by resetting image history
                                                                                    set current history state to history state 3
                                                                                    flatten
                                                                                    resize image width 1348
                                                                                    resize image resolution 300 resample method none
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    --add save to lowResFolder with same options
                                                                                    save in (ftpBrandFolder_Low_JPG & name) as JPEG with options myOptions without copying
                                                                                    close saving no
                                                                          end tell
                                                                on error
                                                                          set noError to false
                                                                          my myLogs(thefile) -- write path to log file in Desktop
                                                                          try
                                                                                    close saving no --if exists, close current document
                                                                          end try
                                                                end try
                                                      end tell
                                            end if
                                  end repeat
                                  --End BHS
                                            --taking the folder identify which process it must follow. W A L L I S
                        else if brandIdentifier is equal to "Wallis" then
                                  try
                                            tell application "Finder" to set o's theseNames to (name of files of alias theFolder whose file type is in the type_list or name extension is in the extension_list)
                                  on error
                                            set o's theseNames to {} -- no psd files or "8BPS"
                                  end try
                                  set numOfNames to (count o's theseNames)
                                  repeat with j from 1 to numOfNames
                                            set thefile to theFolder & ":" & (item j of o's theseNames)
                                            --    W A L L I S     Folder Photoshop Process
                                            set thisName to (item j of o's theseNames)
                                            tell application "Finder"
                                                      set t_ext to name extension of file thefile
                                                      if t_ext is not "" then set thisName to text 1 thru -((count t_ext) + 2) of thisName
                                                      set b to exists file (localSeasondFolder_PSD & thisName & ".psd")
                                            end tell
                                            if not b or (b and not skipFiles) then -- not exists file or file exists and "replace" (continue the rest of the script).
                                                      tell application "Adobe Photoshop CS5.1"
                                                                -- I remove the command activate, Photoshop stay in background
                                                                set ruler units of settings to pixel units
                                                                try
                                                                          open (alias thefile) showing dialogs never
                                                                          set origName to name of current document
                                                                          set myOptions to {class:JPEG save options, quality:12}
                                                                          set myPSDOptions to {class:Photoshop save options, embed color profile:true, save layers:true}
                                                                          tell current document
                                                                                    --If the quick mask mode has been left on then delete the channel Quick Mask
                                                                                    if (quick mask mode) then delete channel ¬
                                                                                              "Quick Mask"
                                                                                    --If the Layer is incorrectly labeled with Original Layer it needs renaming to original Image
                                                                                    if (exists layer "Original Layer") then ¬
                                                                                              tell layer "Original Layer" to set name to "Original Image"
                                                                                    save in (localSeasondFolder_PSD & origName) as Photoshop format with options myPSDOptions without copying
                                                                                    (delete layer "Original Image") flatten
                                                                                    resize image resolution 300 resample method none
                                                                                    --sharpen image
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    save in (ftpBrandFolder_High_Res & name) as JPEG with options myOptions without copying
                                                                                    --Prepare for Low RES by resetting image history
                                                                                    set current history state to history state 3
                                                                                    flatten
                                                                                    resize image width 1020
                                                                                    resize image resolution 300 resample method none
                                                                                    filter current layer using unsharp mask with options {amount:80, radius:3.2, threshold:0}
                                                                                    --add save to lowResFolder with same options
                                                                                    save in (networkBrandFolder_Low_Res & name) as JPEG with options myOptions without copying
                                                                                        close saving no
                                                                          end tell
                                                                on error
                                                                          set noError to false
                                                                          my myLogs(thefile) -- write path to log file in Desktop
                                                                          try
                                                                                    close saving no --if exists, close current document
                                                                          end try
                                                                end try
                                                      end tell
                                            end if
                                  end repeat
                                  --End W A L L
                          end if
    end if
    if not noError then do shell script "/usr/bin/open  ~/Desktop/LogPhotoshopError.txt'"
    on myLogs(t)
              try
                        do shell script "echo " & (quoted form of t) & ">> ~/Desktop/LogPhotoshopError.txt'"
              end try
    end myLogs
    on getText(t)
              set {oTID, text item delimiters} to {text item delimiters, "_"}
              try
                        set r to ""
                        set r to text -2 thru -1 of (text item -2 of t)
              end try
              set text item delimiters to oTID
              return r
    end getText
    on getFolderPath(tName, folderPath)
              tell application "Finder" to tell folder folderPath
                        if not (exists folder tName) then
                                  return (make new folder at it with properties {name:tName}) as string
                        else
                                  return (folder tName) as string
                        end if
              end tell
    end getFolderPath

  • Sql*loader - loading based on file name

    Hi,
    I am facing an issue with using sql*loader. I want to load two data files into one table. While loading the data I have to set a column value based on which file the loader uses. I will have to pass the data file name thru command line parameter.
    Can anyone give the code to do this?
    Data File names:
    sproc01.dat
    mproc01.dat
    sproc02.dat
    mproc02.dat, etc.
    One control file:
    load_data.ctl
    The control file should look like....
    load data
    append
    into a
    when substr(<file_name>,1,5) = 'mproc'
    data1 position(01:20),
    data2 constant 'M'
    into a
    when substr(<file_name>,1,5) = 'sproc'
    data1 position(01:20),
    data2 constant 'S'
    my doubt is, how to get the <file_name> in the when clause.

    Hi
    Depending on your server write a shell script or batch file to generate the control file.
    rgds

  • File to RFC scenario want to read file name

    Hi All,
    I am having file to RFC scenario in which i am having file name in format  text_yyyymmdd.txt.
    i want to read this file name and by separating the date in file name i have to pass this to one of the RFC date parameter.
    please help me to sort out this.
    Thanks
    Swapnil

    Hi,
    By writing simple UDF in your mapping you can Acheive this
    Try this Once
    DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String MyFileName = dynamicconfiguration.get(key);
    String str[] = MyFileName.split("_");
    return str1[1];
    Map this to the date parameter(RFC) in the mapping .
    Thank & Regards,
    Deepthi
    Edited by: Deepthi Muppasani on Sep 23, 2011 8:17 AM

  • Trying to move a file based on file name

    ok, so i feel like this should be an easy thing to accomplish, but sadly, i can't seem to get it. here's what i got...i have an automator app that will take a file that has been scanned in (pdf) and rename it to the name in a field in one of my filemaker databases. got that working. now, depending on the name of the file, i need this applescript to move that file to the correct folder. for instance...if the file name starts with "P", then i need it to move to 'folder 1'. if it starts with 'L", it needs to move to 'folder 2'....and so on. this is what i've got, but it doesn't work. can someone point me in the right direction?
    on run {input, parameters}
    set FileName to input as text
    tell application "Finder"
    if name of FileName starts with "P" then
    move file FileName to folder "Drive:Folder:Folder1"
    else if name of FileName starts with "8" then
    move file FileName to folder "Drive:Folder:Folder2"
    else if name of FileName starts with "L" then
    move file FileName to folder "Drive:Folder:Folder3"
    else if name of FileName starts with "T" then
    move file FileName to folder "Drive:Folder:Folder4"
    end if
    end tell
    return input
    end run

    try...
    if character 1 of FileName is "P"
    edit:
    Whoops rereading your code I realized I completely misdiagnosed the problem there as "begins with" is proper applescript. What are you passing in as Filename? Try a "display dialog FileName" near the beginning of your script and see what you get. You might also try ...if fileName contains "string"...so you don't need to worry about starts with etc.

  • Deleting Applications based on file names.

    I have a pink palm centro, and I would like to delete the following applications: get email, sprint store, and sprint TV.  When I try to delete these things, it only gives me the file names on the list, and I don't know which file name belongs to what applications.. Can anyone help?
    Post relates to: Palm i705

    Hi..  Welcome to the Palm forums.  The applications you are trying to delete are all part of the rom and not removable.
    Post relates to: Centro (Sprint)

  • Condition check (based on sender file name) at receiver determination step

    Hi,
    My scenario is File to AS2 (Sender side file adapter and receiver side AS2 adapter)
    We have 5 customers, but the source location is same to pick the files, Here we are not using any ESR objects.
    Based on the source file name PI need to determine to whoom this file need to send at receiver determination step
    Craeted objects
    1 Sender CC,
    1 Sender agreement,
    1 Receiver determination
    5 Interface determinations
    5 Receiver agreements
    5 Receiver CCs.
    Could you please provide me your valuable inputs.
    Thanks
    Ramesh

    Hi Venkataramesh,
    I understand your scenario as, picking files (different file naming standard for different target customer) from one source folder. Based on file name, that payload should be sent to corresponding target customer. You have mentioned u201CHere we are not using any ESR objectsu201D. I can see two reasons for this decision
    1. PI is used to route the messages, i.e., no need to transform the payload. OR
    2. Files can binary files like PDF, ZIP, JPG, GIFu2026
    Now I can see two possible solutions
    1.     Simple solution, as proposed by u201CPrabhu Rajesh Janardananu201D, make it into 5 different scenarios  (5 sender channels).
    2.     Bit complex solution, only one sender channel, using extended receiver determination
    Step 1:- In Sender File channel check u201CAdapter u2013 Specific Message Adapteru201D in Advanced tab. File Name should be checked.
    Step 2:- In Receiver Determination, Select Type of Receiver Determination as u201CExtendedu201D. http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ce2a423a8e5430e10000000a42189b/frameset.htm
    Step 3:- Do a Graphical Mapping (use it Operation Mapping in Receiver Determination).
    Step 4:-
    Source and target of graphical mapping will be same (below), because you donu2019t want to access input payload (it can be XML, flat file, JGP, GIF and you donu2019t have its structure).
    <Receivers>
       <Receiver>
          <Party agency="" scheme=""></Party>
          <Service></Service>
       </Receiver>
    </Receivers>
    Step 5:- Write a UDF in Graphical mapping as below. http://help.sap.com/saphelp_nwpi71/helpdata/EN/43/03612cdecc6e76e10000000a422035/frameset.htm Pay attention to method declaration
    public String Determine_Receiver( Container container) throws StreamTransformationException
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);
    String valueOld = conf.get(key);
    //Put your logic here
    if (valueOld.equal(u201Cuser1u201D)) {
    return u201Cuser1u201D;}
    if (valueOld.equal(u201Cuser2u201D)) {
    return u201Cuser2u201D;}
    if (valueOld.equal(u201Cuser3u201D)) {
    return u201Cuser3u201D;}
    Step 6: Now use this UDF to map to u201CReceiveru201D and u201C Serviceu201D.
    This solution need more fine tuning.
    Regards,
    Raghu_Vamsee
    Edited by: Raghu Vamsee on Jan 8, 2011 5:56 PM

  • File name based routing in Receiver determination

    Hi experts,
    I have a requirement to do receiver determination based on file names which are dynamic.To put it clearely, i will be having two files in my source File location and i need to route it based on the file name to two target systems.
    The file name are like Month(changes everymonth)_TargetSys1 and month_targetSys2.
    I dont need any conversions ,so i am not using any IR objects.
    To pick files i kept *.txt in sender channel, and in receiver determination  condition i was trying to use context object called 'Filename'.But it doesnt work asthe file name changes every month.
    Is there any option to take substring from the input file name (say targetSys2 from month_targetSys2.) and put it as a condition for receiver determination.
    There is not DT or structure of the incoming file , as there are no modification to be done with the content.
    Regards,
    Anika

    you need to have the structure in case you want to route it via the xpath.
    Else another option is to code the enhanced receiver determination and using a java mapping with dynamic configuration read the filename and then dynamically create the receiver determination.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm

  • Read file  : File name conatins the Time stamp from payload

    Hi
    I have to scenario where i am creating file name  based on the payload field ( Date/time), theni have to pick up the files based on the File Name :
    Ex:  0212200910:01:02
           0212200910:01:03
           0212200910:01:01
    then the sender adapter should pick up the file 0212200910:01:01 file first and 0212200910:01:02 second
    0212200910:01:03 third ...
    the sender adater pick up files based on file name i.e Timestamp
    how to achieve that

    Hi,
    In the Sender File Adapter, goto Processing Tab and change Processing Sequence to By Name.
    Regards,
    Balaji.M

  • 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

Maybe you are looking for