Multiple target files - Idoc to File scenario - Simple question

Hi,
   I have a simple IDOC to File scenario. However at the occurence of a node say node A I need to generate a file
For example if the input IDOC has 3 Nodes for Node A I need to have 3 different files one for each node.
Any help is appreicated.
Thanks
Joe

Hi,
Map your node A to the Target root node.
it will generate the Flat files based on node A.
Regards,
sukarna.

Similar Messages

  • Multiple Target Files as the number of times Item in source node

    Hi all
    I am new XI ,my scenario is File to File and my data type structures for source and target are as follows 
    Data type for source
    Source     
         Header      1:unbound
             Org       1:unbound
    In declaration of target data type occurrence of all child nodes are 1:unbounded. And I have used it in Message type and in message mapping for my target message type occurrence is showing as 1:1.
    My objective is to replicate this entire Target as the no of times the Item is occurring in source  ie for multiple items in source I want multiple target files. For this I have mapped item node of source to Target(parent node). But in mapping test it is only displaying one Target structure for multiple nodes in source. Please Help me in solving this issue

    Hi Satish,
    Use Multi Mappings :
    When you create message mapping change the occurence of target from 1 to unbounded. This will allow you to create multiple target structures.
    Then map them accordingly as per your need and you can see multiple output in test.
    Just you have to be more focused on the context and for that you have to go thro' the mapping documents.
    Search related documents on SDN and go thro' them.
    Regards,
    Shri

  • Multiple Target files as the item in source file

    Hi all ,
    I am new XI ,my scenario is File to File and my data type structures for source and target are as follows 
    _Data type for source:     _               
    Source
          Header     1:unbound                     
              org       1:unbound
              order     1:unbound
          Item             1:unbound    
               itemno   1:unbound
               matno   1:unbound
    Data type for Target
    Target
         org          1:unbound
         order        1:unbound
        itemno      1:unbound
       matno         1:unbound
    In declaration of target data type occurrence of all child nodes are 1:unbounded. And I have used it in Message type and in message mapping for my target message type occurrence is showing as 1:1.
    My objective is to replicate this entire Target as the no of times the Item is occurring in source  ie for multiple items in source I want multiple target files. For this I have mapped item node of source to Target(parent node). But in mapping test it is only displaying one Target structure for multiple nodes in source. Please Help me in solving this issue .
    Full Points will be awarded
    Thanks & Regards
    Satish.

    Hi,
    If you want multiple Targerts you need to use UseOneAsMany.
    check below link
    http://help.sap.com/saphelp_nw70/helpdata/en/38/85b142fa26c811e10000000a1550b0/content.htm
    Thanks,
    RamuV

  • Reciever File Adapter to create multiple target files

    Hi All,
    I have done the mapping to create multiple output messages . I would like each of the messages to be stored as a separate file in the target .
    Below is the output message with 2 separate MT_CANCELOUT  messages . However, both end up in one single xml file .
    How do I configure the receiver file adapter to ouput 2 separate xml files  ?
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
      <id>456</id>
      <name>HEY</name>
      </LineItem>
      </ns1:MT_CANCELOUT>
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
      <id>567</id>
      <name>RAT</name>
      </LineItem>
      </ns1:MT_CANCELOUT>
      </ns0:Message1>
      </ns0:Messages>

    Hi,
    Sorry to say you that but your post show the opposite, it shows you have only one target message !
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>______<<<<<<<
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
    <id>456</id>
    <name>HEY</name>
    </LineItem>
    </ns1:MT_CANCELOUT>
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
    <id>567</id>
    <name>RAT</name>
    </LineItem>
    </ns1:MT_CANCELOUT>
    </ns0:Message1>______<<<<<<<
    </ns0:Messages>
    If you want two files, you should generate two Messages, and so to do that:
    In MM, in your target (tab before "function"), you should have 1 source MT and in target MT, you should have two lines (even if you use the same target MT), after having changed the ouccurence 1->N.
    do the same in your operation mapping: 1->N with two receiver service interface (even if it's the same)
    because you should have something like:
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
    <id>456</id>
    <name>HEY</name>
    </LineItem>
    </ns1:MT_CANCELOUT>
    </ns0:Message1>  _____<<<<<<<
    <ns0:Message2> _____<<<<<<<
    <ns1:MT_CANCELOUT xmlns:ns1="urn://gm.com:VBVTEST">
    <LineItem>
    <id>567</id>
    <name>RAT</name>
    </LineItem>
    </ns1:MT_CANCELOUT>
    </ns0:Message2>
    </ns0:Messages>
    regards
    mickael
    Edited by: Mickael Huchet on Dec 2, 2011 8:58 PM

  • File to file scenario using 1:N mapping

    hi
    i want to know that how we will do a scenario in which on the basis of repetion of one field we have to create a new file.

    Hi Rinku,
    in target data type put the cardinality of target node as 1..1 , then in interface mapping, change the occurance of target msg interface to 0..unbounded , then in msg mapping take the repetitive field and then use exists and creatif functions and then output it to the topmost node..........create a UDF and dynamically generate filename in it and map the output of the UDF to the second topmost msg node.............then on repetition of source node multiple target file will be generated.
    Thanks,
    Rajeev Gupta

  • 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

  • HR - XI - External System: one IDOC to multiple XML Files

    Hi,
    I have a scenario where I need, out of one HRMD_A07 IDOC send multiple XML files:
    The IDOC and the XML files can the Master data for many employee (IDOC has max of 200 as of SAP, external system, max of 1000).
    The IDOC will be generated with change pointers with all the needed filters (I can add/remove if needed).
    My goal is to generate 3 types of XML files:
    - 1 for the persons (containing basic info like name, firstname, persnr,etc)
    - 1 for the various unit (with basic info of unit like number, description & name)
    - 1 for the links between persons and units (this person is linked with that unit)
    The structures of the 3 XML files are know and can be imported via XSD definition.
    Do I need to use BPM for doing so or is there a way to do that with simple mapping?
    If BPM is needed, as I new to that, if you have a link to a begginer guide, fell free to send it
    Cheers,
    greg

    hi,
      For your scenario there is no need of BPM.
      In message mapping select the message tag.
      In the target add 3 message types.
      Just map the fields.Go to Interface mapping add the 3 message in the target.
      Get the mapping.
      In ID sender agreement,Receiver Determination is same.
      In Interface Determination select extended.Get the mapping.
      Create 3 Receiver agreement for each Receiver.
    Regards,
    Prakasu

  • Mapping of multiple segments of  Idoc HRMD_A06 to flat file

    Hi Experts,
               I am doing an Idoc to file scenario. Idoc i am using is HRMD_A06, which is having around 38 segments, contains the hiring action details of multilpe employees (Infotypes 0000,0001,0002,0003,0302,1001).
              When i have send the idoc , I am getting the file in the destination path, but having only one line which is having the the details of first employee.
              As the segments are repeating my mapping is not proper. Can anyone please help me with some details for mapping Idoc to file, when the segments repeats in a single idoc.
             Please also give me the details regarding the destination message interface.

    Hi
    Please go through below link,
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    Its very simple to do some changes in your existing mapping and some occurance changes.
    Verify that if your file message structure has 0..Unbounded Occurance.
    Use 0..Unbounded and map accordingly to target structure with 0...unbounded..
    and test with sample xml in message mapping with multiple idocs data and see whther u get multiple records in target
    Also if you need each sengment on new line with FCC then refer below links
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM
    Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM

  • Creation of multiple Records in the file as per multiple segments in IDOC

    Hi SapAll.
    i have got a requirement to create a multiple records in a file based on multiple segments at sending Idoc in a File To Idoc Interface.
    the Scenario  is the reciever message type is mapped with fields of 3 segments in sending IDOC.
    SEG01   1.....1(PARENT SEGMENT)
      SEG02  0...999999(CHILD SEGMENT)
      SEG03 0...9999999(CHILD SEGMENT)
    in an instance where if the SEG01 exists for one time and SEG02 exists for 2 times and Seg03 Exists for 2 times PI is creating the file with 2 records in it but
    when if the SEG01 exists for one time and SEG02 exists for 2 times and Seg03 Exists for 1 time it is raising the error in message mapping where it is supposed to create 2 records in a file with empty values in the fields (mapping with seg03) segment.
    can anybody help me in this.
    regards.
    Varma

    you can create a UDF after you validate if the count match. if match you create the message if not, call de UDF.
    this UDF should receive two parameters -->Queue SEG2 and queue of SEG3.
    then you should loop by the count of SEG2. if you find a Supress Value in the queue of SEG3 add a "" to result. for example.
    for(i=0;i<=SEG2.count;i++){
    If SEG3<i>.equals(ResultList.SUPPRESS) {
           result.addValue(" ");
    }else{result.addValue(SEG3<i>);
    the result of UDF is a queue which should map to target field directly coz it has context changes
    I think that is what you are needing. if no let me know.
    RP
    Edited by: Rodrigo Alejandro Pertierra on Jun 17, 2010 11:56 AM

  • Idoc File to File scenario mapping problem

    Dear All,
    I am working on File to File scenario in which my source xml file is having multiple deliveries Idoc structure to which I want to convert into output structure as required.
    In my source file there is possibility that there can be multiple delivery idocs for the same delivery number so i want to pick all the data for  the unique deliveries and if same delivery number repeats then the delivery created last should only be picked without considering others.
    Please guide me in mapping this scenario.
    Regards,
    NJ

    Hi,
      Use the below UDF.
    Set set = new HashSet(Arrays.asList(var1));
      String[] array2 = (String[])(set.toArray(new String[set.size()]));
      Arrays.sort(array2);
      for (int i = 0; i < array2.length; i++) {
        result.addValue(array2<i>);
    Map like below:
    source fieldremove contextUDF--Target(delivery number )
    Regards,
    Prakasu.M
    Edited by: prakasu on Jun 2, 2009 6:43 PM

  • Suggestions Required While Doing Idoc To File Scenario

    Hi All,
    My scenario is Idoc To File. I have to take the  Purchase Order Idoc from system "A" and send it as a XML file to system"B".
    The problem here is, i have three types of PO Idoc's with different fields.
    1) Purchase Order (Fields : PO Number, date, vendor, material and quantity)
    2) Delivery with serial number ( Fields : delivery number, est date, vendor, material, serial and quantity)
    3) Delivery using serial number with subcontracting repair ( Fields :
    PO Number, date, vendor, material, serial and quantity).
    I have to convert all the above PO Idoc's into Xml file format and send it to system "B".
    Here i have three different Idocs one per Purchase Order , one per Delivery with serial number and one per  Delivery using serial number with subcontracting repair .
    My question is, shall i need to create three different scenario's for the above requirement or shall i create only one scenario with all the fileds in file structure.
    Is it possible by creating only scenario, to handle the above situation. If so where can i handle the conditions saying that the File Structure
    for Purchase Order  should be (With Fields : PO Number, date, vendor, material and quantity) ,
    for Delivery with serial number should be (With  Fields : delivery number, est date, vendor, material, serial and quantity) and 
    for  Delivery using serial number with subcontracting repair should be ( With  Fields : PO Number, date, vendor, material, serial and quantity).
    Please provide the solution for the above situation.
    And suggest me which is the best method to follow.
    Regards,
    Venkat.

    Prasad,
    My requirement is i will process only  one Idoc at a time either it may be Purchase order or Delivery with serial number or  Delivery using serial number with subcontracting repair . So no chance of multiple targets. For example
    First time i may process Idoc related to Purchase Order then at that time  only fields ( PO Number, date, vendor, material and quantity) should convert into  Xml file and pass it to system "B".
    Second time i may process Idoc related to Delivery with serial number then at that time  only fields ( delivery number, est date, vendor, material, serial and quantity)  should convert into  Xml file and pass it to system "B".
    Third time i may process Idoc related to Delivery using serial number with subcontracting repair then at that time  only fields ( PO Number, date, vendor, material, serial and quantity) should convert into  Xml file and pass it to system "B".
    In all the cases the target is same "B" system.
    I think now it is clear.
    Regards,
    Venkat.

  • Context handling in message mapping  for an IDoc to File Scenario

    Hi,
    Can somebody help me with this issue. I have an Idoc to file scenario. heres my idoc structure. Its a custom Idoc
    Header (1..1)
    Detail (0..Unbounded)
             DependentDetail (0...Unbounded)              Note: This dependentdetail is a subelement of Detail
    Trailer(1...1)
    I  created my target structrure the same way as the Idoc structure.
    My output is a simple text file. I need the output in this format
    Header
    Detail1
       Dependentdetail1
       DependentDetail2
       DependentDetail3
    Detail2
       DependentDetail1
       Dependentdetail2
    Detail3
    Detail4
    Trailer
    Since the Detail and Dependent Detail records are unbounded .
    But right now i m getting my output like this:
    Header
    Detail1
    Detail2
    Detail3
    Detail4
    Trailer
    But the DependentDetail record in not showing up in the output file. I didnot do any context change in my mapping. So do I need to do any context handling??...If so can somebody explain me with this.
    Thanks,
    Adam
    Edited by: hymanroth on Apr 29, 2011 11:11 PM

    Thanks Kenneth foryour quick reply,
    Yes, I see the payload for Dependent detail in SXMB_MONI. So as you said earlier there's a problem with my content conversion.
    my content conversion is as follows:
    Header.fieldNames                             
    Header.fieldFixedLengths                
    Header.endSeparator                        
    Detail.fieldNames                               
    Detail.fieldFixedLengths                    
    Detail.endSeparator
    DependentDetail.fieldNames
    DependentDetail.fieldFixedLengths                   
    DependentDetail.endSeparator
    Trailer.fieldNames                             
    Trailer.fieldFixedLengths                
    Trailer.endSeparator  
    So As I told  earlier. With the above content conversion. I am not able to get the Dependent detail record in my output file. So If there is a change in my content conversion can u check it and tell me where I went wrong.
    Thanks,
    Harsh
    Edited by: hymanroth on May 2, 2011 7:03 PM

  • Real time idoc to file scenario - URGENT!

    Hi all,
    I have a real time idoc to file scenario with the idoc structure as below:
    WP_PLU03
       IDOC
         Begin
         EDI_DC40
         E1WPA01
            E1WPA02
    Now as can be seen, EDI_DC40 is the header record common for the eniter idoc. But the segment E1WPA01 will repeat for each item sent from R/3. E1WPA01 in turn has many segments within it whcih corresponds to that one item.
    Now the problem i am facing is, I did the mapping for all required fields from E1WPA01 to my file structure and it works fine if i send one 1 instance of E1WPA01. But when i send multiple instance of E1WPA01 for each item, my result in teh file should be 1 line of record for each E1WPA01. But this doesnt happen. It takes allE1WPA01 as 1 and gives only one record in the file.
    How can this be overcome? this is a very common requirments? did i miss anything in the configuration?
    Thnaks,
    Yash

    Hi Matias,
    I have two instances (may be much more than 2) of the same segment in the idoc (E1WPA01) and each instance should create a new root in the target message structure as in the link below
    Link: [http://img299.imageshack.us/my.php?image=image3ct6.png]
    I have mapped the segment E1WPA01 with the root like this:
    Link: [http://img176.imageshack.us/my.php?image=image2of6.png]
    Hence it creates 1 root for each segment. But for complex mappings such as:
    Link: [http://img337.imageshack.us/my.php?image=image1yu1.png]
    the 2 input parameter to the UDF - KONDART and KONDWERT - the queue can be seen. the problem which i m facing here is in this queue, values from both the instnace of the segment E1WPA01 is taken together where each instance should be processed seperately. The first 4 values in the top queue(till VKP0) belongs to the filed KONDART of the 1st isntance of the segment and the 1st 4 values of the below queue (till 17) belongs to the field KONDWERT. Similarly the remaining belogns to the other segment. My logic in UDF is built taking only one instance at a time. Is there anyway i can distinguish between the two instance within my UDF?
    I hope u understand my problem here.
    Thanks,
    Yash

  • Issue in IDOC-File Scenario

    Hallo Everybody,
    In one of the requirements,for the interface design which involves IDOC-FILE scenario we have a req as:-
    Multiple IDOCs would be sent from SAP R/3 to SAP XI. Each IDOC can have 0-4 segments and for each segment a file needs to created.
    The files needs to be FTPed to a location, only if all the IDOCs have been processed successfully.
    Requirement:
    1) Even if a single IDOC fails,the files should not be FTPed. --> How do we handle this in XI.
    2) We need to send a notification from XI, in case any IDOC processing fails.
    3) How do we check in XI, if all the IDOCs have been processed successfully.
    Please suggest me with some good stategies to resolve this issue.
    Appreciations and Rewards in line.
    Regards,
    Younus

    Hi
    Are you planning to use BPM as it suits your requirement.
    To collect the idocs in small bunches refer
    Collecting IDocs without using BPM
    1) Even if a single IDOC fails,the files should not be FTPed. --> How do we handle this in XI.
    BPM will allow you to wait for the time all IDOC are processed
    2) We need to send a notification from XI, in case any IDOC processing fails.
    BPM exception handling will allow this functionality even to the exact field you want to send  notification
    3) How do we check in XI, if all the IDOCs have been processed successfully.
    Set Acknowledgment for IDOC's
    refer
    Posting multiple IDocs with Acknowledgement
    Thanks
    Gaurav

  • Error/Doubts in Idoc-XI-File scenario

    Dear All,
    I am doing one scenario in which DELIVERY idoc is posted from R/3 to XI and then from XI that idoc is to be sent as flat file to one local folder.
    For this scenario, I have done all ALE settings and I am able to see the idoc in XI in cXML format.Now I want to sent it as flat file.
    Now, for doing this I created 2 BS & 2 TS. 1 BS & TS of type Third Party for receiver & 1 BS & TS are of type Web as ABAP for sender. Then I have created one namespace in IR. I have not created any DT, MT, MI, MM becoz the structure of source and target file are same. Now, I created one IM in which I specified specified Type as "ABAP Class" & Mapping program name as one of the Z function module as specified in one of the SAP Guides.
    Then in ID, I created 2 Parties ie. one for Sender & one for receiver. Sender is having a communication channel of type Idoc & receiver is having communication channel of type File. And thn further Receiver Agreement, Inetrface Determination, Sender Agreement & Receiver Agreement are configured.
    In my system there is one scenario already configured which is using Delivery idoc so I have used party in my scenario for both sender & receiver.
    Now, when I am sending the idoc from R/3, I am able to see cXML in SXMB_MONI but it is taking receiver as the one which is defined for the already existing scenario but not the receiver defined by me.
    Can anybody guide if I have followed the correct steps & where I am doing the error.
    Warm Regards,
    N.Jain

    Hi ,
    Plese refer the following blogs ,
    IDoc to File
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    You have to do all this settings mentioned in the docuemnt:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapR3%28Idocs%29ToXI--Steps+Summarized&
    Also can you check this weblogs on the same:
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    /people/venugopalarao.immadisetty/blog/2007/01/24/troubleshooting-file-to-idoc-scenario-in-xi
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    /people/saravanakumar.kuppusamy2/blog/2005/01/20/configuration-tips-for-a-business-serviceintegration-process-to-send-back-ale-audit-idoc
    Thanks ,
    Suvarna
    Award pts if  it helps .

Maybe you are looking for

  • Apex as Partner App using OID SSO

    Hi I have setup Apex as a partner App in OAS. Registered the partner application. Created a simple app that uses the builtin Apex auth as partner app using sso. I get the OAS login appearing as expected for authentication however apon entering creden

  • Sqlplus – spool data to a flat file

    Hi, Does any oracle expert here know why the sqlplus command could not spool all the data into a flat file at one time. I have tried below command. It seems like every time I will get different file size :( a) sqlplus -s $dbUser/$dbPass@$dbName <<EOF

  • Dropped My Laptop - Which Tests Should I Run To Assure It's Fine?

    Unfortunately I placed my one + a half year old 15" MacBook Pro laptop  on a new tilted notebook cooler (that has no grip), & sat them both  on my computer chair while in use. To my recollection I only had the  YouTube homepage open without any video

  • My ipod keeps restarting when it is docked.

    Everytime I put my ipod in it's docking station (one that doubles as a radio and alarm clock), it restarts itself. The same happens whenever I change the song when it's docked. Please help- I've looked everywhere but I can't find a solution! Thanks

  • Can I please cancel this subscription. I just ordered it, less than 10 minutes ago. It is not what I thought it was.

    About 15 mintues ago I subscribed to this Adobe Export Convert. I would like to cancel it; it is not what I thought it was. Also, is there any phone number to talk to a person. I also did not get a receipt for my purchase.