XML to many IDOC

HI Guys
I am running SAP PI 7.1, My Scenario is to Send one XML file to 3 IDocs.
I have created 3 Message Mapping and mapped the each IDoc, and when testing I am getting mapping Error on the Operation Mapping.
My XML file has fields from different IDoc, so this file must create three IDocs.
Any suggestion will be appreciated.
Thank,
Yonela

HI Guys
My Scenario have changed a little bit, MDM team will be syndication two xml files that will create two IDocs( MATMAS.MATMAS05 and CLFMAS.CLFMAS02) the sequence goes like this:
MATMAS05 IDoc will be create first and  CLFMAS02 will be created after.
I have a message mapping and communication channel for each, I am using MDM Adapter to pick these xml files, what I need is to delay CLFMAS02(Classified Material) Comm Channel from picking the file till MATMAS05 IDoc is created, maybe be delay by 20-30 minutes.
I was thinking of using the FILE Adapter because it have a time interval option, but the requirement is that I must use MDM Adapter.
I it possible for MDM Adapter to pick the files in deferent intervals.
Any suggestion will be appreciated.
Thanks
Yonela

Similar Messages

  • From ONE file to Many  IDocs in many systems

    Hi,
    In my scenario i have the input file like below
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    HEADER;EMPNO;EMPNAME;TARGETSYSTEM
    ITEMHEADER;DESG;LEVEL
    Here TARGETSYSTEM values are SAPG1,SAPG2 and SAPG3
    for each one HEADER and ITEMHEADER i have to create one idoc in the respective receiver system based on the TARGETSYSTEM value.
    Based on the TARGETSYSTEM value, idocs should be created in to the respective system.
    But problem is :
    Its creating 3 idocs in first system, same 3 idocs in second system and same 3 idocs in third system also.
    But i want to create one idoc in 1st system and second  idoc in 2nd system and third idoc in 3rd system based on the TARGETSYSTEM value.
    please help me, how to solve this problem
    Thanks & Regards,
    Vijji

    Hi Vijaya laksmi,
    I have seen ur question.
    appriciate for doing file to muliple idocs first
    without BPM, u can do this scenario ok
    but while doing this scenario, u have to do idoc with max occurence ie first, after importing idoc, u have to export to xml file and change occurence inplace of "min occurence "  write " min. occurence and Max. occurnce=" and then import this in External definition then u can use this in scenario for multiple idoc. Here don't require more interface mappings ok. u can do this only  with one interface mapping. while generating idoc, at the time u have to save and send as multiple idocs how many u have to send to receiver systems just give the no how many idocs. 
    Even though you won't get it i will send file to multiple idoc scenario ok
    all the best
    regards
    Peera

  • Help in creation of XML file for IDOC postings

    Hi All,
    Need help if anyone has knowledge/experience in creating XML files for IDOC processing.
    We need to design an input file (in XML format) for creation of IDOCu2019s for purchase Invoices through Interface.
    We have an existing input file, which is working correctly.  We are trying to modify this existing input file for a new Tax Code (Non-deductible inverse tax liability).   This tax code is working fine for manual postings.   But, through IDOC, tax postings are not correctly triggering.
    Could you please confirm if any one has experience on this, so that I can share more details for resolving.
    Thanks & Regards,
    Srini

    Hello,
    you can use CALL TRANSFORMATION id, which will create a exact "print" of the ABAP data into the XML.
    If you need to change the structure of XML, you can alter your ABAP structure to match the requirements.
    Of course you can create your own XSLT but that is not that easy to describe and nobody will do that for you around here. If you would like to start with XSLT, you´d better start the search.
    Regards Otto

  • XML Files from Idoc

    Hi All,
    pls can you help me
    i need how will i get xml file from idoc
    can you give me the steps to get it
    thanks
    mars

    report zexternalfile .
    tables : zzpublisher,
    sscrfields.
    data: it_publisher like standard table of zzpublisher,
    wa_publisher like zzpublisher.
    select * from zzpublisher into table it_publisher.
    call function 'GUI_DOWNLOAD'
    exporting
    BIN_FILESIZE =
    filename = 'C:externalfileskamal.XLS'
    FILETYPE = 'ASC'
    APPEND = ' '
    write_field_separator = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = it_publisher
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    if sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Pls go thru the following websites :
    A Step-by-Step Guide on IDoc-to-File Using Business Service in the XI Integration Directory
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e07dcaa0-a92b-2a10-3a96-b3d942bd1539
    How to convert an IDoc-XML structure to a flat file and vice-versa in XI 3.0
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    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
    Reward points if found helpful....

  • SAP XML and SAP IDOC XML

    Hi Friends,
    Can any one tell me what is the difference between SAP XML and SAP IDOC XML?
    Regards,
    Kumar

    Hi,
    Various XML standards are supported by SAP. It presents data according to an SAP specification either in IDoc-XML or BAPI-XML, the SAP XML extensions for IDocs and BAPIs. It uses preprepared representations of the SAP interfaces to XML Commerce Business Language (xCBL) messages to facilitate communication with the MarketSet marketplaces.
    Messages are stored in a generic envelope. This envelope contains metadata that controls, among other things, the routing of the messages. SAP supports two different standards for these envelopes - Microsoft BizTalk and a format similar to Simple Object Access Protocol (SOAP). Packaging SAP BAPIs in a standard envelope offers several advantages, including direct processing of messages by external applications and a uniform system of error handling.
    Regards'
    Aashish Sinha
    PS : reward points if helpful

  • One TRFC connection how many idoc we can send?

    Hi Experts,
    singel TRFC connection,how many Idoc can we send?appreciate any can tell me size also?
    Thanks
    Narendra

    Hi Narendra,
    As far as i know you can configure it. Check this link Transaction WE14 Max. Number of IDOCs in program RSEOUT00 - ABAP Connectivity - SCN Wiki
    Regards.

  • How to convert IDoc-XML to native Idoc-File with in SAP XI/PI

    Hello,
    I have a problem to Create an native IDoc-Format for an File-Receiver.
    The scenario:
    I get an Idoc (ZMATMAS) from a SAP System to an MATMAS-exchange-scenario. One of the non-SAP-receiver-systems needs an other native IDoc-Format as File. So I have to map the ZMATMAS to the receiver Format and write this as File. The problem is, that this file contains the data as IDoc-XML and not as native IDoc-format.
    Has anybody an idea for this problem?

    U need to use sender idoc adapter and file receiver adapter.
    U can do file content conversion at receiver end.
    Content Conversion is basically to convert a text file that contains complex structures into an XML source format and vice versa. It is present only in the File Adapter because it is one of the message protocol which will convert the structure to a desired format.
    There are many blogs for File Content Conversion. Some of them are listed hereunder:-
    Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
    Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
    How to send a flat file with various field lengths and variable substructures to XI 3.0
    Content Conversion (Pattern/Random content in input file)
    NAB the TAB (File Adapter)
    File Content Conversion for Unequal Number of Columns
    Content Conversion ( The Key Field Problem )
    The specified item was not found.
    You may also check the FCC documentation for Sender and Receiver:-
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

  • Invalid char in XML from inbound IDoc

    I am trying to send a CREMDM IDoc from a 4.6C R/3 system to an XI SP09 system. The IDoc gets sent from the backend system, shows up fine in WE05, but after it gets passed to XI, I encounter a fatal error (in SXMB_MONI) that reads:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0x15(:main:, row:1, col:986) at com.sap.aii.mappingtool.tf3.Transformer.checkParserException(Transformer.java:41) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:66) ....
    Upon checking the payload, I discover an "#" character in one of the fields (at position 986) has mysteriously been transformed to a " " character. XI does not recognize this character and the parser fails.
    As I understand, the R/3 system is non-unicode, and XI being unicode could be causing the problem. However, I have no clue how to solve this issue. Deeply appreciate it if any ALE/XI experts can share any insights.
    Regards,
    Danny

    Thanks for all the response. It looks like the "#" character is in fact a control character from the R/3 system, which is a "negative acknowledge" (#0x15) character. This character is not valid for XML and hence it even fails the test tool in Integration Repository. I figured this out from your responses as well as checking the XML payload in XMLSPY (gave me a illegal char code 21 as well, which corresponds to the above hex code for the negative acknowledgement char).
    It looks like we have to tackle the problem on the outbound IDoc side, which I am in the midst of figuring out how....

  • How to eliminate empty tags in out put XML file in IDOC to File scenario

    Hi Experts,
    I am doing IDOC to File scenario.
    My Out put XML is in to FTP is as below
    <ITEMS>
        <item>
              <A>asdf<A>
              <B>GHIJ<B>
        </item>
        <item>
              <A>123<A>
              <B>G098<B>
        </item>
    </ITEMS>
    <ITEMS/>   -
    > Means no data
    <ITEMS/> -
    > Means no data
    <ITEMS>
        <item>
              <A>yyy<A>
              <B>zzz<B>
        </item>
        <item>
              <A>arrr<A>
              <B>Ghhh<B>
        </item>
    </ITEMS>
    Now I want to eliminate tages <ITEMS/> in out out put XML file ( PIwhich writes in File server).
    1) Is there any setting in communication channel to do this
    2) Is there any settings in Mapping proram to suppress parent tag if child tags are not available.
    I want output as below .
    <ITEMS>
        <item>
              <A>asdf<A>
              <B>GHIJ<B>
        </item>
        <item>
              <A>123<A>
              <B>G098<B>
        </item>
    </ITEMS>
    <ITEMS>
        <item>
              <A>yyy<A>
              <B>zzz<B>
        </item>
        <item>
              <A>arrr<A>
              <B>Ghhh<B>
        </item>
    </ITEMS>
    Thanks,
    Subbu

    items->mapwithdefalut(just empty in the value)-> euqals(check with empty constant)->not->createif->target node
    and make sure that as Ravi kanth said ...occurance is  min is 0 at target side
    Regards,
    Prasad.
    Edited by: PRASAD KONDA on May 21, 2009 1:50 PM

  • Many idoc to one unix file tranfer

    Hi,
    I have a requirement where in i have to extract all the vendor master data into an idoc.For this i am using BD14 transaction and i am giving vendor number and message type as selection criteria.So I am generating the idoc for each vendor number and written the same to a application server file through file port.
    In this process for each idoc one file will be generated and i need to send each file.For example if i have to send 1000 vendors then it will generate 1000 files and i need to  send all 1000 files to other system. My question is 'Is there any way we can write all the idoc into one file and send to other system.
    Many thanks,
    Raghav.

    Hi Raghav,
    For this you can specify the packet size within the partner profile (WE20) outbound parameters settings.
    1) You can specfiy the packet size as 1000 and set the output mode as 'Collect IDocs'.
    2) With this the IDocs will be collected at the ALE layer.
    3) When the packet size reaches 1000 they will be downloaded to a single file.
    To do this you have to run the report RSEOUT00. So if there are 2000 idocs then on running the report RSEOUT00 two files will be created.
    RSEOUT00 can be scheduled as a batch job to run at regular intervals.
    Hope this helps.
    Regards,
    Gajendra.

  • Breaking up of, One IDoc to many IDocs & combing Many IDocs into one IDoc?

    Does anybody have any sample code of:
    Splitting an IDoc into multiple IDocs and
    Combining many similar IDocs into one IDoc
    Any pointers will be appreciated.
    Regards
    Mahesh

    This is the code for splitting of an inbound idoc into multiple idoc
    REPORT ztemp no standard page heading .
    ******************Data Declaration for selection screen***************
    TABLES: edidc,edidd.
    CALL SELECTION-SCREEN 9000.
    SELECTION-SCREEN: BEGIN OF SCREEN 9000,
                      BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS: idocno FOR edidc-docnum.
    SELECTION-SCREEN:END OF BLOCK b1 ,
                      END OF SCREEN 9000.
    *******************Data Declaration ************************************
    DATA : it_contrl LIKE TABLE OF edidc WITH HEADER LINE,
           it_hdata     LIKE TABLE OF edidd WITH HEADER LINE,
           it_fdata  LIKE TABLE OF edidd WITH HEADER LINE,
            it_gdata  LIKE TABLE OF edidd WITH HEADER LINE,
           it_data LIKE TABLE OF edidd WITH HEADER LINE,
           it_status LIKE TABLE OF bdidocstat WITH HEADER LINE,
           it_bdwfretvar LIKE TABLE OF bdwfretvar WITH HEADER LINE,
           it_bdi_ser LIKE TABLE OF bdi_ser WITH HEADER LINE,
           it_ldata LIKE TABLE OF edidd WITH HEADER LINE,
           it_tede2  LIKE  tede2,
           vbeln LIKE vbak-vbeln,
           idocnum LIKE  edidc-docnum,
           result LIKE bdwfap_par-result,
           it_stat LIKE edids.
    DATA : count TYPE i ,
           counter TYPE i ,
           temp TYPE i VALUE 1 ,
           line TYPE i ,
           tab LIKE sy-tabix.
    *********************passing values to control record*****************
    it_contrl-direct = '2'.
    it_contrl-rcvprn = 'ID3IDES802'.
    it_contrl-rcvprt = 'LS'.
    it_contrl-doctyp = 'ORDERS05'.
    it_contrl-idoctp = 'ORDERS05'.
    it_contrl-sndpor = 'ZSOFI'.
    it_contrl-sndprt = 'LI'.
    it_contrl-sndprn = '1000'.
    it_contrl-mestyp = 'ORDERS'.
    APPEND it_contrl.
    ************************Select query for data*************************
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_fdata
    WHERE   docnum IN idocno.
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_data
    WHERE   docnum IN idocno AND segnam NOT LIKE 'E1EDP%'  .
    SELECT   * FROM edid4 INTO CORRESPONDING FIELDS OF TABLE it_hdata
    WHERE   docnum IN idocno AND segnam  LIKE 'E1EDP%'.
    **************select query to count the no of E1EDP01 segment*********
    SELECT COUNT( * ) FROM edid4 INTO count  WHERE docnum IN idocno AND
    segnam = 'E1EDP01'.
    *************to determine the no of idocs to be generated************
    count = count / 5.
    PERFORM datasplit.
    **********************************for remaining idocs*****************
    counter = count MOD 5.
    IF counter NE 0.
      PERFORM dataremain. .
    ENDIF.
    *&      Form  datasplit
          text
    -->  p1        text
    <--  p2        text
    FORM datasplit  .
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      DO count TIMES.
        PERFORM split.
        perform idoccreate.
        enddo.
    ENDFORM.                   " datasplit
    *&      Form  SPLIT
          text
    -->  p1        text
    <--  p2        text
    FORM split .
      LOOP AT it_hdata.
        IF temp <= 5.
          ON CHANGE OF it_hdata-segnam.
            IF it_hdata-segnam = 'E1EDP01'.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
            ELSE.
              MOVE-CORRESPONDING it_hdata TO it_gdata.
              APPEND it_gdata.
              temp = temp + 1.
            ENDIF.
          ENDON.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " SPLIT
    *&      Form  dataremain
          text
    -->  p1        text
    <--  p2        text
    FORM dataremain .
      CLEAR it_gdata[].
      LOOP AT it_data.
        MOVE-CORRESPONDING it_data TO it_gdata.
        APPEND it_gdata.
      ENDLOOP.
      LOOP AT it_hdata .
        IF sy-tabix  > 10.
          MOVE-CORRESPONDING it_hdata TO it_gdata.
          APPEND it_gdata.
        ENDIF.
      ENDLOOP.
      perform idoccreate.
    ENDFORM.                    " dataremain
    *&      Form  idoccreate
          text
    -->  p1        text
    <--  p2        text
    form idoccreate .
    ***********************for creating the inbound idocs****************
    CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
       EXPORTING
         pi_status_message             = it_stat
         pi_do_handle_error            = 'X'
       PI_NO_DEQUEUE                 = ' '
         pi_return_data_flag           = 'X'
      PI_RFC_MULTI_CP               = '    '
       IMPORTING
         pe_idoc_number                = idocnum
         pe_state_of_processing        = sy-subrc
         pe_inbound_process_data       = it_tede2     "for process code
        TABLES
          t_data_records                = it_gdata
      T_LINKED_OBJECTS              =
        CHANGING
          pc_control_record             = it_contrl
    EXCEPTIONS
       IDOC_NOT_SAVED                = 1
       OTHERS                        = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      COMMIT WORK.
    *it_contrl-status = '64'.
    modify it_contrl index 1.
    ****************for posting the idoc**************************
      CALL FUNCTION 'IDOC_INPUT_ORDERS'
        EXPORTING
          input_method                = 'A'
          mass_processing             = '1'
       IMPORTING
         workflow_result             = result
      APPLICATION_VARIABLE        =
      IN_UPDATE_TASK              =
      CALL_TRANSACTION_DONE       =
       DOCUMENT_NUMBER             = vbeln
        TABLES
          idoc_contrl                 = it_contrl[]
          idoc_data                   = it_gdata[]
          idoc_status                 = it_status[]
          return_variables            = it_bdwfretvar[]
          serialization_info          = it_bdi_ser[]
      EDI_TEXT                    =
      EDI_TEXT_LINES              =
       CLEAR : it_contrl-docnum.
      COMMIT WORK.
    endform.                    " idoccreate

  • XML mapped to IDoc routed to two different receivers

    Hello gurus,
    I have an XML document coming into XI which needs to be mapped into an IDOC, then sent to two different systems (not to both of them) based on a value in the XML (the value is actually the SAP partner ID).
    Can this be done in BPM? Perhaps using Enhanced Receivers would be a viable solution for this?
    Thank you!

    have u looked into XPaths ?
    Ref:
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    /people/shabarish.vijayakumar/blog/2005/08/03/xpath-to-show-the-path-multiple-receivers
    Here based on a field in your message you can route the message to a receiver.
    Also ref: /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16 for enhanced recv. det.

  • SAP generating invalid XML for ORDERS05 IDOC

    We have XI 3.0 SP 20 installed here.
    I just started working with XI/PI, so bear with me if this has been asked - I already searched SAP for a note on this and couldn't find one.
    We have integrated sales orders into another system - we have SAP generating an IDOC to be sent when a sales order is created.  We use XI to route it to a 3rd party provider.
    The problem that is occuring is that if an item on the order has an ampersand in the description, the system receiving it tells us that the XML is in error.  In examining the message, it is in error as it doesn't properly escape the ampersand.
    Is there a workaround or patch for this?
    Also - it's not XI that is complaining about the issue, it's our 3rd party provider that is.
    Edited by: Bruce Hartley on Dec 22, 2010 9:34 AM

    Stefan and Abhishek;
    I read the blog - and unless SAP support does not have a fix for issue, I'm not going to use the suggestion in the blog for the exact reasons pointed out by Stefan in the most recent comment.  I have opened a case for this with SAP support and when I get a resolution on it that is not covered by the blog post I will post it here.
    To me, this should work out of the box by SAP and I shouldn't have to write code to work around it.  We're not doing anything fancy or special, we just want to send the order to the 3rd party system via an IDOC interface.  If I was generating the XML by myself, then I would have to convert the stuff.
    I don't think we have < or > in our item descriptions, but I'm sure we have quote characters in there as well.
    We have other systems we use XML with and we did have this issue a long time ago and since I was the one doing the programming and had total control over the process, I was the one who had to fix it - so at least I was aware of it.

  • How to get XML data of IDOC

    Hello ABAP gurus
    I am an SAP PI consultant working on some IDOCs.
    I am able to see the payload (in XML format)  sent via IDOC adapter.
    This is being sent to our backend system (ECC 6.0). I would like to know if there is any way that I can see this IDOC in XML format  on the ECC side so that I can compare it with the XML data that I see on PI side.
    After checking old postings on SDN, I have tried tables like EDIDC, EDISYN and EDID4. I even tried IDOC transactions like WE02, WE60 etc.,  But couldn't see the XML data.
    Any suggestions or comments will be highly appreciated.
    Thanks
    Ram

    Hi
    Check SXMB_MONI in ECC if you find the message. I am not sure but you can have a look.
    Regards
    Vinit

  • ZIP-File- XML-Files- XSLT- IDOC(invoice)

    Hi ,
    I am doing file to idoc scenario on BC. I am getting the mail with an attachment file in zip format. It must be extract  to XML files and after that each of this files must be transformed via xslt to idoc to R3. Please help with  solution!!!
    Thanks in advance
    Regards
    Olga

    In your file adapter, use the following modules in module processor chain:
    1. PayloadSwapBean module to get the attachment as main payload;
    2. PayloadZipBean module to extract the XML from zip file;
    next steps should be standard steps for file-to-IDOC scenarios.
    Check the wiki for help with those modules:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/xi_adapter_notes&
    Regards,
    Henrique.

Maybe you are looking for