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

Similar Messages

  • Sender File adpater to Pick Two files at a time based on the file name

    Hi Everyone,
    I have a scenario where I need to pick two files at a time using file adapter where the two files names have a common string in between their names.For example , the file names can be sets like
    H123.txt and L123.txt
    H345.txt and L345.txt.
    Now how do we handle this in the File Adapter ?

    Anu,
    Two approaches.
    1.     Use BPM: use a collect pattern to pick those files: L and H files , use multi mapping to merge those files and map to IDoc. Constraint is that there must be a mandatory correlation field in both the files. Say a same po id  in L and H file.
    2.     Use an Adapter module with additional files option in file Adapter. Operate on the Main payload and attachment inside your module code to get a combined contents of both files and proceed.
    Module is preferable in terms of performance, but maintenance is difficult. Deployment after each changes, transport issues, etc.
    BPM is resource intensive, but easy to maintain, transport.
    Choose based on your requirement.
    Regards,
    Sudharshan N A

  • About BPM merge two files

    In BPM merge of two files scenario based on the correlation we merge two files and send to target, but my requirement is if any message comes then that data goes to target.
    data types
    send1
        id
        name
        address
    send2
        marks
        university
        state
    receiver
        id
        name
        address
        marks
        university
        state

    t

  • 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

  • Scripting a file name change as a data merge element.

    My goal of the work being done with InDesign is to utilize the Data Merge functionality of InDesign and the, already available, ability to create a new document per record in your data source where the docuement name is changed based on data contained in the data source.
    A very simple example of this would be the following:
    EXAMPLE
    ======================
    Given the following data source in excel:
    First_Name
    Last_Name
    ResultingFileName
    George
    Smith
    c:\A45.pdf
    Mary
    Lopez
    c:\C99.pdf
    Steve
    Barns
    c:\tmp\XM96TR.pdf
    Along with a simple two text box InDesign documents, I would perform a standard data merge with First_Name linked to one text box and Last_Name linked to another.  By setting the “Record Limits Per Document” to 1, I would end up with three different documents.  By default, the documents would be named Untiltled-1, Untiltled-2 and Untitled-3. 
    Untitled-1 would contain George and Smith.  Untitled-2 would contain Mary and Lopez and Untitled-3 would contain Steve and Barns.
    At this point in time, I would run the new created script, which would do the following:
                Rename Untitled-1 to A45 and/or save Untitled-1 as C:\A45.pdf
                Rename Untitled-2 to C99 and/or save Untitled-2 as C:\C99.pdf
                Rename Untitled-3 to XM96TR and/or save Untitled-3 as c:\tmp\XM96TR.pdf
    I am open to modifying the manner in which the data merge source is created.  For example, separating the path and the file name into separate columns.  In addition, I am flexible in putting preset information and/or file save types into the data merge document.
    Please feel free to contact me directly at [email protected]
    Thanks in advance for the help.
    Matt

    Hi Matt,
    I think it’s better to use an XML-based approach for your task.
    I’ve never scripted Data Merge process, but I don’t see a straightforward way of doing it. May be you can create the 3rd textbox on pasteboard or a non-printing layer, which will contain the file path from ‘ResultingFileName’ field, and the contents from which can be used for naming & saving the current file and exporting it to pdf-file. But this approach is so clumsy.
    Instead, you’d better to keep your data in excel file, or even better Access or some other database program.
    Export the data from it in XML-format.
    Then import it to an InDesign file and process it by script. XML support is very powerful in InDesign: you can process your data by xml-rules. I once made a script for a newspaper, which processed data for classified ads. The script applied all formatting, changed colors for different headings and placed images.
    Kasyan

  • Oracle SQL Developer  error - "The file-based source procedure Name is not present in the database."

    I recently started working on the Oracle SQL developer. I have 'select' privileges on the QA schema and when tried to execute proc in QA. It is giving the error as 'The file-based source <procedure Name>  is not present in the database.  Was it compiled?'
    instead 'you do not have sufficient privileges to execute this procedure'. Did research on internet but with no luck.What configuration changes needed to be done to make it work.Guide me.

    Sounds like you do not have the correct privileges.  What should have been granted to you by the QA user, or some other user with appropriate privileges, is...
    grant EXECUTE on "QA"."<PROCEDURE_OF_INTEREST>" to "<YOUR_USERID>" ;
    Note that a grant of execute on a procedure has nothing to do with grants of select on some or all of QA's tables and views.
    So, as Vadim suggests, from your connection node in SQL Developer's Connections view, if you expand the Other Users node, then expand QA and look in the Procedures node, do you see the procedure of interest?  If not, you cannot expect to be able to execute it from your userid's connection. And even if you do see it, you may have some other privilege that permits viewing but not executing, like...
    The role SELECT_CATALOG_ROLE
    The system privilege SELECT ANY DICTIONARY
    And even if you do not see it there, then having certain other privileges granted to you could permit executing it in general, like...
    The role EXECUTE_CATALOG_ROLE
    The system privilege EXECUTE ANY PROCEDURE
    Also, note that the 3.0 release is a bit dated nowadays. Upgrading to 4.0.3 production or even the 4.1 EA2 (early adopter) release will, in general, give you a better experience.
    Best wishes,
    Gary

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

  • 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

  • Can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF

    can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF?

    No, there isn't. The way you're using the file is not recommended. You
    should use a review tracker to avoid getting in the way of one another.

  • To test how can we use the opt  'logical file name' to name the file based

    Hi Sir/Madam,
               to test how can we use the opt  'logical file name' to name the file based on the selection made in the dtp run for extracting data as flat file.

    Hi Vishali,
    In the DTP select the file location as application server and give the logical file path. The actual file and logical path can be created using transaction "FILE" and "AL11".
    Rest of the process is same as that of extraction from local file.
    Regards,
    Durgesh.

  • 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

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

  • Dynamic file names on file based  processing

    Hi Experts
    we are doing file to file scenario using file based processing not on message based ( No Reposiitory Objects - No mapping , no interface objects ).
    we need to pickup the file name from the source directory and place it in the target directory with the same file names.
    the source file name is added with the time stamp and client number,
    Since there no mapping , we can't use the dynamic file concepts.
    Please help me with the possible solutions
    thnz for the help in advance.
    Cheers
    Faheem

    Hi Faheem,
    You will be using the dynamic config when u want to map the input file name to a field in the target message.
    As per ur requirement ASMA will do :
    try this:
    In both the sender and receiver file adapters , select Adapter Specific Identifiers and File Name
    In the receiver file adapter give some dummy value for file name and directory.
    In the runtime, the source file name and directory will be used as the target file name and directory.
    You need not use any UDF or a mapping here
    Hope it helps!!!!!!!!

  • 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

  • Condition based on source file name - PI 7.1

    Hi Friends
    I have an file2file interface without any mapping requirement , source is sending  .csv files and I need to post those source files to two target systems in which each target system have two directories where I need to post based on few conditions and here are my queries.
    1. As mapping is not required I guess File Content Conversion is also not required as I simply pick and drop the .csv files into target - please confirm.
    2. One of the condition is :  source file name will be XXXX-AABB-C-XXXX-XXX-XXX.csv , here SAP PI has to read the company code (AABB) to determine the target system. Z001 and Z007 should be sent to TARGET1 & All other files will be sent to Target2.
    3. 2nd Condition : SAP PI has to read the type of file indicator (C). The files will be sent to the following target application directories:
    Simulation files (indicator = S): /interfaces/XXX/simulation
    Production files (indicator = P): /interfaces/XXX/inbound/
    Please kindly provide your ideas/solutions .
    Regards
    Suman.

    Hi Suman,
    If the Target is two different locations, then i guess you need to have two receiver Channels. Please check the below thread for details:
    Re: Genrate file in 2 different locations
    Incase of different directories in same server, you can check out this link:
    Dyanamic Configuration at receiver file adapter determine target directory
    kanan

Maybe you are looking for