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

Similar Messages

  • File name based routing

    Hello All,
    Here I have a scenario where based on the source file name PI should route it to corresponding Business system.
    There is no IR part as it is a pass through Interface. Instead of creating multiple channels can I check the condition(file name based condition) at Receiver determination level in ID part?
    Thanks,
    Regards,
    Moorthy

    Hello,
    There is no IR part as it is a pass through Interface. Instead of creating multiple channels can I check the condition(file name based condition) at Receiver determination level in ID part?
    Yes, you can use context objects and then select fileName, I'm not sure if you'll be able to use the extended xpath conditions. Probably that approach is limited to the approximately equals, equals, not equals condition.
    Corrections are welcome
    Hope this helps,
    Mark

  • Content based routing in receiver determination.

    hi,
            how to do content based routing in receiver determination based on value of  of a variable of target structure?
    Miten.

    ths is what you are looking for
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers

  • How can I auto export a PDF File using the "Smallest File Size" preset and set the Exported File Name based on information from an Imported PDF?

    Greetings all,
    I am trying to create a script to automate a PDF export process for my company for inDesign. I’m fairly new to inDesign itself and have no previous experience with javascript, although I did take C++ in high school and have found it helpful in putting this code together.
    We have an inDesign template file and then use the Multi-page PDF importer script to import PDF files. We then have to export two version of each file that we import, then delete the imported file and all of the pages to reset the template. This has to be done for nearly 1000 pdf files each month and is quite tedious. I’m working on automating the process as much as possible. I’ve managed to piece together code that will cleanup the file much quicker and am now trying to automate the PDF exports themselves.
    The files are sent to us as “TRUGLY#####_Client” and need to be exported as “POP#####_Client_Date-Range_North/South.pdf”
    For example, TRUGLY12345_Client needs to be exported as POP12345_Client_Mar01-Mar31_North and POP12345_Client_Mar01-Mar31_South.
    There are two templates built into the template file for the north and south file that are toggled easily via layer visibility switches. I need to get a code that can ideally read the #s from the imported Trugly file as well as the Client and input those into variables to use when exporting. The date range is found in the same place in the top right of each pdf file. I am not sure if this can be read somehow or if it will have to be input manually. I can put North or South into the file name based on which template layer is visible.
    I am not sure how to go about doing this. I did find the following code for exporting to PDF with preset but it requires me to select a preset and then type the full file name. How can I set it to automatically use the “Smallest File Size” preset without prompting me to choose and then automatically input some or preferably all of the file name automatically? (If the entire filename is possible then I don’t even want a prompt to appear so it will be fully automated!)
    PDF Export Code (Originally from here: Simple PDF Export with Preset selection | IndiSnip [InDesign® Snippets]):
    var myPresets = app.pdfExportPresets.everyItem().name;
    myPresets.unshift("- Select Preset -");
    var myWin = new Window('dialog', 'PDF Export Presets');
    myWin.orientation = 'row';
    with(myWin){
        myWin.sText = add('statictext', undefined, 'Select PDF Export preset:');
        myWin.myPDFExport = add('dropdownlist',undefined,undefined,{items:myPresets});
        myWin.myPDFExport.selection = 0;
        myWin.btnOK = add('button', undefined, 'OK');
    myWin.center();
    var myWindow = myWin.show();
    if(myWindow == true && myWin.myPDFExport.selection.index != 0){
        var myPreset = app.pdfExportPresets.item(String(myWin.myPDFExport.selection));
        myFile = File(File.saveDialog("Save file with preset: " + myPreset.name,"PDF files: *.pdf"));
        if(myFile != null){
            app.activeDocument.exportFile(ExportFormat.PDF_TYPE, myFile, false, myPreset);
        }else{
            alert("No File selected");
    }else{
        alert("No PDF Preset selected");
    So far my code does the following:
    1) Runs the Multi-Page PDF Import Script
    2) Runs PDF Export Script Above
    3) Toggles the Template
    4) Runs #2 Again
    5) Deletes the imported PDF and all pages and toggles template again.
    It’s close and much better than the original process which was almost 100% manual but I’d like to remove the Preset prompt from the PDF script and have it automatically select the “Smallest File Size” preset. and then if there’s a way to have it auto-fill in the file name so no user input is required at all other than selecting each file to import. (If there’s a way to setup a batch action for the multi-import script that would be even better!)
    Thanks in advance and if there’s anything else I can provide that would help please let me know! Even a nudge in the right direction will be a big help!

    If you hold down the option key, it will typically show the location. Or you can often hit option-return on the file and it will reveal the file in the Finder, instead of opening it.
    Final option is to open it, and just option-click the filename in the toolbar of Preview and it should show you the location.
    It's probably an attachment to an email you've received. If you have Mail set to cache emails and their attachments it'll be stashed in a subdirectory of ~/Library/Mail. Which is fine.

  • Same file name from sender to receiver file adapter with out using UDF

    Hi All,
    I am working on FILE TO FILE. My requirement is same file name from sender to receiver file adapter. Is it possible to do using only Adapter Specific message properties?  i mean with out using UDF.
    Thanks
    Karthik

    Hi,
    >>>Is it possible to do using only Adapter Specific message properties?
    yes
    just enable Adapter Specific message properties in sender and receiver channel for file name
    and you're done
    Regards,
    Michal Krawczyk

  • Name based routing capab

    Hi there, I"m new to the forums and I'm looking for routers capable of name based routing. Does Cisco provide any routers that have that capability? Essentially what I'm looking for is a router with a built-in functionality similar to virtual hosting by Apache.
    Any suggestions are appreciated

    Bennet,
    Nothing in the Small Business Product Line , I'm sure they have something under the Enterprise group line.
    You can post under the Enterprise support forum or call a Cisco representative @ 1-800-553-6387
    Thanks,
    Jasbryan

  • How to put // infront of file name in SAP SFTP receiver adapater

    Hello,
    How can we put double forward slashes(//) in front of the file name in receiver SAP SFTP adapter? The receiving SFTP server is based on mainframe with VMS  and for some reason the receiver system wants to have // in front of the file name.
    I tried with all options of put // in the directory or part of the file name parameters in the channel,but I get following error.
    Transmitting the message to endpoint <local> using connection SFTP_http://sap.com/xi/XI/SFTP failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.resource.ResourceException: 4: Putting ./'//TESTFILENAME' failed.
    please let me know,if there is a work around for this requirement.
    thank you,
    Sri

    Usually filename schema will not allow you to put special characters. Please refer this link for restricts. Filename - Wikipedia, the free encyclopedia
    You may also try Run Operating System Command option to execute Unix script to add '//'
    Could you please let me know the file type ?

  • File Based logging: Control file name based on calling service

    In the file logging, I need to change the "Prefix" and "Suffix" that I can type in, from page "FILE Transport Configuration" while creating
    business service with transfort: File. I need to be able to supply these values for the file name from proxy service activity.
    I am creating as logging proxy service which will be called from all the other proxy services. I am planning to use logging to File System based on
    BS for achieving this. I need to be able to create a new file with name that corresponds to the calling service. How can I achieve this?
    Also this service should be able to turn logging on or off based on the calling service. I should be able to turn off the logging completely or
    turn off the logging only for few services.
    What is the best way to achieve this?

    HI
    That means your file name would be decided at run time . so u can use adapter specific mesage attributes in ur communication channel
    please refer tto the same here
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
    Dynamic File Name Part 2
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

  • File Name based on Field Entry

    Based on Adobe Acrobat SDK document "Javascript for Acrobat API Reference": Pg 146 I have been able to get the trusted function to work and save a file to a particular path with a non-dynamic name. However I have yet to figure out why the document will not save the field entry I specify as the file name.
    http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
    Pg 146 Example 1
    The Javascript trusted function saved in the Acrobat apps folder:
    mySaveAs = app.trustPropagatorFunction(function(doc,path)
    app.beginPriv();
    var myDoc = event.target;
    myDoc.saveAs(path);
    app.endPriv();
    myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
    // Privileged and/or non-privileged code above
    app.beginPriv();
    mySaveAs(doc,path);
    app.endPriv();
    // Privileged and/or non-privileged code below
    Javascript code I have on my button click:
    xfa.resolveNode("RA");
    myTrustedSpecialTaskFunc(this, "/c/temp/" + RA + ".pdf");
    this returns a saved file with the name of: [object XFAObject].pdf in the folder specified above.
    The Javascript code in the Adobe example is:
    myTrustedSpecialTaskFunc(this, "/c/temp/mySavedDoc.pdf");
    this returns a pdf file in the specified folder with a file name of "mySavedDoc.pdf"
    I am using MS XP with Adobe LiveCycle Designer ES2 and Adobe Acrobat X Pro

    myTrustedSpecialTaskFunc(this, "/c/temp/" + RA.rawValue + ".pdf");
    Kyle

  • Appending the Original File Name as Suffix to Receiver File Name

    Been searching and I've seen Michael's blog about creating a UDF to place the original file name in the payload.    Since this is a file->file scenario, I have no mapping. 
    I have the Adapter-Specific Attributes turned on on the Sender to pass the file name in the DynamicConfiguration of the message header and I can see it in the message.
    What I want to do it to have a target file name in the form of:   XXXXX_<i>originalfilename</i>.
    So I have turned on variable substitution and created a variable called 'file'.
    In the File Name Scheme Parameter I have entered: XXXXXX_%file%
    If I set the variable substitution refererance for 'file' to message:message_id, my file name is created as XXXXX_message_id,  or any of the other options from -> <a href="http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm">SAP Adapter Help Page</a>
    How can I get the value of FileName as the value for my variable %file%?

    > Actually, what I meant was the mapping will not know
    > the value I have entered in the receiver
    > communication channel - File Name Scheme parameter
    > value.   For example in CC for Target System 1  the
    > FNS = FMRECEIVER1, the CC for Target System 2 the FNS
    > = FM_RECEIVER2 and so on.  
    >
    > Are you saying in the mapping I could access the
    > value of FNS from the communication channel in the
    > mapping?   
    No, you cant read in mapping what you set in CC.
    However, you can ignore the parameter FileName scheme in CC and just set it in mapping runtime.
    The way you are using, you'll have to maintain the prefix for each receiver adapter you have. If you had it in mapping, you could just do something like:
    String receiver = container
        .getTransformationParameters().
        .get(StreamTransformationConstants.SENDER_SERVICE);
    DynamicConfiguration conf = (DynamicConfiguration) container
        .getTransformationParameters()
        .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(
        “http://sap.com/xi/XI/System/File”,
        “FileName”);
    String orgFileName = conf.get(key);
    String tgtFileName = receiver + "_" + orgFileName;
    conf.put(key, tgtFileName);
    and then you wouldn't have to maintain the file name scheme in CC.
    Regards,
    Henrique.

  • Create a file name based on message

    hi
       suppose the message consists of
    <header>
        ibm
    i want to have a file name created as ibm in recie ver side in file 2 file scenario.
    i.e whatever name i get under header i want to create the same as fle name.
    please suggest me.
    regards
    raghu.

    If youe message structure look like this:
    <MT_VENDORMASTER>
    <RECORD>
    <Header>ibm</Header>
    </RECORD>
    </MT_VENDORMASTER>
    Then you can use variable substition in the Receiver Communication channel as following
    variable name:
    filename            
    Reference: payload:MT_VENDORMASTER,1,RECORD,1,Header,1
    and use the follwoing parameter  in the file name: %filename%.txt
    Regards.
    Jeet.

  • Dynamic flat file name based on selected date range

    Hi,
    I have created mapping which load data into file, i have to create file with the range specified for the data to be pulled.
    e.g if i have to load data from 01-sep-12 to 15-sep-12 the file name should be ext_rio_15-sep_to_15_sep. how can i achive through owb

    https://blogs.oracle.com/warehousebuilder/entry/dynamically_generating_target
    Cheers
    David

  • Automatically create file name based on information in image

    Hi,
    I have a requirement to scan 100 documents into a single tiff file. I need a software that can split the images (inside the big tiff file) into individual tiff files afterward. I need to extract a number appearing in each of these tiff image to become the filename of each individual tiff file after splitted. Finally, I have a process to upload and attach these files to the corresponding table rows in Oracle.
    Does anyone know any software that can accomplish this?
    Thanks.
    Andy

    Use the file dialog box function to get the file name/path.
    To save the file , use appropriate write function ( as per file type that is being saved..text file,datalog , binary ..)

  • Sender SMTP Adapter / Content Based Routing / Mapping of an attachement

    Hi all,
    I'm still working on my SMTP --> PI --> Proxy scenario (asynchronous). I've tried several different properties of my sender communication channel (type = mail), but I didn't find the correct configuration. Hopefully it exists.
    I'm working with PI 7.0 SP10.
    I get an inbound message via Mail using sender SOAP Adapter. The message payload itself is an attachement. Now I'd like to do the following:
    a) Content Based Routing in Receiver Determination based on the message subject
    b) Mapping of the Attachement XML message to my inbound proxy interface
    Now, trying to do so, I didn't get it work. When I use XIPAYLOAD with keep attachements, I get two attachements in my inbound message (one in XI mail package format having the subject within, one with the IDoc structure I'd like to map). How can I assign the second attachement to be used for my message mapping?
    When I use XIALL instead of XIPAYLOAD, I think the mapping will work but my subject for content based routing will be lost, right? That one I didn't get running because of another failure, so I don't know the exact behaviour of the adapter for that configuration.
    Anybody out there who know the correct configuration for the sender mail adapter for my small scenario above?
    BR
    Holger

    Hi Stefan,
    sorry for misunderstanding, for sure I'm using the mail adapter, not the SOAP Adapter. I'm actually on the same direction. I'm using XIPAYLOAD as message protocoll (having the attachement as the content for the mapping --> correct). Furthermore I've also found the predefined context objects for the content based routing receiver determination.
    What I missed was setting the following properties in the communication channel:
    To store adapter attributes in the message header of the XI message, set the Set Adapter-Specific Message Attributes indicator.
    The following attributes are added to the XI message header if the sender makes them available, and if the Variable Transport Binding indicator is set.
    Now it's working
    BR
    Holger

  • 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

Maybe you are looking for

  • Login prompt appearing when opening Excel Files - SharePoint 2010 SP1 - Office 2007

    hi, i have 2 sites on the same server, 1 at Port 80 and 1 at port 8300 https://contoso.com https://contoso.com:8300 Both are under same AD and credentials. But when users on 8300 port site, tries to open office files such as Word or Excel. In read on

  • FI settings for New PL

    Dear Sap Experts, MM consultant have created one New plant for our client. As a FI consultant, should I assign/change/configure any settings based on New plant. If any settings should I change, Pl send me that settings asap. It is really appreciate,

  • Cell colouring in a JTable

    I am stuck with this problem. I have generated a large table and inserted the results of calculations into the 2D table. My next problem is then to highlight the rows and columns that contain the highest value. I have seeked advice on this matter bef

  • ADF application deployment and Data source configuration

    Hi, we are developing an adf application . This app accessing the tables from a data base and i can run it in the integrated WLS of Jdeveloper. Now i would like to run it in a standalone WLS server. I can create a Data source in the server. How can i

  • Css styles in rendered html

    I'm trying to find where i can access the settings that determine the embedded style sheet that gets rendered with the html.I'd like to add a print style to the embedded style. Thank you Karl