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

Similar Messages

  • How to Split Single Idoc into 2 files and put some delay

    Hi,
    I have a IDoc to file Scenario. Invoice Idoc to Flat file scenario
    this is a reuse Interface
    Current Scenario we have graphical mapping(used for lookup and dynamic filename, mostly all the field mappings are 1-1) and ABAP Mapping to convert Idoc to flat file, 1 Idoc will generate 1 file.
    In addition to the above case, there is 1 more requirement
    Correction Invoice case. where in I get single Idoc with Multiple Item categories (Original data and Correction data)
    In this case always I need to send two files(2 Idoc data), first Idoc is for Original Idoc and 2nd is Corrected Invoice, these 2 idocs should be sent with some delay.
    In Correction Invoice case, I should generate 2 idocs based on Item category (PSTVY) value.
    Suppose I have 4 E1EDP01 segments out of which PSTVY has value "AA" and "BB" repeated twice as shown below
    <PSTYV>AA</PSTYV>
    <PSTYV>AA</PSTYV>
    <PSTYV>BB</PSTYV>
    <PSTYV>BB</PSTYV>
    So I need to generate 2 Idoc 1 for AA and other for BB.
    If there is no correction Invoice, 1 idoc for 1 file will be generated.
    Am planning to use BPM to delay the idocs and identigy bpm based on Document type else no bpm...
    How do I split the mapping of single Idoc to 2 files based on Item category.
    Thanks,
    Varun

    You can use the multi-mapping to split the message payloads according to business requirement (AA and BB segments values)
    /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
    And then send to different receivers by adding the conditions on the Receiver Determination (for example, "field = AA" go to Receiver1, and "field = BB" to to Receiver2).
    http://help.sap.com/saphelp_nwpi71/helpdata/en/26/5ccd3bb4560f01e10000000a11402f/frameset.htm
    Or even Extended (enhanced) receiver determination, should the scenario be more complex:
    http://wiki.sdn.sap.com/wiki/display/XI/EnhancedReceiverDeterminationinSAP+XI

  • Split Single IDOC into Multiple IDOC's Based on Segment Type

    Hi Experts,
    I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on Segment Type
    Outbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Segment 2
    Segment 3
    Status Record
    I should get output like below
    Inbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 2
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 3
    Status Record
    Please suggest me step by step process to achieve this task.
    Thanks.

    Thanks a lot Harish for reply.
    I have small doubt. According to your reply , If we have N number of segments in single IDOC with same fields in all segments then for splitting Single IDOC into Multiple IDOC's based on Segment Type we need to duplicate N number of target IDOC tree structure.
    Is that possible to Split single IDOC into Multiple IDOC's based on Segment Type using only one Target IDOC structure without duplicating the Target IDOC structure tree.

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • Idoc to Multiple file scenario

    Hi Experts,
    My scenario is IDOC to Multiple files..
    IDOC will be triggered from the ECC system and i have three differient structures and need to drop those 3 files in the ftp server at the target system.
    Here we can use multimapping for such scenario but the problem here is ..
    In my scenario for all the 3 mappings i am using combination of message mapping and xslt mapping as below
    1st case:
    Idoc -
    Message mapping -
      Target First File.
    XSLT Mapping1
    XSLT Mapping2
    XSLT Mapping3
    XSLT Mapping4    -
    The output of the xslt 4th mapping will go to the target ftp server
    In similar for the other 2 mappings also uses the combination of messag mapping and xslt mapping.
    Here as the receiver system is one in the interface determination (PI 7.1-- NO Enhanced determination)when i add these operation mapping in the interface determination when i execute the scenario all the operation mappings are not getting executed.
    For example;; If the first target file has no records then it is not executing the 2nd operaion mapping, does the occurence of the operation mapping needs to changed.
    could anyone suggest on this..
    Thanks,
    sai

    Hi,
    Why cannot you use three mappings when you want to generate the three files for the same input instead of multimapping as the multimapping generates either of the three messages only...
    you can later provide the condition at the interface determination to execute the mappings if not all mappings to be executed..
    if there are no conditions provided by you at the interface determination level then mappings will get executed automatically..
    provided your mapping is working fine..so in your case check /test the message mapping..
    HTH
    Rajesh

  • IDOC to (multiple) file design help

    Hi all,
    i am trying to do a IDOC to multiple file scenario.
    Requirement:
    An outbound idoc has 4 segments.
    now i want the output of first 2 segments in one file and second 2 segments in another file.
    How to approach this design (without BPM).
    Waiting for reply,
    Senthilprakash.

    Hi,
    Use multimapping (use external definition of Idoc in source side) in which target message occurance should be 0..unbounded.
      write one UDF like below
    for(int i=1;i<=4;i++)
         if(i==2||i==4){
         result.addValue("");;
                     so that it will split the target structure 2 time(when i=2 and i=4). so that you map all the source fields to target fields(all one to one mapping except UDF).
    start doing this so that you will get the required output easily.
    thanks,
    madhu

  • How do I create. A single PDF from multiple files? PDF pack on iOS

    How do I create. A single PDF from multiple files? PDF pack on iOS
    The primary reason I signed up for. PDF Pack was to create a single PDF from multiple image files and other PDFs .
    Is this possible? If so how
    thanks in advance
    rich

    Hi Rich,
    The combine files feature isn't available when you're using Reader for iOS. However, you can log on to the web interface at Adobe Acrobat.com using your Adobe ID and credentials, and use the Combine Files feature there.
    Please let us know if you need further assistance.
    Best,
    Sara

  • Split single row in multiple rows based on date range

    I need sql script that can split single row in multiple rows based on start date and end date column in table.
    Thank you

    I agree to your suggestion of having a dates table permanently in the database. Thats how we also do for most of our projects as well
    But in most projects the ownership  of table creation etc lies with the client as they will be the DBAs and will be design approval authorities. What I've seen is the fact that though
    many of them are in favour of having calendar table they dont generally prefer having a permanent table for numbers in the db. The best that they would agree is for creating a UDF which will have
    tally table functionality built into it based on a number range and can be used in cases where we need to multiply records as above.
    Wherever we have the freedom of doing design then I would also prefer creating it as a permanent table with required indexes as you suggested.
    >> many of them are in favour of having calendar table they dont generally prefer having a permanent table
    Those people do not understand about database and are not DBAs :-)
    It is our job to tell them what is right or wrong.
    ** This is a real story! I had a client several years back, who was the CEO of a software company.
    He use the query:
    select * from table_name
    In order to get the last ID!
    The table_name was actually a view that took data from several tables, and the main table that he wanted to get the ID included several string columns, with lot of data!
    he actually pulled all this data to the application, just to get the lat ID in a specific table!
    It is our job as Consultants or DBAs to fix's his misunderstanding :-)
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

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

  • Multiple Idocs to Multiple files

    Hi,
    I have a Idoc to File Scenario, where I get multiple Idocs and I need to generate multiple files with different file names
    Assume I am using file XML port at SAP to collect the Idocs.
    Target files are generated based on two field values (Delivery Type and Shipping Point)from Idoc.
    Eg:
    I have three Idocs at a time.
    Idoc1 has Delivery Type = EL & Shipping Point = 2550 --> Target file name is test1.bpr
    Idoc2 has Delivery Type = LF & Shipping Point = 2551 --> Target file name is test2.bps
    Idoc3 has Delivery Type = NL & Shipping Point = 2552 --> Target file name is test3.bpr and test3.bps
    1) Does Mult-mapping support in the case... ?
    2) Do I need to change the Idoc Occurrence 0 to unbounded ?
    3) What will be the Occurrences in the interface Mapping
    4) Can i generate Multiple fileswith different names at one time as specified above using Dynamic Configuration?
    5) What will be the Target Structure Occurrence ?
    Thanks,
    Varun

    Hi,
    Though I am using Multi - Mapping only 1 file is being created. I tested with two Idocs, where 2 files should be created.
    In Moni, under Payload,  I can see 2 sets of Main Document and SubMainDocument been created.
    How to generate 2 files/multiple files ?
    If Dynamic Configuration is not supported in case of Multi Mapping, If I want to use Variable Substitution, then What will be the Target path to be defined in the comm channel since Multi mapping is there. I am trying to define for Action field. Does Variable Substitution support Attributes in the aml payload ?
    My target structure
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:Root xmlns:ns1="urn:ap:xi:dwn:Logi:100">
    - <Shipment Company="XX" Warehouse="01" ErpOrder="0830001212">
      <Action>0830001212_2551.bpr</Action>
      <Customer Customer="DEMO" Company="DEMO" />
      </Shipment>
      </ns1:Root>
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
    <Shipment>
    <Action>0830001212_2551.bpr</Action>
    </Shipment>
    </root>
    Shipment Occurrence is 0 to unbounded and above root I have Messages and message1 node (since Multi mapping)..
    so How do I specify Path for variable substitution in this case, i tried all possibilities, but i am getting error as
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var2: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: var2
    I am working on PI 7.0 SP 21
    Thanks
    Edited by: Varun Reddy on May 9, 2011 4:38 PM

  • 1:N mapping without using BPM -- IDOC to multiple files

    Hi all,
    I am facing a problem while sending multiple files,
    I need to send files ( File1, File2 or FIle3) ...
    I was able to successfully send the first 2 files and along with it the 3rd file is being created without any data... How to stop this file( either file2 or file 3 should be created) in creating..
    I have done the sceanrio like this, )ALL the source and target files are XSD's imported)
    In the Message Mapping <b>Messages Tab</b>
    <b>Source is AFS_DELVRY03   occurence is 1,
    Target files
    rootI8 occurence is 1,
    rootI9 occurence is 0...1,
    rootIB occurence is 0...1</b>
    I have done all the maping part , problem is all 3 files are being created(eventhough 2nd or 3rd has no data) , I need rootIB, either rootI9 or rootIB based on condition,
    So any one has done the similar scenario, If please suggest me how to hadnle so that only 2nd or 3rd file should be created,
    In Interface Determination i have selected the extended option also...
    Should i do any specific handling in the Configuration part or should i create more than one mapping?..
    U r suggestions are welcome and will be rewarded with points,
    Regards,
    sridhar

    Venu,
    Using a BPM, you can do the mapping / Split as needed and then send the files individually, using a Sens Step as needed. There are multiple ways in which this can be done with a BPM.
    But, for a solution without a BPM, as the requirement is such that only 2 of the 3 target messages need to be created, multimapping would not work and the need for conditional routing occurs.So, this would require additional mappings.
    The solution is either use a BPM or  do the logic using Conditional Routing. Ofcourse the second solution requires 3 mapping programs , but you are avoiding a BPM which can cause a perfromance bottle neck.
    If perfromance cannot become a bottle neck, then using BPM would make much more sense , but again it all boils down to the exact requirements and the feasibilty of the solutions!
    Regards,
    Bhavesh

  • Single IDOC to Multiple Interface Mapping

    We have a requirement in our project where one masterdata IDOC will be sent from a SAP MDM box and will be transformed to a target IDOC and be sent to an SAP SNC box. However, the scenario is that depending on the contents of the IDOC, there can be multiple IDOCs that need to be created. For example, the single MDM IDOC has V1, V2 and V3 values then the IDOCS that should be sent to the SAP SNC box should be three.
    The IT head of the customer decided against using Enhanced Interface Determination (since the problem can be easily solved using a 1:n mapping) due to the complexity especially when the solution is rolled out to other regions as each region has it's own logic (currently, the other implementation has only 1:1 mapping so there is no problem). I had developed a 1:n mapping but the resulting map is too big and very complex.
    What I tried to do is to create separate mappings for each scenario that an IDOC needs to be generated out of the values from the received IDOC in XI and then define rules in the Interface Determination. Problem is that XI throws an error stating that multiple interfaces are found. So I cannot use Interface Determination to trigger creation of multiple IDOCS of the same type with different values from a single IDOC sent by the same SAP box.
    Question is, is there any way to solve this requirement without using Enhanced Receiver Determination. I was thinking of BPM but not really sure how to do it.
    Thanks in advance!
    Best Regards,
    Rommel Mendoza
    Hewlett Packard Asia-Pacific, Ltd.

    Thanks a lot for that.
    For example, We have this input Message:
    <ZMATMA>
      <IDOC>
        <E1MARAM>
           <E1MARMM>
               <MEINH>IT</MEINH>
           </E1MARMM>
           <E1MARMM>
               <MEINH>CS</MEINH>
           </E1MARMM>
           <E1MARMM>
               <MEINH>SW</MEINH>
           </E1MARMM>
        </E1MARAM>
      </IDOC>
    </ZMATMA>
    then there should be an output of:
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>IT</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>CS</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>SW</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    The logic is when the MEINH field of the ZMATMA02 IDOC has the values: IT, CS and SW, create one IDOC for each.
    Thanks in advance!
    Edited by: Rommel Mendoza on Nov 6, 2008 7:30 PM

  • IDOC to multiple file with dynamic file names with same content

    Hi,
    My scenario is from IDOC to file.
    The number of files which i need to create is dynamic, which depends on the number of plants.
    I have a Z-table where i will maintin list of all plants ( non SAP plant names).
    I need to fetch the data from this z-table and depending on the nunber of plants i need to create the file for each plant and fiel name should contain plant name in it. EX: abc_<plant>_datatype.txt
    I want to use only receiver one CC, and files should be created in the same directory.
    Can we do this without BPM?

    Hi,
    You can use the Mapping lookup concept to fetch the plant names from Z-tables and then you can use the variable substitution technique to resolve your purpose.
    Here you need to create multiple interfaces ie.e per plant to create multiple files. You can use common Communication channel for all.
    Mapping Lookup
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Mapping Lookups - RFC API
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm
    Variable Substitution
    An interesting usage of Variable Substitution in XI
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    SP12 -Variable Substitution option
    Receiver File Adapter:Variable substitution :FATAL  ERROR
    Thanks
    Swarup

  • Splitting the single record into multiple records based on validity

    Hi Guru's,
    basically i am an BI consultant with less knowledge on ABAP, can i request your help on the ABAP task.
    I am working on HR module which is integrated with SAP BI,  the reports will be executed based on calendar month the requirement is i should split the single record into a multiple records based on validity of the record.  basically the HR data would be in data from and date to. 
    below is the logic
    Check whether the start and end date of the record are in the same month and year.
    If yes  nothing changes
    If no  create multiple records
    1st record  original start date of the record u2018till end of that month
    Following record  1st of the next month  u2018till last day of the month
    u2026
    Last record  1st of the month u2018till original end date.
    All fields will have the same values, only the datefrom and dateto fields change.
    Can any one please provide me the same code to proceed on my task.
    Thanks and Regards,
    Venkat

    Hi,
    Using Rule group we can split it.
    Using Rule Group in SAP-BI  Part - 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20rule%20group%20in%20sap-bi%20%20part%20-%201.pdf
    Thanks
    Reddy

  • Splitting single video into multiple files - workflow improvements?

    I regularly need to split a single video into multiple separate files that are used by other programs.  I'm using Premiere Pro CS4 for a number of reasons including the ability to easily and accurately select a scene by individual frames, native audio and video effects/filters, and the ability to import and export various video types.  I'm open to using other tools, but I haven't yet found one that is even close to Premiere Pro when it comes to accurately selecting split points.
    I'm not a Premiere Pro expert.  I have been doing this for about four months and have read many resources (books, forum posts, help guides) to refine the workflow I'm currently using.  My question:  does anyone know any improvements that might save me time/keystrokes.
    Current workflow:
    I've bound F8 to File > Export > Media
    Import video file
    Open in source monitor
    Set In and Out points for scene in source monitor
    Ctrl-drag from source monitor to Project Panel (creates a subclip)
    Repeat 3 and 4 for all scenes/subclips
    Select all subclips from Project Panel and drag to timeline
    Set work area bar to first subclip in timeline by the following four keystrokes:  Home, Alt-[, PageDown, Alt-]
    Type F8 (File > Export > Media shortcut).  Type output file name, click OK and the first subclip is put in the AME queue
    For the remaining subclips, type: Alt-[, PageDown, Alt-], F8, output file name, OK and repeat until done
    Any thoughts/ideas on workflow improvements?
    Thank you!

    Thank you Hunt.
    For the sake of brevity, I didn't include all of the details about the various aspects of the projects.
    Early on I was doing what you suggested and yes, it is a little quicker.  I learned (painfully) a couple of months later that I sometimes have to go back and adjust the clips and this method (trim to timeline with no subclips) resulted in quite a bit of duplicate effort (to reobtain start/stop points).  I've since learned that managing the "scenes" as subclips in topical bins allows me to go back and make adjustments, long after I've totally forgotten about the project content, without a lot of unnecessary reworking.

Maybe you are looking for

  • SAP BW 3.5 Query Cache - no data for queries

    Dear experts, we do have a problem with the SAP BW Query Cache (BW 3.5). Sometimes the problem arise that after the queries have been pre-calculated using web templates there are no figures available when running a web-report, or when doing a drilldo

  • Tom Tom app not updating

    Hi, I'm a newby 16Gb IPhone owner. I have the Tom Tom app and an update is now available which I'm unable to download as an error message says that I don't have enough space and advises to delete photos or video. I would delete some content, however

  • How do I undo to short in my memo?

    Hi I went to the concert of Ed Sheeran yesterday and I recorded the whole thing on my Voice recorder. I was listening to it today and I wanted to send it to my e-mail but the file was too long so I had to short it in. So wha happened is that it short

  • Cannot find the Quick Selection Tool (previously paired with the magic wand tool) on Illustrator CC (newest version installed on October 14, 2014)

    I have just installed a new version of Illustrator CC and CS6 on October 14, 2014 and I couldn't find the Quick Selection Tool on this version, previously this tool is located with the magic wand tool

  • Auto Suggest fail when type in whole word

    The web page is http://www.magnoliaparkburbank.org and click on directory. My client is complaining because if and when she types in the complete name of the store, autosuggest does not find the store. For instance, if you type in the store named Swi