Process files based on condition

Hi,
Iam looking for some possible suggestions in desiging an interface for the below requirement.
Let's assume there are two source files,  'FileA' and 'FileB' in an FTP Server.
Now, we would need to Process 'FileB' in PI (no IR objects are needed, we need to zip 'FileB' and post it to some other location), only if certain condition gets satisfied in 'FileA'. If not ,we need to send an email saying that the condition in 'FileA' didnot get satisfied on that day.
Is it possible to design this interface with out ccBPM.
Let me know your thoughts.
Thanks
Pradeep

the best and the correct way is to use BPM
If you dont use BPM,
1. you can code a module for your sender File adapter, do the validation/check and then in the module put in a snippet of code that will access the other file, zip the file and transfer it to a different location
2. use a sender java proxy and do the required logic there.
Both the solutions are not clean. So i recommend BPM

Similar Messages

  • How to create additional Line in file based on condition available as part of ZINVOIC02 Idoc segment

    Scenario Details:
    Receiving Zinvoic02 Idoc in PI. Idoc to file translation creates comma separated file with .csv extn
    The logic was kept in such a way that how many E1EDP01 (items) are available in IDoc that many no of records will be created in csv file.
    The file logic for some the fields is as below:
    No of records
    InvNumber
    InvDate
    CusNumber
    LineitemDesc
    Tax1Type
    Tax1%
    for 1st E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    Populate when E1EDP04/MSKWZ=O2 or O4 with E1EDP19/KTEXT
    Hardcode when E1EDP04/MSKWZ=O2 or O4
    Sum all E1EDP04 /MSATZ when E1EDP04/MSKWZ=O2 or O4
    for 2nd E1EDP01
    E1EDK01-BELNR
    E1EDK01-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    for 3rd E1EDP01
    E1EDK01-BELNR
    E1EDK03-DATUM
    E1EDK01-PARTN
    same as above
    same as above
    same as above
    Additional Line to be created when one or more of E1EDP01 is having E1EDP04/MSKWZ = O3
    same as above
    same as above
    same as above
    Hardcode "REIM for USE TAX"
    Hardcode ""
    Hardcode ""
    Now we have got addition requirement to add a new lineitem when tax code is equal to O3 for any of the E1EDP01.
    Is it possible to create additional lineitem based on condition. If yes, please share what should be the approach.
    How we can create the additional lineitem?
    Currently we are using E1EDP01 to do context handling.
    The target structure is :
    MT_FILE
         INVOICE     0..unbounded
              InvNumber     0..1
              InvDate          0..1
              CusNumber     0..1
              LineitemDesc     0..1
              Tax1Type          0..1
              Tax1%               0..1

    Hello,
    Please add one extra field in the data structure of the target mapping and let its occurrence be 0..unbounded under the root node 'MT_ADP_Invoice'.
    Apply the condition, if tax code MSKWZ (with its context changed to E1EDP01) equalsS to '03', then map it to the newly created target field whose occurrence is 0..unbounded.
    This will then create an additional field which is your requirement.
    The above is one way.
    But if you want to have the same target field name as ADP_File appended for tax field being '03'.
    Then in that case you can you two message mapping for one common operational mapping / interface.
    In the first message mapping you need to have one target data structure created with the source data structure remaining the same as the one shown by you in scrn shot. Now this target data structure will be similar to the source, except that you need to add one more field at the end(name different from other fields) in target (whose occurrence should be 0..unbounded), and it needs to be mapped to E1EDP01 provided the tax code field MSKWZ(its context changed to E1EDP01) equalsS to constant '03'.
    In the second message mapping you need to map the target structure of previous message mapping to the actual required structure. The newly added field should be mapped to ADP_File of your final target structure.
    This will then create the same structure as required.
    Note : Please change the occurence of ADP_File to 0..unbounded.
    Regards,
    Souvik

  • Spliting files based on condition using multi mapping with BPM

    Hi All,
    Can any one please let me know How to <b>Splite the outbound records based on condition using multi mapping with Integration Process in BPM</b>?
    Thanks
    Govindu.

    Hi All,
    Sorry for mistake this question for Exchange infrastructure guys.
    Thanks,
    Govindu

  • Executing OIM Process task based on Condition

    Hi Experts ,
    I have the following requirement :
    when a OIM user field - X is updated with a value A i have to call task T1, generate a random number on this task and have to trigger CREATE user Task within in the same process definition of an IT resource
    when the same OIM user field - X is updated with a value B i have to call task T1 again, generate a random number on this task and have to trigger DISABLE user Task.
    Im taking the approach of OIM lookup triggers which will kickoff the task T1 when user field X is updated
    My question is how can i add the conditional logic to a task(T1) to trigger the only one dependent task, either create user or disable user when a condition satisfies.
    currently i have added create user task and disable task as the dependent tasks of the task T1.
    If i am triggering create user task how can i get all the attribute mapping values of createuserAdp. since few are referring the process form, userdata and IT resource
    Im confused and not sure as how to implement such Work flow based on conditions. hope some one can help me!!
    Thanks in advance
    Edited by: user8942439 on Aug 24, 2012 11:58 PM

    Use the responses returned by task T1. Lets say for create user, Task T1 returns a response "CREATE". So in the responses tab add this response, select it and in the tasks to generate section add "Create user" task to this response. In the same way task T1 returns response "DISABLE", so on DISABLE response select task to generate Disable user.
    regards,
    GP

  • IDoc to file. Grouping and generation of files based on condition

    Hi All,
    I am working on a scenario, Idoc to File. I need to create number of files based on  occurrence of a field(vendor) in the idoc. Also the condition is to group by the field(vendor) and create as many files as the number of groups formed.
    For e.g.: In an Idoc if there are ten items present and 3 vendors who are supplying it. <b>The vendor and items can repeat in any order within the same idoc. </b>
    I need to group the items by the vendors and create a file separately for each vendor.  Like :   
    Item         Vendor
    Item1       V1
    Item2         V1
    Item3         V2
    Item4       V2
    Item5        V2
    Item6         V2
    Item1      V2
    Item2         V2
    Item3        V3
    Item6        V3
    What we have to achieve is, to group by the vendors irrespective of the order of the items or number of reoccurrence of the items.  As you see, the Item1 is supplied by both V1 and V2. I need to generate 3 files as follows:
    V1.xml with Item1 and Item2 details.
    V2.xml with Item3, Item4, Item5, Item6, Item1 Item2 details.
    V3.xml with Item3 and Item6 details.
    Can someone please help me with achieving this without using BPM?

    Hi Shashi,
    For this scenario you have to use multimaping without BPM using this blog.
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    And while doing your message mapping you have to use <b>removeContext</b> & <b>SplitByValue</b> (double clike the on splitbyvalue and select <b>value changed</b>) function. This function you have to use with the node in which your Vendor is coming. Example:
    if required to sort the vendor, then first sort the vendor in the below mapping.
    Vendor (NODE) -
    > removeContext -
    > SplitByValue (value Changed) -
    > IDOC.
    By doing this your vendor will be grouped and you will get new IDOC on change of  Vendor.
    Regards,
    Sarvesh

  • IDOC TO FILE based on condition

    Hi,
        I am having IDOC to Ftp scenario, where i need to send the IDOC on condition.
    1. In IDOC there is a field Location, based on this field the target files has to be created.
    ex:-
    1. for Location India ---> file has to be created in INDIAN folder
    2. for Location USA ---> file has to be created in USA folder
    3. 2. for Location Uk ---> file has to be created in UK folder etc.......
    Like this there are nearly 20 folders where i need to create at the target side, based on the location field the fied has to be created at the respective folder automatically.
    When i trigger the IDOC with the Location INDIA, automatically the file has to get created in INDIAN FOLDER.
    Please help me...
    cheers
    nissi

    Hi Roy,
               Thanks for your code, its very useful and suits to my requirement. But i am having folders already in my target file system.
    Based upon the location ID . directly the the file should be placed in the respective folder.
    please find the below code and suggest me if any changes to be done.
    public String dynamicDirectoryName(String Location, Container container) throws StreamTransformationException
             String Directory;
             String  inputFileName;
            DynamicConfiguration conf = (DynamicConfiguration) container
                                            .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
            //DynamicConfigurationKey key1 =  DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
            DynamicConfigurationKey key2 =  DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
            //Directory = conf.put(key1,location);
            inputFileName = con.put(key2,location);
            //Directory = conf.get(key1);
            inputFileName = conf.get(key2);
            If(inputFileName.equals("INDIA")
                con.put(key2,"INDIA");
            else if(inputFileName.equals("AUSTRALIA"))
                con.put(key2,"AUSTRALIA");
            else
               return "";

  • Automatically merging PDF files based on conditions

    Hello
    I need to be able to setup a job with some basic parameters to automatically merge multiple PDF’s.
    For the following group of files:
    1_a.pdf
    1_b.pdf
    2_a.pdf
    2_b.pdf
    3_a.pdf
    3_b.pdf
    I need to be able to append the pages in the "_b" files to the start of the "_a" files using the number at the start as the match identifier.
    I think the safest method would be to output a new "_c" file and maintain the original files.
    I can see functionality to manually do this or merge a group of files into 1 but I need to automate this to deal with larger volumes.
    Do I need additional software?  Any suggestions on how to do this?
    Appreciate any help.
    Cheers

    You're looking for a PDF Parser or PDF miner tool (PDFminer) as a starting framework, and you'll almost certainly be writing custom code around that as parsing a text file that's effectively free-form and originating from multiple different sources almost always (always?) involves writing customized processing code and an on-going series of tweaks as the suppliers of the PDF change their ticket formats.  (Even apparently-simple details such as the time and date formats, for instance, can vary by geography and language and by supplier, and can derail common processing.)
    In some cases that I can envision, it'd be entirely possible that the data you're after is actually located in an embedded image and not in text that can be parsed.
    The best approach is to get folks to send you JSON or XML or some other format intended for interchange, and avoid the whole mess that is parsing or mining a printer-oriented format.
    The other obvious option is to use something like Amazon's Mechanical Turk or some other explicitly outsourced help.  Depending on how often the formats change and how many of these PDF files you're dealing with and how varied the formats are, sometimes throwing staff at the problem can be the most cost-effective approach.

  • Restrict records in CSV file based on condition

    Greetings. I searched the forum for my issue and didn't find an answer or the right search terms. I am running APEX 4.1.1
    I have a report on a page. I am showing all records for a given SQL statement in my table, but in the "Export to CSV" I need to limit the output based on one of the fields. So for example, if I had a report like:
    SELECT x, y, Z
    FROM Table1
    I would like the Export to CSV for that table to limit the output such as:
    SELECT x, y, Z
    FROM Table1
    WHERE Z = 1
    Is that possible?
    Thanks!
    John

    Hi John,
    I have tested the login now and the above works for Interactive report only and for Classic report you need to do something like this because the request is set to different value
    SELECT x, y, Z
    FROM Table1
    WHERE ((Z = 1 and nvl(:REQUEST,'X') like 'FLOW_EXCEL_OUTPUT%') OR nvl(:REQUEST,'X') not like 'FLOW_EXCEL_OUTPUT%')See this working example http://apex.oracle.com/pls/apex/f?p=46417:25
    When you export to csv you will only get dept 10 records

  • IDOC-File - records in Idoc to file based on some condition

    Hello experts,
    I have a idoc to file scenario. the incoming Idoc can have multiple records in it and i have to map these records to a csv file. Now the problem is not all records has to be mapped to the file. Based on the value of a perticular file (which is not root), i need to decide if the entire record has to be processed or not. Like the idoc structure is say:
    IDOC
       E1WPA01            0....9999
          E1WPA04         0...99
              KONDART     0..1
    Now for all valid E1WPA01 where the value of KONDART equals to some spacified value (known) , there has to be one record in the target csv file.
    How can this be done at the root level?
    One way of doing is we give empty values in the target file where the condition of KONDART is not fulfilled. Say if there are 10 records of E1WPA01 and only 4 satisfies the condition, we will ahve 10 records in the output file but only 4 records will have value and the rest 6 will be blank like (,,,,,,,). But I dont want this. I want only 4 records in the output file.
    I tried mapping like this:
    E1WPA01----
    >Advanced -
    > Root
    E1WPA04-KONDART---->UDF
    The problem i am facing here is if 4 records fulfill the condition, the first 4 are taken and the revelent 4.
    Please help.
    Regards,
    Yash

    Hi Chirag,
    I wrote the following code in UDF:
    for(i=0;i<a.length;i++)
    if(a{i}.equals("Specified Values"))
    result.addValue("a{i}");
    else
    result.addValue(ResuktList.SUPPRESS);
    And its working partially. I mean the queue of the UDF looks like
    1. AAAA                      SUPPRESS
    2. <Specified value>     <Specified value>     
    3. AAA                        SUPPRESS
    4. AAA                        SUPPRESS
    5. AAA                        SUPPRESS
    6. AAA                        SUPPRESS
    7. <Specified value>     <Specified value>
    8. AAA                        SUPPRESS
    9. AAA                        SUPPRESS
    and it creates 2 ROOT nodes. But the root nodes are created for line 2 and line 8 insteed of 7.
    What can be problem??
    Yash

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

  • Creating Files Dynamically based on Condition

    Hi Experts,
    I want to create a scenario in which I want to have N number of target files based on some condition.
    Suppose I have following Source structure .
    <ns0:MT_Employee_Src xmlns:ns0="urn://FileToFile_ERD">
       <Details>
          <EmpId>1</EmpId>
          <Name>Rabi</Name>
          <Designation>ABAP</Designation>
       </Details>
          <EmpId>4</EmpId>
          <Name>Satya</Name>
          <Designation>ABAP</Designation>
       </Details>
    </ns0:MT_Employee_Src>
    My requirement is I want to have 2 different target files based on EmpId.
    And this should be dynamic that means N number of EmpId in my source will create N number of files.
    Can anyone help me to solve this?
    Any kind of suggestion will be appreciated.
    Thanks
    Rabi

    Hi All,
    As my requirement was to create N files dynamically based on some condition so I first used 1:N multimapping without BPM.
    Then I followed RP's steps.
    Follow those steps
    1) in the message Mapping go to Signature T..Outbounded.
    2)later go back to main tab . you shoud create a mapping like this:
    3)<EmpId>--> change the context to MT_Employee_Src. to do that press right button on the field and go to context menu option.
    map this field to the proper header target structure E.X: MT_Employee_Tgt
    4) doing this you will create as many target files as <EmpId> you receive.
    5) map the rest of the fields
    This is great.And  this helped me a lot and finally gave solution.
    I want to share one thing that I faced.
    when you are doing 1:N multi-mapping then you have to change the occurrence of target .
    Then your source and target structure will be changed .If you are taking the source schema from mapping then remove the extra tags those got generated due to multi mapping such as
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    - <ns0:Message1>
    </ns0:Message1>
      </ns0:Messages>
    And then use the file and it will work fine.
    Thanks
    Rabi

  • Single iDOc to multiple files based on a condition

    Hi Friends
    need your help in one scenario which is something like this:
    there is one iDOC as the sender and this iDOC has to be mapped to files based on a condition means let us say if there is a particular field "R" in iDOC(WPDBBYY01) than it should go and create the file "ABC"
    and if the particlar field is P or G or M than it should create another 2 files named "XYZ" and "WUV" .
    Please guide me how can i put this condition ?
    Any help would be rewarded with points
    Thanks

    Have a single receiver and 2 inbound interfaces.
    So you will have 2 different mappings. In the first mappng source is IDOC and the target is file ABC.
    In the second mappping the source is IDOC and the target is 2 files XYZ and WUV.
    In Interface determination, add both the inbound interfaces and put the condition for each interface.
    Regards,
    Jaishankar

  • Include file based on if condition

    I was wondering if its possible to include a file (or display a file) based on a condition in JSPs.. for example:
    ----------Desired functionality----------------
    <%
    if (myconnection == null)
    // include/display login page
    else
    // display the main page
    %>
    I tried this.. Not working based on my condition... I get both the files displayed in one page..
    ----my code----
    <%
    if (DBcon.con == null)
    out.println("No connection");
    %>
    <%@ include file="Login.jsp"%>
    <%
    if (DBcon != null)
    out.println("connected");
    %>
    <%@ include file="Main.jsp" %>
    -NJU

    If you don't put a { after the if statement, then it's only going to execute the first line after it.  This is always the case, in JSP or otherwise.  Otherwise how would it know when to stop? 
    <%
    if (DBcon.con == null) {
       out.println("No connection");
    %>
    <%@ include file="Login.jsp"%>
    <%
    if (DBcon != null) {
       out.println("connected");
    %>
    <%@ include file="Main.jsp" %>
    <%
    %>

  • Process InfoPackage based on a condition in Process Chain

    Hi,
    I would like to include a Function Module in my Process Chain.Based on the output of the Function Module (example Flag - 'A','B','C') I would like to load data from Infopackage.
    Could you please suggest the best possible solution.
    Thanks,
    Nimai

    then you need a decision step...
    as you want to use a FM to get the outcome, you can't use the standard decision step as you can only use a formula...
    so you need to implement a new decision step...look on sdn for the how to paper 'Enhanced Decision Process Type for BW Process Chains'...
    this how to paper will lead you to create a process step of the type decision but you can use abap forms (take a look at it and it will become clear)...once you have done this, drag/drop the step in your chain. within the variant, you can define the result of the if, elseif, else...you can add as much elseif as you want (a lot in any case)...you need to create for every 'if' the form using the FM... back in the process chain you can link this step to all the infopackages, and indicate the result of the decision step leading to the infopackage execution...
    that's the nice way...
    the easy way :
    create for every infopackage a single process chain (you can easily copy them)...they should start after event EV_A, EV_B, and so on...every chain after another event...now create an abap program and call the function module...now depending on the outcome of your FM you can trigger one of the events and the corresponding chain will start, leading to the correct infopackage being loaded.
    look on abap forum on more info about event triggering, how to create event,...

  • Process file in PI 7.1 with Integrated configuration.

    Hi All,
    I am facing some issue that .  I am using file to file scenario with no ESR involvement.  we are routing the file through PI only. 
    But I want to route the file based on file name for eg.  Here we have one sender and mutiple receiver.
    Suppose I say
    if File name is  A  then it goes to    business compnenet   BS_A
    if File name is  B then it goes to   business component  BS_B
    Please provide your suggetion for the same.
    regards
    Ram

    Thanks ,
    I did the same and I put condition like ...
    FileName=ABC.TXT.
    Is format fine? 
    and do I need to put any condition/ configuration at communication channel level?
    When I am processing this file and when I got for communication channel monitoring then its giving error :
    "Receiver Determination failed for message d0789125-d947-4ce2-2c57-c6b2f4c25da7(OUTBOUND)"
    and in detail it gives:
    2010-09-06 04:22:20 Information Channel File_Sender: Send binary file  "/interfaces/ABC.TXT", size 347480 with QoS EO.
    2010-09-06 04:22:20 Information MP: entering1
    2010-09-06 04:22:20 Information MP: processing local module localejbs/CallSapAdapter
    2010-09-06 04:22:20 Information The application tries to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.
    2010-09-06 04:22:20 Information No receiver could be determined. According to the configuration, this will result in an error.
    2010-09-06 04:22:20 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Receiver Determination failed for message d0789125-d947-4ce2-2c57-c6b2f4c25da7(OUTBOUND)
    2010-09-06 04:22:20 Error MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: Receiver Determination failed for message d0789125-d947-4ce2-2c57-c6b2f4c25da7(OUTBOUND)
    2010-09-06 04:22:20 Error File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: Receiver Determination failed for message d0789125-d947-4ce2-2c57-c6b2f4c25da7(OUTBOUND)
    Please have a look on the aboeve logs
    regards
    Ram

Maybe you are looking for

  • Windows 8.1 will not play any video in Video app, windows media player, Power DVD, or Picture

    I just downloaded 8.1 and Windows will not play any of my videos. Power DVD will play the videos, but there is no sound. I downloaded a video from xbox video and that will not play on my computer either. I have a lenovo yoga ultrabook. I get error co

  • Partner function in web ui

    hi , we have 10 partner functions and they belongs to all sold to party partner function catagory.they should be reflect in companies assinment block in web ui..what the custmizing i need to please help me out.

  • How to tell the version of Portal

    Hi... I have downloaded PDK 90402 and I am about to install it over the Oracle Collaboration Suite's iAS (OCS R2 9.0.4.1.1) I followed the installation steps and I have found some problems... I am checking the requirements lists and I need to find ou

  • CDC Subscription question concerning transactional consistency

    Hi Hopefully a quick question: can anyone confirm whether or not it is the subscription that controls transactional consistency when accessing change records in the change views? For example, if you have 20 source tables that you are capturing change

  • Template: error "Closed a head tag that was left unclosed."

    Hello, I have just found out why an error occurs with one of my template and I thought I'd post the solution for further reference in case someone encounters the same problem—it has bothered me for a quite a while. I'm using Dreamweaver CS4. Each tim