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

Similar Messages

  • Multiple idocs in a file

    Hi,
    How to transfer multiple idocs in a file? ( We can use BPM)  but i dont know how to implement using BPM.
    Kindly help.
    Regards
    sai

    Do you wish to  have multiple idocs coming through SAP merged into a single file
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/906fda31-0e00-2c10-4fb4-e264988a9263
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b?quicklink=index&overridelayout=true
    saptechnical website /Tutorials/XI/CollectMultipleIDocs/Collect1
    Regards
    Ninad

  • Problems with multiple idocs in one file ( Inbound file )

    HI,
    Thanks in Advance for your suggestions.. Highly appreciated.
    We have problems with multiple IDocs in one file.
    We are using XIB ( Amtrix ) as Middleware to receive the files.
    Curretenly When the file contains one IDoc then there is no problem. IDoc is created and everything is ok.
    If file contains two IDocs ( for example two messages ORDERS and DELVERY ) then it is creating two IDocs but both IDocs contains ORDERS plus DELIVERY segements information. That is the problem. Some how SAP unable to differentiate the IDocs in the file.. But it knows that how many idocs are there in the file..because it is creating exact number of idocs.
    We are using TRFC port ... Do I need to change it to File port..
    When we have more than one idoc do we need set any parameter in the file ...

    Thanks for the swift response. Always ideas are useful.
    As of now , Middleware cannot split the file.
    Thing is SAP is creating two Idocs with different message types. Problem is First IDoc contains ORDERS message type but also DELIVERY segments as well. Second IDoc with DELIVERY message tyoe but ORDERS segments as well... This is the problem... I think we are missing some field activation in file for EDIDC record.
    As far as I know file port supports the number of IDocs in one file.. Hope TRFC port also supports that

  • Multiple IDOC to Multiple IDOC scenario without BPM steps????

    Hi
    Could you please give me the solution for this ???
    I want steps for sending all IDOCs at a time- ---"Multiple IDOC to Multiple IDOC scenario without using BPM".???
    thanks
    3nadh

    Hello,
    Refer the below, for certain details!
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi     ALE configuration for pushing idocs from SAP to XI
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change     XI: IDOC bundling - the "trick" with the occurance change
    Regards,
    Jilan

  • How to genereate multiple IDOCs from multiple rows in a single flat file

    HI,
    I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
    I created DT of following strcuture:
    DT_TYPE
    --DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    IDOC is
    ZIDOC
    IDOC----1..1
    -BEGIN-Required
    -SEGMENT1---1..1
    -SEGEMENT2-1..1
    -SEGMENT3-1..999
    To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
    Source structure:
    Messages------1...1
    -Message1--1....1
    DT_TYPE------0..Unbound
    DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    Target Strcuture:
    Messages----1....1
    -Message--1....1
    ZIDOC----1....1
    IDOC------1..1
    BEGIN---Required
    SEGMENT1-----1..1
    SEGEMENT2---1..1
    SEGMENT3---1..999
    I am unable to generate two IDOCs if there are two rows:
    Am I missing some thing?
    Thanks
    Rajeev

    HI,
    I am working on a scenario where I need to genereate a IDOC per one row in a flat file.
    I created DT of following strcuture:
    DT_TYPE
    --DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    IDOC is
    ZIDOC
    IDOC----1..1
    -BEGIN-Required
    -SEGMENT1---1..1
    -SEGEMENT2-1..1
    -SEGMENT3-1..999
    To create multiple IDOCs if there are multiple rows in a flat file in MM i choosed occurances as 0..unbound in Signiture tab
    Source structure:
    Messages------1...1
    -Message1--1....1
    DT_TYPE------0..Unbound
    DETAILS -
    0..Unbound
    F1------0..Unbound
    F2------0..Unbound
    F3------0..Unbound
    Target Strcuture:
    Messages----1....1
    -Message--1....1
    ZIDOC----0....unbound
    IDOC------1..1
    BEGIN---Required
    SEGMENT1-----1..1
    SEGEMENT2---1..1
    SEGMENT3---1..999
    I am unable to generate two IDOCs if there are two rows:
    Am I missing some thing?
    It isnt possible with out BPM?
    Thanks
    Rajeev

  • Mapping from File to IDoc with multiple Idocs and multiple line items?

    Hi All,
    Need some help with mapping, requirement as below: I have a flat file with multiple records, need to create multiple idocs per each separate order in flat file with as many line items.
    Order_1 field-1 field-2 field-3 field-4
    Order_1 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_2 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    Order_3 field-1 field-2 field-3 field-4
    I have imported IDoc changed to 1:Unbounded, able to create multiple Idocs based on separate order from flat file.
    Order_No - removeContexts - splitByValue(ValueChanged) - collapseContexts - exists - creatIf - IDOC
    Now I am having hard time creating a line item segment E1EDP01. I want to have Idoc created below way:
    IDoc-1 (Order_1)
    E1EDP01
    E1EDP01
    IDoc-2 (Order_2)
    E1EDP01
    E1EDP01
    IDoc-3 (Order_3)
    E1EDP01
    E1EDP01
    I am getting multiple IDocs created. Please help me to create mutlieple line items under each Idoc. Please be speficic about the node funtions to be used, because I tried many times with different combinations, didn't work.
    Regards,
    N@v!n

    Hi Navin,
    Create your source structure like below
    <Order>1 to unbounded
        <Order_No>
        <field1>
        <field2>
        <field3>
        <field4>
    </oder>
    to create mutiple IDocs based on order number,use below logic
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)--->collapsecontext-->Idoc
    use below logic for E1EDPO1,
    Order----->removecontexts------>
                                                                                    formatByexample------>E1EDP01
    Order_No-->removecontexts--->sort--->splitbyvalue(Valuechange)-------->
    try above logic and let me know if you any issues.
    Regards,
    Raj

  • Multiple IDocs - XI - Flat file

    We are looking at a scenario to send multiple IDOCS from SAP to Flat File. We implemented this using the Collect Pattern in BPM, merge all the IDocs into a single message and write it in a file. But is there any a way to avoid BPM and still be able to send multiple IDOCS in a package to be written onto one file?
    Thanks
    Vinoda

    Hi,
    I think this is possible using PACKAGING.
    Check this note <b>814393</b> on Service Market Place.
    <i>You want to create or process an XI message with multiple instances of an IDoc (of the same IDoc or extension type) in the mapping.
    The payload of the relevant message is to have the following the format:
    <IDOCTYP>
    <IDOC>...</IDOC>
    <IDOC>...</IDOC>
    </IDOCTYP>
    To be able to process these messages in the message mapping of the source system and to create them in the target system, you need an XML schema for the IDOC that allows multiple instances of the IDOCtag.
    If the relevant IDOC is imported into the Integration Repository, the system generates an XML schema that sets the number of instances of the IDOC tag to exactly one.
    The following describes how you can manually change the XML schema so that multiple instances of the IDOC tag are allowed, and how you can make the modified XML schema available to an adequate message mapping.
    Other terms
    IDoc packaging
    Reason and Prerequisites
    The relevant IDoc is imported into the Integration Repository.
    Solution
    1) Log on to the Integration Repository.
    2) Open the relevant IDoc in the object editor.
    3) Select the "Export XSD" menu option in the "Tools" menu.
    4) In the subsequent dialog box, assign a file name and save the data to the hard disk of your local PC.
    5) Open the file that you have saved in step 4 in an adequate editor (for example, Notepad) for editing.
    6) Locate the first entry: <xsd:element name="IDOC" type="<
    Idocname>"> and add the following expression, maxOccurs="unbounded", between the value of the type attribute and the closing angular bracket.
    Example:
    <xsd:element name="IDOC" type="ADR2MAS.ADR2MAS02"
    maxOccurs="unbounded">
    7) Save the modified file to the hard disk of your local PC.
    8) In the message mapping, use the file saved in step 7 instead of the imported IDoc by using the "Import XML or XSD" function in the mapping tool to select the source or target messages.
    </i>
    Regards,
    Bhavesh

  • Multiple IDocs-XI-Single File Scenario

    Hi All,
       We need to send multiple IDocs from R/3 to XI and then to a single file using File Adapter. Please help us with your suggestions on how to proceed using a simple solution.
    Regards,
    Peter

    I made a program that solved the issue of collecting the IDOC in to one file.
    1.  The partent profile should be setup for collect idocs
    2.  Make a report that will select and dispatch the idocs
    seudo code:
    select tables with select criteria:
    edidc (idoc control)
    edid4 (idoc data)
    one yo have made you selection into internal tables
    it_final_edidc
    it_final_edid4
    *you can apply rules and data tranformations, eg. PEXR2002 batch per payment type.
    CALL FUNCTION 'EDI_OUTPUT_NEW'
               EXPORTING
                    onl_option  = 'B'
                ERROR_FLAG  = ' '
                NAST_RECORD =
               TABLES
                    i_edidc     = it_final_edidc
                    i_edidd     = it_final_edid4
               EXCEPTIONS
                    OTHERS      = 1.
      " EDI mesages dispatched
      IF sy-subrc EQ 0.
        COMMIT WORK.
        CALL FUNCTION 'DEQUEUE_ALL'
           EXPORTING
                _SYNCHRON = ' '
             EXCEPTIONS
                  OTHERS    = 1.
    That work like a charm when writting the IDOC to a single file.
    But when I send the IDOCS to XI like XML-IDOC I still receive one transaction per IDOC.
    if anyone know how to solve that, let me know.
    juan

  • Multiple idoc to flat file

    Hi,
    i have  a scenario from idoc to flat file.There is two idoc that send message in same file.Without flat file content messages come succesfully.the format should be following:
    at the first  row should be the first idoc,
    at the second row should be the second idoc
    01  1FONEX0045               FONEX0045               FONEX SIVI SABUN 400+850ML FLOWERS                    =>1.idoc
    02  1FONEX0045               8691988000162           8691988000162                                                             =>2.idoc
    01  1DOVE0199                DOVE0199                   DOVE SAC DOKULMELERINE COZUM SAC BAKIM M     =>1.idoc
    02  1DOVE0199                8718114638348           8718114638348                                                               =>2.idoc
    Thanks in Advance
    Nurhan

    Hi,
    You have to MessageTransformBean Module.
    The MessageTransformBean module enables conversion of XML files to flat files and vice versa. You can use this module in the sender and receiver communication channels.
    In receiver communication channel, specify MessageTransformBean module before standard adapter module CallSapAdapter and use
    Module Name: localejbs/AF_Modules/MessageTransformBean
    Module Key : XML2Plain
    Please see the below links, it might be useful to you.
    /people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-2
    http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm
    Regards,
    P.Rajesh

  • Create multiple idoc with multiple receivers based on value mapping table

    Hi,
    Scenario: 
    Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
    Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
    Issue 1 : say the incoming idoc has 4  line seg wid 4 diff profit center
    Profit center.       Rec comp code.   Recv sys
    P1.                       C1.                        R1
    P2.                       C2.                        R1
    PS.                       C2.                        R1
    P3.                       C3.                        R2
    Nw using this info, I want 3 diff idocs to be created for each unique comp code.
    Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
    Idoc2 : for C2 wid 2 line items + 1 for reconsilation
    Idoc 3: for C3 wid 1 line item + 1 for reconsilation
    Idoc 1 and idoc 2 shud be sent to R1.
    Idoc 3 shud be sent to R2.
    Kindly advise on this

    Hi experts,
    U all r pretty close, but let me put this more clearly.
    Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
    Nw as per the values from value mapping table.
    Idoc for c1 contains 1 line seg.
    Idoc for c2 contains 2 line segs.
    N idoc for c3 contains 1 line seg.
    steps2 n 3,  where I do not have a confirmed solution yet n need ur advise.
    Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
    In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
    Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
    Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
    Nw I need ur advise on how 2 generate this additional seg in each idocm
    Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
    Nw how do I do this?
    Please explain with examples if possible 4 bettr understanding.
    u2020ђąu03B7kўu03C3u03C5 in advance.

  • Multiple Idoc to a file

    Hi,
      I gone through the blog
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm but i am not able to understand about message mapping
    I am using two idoc EUPEXR.IDCREF01.ZDCREF01 and PAYEXT.PEXR2002.ZEXR2002 and I created file DT, MT and MI.  Please let me know what are all the soure and target message need to give while doing mapping
    Regards,
    Dhil

    hey
    u have to create 3 message mappings and 3 interface mapping.
    step 4 and 5 say it clearly
    Step 4:
    Create three Message Mapping to convert Outbound type of IDOC into Abstract type so that we can collect it in our BPM. Message Mapping for conversion of three different types of IDOCs to their Abstract type are as follows:
    MM_ISU_UKGAS_NOM1_to_NOM1_ABS
    (ii) MM_ISU_UKGAS_NOM2_to_NOM2_ABS
    (iii) MM_ISU_UKGAS_NOM3_to_NOM3_ABS
    Below mapping is for N:1 transformation. (Here input will be having three different types of Abstract IDOCs and target will be having Abstract Target File type)
    (iv) MM_ISU_UKGAS_NOM_to_NOM_ABS
    Step 5:
    Create the Interface Mapping as follows.
    (a) Interface mapping for IDOC outbound to IDOC abstract.
    IM_ISU_UKGAS_NOM1_to_NOM1_ABS (Message Mapping is used here)
    IM_ISU_UKGAS_NOM2_to_NOM2_ABS (Message Mapping (ii) is used here)
    IM_ISU_UKGAS_NOM3_to_NOM3_ABS (Message Mapping (iii) is used here)
    (b) Interface mapping for collected IDOCs of Abstract type to the file of Abstract Asynchronous type.
    IM_ISU_UKGAS_NOM_to_NOM_ABS (Message Mapping (iv) is used here)
    thanx
    ahmad
    Message was edited by:
            Ahmad

  • Collection of multiple IDOCS in one file to send once a day

    Hello,
    There are number of documents created for a vendor and we need to send the IDOCs for all the orders in one file collectively.  The transfer should happen at the end of day.
    Currently we are using correspondance mechanism for it, but it creates one file for each idoc.
    Is there any standard solution to combine the IDOCS ?
    Thanks and rgds,
    Anand

    Hello Anand
    I have used the approach described in [SAP Network Blog: Collecting IDocs without using BPM|Collecting IDocs without using BPM] to collect IDocs.
    Regards
      Uwe

  • Collection of multiple idocs into a file

    while activating the BPM,i m getting error "Expression must not return a multiline value" in transformation step of BPM at the source message.My source message is Abstract asynchronous type idoc which i m sending into BPM and value is container variable of same interface type and which is of multiline type.Can,anyone help me to solve out this error in BPM?

    ref: http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm
    Use that as a checklist !!!
    Also make sure that you have provided the message (that needs to be collected) (in message mapping and interface mapping) as 0-unbounded

  • Report for multiple IDOCs with multiple POs

    Hi,
    In our project PO goes out to vendor through EDI 850 and Outbound IDOC is generated for this.Some times its failed due to connection issue at vendors end. so sometimes  we need to send  PO nos and its related IDOC nos  to EDI team as per their request.I can get IDOC number for a particular PO from WE09.But that transaction is for single PO i belief.But sometimes there are  20-30 pos and if we want to search its related IDOC at a single time then how can i search this in SAP?Is there any standard SAP functionality or i have go custom report?

    you need to copy the idoc failed idoc numbers, and segment name in which your PO resides
    Go to table EDID4, pass Segment name and idoc numbers, you will find all related PO numbers in
    Application data column, please note this column is a merged column
    You will need to download it as unconverted Text , call in Excel -Text column and get the records
    There is no other easy way for this
    Thanks
    DD

  • Multiple Idocs (DEBMAS06) into one single file

    Hi All,
    Multiple Idocs(DEBMAS06) are sent from SAP in bulk to be sent to FTP server via XI...(Cannot use Append the file as The structure is with Header,Detail(all the idoc details) and Trailer)
    I have seen different threads which speaks about the same,
    But Please suggest me the best approach to proceed with this kind of scenario...
    Multiple IDocs -> XI -> Flat file which is speaking about BPM and also Packaging(SAP note 814393)
    and https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b
    (How Tou2026 Send Multiple IDocs Within One XI Message)
    I prefer not to use BPM... but if required then....
    Please suggest me which is the best approach to proceed with it..
    Thanks and Regards,
    Sridhar Reddy

    Hi ,
    I had tried the scenario Multiple IDOC's coming from R/3 and send all of them into a Single File
    But it did not work...
    Of course i changed as Micahel mentioned in
    The specified item was not found.
    (Collect and make pack size to 50) but still the idocs are posting as 50 messages in XI and 50 files are being created ...
    But as per his remarks we need customization which is very difficult...
    And also i checked Michaels blog
    The specified item was not found.
    But this is dicussing reverse of my scenario...
    and finally i am thinking of going with the stefens weblog...
    Collecting IDocs without using BPM
    Can any one please suggest any other best way to handle this...
    Instead of going for BPM i am implementing as Stefen suggested ... This is because we have many such interfaces where SAP sends collective idocs....
    Regards,
    Sridhar Reddy
    Edited by: sridhar reddy kondam on Oct 22, 2008 6:20 AM

Maybe you are looking for

  • TV does not work anymore on Qosmio G10

    Good morning, TV does not work anymore, may be due to an update. It has been working OK before. When selecting TV option 'TV direct ' with MCE menu, I get the following error message: "necessary files for video display are not installed or do not wor

  • Create_portlet_definition.sql probs with UDB: field "value" too long to index

    We're trying to deploy the create_portlet_definition.sql on a UDB DB2 6.1. However, we encountered some problems: "COLUMN_ORDER" cannot be a part of the primary key because it can contain null values: CREATE TABLE "COLUMN_INFORMATION" ("PORTAL_NAME"

  • Inconsistent logic for viewing others schemes objects in browser

    A while ago when we upgraded our db's to Oracle 10 we also replaced our famous green friend for Sql Developer with our entire development crew. Among a few other things, people were not all that happy, seeing that they lost the desired "check for acc

  • How do I get an audiobook CD to load into IPOD audiobook library

    When I rip the CD it automatically loads into the music library. Is there any way to get the tracks to load into the audiobook category? Dell Inspiron E1705   Windows XP  

  • "Role Upload" Preconfigured set?

    When using the "Role Upload" feature in the portal under System Administration --> Transport --> Role Upload, it says: "You can also load a preconfigured set which contains the objects taht should be uploaded as well as the upload settings." How do y