IDOC To XML using JCOIDOC

Hi Experts,
IS it possible to know from a field of segment in XML format  IDOC coming from  SAP system to JCO that whether that transaction is a new record (create) or change pointer record , so that i can either Insert the data or Update in to the Database respectively.
specifically saying am using MATMAS05 and am not able to figure it out for new or change pointer.
Edited by: anil@1234 on Nov 12, 2010 6:09 AM

<?xml version="1.0" ?>
- <MATMAS05>
- <IDOC BEGIN="1">
- <EDI_DC40 SEGMENT="1">
  <TABNAM>EDI_DC40</TABNAM>
  <MANDT>100</MANDT>
  <DOCNUM>0000000000222146</DOCNUM>
  <DOCREL>700</DOCREL>
  <STATUS>30</STATUS>
  <DIRECT>1</DIRECT>
  <OUTMOD>2</OUTMOD>
  <EXPRSS />
  <TEST />
  <IDOCTYP>MATMAS05</IDOCTYP>
  <CIMTYP />
  <MESTYP>MATMAS</MESTYP>
  <MESCOD />
  <MESFCT />
  <STD />
  <STDVRS />
  <STDMES />
  <SNDPOR>SAPB60</SNDPOR>
  <SNDPRT>LS</SNDPRT>
  <SNDPFC />
  <SNDPRN>B60CLNT100</SNDPRN>
  <SNDSAD />
  <SNDLAD />
  <RCVPOR>A000000016</RCVPOR>
  <RCVPRT>LS</RCVPRT>
  <RCVPFC />
  <RCVPRN>ICONLS</RCVPRN>
  <RCVSAD />
  <RCVLAD />
  <CREDAT>20101111</CREDAT>
  <CRETIM>162912</CRETIM>
  <REFINT />
  <REFGRP />
  <REFMES />
  <ARCKEY />
  <SERIAL>20101111162909</SERIAL>
  </EDI_DC40>
- <E1MARAM SEGMENT="1">
  <MSGFN>004</MSGFN>
  <MATNR>000000000000000029</MATNR>
  <ERSDA>20080305</ERSDA>
  <ERNAM>Material03</ERNAM>
  <LAEDA>20101104</LAEDA>
  <AENAM>anil</AENAM>
  <PSTAT>KSLEBDP</PSTAT>
  <LVORM />
  <MTART>ROH</MTART>
  <MBRSH>M</MBRSH>
  <MATKL>01</MATKL>
  <BISMT />
  <MEINS>EA</MEINS>
  <BSTME />
  <ZEINR />
  <ZEIAR />
  <ZEIVR />
  <ZEIFO />
  <AESZN />
  <BLATT />
  <BLANZ>000</BLANZ>
  <FERTH />
  <FORMT />
  <GROES />
  <WRKST />
  <NORMT />
  <LABOR />
  <EKWSL />
  <BRGEW>0.000</BRGEW>
  <NTGEW>0.000</NTGEW>
  <GEWEI />
  <VOLUM>0.000</VOLUM>
  <VOLEH />
  <BEHVO />
  <RAUBE />
  <TEMPB />
  <TRAGR />
  <STOFF />
  <SPART />
  <KUNNR />
  <WESCH>0.000</WESCH>
  <BWVOR />
  <BWSCL />
  <SAISO />
  <ETIAR />
  <ETIFO />
  <EAN11 />
  <NUMTP />
  <LAENG>0.000</LAENG>
  <BREIT>0.000</BREIT>
  <HOEHE>0.000</HOEHE>
  <MEABM />
  <PRDHA />
  <CADKZ />
  <ERGEW>0.000</ERGEW>
  <ERGEI />
  <ERVOL>0.000</ERVOL>
  <ERVOE />
  <GEWTO>0.0</GEWTO>
  <VOLTO>0.0</VOLTO>
  <VABME />
  <KZKFG />
  <XCHPF />
  <VHART />
  <FUELG>0</FUELG>
  <STFAK>0</STFAK>
  <MAGRV />
  <BEGRU />
  <QMPUR />
  <RBNRM />
  <MHDRZ>0</MHDRZ>
  <MHDHB>0</MHDHB>
  <MHDLP>0</MHDLP>
  <VPSTA>KSLEBDP</VPSTA>
  <EXTWG />
  <MSTAE />
  <MSTAV />
  <MSTDE>00000000</MSTDE>
  <MSTDV>00000000</MSTDV>
  <KZUMW />
  <KOSCH />
  <NRFHG />
  <MFRPN />
  <MFRNR />
  <BMATN />
  <MPROF />
  <PROFL />
  <IHIVI />
  <ILOOS />
  <KZGVH />
  <XGCHP />
  <COMPL>00</COMPL>
  <KZEFF />
  <RDMHD />
  <IPRKZ />
  <PRZUS />
  <MTPOS_MARA />
  <GEWTO_NEW>0.0</GEWTO_NEW>
  <VOLTO_NEW>0.0</VOLTO_NEW>
  <WRKST_NEW />
  <AENNR />
  <MATFI />
  <CMREL />
  <SATNR />
  <SLED_BBD>B</SLED_BBD>
  <GTIN_VARIANT />
  <GENNR />
  <SERLV />
  <RMATP />
  <GDS_RELEVANT />
  <MCOND />
  <RETDELC />
  <LOGLEV_RETO />
  <NSNID />
  <WEORA />
  <_-CWM_-TOLGR />
  <_-CWM_-TARA />
  <_-CWM_-TARUM />
- <E1MAKTM SEGMENT="1">
  <MSGFN>018</MSGFN>
  <SPRAS>E</SPRAS>
  <MAKTX>bolt</MAKTX>
  <SPRAS_ISO>EN</SPRAS_ISO>
  </E1MAKTM>
- <E1MARCM SEGMENT="1">
  <MSGFN>004</MSGFN>
  <WERKS>0001</WERKS>
  <PSTAT>SLEBDP</PSTAT>
  <LVORM />
  <BWTTY />
  <MAABC />
  <KZKRI />
  <EKGRP />
  <AUSME />
  <DISPR />
  <DISMM>PD</DISMM>
  <DISPO>001</DISPO>
  <PLIFZ>0</PLIFZ>
  <WEBAZ>0</WEBAZ>
  <PERKZ>M</PERKZ>
  <AUSSS>0.00</AUSSS>
  <DISLS>DY</DISLS>
  <BESKZ>X</BESKZ>
  <SOBSL />
  <MINBE>0.000</MINBE>
  <EISBE>0.000</EISBE>
  <BSTMI>0.000</BSTMI>
  <BSTMA>0.000</BSTMA>
  <BSTFE>0.000</BSTFE>
  <BSTRF>0.000</BSTRF>
  <MABST>0.000</MABST>
  <LOSFX>1</LOSFX>
  <SBDKZ />
  <LAGPR>1</LAGPR>
  <ALTSL />
  <KZAUS />
  <AUSDT>00000000</AUSDT>
  <NFMAT />
  <KZBED />
  <MISKZ />
  <FHORI>000</FHORI>
  <PFREI />
  <FFREI />
  <RGEKZ />
  <FEVOR />
  <BEARZ>0.00</BEARZ>
  <RUEZT>0.00</RUEZT>
  <TRANZ>0.00</TRANZ>
  <BASMG>0.000</BASMG>
  <DZEIT>0</DZEIT>
  <MAXLZ>0</MAXLZ>
  <LZEIH />
  <KZPRO />
  <GPMKZ />
  <UEETO>0.0</UEETO>
  <UEETK />
  <UNETO>0.0</UNETO>
  <WZEIT>0</WZEIT>
  <ATPKZ />
  <VZUSL>0.00</VZUSL>
  <HERBL />
  <INSMK />
  <SSQSS />
  <KZDKZ />
  <UMLMC>0.000</UMLMC>
  <LADGR />
  <XCHPF />
  <USEQU />
  <LGRAD>0.0</LGRAD>
  <AUFTL />
  <PLVAR />
  <OTYPE />
  <OBJID>00000000</OBJID>
  <MTVFP>KP</MTVFP>
  <PERIV />
  <KZKFK />
  <VRVEZ>0.00</VRVEZ>
  <VBAMG>0.000</VBAMG>
  <VBEAZ>0.00</VBEAZ>
  <LIZYK />
  <BWSCL />
  <KAUTB />
  <KORDB />
  <STAWN />
  <HERKL />
  <HERKR />
  <EXPME />
  <MTVER />
  <PRCTR />
  <TRAME>0.000</TRAME>
  <MRPPP />
  <SAUFT />
  <FXHOR>000</FXHOR>
  <VRMOD />
  <VINT1>000</VINT1>
  <VINT2>000</VINT2>
  <STLAL />
  <STLAN />
  <PLNNR />
  <APLAL />
  <LOSGR>0.000</LOSGR>
  <SOBSK />
  <FRTME />
  <LGPRO />
  <DISGR />
  <KAUSF>0.00</KAUSF>
  <QZGTP />
  <TAKZT>0</TAKZT>
  <RWPRO />
  <COPAM />
  <ABCIN />
  <AWSLS />
  <SERNP />
  <STDPD />
  <SFEPR />
  <XMCNG />
  <QSSYS />
  <LFRHY />
  <RDPRF />
  <VRBMT />
  <VRBWK />
  <VRBDT>00000000</VRBDT>
  <VRBFK>0.00</VRBFK>
  <AUTRU>X</AUTRU>
  <PREFE />
  <PRENC />
  <PRENO />
  <PREND>00000000</PREND>
  <PRENE />
  <PRENG>00000000</PRENG>
  <ITARK />
  <PRFRQ>0</PRFRQ>
  <KZKUP />
  <STRGR />
  <LGFSB />
  <SCHGT />
  <CCFIX />
  <EPRIO />
  <QMATA />
  <PLNTY />
  <MMSTA />
  <SFCPF />
  <SHFLG />
  <SHZET>00</SHZET>
  <MDACH />
  <KZECH />
  <MMSTD>00000000</MMSTD>
  <MFRGR />
  <FVIDK />
  <INDUS />
  <MOWNR />
  <MOGRU />
  <CASNR />
  <GPNUM />
  <STEUC />
  <FABKZ />
  <MATGR />
  <LOGGR />
  <VSPVB />
  <DPLFS />
  <DPLPU />
  <DPLHO>0</DPLHO>
  <MINLS>0.000</MINLS>
  <MAXLS>0.000</MAXLS>
  <FIXLS>0.000</FIXLS>
  <LTINC>0.000</LTINC>
  <COMPL>00</COMPL>
  <CONVT />
  <FPRFM />
  <SHPRO />
  <FXPRU />
  <KZPSP />
  <OCMPF />
  <APOKZ />
  <AHDIS />
  <EISLO>0.000</EISLO>
  <NCOST />
  <MEGRU />
  <ROTATION_DATE />
  <UCHKZ />
  <UCMAT />
- <E1MPOPM SEGMENT="1">
  <MSGFN>009</MSGFN>
  <VERSP />
  <PROPR />
  <MODAW />
  <MODAV>2</MODAV>
  <KZPAR />
  <OPGRA />
  <KZINI>X</KZINI>
  <PRMOD>D</PRMOD>
  <ALPHA>0.00</ALPHA>
  <BETA1>0.00</BETA1>
  <GAMMA>0.00</GAMMA>
  <DELTA>0.00</DELTA>
  <EPSIL>0.00</EPSIL>
  <SIGGR>4.000</SIGGR>
  <PERKZ>M</PERKZ>
  <PRDAT>00000000</PRDAT>
  <PERAN>60</PERAN>
  <PERIN>0</PERIN>
  <PERIO>0</PERIO>
  <PEREX>0</PEREX>
  <ANZPR>12</ANZPR>
  <FIMON>0</FIMON>
  <GWERT>0.000</GWERT>
  <GWER1>0.000</GWER1>
  <GWER2>0.000</GWER2>
  <VMGWE>0.000</VMGWE>
  <VMGW1>0.000</VMGW1>
  <VMGW2>0.000</VMGW2>
  <TWERT>0.000</TWERT>
  <VMTWE>0.000</VMTWE>
  <PRMAD>0.000</PRMAD>
  <VMMAD>0.000</VMMAD>
  <FSUMM>0.000</FSUMM>
  <VMFSU>0.000</VMFSU>
  <GEWGR />
  <THKOF>0.00</THKOF>
  <AUSNA />
  <PROAB />
  </E1MPOPM>
  </E1MARCM>
  </E1MARAM>
  </IDOC>
  </MATMAS05>

Similar Messages

  • IDOC to XML using HTTP

    Hi Friends,
    Is there any possibilities to Convert IDOCs as XML using HTTP Adapter in SAP PI?
    Because in my Scenario i need to send Idocs from ECC to Red Prariie using SAP PI.
    Also is it there any possibilities using FTPS?
    Please help me.
    Thanks.

    Hi PIstarter,
    Sure this is possible. Just treat the IDoc like any other Service Interface that you use in the HTTP Receiver Adapter. You can even use the no-mapping approach if no additional processing is required by PI.
    Hope this helps,
    Greg

  • SAP ECC Interface w/ IDOC-XML using TCP/IP, HTTP, or FTP to 3rd-Party Syst.

    I am trying to understand if the following interface options can occur (without the use of SAP PI or any other middleware):
    Option 1A: Can I process an SAP ECC outbound IDoc in XML using TCP/IP to a non-SAP 3rd party system?  Can you please explain the reason for why I can or can NOT do this.  If possible, please provide supporting documentation on how-to do this?
    Option 1B: Can I process an SAP ECC inbound XML-IDOC from a non-SAP calling system that used TCP/IP?  Can you please explain the reason for why I can or can NOT do this. If possible, please provide supporting documentation on how-to do this?
    Option 2A: Can I process an SAP ECC outbound IDOC in XML using HTTP to a non-SAP 3rd-party system?  Can you please explain the reason for why I can or can NOT do this. If possible, please provide supporting documentation on how-to do this?
    Option 2B: Can I process an SAP ECC inbound XML-IDOC from a non-SAP calling system that used HTTP?  Can you please explain the reason for why I can or can NOT do this. If possible, please provide supporting documentation on how-to do this?
    Option 3A: Can I process an SAP ECC outbound IDOC in XML using FTP to a non-SAP 3rd-party system?  Can you please explain the reason for why I can or can NOT do this. If possible, please provide supporting documentation on how-to do this?
    Option 3B: Can I process an SAP ECC inbound XML-IDOC from a non-SAP calling system that used FTP?  Can you please explain the reason for why I can or can NOT do this. If possible, please provide supporting documentation on how-to do this?

    Hello Kirk  ,
    The answers for your question are:
    Option 1A: Yes you can .you can use TCP/IP but you must have a middleware component for that such as BC/JCO .
    Please see the link : [http://help.sap.com/saphelp_nw04/helpdata/EN/09/c88442a07b0e53e10000000a155106/frameset.htm]
    Option 1B: See the link above.
    Option 2A: You can use ABAP code :
    [http://help.sap.com/saphelp_nw04/helpdata/EN/e5/4d3514c11411d4ad310000e83539c3/frameset.htm]
    Option 2B: [http://help.sap.com/saphelp_nw04/helpdata/EN/90/4f3c2ec3c511d6b2b400508b6b8a93/frameset.htm]
    Option 3A: Only with ABAP code :[Reg: FTP Connection;
    Option 3B: See the link of Option 3A.
    Good Luck,
    Boaz
    Edited by: Boaz Ornan on Feb 21, 2010 4:33 PM

  • Java.nio.BufferUnderflowException when send a idoc xml using sapjco3.jar

    When I use sapjco3.jar to send a idoc
    I have 2 IDOC ,one size is 200kb ,another is 336kb
    the first one can send to sap correct, but the bigger one got Exception (java.nio.BufferUnderflowException)
    If any thing I have to note when writing java code ? thanks ....
    Exception:
    send TXLOG-12918467-ToIDOC_20110513161427170_1125436.xml
    send idoc D:\TXLOG-12918467-ToIDOC_20110513161427170_1125436.xml to SAP GateWay finished ,IDoc Tid is AC1140540B534DD1EAE61781
    send TXLOG-12964100.xml
    java.nio.BufferUnderflowException
         at java.nio.Buffer.nextGetIndex(Buffer.java:486)
         at java.nio.HeapCharBuffer.get(HeapCharBuffer.java:129)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLParser.parse(DefaultIDocXMLParser.java:365)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLProcessor.parse(DefaultIDocXMLProcessor.java:87)
         at com.sap.conn.idoc.rt.xml.DefaultIDocXMLProcessor.parse(DefaultIDocXMLProcessor.java:68)
         at com.testrite.msg.dex.sender.SAPSender.sendMessage(SAPSender.java:61)
         at com.testrite.msg.dex.sender.SAPSender.main(SAPSender.java:37)
    My Code :
    JCoDestination destination;
    String dest = "BCE";
    destination = JCoDestinationManager.getDestination(dest);
    IDocRepository iDocRepository = JCoIDoc.getIDocRepository(destination);
    String tid = destination.createTID();
    IDocFactory iDocFactory = JCoIDoc.getIDocFactory();
    IDocXMLProcessor processor = iDocFactory.getIDocXMLProcessor();
    IDocDocumentList iDocList = processor.parse(iDocRepository, new BufferedInputStream(new FileInputStream("D:
    TXLOG-12964100.xml"));
    JCoIDoc.send(iDocList, IDocFactory.IDOC_VERSION_DEFAULT, destination, tid);

    hi,
    it only works with idoc to idoc scenarios I think
    when you send from SAP to SAP through XI
    have a look at my weblog:
    /people/michal.krawczyk2/blog/2005/11/21/xi-idoc-to-idoc-tunneling--how-fast-and-easy-can-you-get
    Regards,
    michal

  • Communication between SAP and 3rd Party Systems using IDOC HTTP XML Interfa

    Hi
    i am try do
    Communication between SAP and 3rd Party Systems using IDOC HTTP XML Interface
    With The help of SDN Contribution
    link----
    ( have look on it)
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4943f2b7-0a01-0010-37af-faff35b2f08c
    I am getting error in
    Partner system as HTTPLOG and "Execute" to check the results
    Error is --  Port could not be created
    RFC destination HTTPLOG Not specified for system HTTPLOG
    any 1 have any idea  if plzzzzzzzz...........
    Thank u
    Ram

    Hello .
      we are also in  process of implementing the same
    could you share the knowledge pl?
    1)is it a separate add on with ALE to saphr
       or using ECC ??
    2)can u share the configuration part ??
    we are trying it on webas as addon 3.0 .

  • Automate flat IDOC to XML IDOC using one interface

    Hello all,
    We are currently going through a migration process where XI will be replacing a legacy system.  As part of our testing procedure, we are using historical data pairings from the legacy system and using an automated tool to compare if the interfaces we develop in XI match.  The catch is we need the data that we are comparing in XML format for the automated tool to be able to do the comparison, and unfortunately the legacy data is a flat format.  So now I would like to automate a way to convert this data to XML format.
    Specifically for IDOCs, I would like to have an interface which picks up the flat files, transforms them to XML, and then drops them back into another file directory in the XML format.  It would need to be able to pick up any kind of IDOC (given that XI has the metadata already imported), recognize what message type it is, then do the conversion.
    I have been reading on SDN and found that there is a standard tool to do the conversion, but it appears it can only handle one kind of IDOC at a time, and it appears it only picks up one specifically named file at a time.
    Has anybody tried to implement a scenario like this?  Any help is appreciated (A walkthrough would be the best!).
    Thanks in advance,
    Mike

    Mike,
    What version of PI will you be using? PI 7.11 can now auto-convert Flat File IDocs to XML IDoc and vice versa.
    Here is the documentation:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/b5/bd93642dd3410f90ebea702399fac4/frameset.htm (flat to XML)
    http://help.sap.com/saphelp_nwpi711/helpdata/en/74/a45bc07e2043fb9b63295229178903/frameset.htm (XML to flat)
    I have not tried this personally, but seems like you might be able to use a "File to File" scenario with no mapping, and use the "IDOCFlatToXmlConvertor" Module in your File Adapter Comms Channel and it may just work, giving you files that are the IDoc XML version of the flat file it is reading. It looks like it does an RFC call to the back-end SAP system where the IDocs are originally from (or could be any system as long as you know the IDocs in there are identical), and reads the IDoc metadata (which has always included flat file field offsets for each IDoc Segment Field), and applies that either to convert from flat file IDoc to XML IDoc, or XML IDoc to flat file IDoc.
    It does mention that there is a limitation that there can only be one IDoc in the source flat file - could be a problem if you have many in one file, which is pretty typical.
    Regards,
    Brendan

  • Using ABAP Web Service tor convert IDoc to XML and transfer to SOAP Server

    Hi all,
    I have a problem to use ABAP Web Service to convert IDoc's to XML and then send them to a SOAP Server.
    Currently we have the following landscape:
    SAP->XI->Archive
    The sap-system (ECC6.0) sends an IDoc to the Exchange Infrastructe. The XI maps the IDoc and converts it to the required XML format, used by the archive. Afterwards, the XML documents are sended to the SOAP Server.
    So I'm trying to replace the Exchange Infrastructure with ABAP Web Service.
    I've read a lot of posts and documents reagarding ABAP Web Serivce, converting IDoc's to XML, RFC and so on, but I'm not able to do the replacement.
    I don't know how to start and which steps are required.
    The required roles and authorizations at the sap-system and the service for soamanager and the Web Service Viewer are available.
    First I thought to create the RFC and partner profiles and then the report to convert IDoc to XML as a BAPI. With this BAPI I supposed to create and define a Web Service. The problem is, I don't know how to trigger the report if the Idoc should be send to the archive.
    Hopefully, someone has an idea or a how-to for me.
    Thanks in advance.
    Regards,
    Christoph
    Edited by: BigTicket on May 12, 2010 9:36 AM

    Hi BigTicket.
    A suggestion to trigger the BAPI / WebService at the IDoc receiving is to use a user exit or enhanced inside the idoc function module. When the idoc arrived to the idoc port the system start the related function module and then your user exit/enhanced in which you invoke your BAPI.
    I hope this help.
    Ciao.
    Nicola

  • ALE IDOC to XML IDOC scenario using XML port

    Hi,
    I am working on ALE IDOC to XML IDOC scenario using XML port . The requirement is to place a XML IDOC on the application server using ALE IDOC scenario ( output type is created in NACE which is ALE enabled ).
    Can anybody help me on the steps.
    Regards
    Kumar
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Sep 8, 2011 6:01 PM

    U can give a try as follows.
    In the Partner Profile of Sender R/3 system,
    Give the Receiver Party P_Party in the PartnerNo. Give the 'Business Partner' as logical System type.
    In XI, Party Definition of P_Party
    Give the following Alternative Identifier
    Agency  -   Sender R/3  Business System       
    Scheme -   ALE#GP
    Value    -    P_Party

  • Issues with creating and sending BOM XML IDOC to SAP using 2010 WCF-SAP Adapter (without using Biztalk Server)

      I'm trying to replace an existing Biztalk 2006 Send BOM IDOC process, and completely remove Biztalk server from the equation.   The existing Bizatalk 2006 server receives an input BOM (Bill of Materials) flat file, and using a Biztalk Map (BM08),
    and Orchestration, generates an Idoc and sends it to SAP.
      In my replacement C# program, I'm using the 2010 WCF-SAP Adapter, and am trying to generate the BOMMAT03 XML IDOC it to SAP.  
      I generated the BOMMAT03 schema from SAP using the Add Adapter Service in VS 2010.  I was able to generate a BM08 XSLT from the existing BMO8 map in the current Biztalk 2006 process.  I am able to run a XSLT transform on the input BOM flat
    file, and generate an XML file from that.  
      However, I've run into a few issues.   First of which, is that the XML file that is generated from the XSLT transform is NOT the same schema as the BOMMAT03 schema expects.  It's somewhat similar, but different enough that I have to manually
    translate between the two in my code.  I've verified that both the original Bitztalk 2006 process and my replacement program use BOMMAT V3 from SAP.  Question--Is Biztalk 2006 server doing some other magic to turn that transormed XML into the BOMMAT03
    schema?    
     I ended writing code which translates the transformed XML into the BOMMAT03 schema (which is a strong typed XML IDOC at this point).
      However, when I try to send the BOMMAT03 XML IDOC, I get an exception "Object reference not set to an instance of an object."
                   idocClient.Send(idocData, ref sadapterTxGuid);
    idocData is of type BOMMAT03, and I've verified that the various fields are populated.  
      Any help is appreciated. 

    Well, putting in a MSDN subscription support ticket for Biztalk server actually helped with the issue.  They didn't find, or fix the issue directly.  But one of the examples (https://randypaulo.wordpress.com/tag/idoc/) they sent over, jogged my
    memory, and I realized in the code snippet below, I had accidentally deleted the 1st line.  Such a simple mistake, yet was easy to overlook.  The URL example is almost EXACTLY like my code, but without the transform and translation code to convert
    from input XML file to IDOC XML.  If someone is interested in that, let me know.    
    //Forgot the 1st line.  
    idocClient = new IdocBOMMAT03SIEIS_WED_BOMMAT03V3R700Client(binding, endpointAddress);
     idocClient.Send(idocData, ref sadapterTxGuid);
    For anyone else interested in knowing, you CAN send a strongly typed IDOC to SAP using C#.NET and the WCF SAP 2010 Adapter, using the IDOC Binding Client class you generated using the Add Adapter Service Reference in VS2010.  
    The one difference, which no one, not even the tech support from MS could tell me, was why the XSLT which I generated from the original map, did not transform the input BOM XML into the BOMMAT03 XML.  Instead, it transformed it into an intermediate
    XML, which resembled the BOMMAT03 IDOC XML, but still needed to be translated to the BOMMAT03 IDOC format.  
    The tech support person swore up and down that it should.  But I believe that something happens in Biztalk server, after the Mapping occurs, maybe in the Pipeline, which converts that
    intermediate XML into the final BOMMAT03 IDOC XML format.
    I do think that the examples are severely lacking in showing how to send a strong typed IDOC using C# and the WCF-SAP Adapter.  Even worse, the examples are completely lacking in how to actually generate a weakly typed IDOC.  They show how to send
    that weakly typed IDOC, but show me, or give me a class to be able to generate it.
    I realize that this is not quite the "recommended way" to do it, but in reality, not everyone wants or even needs a full Biztalk installation.   For some simple stuff like this, a C#.NET program and WCF-SAP adapter do the trick.  

  • How to use JCoIDoc.JCoDocument.fromXML method

    I want to restore an IDoc from XML string which is saved by method of IDoc.Document.toXML. But I can not find any api I can use. There is JCoIDoc.JCoDocument.fromXML method which can do this task. But I don't know how to get the instance of this class. Does anyone can give me some help?
    Thanks,
    Jun

    See the JMX documentation.
    http://java.sun.com/javase/6/docs/api/javax/management/modelmbean/ModelMBeanInfo.html

  • How can I convert IDoc in XML format w/DTD into a string?

    I want to send by e-mail outbound IDoc in XML format with its document type definition (DTD).
    I want to be able to get the same output result into a string than the XML file IDoc port type with DTD activated.  I have created a FM (based on SAP "OWN_FUNCTION") assigned to an IDoc port of type ABAP-PI that executes the following processing steps:
    1-Extract outbound IDoc information to get the sender & recipient mail addresses (EDP13 / EDIPHONE tables).
    2-Convert & Transform IDoc data into XML string using FM IDX_IDOC_TO_XML.
    3-Prepare and send e-mail with XML attachement using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    I cand generate the e-mail with the XML file attachement but FM IDX_IDOC_TO_XML does not convert the IDoc with proper formating and DTD.
    What should I use to accomplish the IDoc conversion to XML w/DTD into a string?
    Should I use XSLT tools ?
    How does that work?
    Thank you
    Carl

    muks wrote:
    Use decimal string to number
    Specifically, you can define a constant with a different datatype on the input on the lower left if you need a different datatype (e.g. U8, I64, DBL, etc) Are all your values integers or do you also need to scan fractional numbers? In this case, you should use "fract/exp string to number" instead.
    LabVIEW Champion . Do more with less code and in less time .

  • IDOC-XI-XML Scenario Questions

    Hi everyone,
    I am actually trying to configure a scenario starting from SAP and finishing creating a XML file.
    R/3 IDOC -> XI -> XML file
    The XI is receiving IDOCs from SAP correctly, but when it try to send to third party system, the monitor engine (SXMB_MONI) are showing the following error: HTTP_RESP_STATUS_CODE_NOT_OK.
    I am currently using the File Adapter, please take a look at the config for the communication channel:
    Adapter Type: File
    http://sap.com/xi/XI/System
    SAP BASIS 6.4
    Transport Protocol: File Protocol(FTP)
    Message Protocol: File
    Adapter Engine: Integration Server
    Target Directory: /  (root)
    File Name Scheme: mptest_xi_output.dat
    File Construction: Create
    Overwrite File: X
    File type: Binary
    Adapter Status: Active
    Regards,
    Gabriel Santana

    If you have enough authorization, then click on the last button which is change button.
    Otherwise, open two windows of SAP and try to do the above step and when you get the authorization error, go to the second window and enter transaction /nSU53. Send that info to your security team.
    Once you have authorization you should be fine.
    One other thing, in which client you are doing this ?
    Do not use DDIC user to change it.
    regards
    Shravan

  • Idoc to XML, namespace is not getting created in output XML

    Hi All
    My interface is idoc to XML.
    I am using graphical message mapping.
    In output xml , namespace is not  formed
    Can any one tell why namespace is not  created in the XML and
    How to add the  namespace to the  output XML .
    Kindly help
    Regards,
    Sheela

    Hi,
    You can change your external definition to achieve it.  just compare the structure of your xsd with some other normal data type xsd and change accordingly.
    Inder

  • IDOC to xml file

    hi,
    my name is avinash.i m new to xi.i have few qs regarding it.
    1.what is third party?
    2.what are adapters?where are they located?
    3.what is IDOC?
    4.how is IDOC converted to xml file?
    pls reply.its urgent.
    thanks in advance.
    Message was edited by:
            avinash s

    Hi avinash s  ,
    >>1.what is third party?
    third party is middleware or intermediate software which takes data from sender & transfers to a reciever in his understandable format.
    For Example
    Suppose think that there r 3 different people who speak different languages.
    Say User A understands french language,
           User B understands french , german, english language
           User C understands german language
    & User A and C want 2 communicate . Hence their languages r different they can't understand. If they take the help of User B, He undertands the language of User A & converses to User C in german.
    User B is the 3rd Party here.
    This example can be viewed in terms of systems who r having different platforms & they want 2 exchange messages with each other.
    Examples of 3rd party include:
    TIBCO,XI,EDI.....
    >> 2.what are adapters?where are they located?
    Adapters enable communication between the XI integration engine and an application system. This leads to the compatibility between heterogeneous systems.Adapters convert the XI protocol (SOAP with attachments over HTTP) to the protocol spoken by the application system and vice-versa.The key purpose of XI is to integrate heterogeneous systems and adapters are the key enabler to achieving this goal
    Adapter Categories
    Application adapters provided by SAP (IDoc and RFC) and 3rd party vendors (Seeburger, Siebel, Oracle, ...)
    Technical adapters relate to specific protocols
    File systems (FTP / File)
    RDBMS systems (JDBC)
    Messaging systems (JMS)
    Web services (SOAP)
    Mail servers (SMTP)
    SAP Business Connector
    Marketplaces
    Industry standard adapters
    RosettaNet
    CIDX
    The Adapter Engine
    The XI Adapter engine is the home of the majority of the XI adapters. Only the IDoc adapter and the plain HTTP adapter do not reside on the adapter engine. They reside on the Integration Server.
    It is fully integrated in to the XI landscape with tools provided for configuration, logistics and monitoring. It's Adapter Framework is based on the JCA.
    SAP XI requires an adapter framework to communicate outside of the SAP system. These adapters translate code from external applications to an XML message for NetWeaver processes using the Java Connector Architecture.It is a part of the Adapter Engine, which provides interfaces for configuring, managing, and monitoring adapters.
    The following r good websites which give complete overview of Adapter:
    Structure of the Adapter Framework
    http://help.sap.com/saphelp_nw04/helpdata/en/fd/16e140a786702ae10000000a155106/content.htm
    Adapter for SAP XI environment
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst11.htm
    List of all adapters compatible with XI 3.0
    http://searchsap.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid21_gci1229988_tax304527,00.html
    Adapter and Module Development
    http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/content.htm
    Legacy Integration with the SAP XI Adapter
    http://www.makdata.de/www_makdata/sites/www.makdata.de/en/solutions/solutions02/downloads/SAP_XI_Adapter_mak_data_news_23_en.pdf
    Installing the SAP XI Integration Components of the XI Adapter
    http://documentation.softwareag.com/crossvision/xio311/install/sapXiInstall.htm
    >>3.what is IDOC?
    IDoc is a container that carries the data thru 2 methods : either thru ALE or EDI.
    >> 4.how is IDOC converted to xml file?
    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
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • IDOC to XML : error in opening the output file in iexplorer

    Hi Frnds,
    I have a scenario IDoc to xml where in Im getting some non ascii values in the idoc for which I used ISO-8859-1 encoding technique but still the conversion is not done. Iam unable to opend the output file in internet explorer giving the follwoing error as :
    An invalid character was found in text content. Error processing resource
    Please help me how to overcome this issue.
    Thanks in advance,

    Hi,
    As i posted previously in xi UTF-8 is the default encoding if message protocal is FILE.
    And UTF-8 encoding support unicodes..
    Can reconfigure your receiver file adapter with file type as Binary and check once again.
    go through http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm  
    refer  File Type
    now i check with a japanese double byte character and i can open in iexplorer.
    regards,
    pradeep A.

Maybe you are looking for