IDOC to FIle multiple records

HI Experts,
My scenario is IDOC-FILE and i need to collect idocs and send it to XI. So i am using XML PORT.
The vendor master file is reaching the directory that i specified in receiver communication channel.but only one record is existing in that even i send multiple idocs.
i had configured the messege mapping  with the external message  that i imported as XSD(changed the idoc occurence max= unbounded) and i used the same for interface mapping.
what can be the problem .
Thanks in Advance,

HI,
This problem due to occurance mapping, check sender and receiver structure occurance fields mapping.
In sender partner profile outbound configuration select collection idoc option
source                 target
segment (0..un)-----> row(0..un)
             field1................field1
             filed2................field2
this mapping will sort out your problem

Similar Messages

  • IDOC to File multiple segments to one record

    Hello,
    I have an xi scenerio where I am going from IDOC to flat file.   I have an issue where a segment can occur multiple times and I want to take the last segment of that multiple occuring segment as my record to flatfile.
    for example
           EDI_DC
              EMPLOYEE
                   EMPLOYEE_PERSONAL_INFO
                   EMPLOYEE_ADDRESS_INFO
                   EMPLOYEE_ADDRESS_INFO
                   EMPLOYEE_ADDRESS_INFO
                   EMPLOYEE_BENEFIT_INFO
    in the above example, i want to take the last occurance of the EMPLOYEE_ADDRESS_INFO in my message mapping without any logic around dates or statuses.
    is there an easy way to do this?
    thank you

    use this logic;
    source -> COUNT-
                              |--- EqualsS -> pass the source to target
    source -> INDEX -
    the logic is count function will give you the number of occurrences and Index will return the current occurrence.

  • Posting  multiple records from file to idoc

    Hi Exerts,
       i have done scenario to post one record from file to IDOC, to post multiple records from file to idoc what are the options to be modified in the scenario.
    thanks,
    dhanush

    Hi Dhanush,
      You need to change the occurance of idoc to 0 to unbounded ie need to opt idoc packaging.
      Just download the xsd of you idoc to the desktop and change the occurance tag as "<xsd:element name="IDOC" type="COND_A.COND_A02" maxOccurs="unbounded" />" and then reimport it into External definition and use it in your message mapping and then map it with you source structure.
    Regards,
    Prasanthi.

  • 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

  • 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

  • Creation of multiple records in reciever file as per occurance of 1 segment

    Hi SapAll.
    i have a got a requirement in an IDOC To File Interface
    the Requirement is under sending IDOC there will be multiple segments whose fields will me mapped to reciever file,so here i got a business requirement as
    IDOC -
    Segment 1-occur for 1 time
    segment 2- occurs  for 1 time
    segment 3-occurs for 3 times so here PI Need to create a file with 3 records as segment 3 repeats for 3 times, here segment 1 and segment 2  field  values repeats for all the 3 records int the file and segment 3 fields values will have to be mapped respectively for each record of all the 3 records from each segment 3.
    i dont know on how i can acheive this.
    can any of sap group provide me the solution.
    regards.
    Varma

    > segment 3-occurs for 3 times so here PI Need to create a file with 3 records as segment 3 repeats for 3 times, here segment 1 and segment 2  field  values repeats for all the 3 records int the file and segment 3 fields values will have to be mapped respectively for each record of all the 3 records from each segment 3.
    Create your target structure as mentioned and do the mapping as shown below.
    <Records> 0..unbounded
         <segment1_Fields> </segment1_Fields>
         <segment2_Fields> </segment2_Fields>
         <segment3_Fields> </segment3_Fields>
    </Records>
    Now do the mapping like this..
            segment3 -
    >RemoveContext---> Records (parent node mapping)
             segment1----->CopyValue(0) ---> segment_field1
             segment2----->CopyValue(0) ---> segment_field2
             segment3----->SplitByValue ---> segment_field3
    Note: You can also use "UseOneAsMany" instead of "CopyValue" function to repeat the segment1 & segment2 values in each record.

  • Multiple IDocs to File using BPM

    Hi All,
    I have configured a scenario of multiple IDocs to file using BPM.  In this scenario while I am triggering IDoc from R/3 system it is sent to the external program.    I am getting in the status record of WE05 as IDoc is sent to an external system with status code 03. But I am unable to view the same message in moni of the XI system.
    Also I have checked the ALE settings on both the sender and receiver side and it is fine.
    Also in SM58 nothing is there in queue.
    Can anyone solve this issue of mine?
    Cheers,
    Neethu.

    Hi,
    in many cases it's a problem with the RFC connection. You should try an authorization test in SM59 of the R/3 system.
    This might also be useful:
    http://help.sap.com/saphelp_nw04s/helpdata/en/6a/e6194119d8f323e10000000a155106/frameset.htm
    Regards
    Patrick

  • Idoc to file -- Records based on the segment repitition. Urgent..Pls.!!

    Hi Experts,
    Iam doing a Idoc to file scenario.
    Based on the sales organization(VKORG),i need to create the multiple records in the file.
    For example :
    E1MARAM 0..Unbounded
    |
    |E1MARMM 0..Unbounded
    |
    E1MARMM
    |
    E1MARMM
    |
    E1MARMM
    |
    E1MVKEM 0..Unbounded
    |
    E1MVKEM
    When E1MVKEM-VKORG = Z200 then i need to create a file with 4 records (for 4 E1MARMM segments 4 records will be created)
    When one more E1MVKEM-VKORG = Z201 present then we need to create 4 more records for Z201 in the same file.
    So now i will be getting a single file with 8 records.
    Each E1MVKEM segment will be having only one VKORG value.
    I tried with <b>oneasmany</b> function,but its creating only for VKORG=Z200 with 4 values but its not providing the values for VKORG=Z201.
    Please suggest me what to do.. I need to write UDF's or can i achieve without using them.??
    PS: we are not using BPM in our scenario.
    Thank You.
    Regards
    Seema.

    Hi Prabhu,
    I need to display the records in the file for each sales organisation (MVKEM-VKORG) .
    MARAM is the parent node and MARMM,MVKEM are child nodes.
    MARAM                                                  
             MARMM                                              
             MARMM                                              
             MARMM                                              
             MVKEM                                                               
             MVKEM                    
    Consider that first MVKEM has VKORG = Z200 then 3 records has to display in file (for 3 MARMM segments 3 records has to display)
    Simillarly consider second MVKEM has VKORG = Z201 then 3 more records has to display in file. ( same as above for 3 MARMM segments = 3 records in file)
    So for the above structure i will be getting a total of 6 Records in my output file.
    Iam trying with different Node functions but it is taking only for first VKORG and not taking the second one.so iam getting only 3 records in my file.
    Please help me in cracking this.
    Regards
    Seema.

  • Idoc to File -- Records will depend on repetition of particular segment.

    Hi Experts,
    Iam doing a Idoc to file scenario.
    Based on the sales organization(VKORG),i need to create the multiple records in the file.
    For example :
    E1MARAM  0..Unbounded
         |
         |E1MARMM   0..Unbounded
         |
         E1MARMM
         |
         E1MARMM
         |
         E1MARMM
         |
    <b> E1MVKEM   0..Unbounded
         |
         E1MVKEM</b>           
    When E1MVKEM-VKORG = Z200 then i need to create a file with 4 records (for 4 E1MARAM segments 4 records will be created)
    When one more E1MVKEM-VKORG  = Z201 present then we need to create 4 more records for Z201 in the same file.
    So now i will be getting a single file with 8 records.
    Please suggest me how to approach these kind of scenario.
    PS: we are not using BPM in our scenario.
    Thank You.
    Regards
    Seema.

    Hey seema,
    This can be achieved using node function <b>createif</b>.
    Refer this link which help you doing the same
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/frameset.htm
    and also refer stefan's blog
    /people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool
    Hope it helps you
    Regards,
    Ramesh P

  • How to isolate error with a record/segment in IDOC with multiple records

    I have an IDOC with multiple records/segments (typically 1000 records/segments). Sometime XI can not process the IDOC because of some control characters in data.
    1. How can I pre-processed the IDOC to remove those control characters?
    Can I use XPATH expression/Java class to do it? How can I configure the XPATH expression/Java class in XI to pre-process the file?
    2. Until I have answer to 1st question. I would like to find out the error is exactly for which record? What configuration can I do in XI to isolate the error is with which record/segment in IDOC?
    Thanks in advance.

    Split the IDoc.
    with in the UDF, after the validations if every thing fine, pass as successful records to success_MT and pass it to target system using Branching in BPM.
    if errors found in the record, then store the error records in Hash table with in UDF, get the IDoc number, frame as a string and raise alert.
    U have to do this in the context of IDoc.
    If U wanna get the IDoc Number, Segment Name and field name for every failure, U can pass the expected error field name as constant to UDF, frame the sentence in the UDF like -> <b>IDoc 1234321 segment – SEG001 – field – FLD03 has a special character ‘*’</b>.
    If U wanna pass this string to source/target, U can do in error messages branch in BPM.
    U must use BPM for splitting the IDoc, since it is multi-mapping.
    reg.,
    Yallabandi.

  • IDocs and Multiple Records

    Ignorant newbie here.  In migrating legacy data to an R/3 system, one approach seems to be to massage the data into IDoc format and ship it to R/3 for processing by some BAPI_xxx_CREATEFROMDATA BAPI.
    I have a tool that can be changed to write IDoc formated data out to a disk file. 
    I am unclear on whether an IDoc can contain the data for only one record or a whole bunch of records.  Or maybe I should be asking whether the disk file I produce can contain multiple IDocs (header, segments, header, segments,...).
    Also, once I've produced the file containing the IDoc(s), what do I do with it; does DX Workbench handle such things?

    Hi,
    1) Each IDoc# contains data to process single transaction. But it contains with mutiple rows with segments data that to process necessary application data that required to create like Sales order creation/change , Material master creation/change.
    2) your disk file can have any no# of idocs.
    Your DX workbench(data migration tool) will process all the IDocs from file by considering one idoc# at a time.
    It is as simple as like how your BDC program works inorder to post your orders that reading from file.
    For understading about DX requirements click on given below link:
    http://www.sapgenie.com/sapgenie/docs/PROCESSING_LSMW_DXWB.doc
    Naga

  • Problem : IDoc to file Senario, multiple segments in the IDoc.Intresting !!

    Hello People,
    Just a very good problem, to put your brains work.
    The senario is Idoc to File.
    Now Suppose the structure of IDoc is in such a way.
    segment1 -  fields A, B, C, D --- >> Single
    segment2 - fields E,F            --->> This segment can come multiple times.
    segment3 - fields G, H          -
    >> Single
    segment4 - filds I, J, K          -
    >> Multiple.
    Now the format of the file is Fixed Length.
    The record will be inserted Row wise.
    Let us assume that the number of segments are.
    segment1
    segment2
    segment2
    segment3
    segment4
    segment4
    All segments are at the same level.
    Example of file :-
    A  B  C  D  E1  F1  G H I1  J1 K1
    A  B  C  D  E2  F2  G H I2  J2 K2
    So please let me know, what kind of structure should i create in my repository for the Target and also let me know , the File content Conversion part ..
    Thanks in Advance.
    Harpreet.

    hi,
    Repeat the row for each segment and in the (i)th iteration of the map it to the (i)th segment from the input. Now in your FCC, it will be like writing a normal fixed length conversion.
    For e.g. you target structure will look somewhat like this.
    Document
      Recordset
         Record(i)
           FieldA
           FieldB
           FieldC
           FieldD
           FieldE(i)
           FieldF(i)
    and so on....
    Cheers,
    Sarath.
    Award if helpful.

  • Loading Hex Files with multiple records with each line starting with : record marker, how do I load this hex file into a front panel table ? thanks in advance, Jeff.

    I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.

    Jeff,
    I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
    I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
    Thanks

  • Forms pulling Multiple Records from an XML Schema and XML data files - Adobe LiveCycle Designer

    I built a form in Adobe LiveCycle with an xml schema and data file.  The problem is with how the form renders the xml data file.
    I have a statement element that consists of about 6 fields (statementID, statementName, statementAddress, statementCountry, statementZip, statementDate, etc) of data in the schema that allows for multiple iterations - so one xml data file can contain multiple statements. These fields allow for null values.
    But here's the problem:  When any of the statements - say statement 2 of 6 - has a null value in one of the fields, if the xml data file doesn't have a placeholder
    (example of placeholder:  <statementName type="String"/>   )in the xml for that field, my form pulls the field value from the NEXT statement.
    This corrupts all the rest of the statement records, as this field is shifted up for all the rest.
    I know that in the past I haven't needed a placeholder when a field was null. But I'm wondering if when the data allows for multiple records the xml data file needs to generate the placeholder.  And where is the problem? In the Schema? The xml data file? My form?  And the 64-thousand-dollar question:  How to fix it?

    If your <statement> element is the one that repeats, it should be bound to a subform with the binding string of something like $.statement[*]. Then in that subform should be your fields and they should have bindings of $.statementID, $.statementName, $.statementAddress, etc.
    Kyle

  • Get MUTLIPLE output files for SINGLE input file with multiple records

    Hi ,
    I have source xml file  which has multiple records in it and  I want to get multiple seperate  flat files for it.
    this is my source structure
    <root>
    <Header1 fld1=1234 fld2="name1" fld3='SAP1"
    fld4='000" fld5=0 fld6="sdn1"></header>...............no line items here
    <Header2 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value1 fld8=value2 fld9=value3 /line><line fld7=value4 fld8=value5 fld9=value6 /line></header>.....two line items here
    <Header3 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value7 fld8=value8 fld9=value9 /line></header>......one line item here
    Header4 fld1=12345 fld2="name2" fld3='SAP2"
    fld4='0006" fld5=01 fld6="sdn2"</header>.......no line items here
    </root>
    I am trying to get flat files as many time the <b>header</b> values occur that many target files should appear in the target.
    like
    file1:
    1234name1SAP10000~sdn1
    file2:
    123nameSAp000~sdn
    value1value2valu3
    valu4value5value6
    file3:
    123namesap000~sdn
    value7valu8value9
    file4:
    12345name2SAP2000601~SDN2
    here I have 4 headers so i need to get 4 output files ,similarly for 'n' headers I need to get 'n'  output flat files. the above mentioned source xml file is just one file,like that I might get somany sourc xml files which has similar structure in it.
    and also it is important to get the line items,if exists to the header, for the corresponding headers.
    how can I achieve this?do I need to use BPM or any mappings other than Graphical? 
    please suggest me.
    thank you.
    Babu
    sorry,output file structure changed
            Babu

    Babu,
    See the Mapping and the logic.
    Make sure your target message occurrence:http://www.flickr.com/photo_zoom.gne?id=1412748793&size=o
    Check out for source and target structure
    http://www.flickr.com/photo_zoom.gne?id=1412748803&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748809&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748815&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748825&size=o
    Results:http://www.flickr.com/photo_zoom.gne?id=1412748799&size=o
    Note:
    While creating Interface determination choose it as Enhanced/Extended
    The Receiver Content conversion - For field separator and line separator give 'nl' , coz we concatenated all of them using ~ in mapping.
    If you find any discrepancy in the above logic , please let me know.
    raj.

Maybe you are looking for