Problem Sending ARTMAS IDoc

Hello,
we have following error.
ARTMAS04 IDOC contains a field like <2STEP_PICK>.
But a XML tag with a number in front isn't well-formed.
So i got an error on my XSLT Mapping.
Any Idea?
Reagards,
Robin

Hi Robin,
the field is called "_--32STEP_PICK". May be load metadata again in IDX2 or load IDoc again to Repository.
Regards,
Udo

Similar Messages

  • Problem with ARTMAS idoc

    Hi
    I am working on an IS-Retail implementation and we deal with article master (similar to Material master). The idoc corresponding to this is ARTMAS.
    The scenario is as explained below.
    We have articles classified as 'generic' and 'variant'. One generic article can have many variants. eg. T-shirt can be a generic and its variants could be 'High neck', 'V-neck', 'round neck' etc.
    The issue is : Whenever we make article master changes to the generic article and execute the tcode BD21 - idoc type for change pointers for ARTMAS, the articles whose info is changed triggers the outbound idoc which contains a segment ' E1BPE1MATHEAD' containing the details of generic and a number of segments 'E1BPE1AUSPRT' which contain the details of the variants associated with the generic,
    When i changed any field in MM42 for a generic article, the idoc generated through BD21 contains the segments for variant articles also.
    However, when the description field -MAKTX is changed for the generic article, the outbound idoc generated through BD21 does <u>NOT</u> contain the segment for the associated variants.
    I need the outbound idoc to include the variant segments (E1BPE1AUSPRT) also when the Description of the Generic article is changed.
    I have checked the table fields associated with ARTMAS and the field MARA-MAKTX is included in BD52.
    Can someone throw some light on this.
    Thanks in advance.

    hi negender,
          can u help me how u solved the issue,
    thanx,
    hari

  • Problem with Custom idoc sending

    Hi Experts,
    We have created partner profile and port for receiver system, our idoc is Z (custom) idoc.
    but the problem is here, when we are sending that idoc from R/3 system, it is in Yellow position with message number 30. How we can solve this problem.
    Is there any other configuration required for Z (Custom) idoc.
    Please help,
    Regards,
    Study SAP

    hi check this...
    http://www.****************/Tutorials/ALE/CustomIDOC/Create.htm
    check  the process followed or not if u miss any steps then it will give warning....that is not a problem..see one thing after creating the idoc u need to give the status back to the idoc_status. otherwise it will not show the green message 51...we have to do it if this is the custom idoc ...otherwise if it is a standard one there is nothing to do it will automatically catch the message back.

  • Problem sending IDOC DESADV  /AFS/DELVRY03 to XI

    Hi Gurus,
    I have problems sending IDOCs DESADV (basic type /AFS/DELVRY03) created by function LSEND_IDOC to XI system. IDOC is correctly created by R3 system (AFS ECC 5.0) and correctly sent on the XI port (Status: Data passed to port OK - 03), but XI system doesn't receive IDOC.
    If I resend the same IDOC by WE19 tcode goes ok!!
    In R3 sending system nothing warnings/errors in syslog or sm58.
    Any suggests? Thanks in advance.

    Issue solved! It is necessary close the master idoc with a commit

  • Limit send of IDoc from SAP-ERP to SAP-XI or a Non-SAP

    Hi guys,
    I send the following IDocs from SAP-ERP over SAP-XI to Non-SAP for an initialload: Artmas, Bommat, Infrec, Cond_a, Mmaddi, Cremas
    Example: Artmas with TA: BD10.
    Problem: SAP-ERP send all 25'000 IDoc to SAP-XI. The effect is that the qRFC and tRFC in SAP-XI is full, because the Non-SAP is not fast enough to takeover the Idocs. From then other systems can't send out or get in Idocs.
    I tried to limit in WE20, but it didnt work. TA: RSEOUT00 ist not so useful, because of the quantity of the IDocs.
    Is in SAP-ERP a possibility to limit the sending of IDocs to SAP-XI or Non-SAP?
    Example: Automatic sending of 200 Idocs every 2 Minute.
    Thanks

    may be u can write a wrapper above BD10 this way
    report zaRs message-id b1.
    select-options: matsel for marav-matnr matchcode object mat1.
    parameters: receiver like tbdlst-logsys no-display.
    start-of-selection.
      select * from mara into i_mara where matnr in matsel.
      refresh : matsel.  
      v_no = 0.
      loop at i_mara.
        move i_mara-matnr to matsel-low
    * fill up sign option etc.
        append matsel
      do.
       move mara
       if v_no = 200.
        submit rbdsemat  " Program behind BD10
              with logsys eq receiver
              with matsel in matsel
              with mestypat eq 'ARTMAS'
              and return.
              wait 20 seconds
        exit.
        clear v_no.
       endif.
      enddo.  

  • Problem in  Outbound IDOC from SAP R/3

    Hi,
    I am working on to send an IDOC from SAP R/3 to XI.
    I configured all necessary things as follows:
    1. Created for XI in sender system -- RFC dest, PORT and a partner profile with an outbound parameters and reciever port as XI port.
    2. created for sender system in XI -- RFC dest, PORT(as SAP<SID>) in IDX1 and assigned an idoc type(coming from sender system) to the port.
    Now I am trying to push the IDOC from sender system using Test IDOC transaction and gets success message as data is passed to port.
    My problem is I am not able to see any message in SM58 of XI server.
    Could anyone help me out?
    Thanks In Advance.
    Yaseen.

    Yasseen,
    you hardly see the idocs in Xi in sm58. Try sxmb_moni.
    If you see anything there try sm58 on the sending R/3. There you see if you have connection problems (eg authorization in XI or missing receiver determinitions).
    Hope it hellps,
    helge

  • XI Problem: File to Idoc Scenario - IDOC_INBOUND_ASYNCHRONOUS

    Hi,
       I'm having problems with inbound IDOCS in R/3. The idocs from XI are sent as tRFC using the FM IDOC_INBOUND_ASYNCHRONOUS and this is a problem because i have like 200 or 300 idocs to be sent at the same time and each IDOC takes like 5 minutes to process, hence the system crash due the amount of simultaneous logins (error message ThISend: ThRollout ).
    I need to fix this problem using some kind of serialization and the use of the function module IDOC_INBOUND_IN_QUEUE.
    Does anyone know how to achieve this?.
    The scenario configuration in XI and R/3 is as follows:  (PI 7.0 SP15) - (R/3 SAP ECC 6.0)
    File to Idoc.
    Sender CC->
    File content conversion
    Exactly once in order
    Receiver CC->
    IDOC protocol
    Queue Processing
    R/3 Partner profile config.
    Message type BOMMAT
    Trigger immediately
    Thanks.

    Hi,
    You have to split the messages in the sender file adapter, by using the parameter "Recordsets per Message".
    I hope that it will solve your problem. Please see the below link, it might be useful to you.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    Regards,
    Rajesh

  • XSL mapping of ARTMAS IDoc - carriage returns and white space

    Hi all. I have tried all sorts here and am completely stuck. I am mapping an article master ARTMAS IDoc using XSL mapping and an extra carriage return and white space characters are being added to the FIELD1 and FIELD2 fields of the E1BPE1MARAEXTRT segment and I don't know why! These fields contain all our bespoke field values joined together so they are 229 and 250 characters long respectively, which I think is related to the problem. The mapping program looks like this:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/>
    <xsl:template match="/">
    <ARTMAS04>
    <IDOC>
      <xsl:copy-of select="//ARTMAS04/IDOC/EDI_DC40"/>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MATHEAD"/>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARART"/>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARAEXTRT"/>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MAKTRT"/>
      <xsl:for-each select="//ARTMAS04/IDOC/E1BPE1MARCRT">
        <xsl:if test="(PLANT='D100') or (PLANT='D200') or (PLANT='D300')">
          <xsl:copy-of select="."/>
        </xsl:if>
      </xsl:for-each>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MARMRT"/>
      <xsl:copy-of select="//ARTMAS04/IDOC/E1BPE1MEANRT"/>
    </IDOC>
    </ARTMAS04>
    </xsl:template>
    </xsl:stylesheet>
    I have a test IDoc going through this and the first 3 characters of the FIELD1 are "BIK". If I look at the source of the XML file, the problem area looks like this:
    <E1BPE1MARAEXTRT SEGMENT="1">
          <FUNCTION>004</FUNCTION>
          <MATERIAL>000000000000895649</MATERIAL>
          <b><FIELD1>
            BIK</b>      0  0.00 T                                    000000001CARRERA FURY 04 20"     CARRERA FURY 04 20" 2005092420040622    X                    00000000   20031104 00200406140000000000                    0.00 0000000
          </FIELD1>
    You can't really see it above, but there is a carriage return and 8 white spaces before the BIK. Where does this carriage return and white space come from?! Any help would be really appreciated - this is driving me crazy!
    Many thanks,
    Stuart Richards

    Stuart,
    I think I know the cause to your problem. I am not an XSLT programmer but based on searching this forum I found how I can acheive the carriage return at the end of my document. Your xsl statement is as follows:
    <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes"/>
    Change the indent value from yes to no. This should remove the carraige return. Hope this works for you.
    I actually need a carriage return and line feed on my document so I am still stuck. All I have acheived is the carraige return.
    Thanks,
    Jim

  • Problem with HRMD_A06 idoc

    Dear All,
    I am using the IDOC HRMD_A06 for carrying out various operation on the available HR infotypes.Kindly go thru the below mentioned details for further insight of the problem
    1.Scenario:
    a.An interface to SAP HR system needs to be built
    b.The interface will supply incremental master-data in 
      form of flat-files
    c.An integration broker ,SAP XI will then convert the
      flat-files to I-Docs and send I-Docs to SAP HR system
    d.The I-Doc chosen for this purpose is HRMD_A.HRMD_A06
    e.However this I-Doc is not supporting different
      operations on incremental data like modify, delete etc
    f.Further validations are also not being supported
    g.Also segments for certain info-type records are missing
    Example for Delete Operation mode:
    <b>Operation Delete</b>: Delete existing infotype record
    <b>Expected Result</b>: Only the particular info-type record, as supplied in the I-Doc should be deleted and not the entire personal number with all the info-types
    <b>Actual Result</b>: The entire personal Number is deleted.
    Is it that the Idoc behaves in this fashion or there is some other flag apart from OPERATION, which needs to be set.
    Regards
    Vinay

    Hi Vinay,
    Have you found a solution ?
    Because I'm a similar problem by using IDoc HRMD_A06. I have not a segment E1P0021 when I delete the infotype 0021 on an employee. I have only its segment E1PITYP.
    Regards
    Mickael

  • Problem in receving IDOCS

    I have a problem receving an IDOC. I checked the SM58 Xn and it says " Error when opening RFC connection "
    So I reprocessed the IDOC by transaction WE19 and then BD87 where SAP says it has sent the IDOC and staus is set to 03.
    However I again checked SM58 this time it says " RfcAbort : Cannot lock transaction " ........
    any idea or pointers as what the problem is or might be?
    Below is the RFC Server code which i am using......it is the sample code that comes along with the  sapjco.jar
    Thanks a lot
    package milestone.ups;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.util.Hashtable;
    import java.util.Map;
    import java.util.Properties;
    import com.sap.conn.jco.JCoException;
    import com.sap.conn.jco.JCoFunction;
    import com.sap.conn.jco.ext.DestinationDataProvider;
    import com.sap.conn.jco.ext.ServerDataProvider;
    import com.sap.conn.jco.server.DefaultServerHandlerFactory;
    import com.sap.conn.jco.server.JCoServer;
    import com.sap.conn.jco.server.JCoServerContext;
    import com.sap.conn.jco.server.JCoServerContextInfo;
    import com.sap.conn.jco.server.JCoServerErrorListener;
    import com.sap.conn.jco.server.JCoServerExceptionListener;
    import com.sap.conn.jco.server.JCoServerFactory;
    import com.sap.conn.jco.server.JCoServerFunctionHandler;
    import com.sap.conn.jco.server.JCoServerState;
    import com.sap.conn.jco.server.JCoServerStateChangedListener;
    import com.sap.conn.jco.server.JCoServerTIDHandler;
    public class StepByStepServer
        static String SERVER_NAME1 = "SERVER";
        static String DESTINATION_NAME1 = "ABAP_AS_WITHOUT_POOL";
        static String DESTINATION_NAME2 = "ABAP_AS_WITH_POOL";
        static MyTIDHandler myTIDHandler = null;
        static
            Properties connectProperties = new Properties();
            connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, " PRIVATE_IP ");
            connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "01");
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "001");
            connectProperties.setProperty(DestinationDataProvider.JCO_USER, " usr");
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "pwd ");
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en");
            createDataFile(DESTINATION_NAME1, "jcoDestination", connectProperties);
            connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "3");
            connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, "10");
            createDataFile(DESTINATION_NAME2, "jcoDestination", connectProperties);
            Properties servertProperties = new Properties();
            servertProperties.setProperty(ServerDataProvider.JCO_GWHOST, " PRIVATE_IP ");
            servertProperties.setProperty(ServerDataProvider.JCO_GWSERV, "sapgw01");
            servertProperties.setProperty(ServerDataProvider.JCO_PROGID, "JCO_SERVER");
            servertProperties.setProperty(ServerDataProvider.JCO_REP_DEST, "ABAP_AS_WITH_POOL");
            servertProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, "2");
            createDataFile(SERVER_NAME1, "jcoServer", servertProperties);
        static void createDataFile(String name, String suffix, Properties properties)
            File cfg = new File(name + "." + suffix);
            if(!cfg.exists())
                try
                    FileOutputStream fos = new FileOutputStream(cfg, false);
                    properties.store(fos, "for tests only !");
                    fos.close();
                catch(Exception e)
                    throw new RuntimeException("Unable to create the destination file " + cfg.getName(), e);
        static class StfcConnectionHandler implements JCoServerFunctionHandler
            public void handleRequest(JCoServerContext serverCtx, JCoFunction function)
                System.out.println("----
                System.out.println("call              : " + function.getName());
                System.out.println("ConnectionId      : " + serverCtx.getConnectionID());
                System.out.println("SessionId         : " + serverCtx.getSessionID());
                System.out.println("TID               : " + serverCtx.getTID());
                System.out.println("repository name   : " + serverCtx.getRepository().getName());
                System.out.println("is in transaction : " + serverCtx.isInTransaction());
                System.out.println("is stateful       : " + serverCtx.isStatefulSession());
                System.out.println("----
                System.out.println("gwhost: " + serverCtx.getServer().getGatewayHost());
                System.out.println("gwserv: " + serverCtx.getServer().getGatewayService());
                System.out.println("progid: " + serverCtx.getServer().getProgramID());
                System.out.println("----
                System.out.println("attributes  : ");
                System.out.println(serverCtx.getConnectionAttributes().toString());
                System.out.println("----
                System.out.println("CPIC conversation ID: " + serverCtx.getConnectionAttributes().getCPICConversationID());
                System.out.println("----
                System.out.println("req text: " + function.getImportParameterList().getString("REQUTEXT"));
                function.getExportParameterList().setValue("ECHOTEXT", function.getImportParameterList().getString("REQUTEXT"));
                function.getExportParameterList().setValue("RESPTEXT", "Hello World");
                // In sample 3 (tRFC Server) we also set the status to executed:
                if(myTIDHandler != null)
                    myTIDHandler.execute(serverCtx);
        static class MyThrowableListener implements JCoServerErrorListener, JCoServerExceptionListener
            public void serverErrorOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Error error)
                System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId);
                error.printStackTrace();
            public void serverExceptionOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Exception error)
                System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId);
                error.printStackTrace();
        static class MyStateChangedListener implements JCoServerStateChangedListener
            public void serverStateChangeOccurred(JCoServer server, JCoServerState oldState, JCoServerState newState)
                // Defined states are: STARTED, DEAD, ALIVE, STOPPED;
                // see JCoServerState class for details.
                // Details for connections managed by a server instance
                // are available via JCoServerMonitor
                System.out.println("Server state changed from " + oldState.toString() + " to " + newState.toString() + " on server with program id "
                        + server.getProgramID());
        static void step2SimpleServer()
            JCoServer server;
            try
                server = JCoServerFactory.getServer(SERVER_NAME1);
            catch(JCoException ex)
                throw new RuntimeException("Unable to create the server " + SERVER_NAME1 + ", because of " + ex.getMessage(), ex);
            JCoServerFunctionHandler stfcConnectionHandler = new StfcConnectionHandler();
            DefaultServerHandlerFactory.FunctionHandlerFactory factory = new DefaultServerHandlerFactory.FunctionHandlerFactory();
            factory.registerHandler("STFC_CONNECTION", stfcConnectionHandler);
            server.setCallHandlerFactory(factory);
            // additionally to step 1
            MyThrowableListener eListener = new MyThrowableListener();
            server.addServerErrorListener(eListener);
            server.addServerExceptionListener(eListener);
            MyStateChangedListener slistener = new MyStateChangedListener();
            server.addServerStateChangedListener(slistener);
            server.start();
            System.out.println("The program can be stoped using <ctrl>+<c>");
        static class MyTIDHandler implements JCoServerTIDHandler
            Map<String, TIDState> availableTIDs = new Hashtable<String, TIDState>();
            public boolean checkTID(JCoServerContext serverCtx, String tid)
                // This example uses a Hashtable to store status information. But usually
                // you would use a database. If the DB is down, throw a RuntimeException at
                // this point. JCo will then abort the tRFC and the R/3 backend will try
                // again later.
                System.out.println("TID Handler: checkTID for " + tid);
                TIDState state = availableTIDs.get(tid);
                if(state == null)
                    availableTIDs.put(tid, TIDState.CREATED);
                    return true;
                if(state == TIDState.CREATED || state == TIDState.ROLLED_BACK)
                    return true;
                return false;
                // "true" means that JCo will now execute the transaction, "false" means
                // that we have already executed this transaction previously, so JCo will
                // skip the handleRequest() step and will immediately return an OK code to R/3.
            public void commit(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: commit for " + tid);
                // react on commit e.g. commit on the database
                // if necessary throw a RuntimeException, if the commit was not
                // possible
                availableTIDs.put(tid, TIDState.COMMITTED);
            public void rollback(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: rollback for " + tid);
                availableTIDs.put(tid, TIDState.ROLLED_BACK);
                // react on rollback e.g. rollback on the database
            public void confirmTID(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: confirmTID for " + tid);
                try
                    // clean up the resources
                // catch(Throwable t) {} //partner wont react on an exception at
                // this point
                finally
                    availableTIDs.remove(tid);
            public void execute(JCoServerContext serverCtx)
                String tid = serverCtx.getTID();
                if(tid != null)
                    System.out.println("TID Handler: execute for " + tid);
                    availableTIDs.put(tid, TIDState.EXECUTED);
            private enum TIDState
                CREATED, EXECUTED, COMMITTED, ROLLED_BACK, CONFIRMED;
        public static void main(String[] a)
            // step1SimpleServer();
            step2SimpleServer();
            // step3SimpleTRfcServer();

    thx sameer.
    I am sending IDOCs when delivery is created i.e through transaction VL01N /VL02N.
    I dont know for some reason i dont have mw ppackage in my sapjco.jar. I got from the sap market place.
    I modified the code to handle IDOC request as u sugguested. I have put system.out in the code to check whether handler is being invovked? But it didnt when I run the code.
    I tried to reprocess the IDOC through we19....but they failed(as shown in sm58).
    Here is the modified code....
    package milestone.ups;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    import java.util.Hashtable;
    import java.util.Map;
    import java.util.Properties;
    import com.sap.conn.idoc.IDocDocumentList;
    import com.sap.conn.idoc.IDocXMLProcessor;
    import com.sap.conn.idoc.jco.JCoIDoc;
    import com.sap.conn.idoc.jco.JCoIDocHandler;
    import com.sap.conn.idoc.jco.JCoIDocHandlerFactory;
    import com.sap.conn.idoc.jco.JCoIDocServerContext;
    import com.sap.conn.jco.JCoException;
    import com.sap.conn.jco.ext.DestinationDataProvider;
    import com.sap.conn.jco.ext.ServerDataProvider;
    import com.sap.conn.jco.server.JCoServer;
    import com.sap.conn.jco.server.JCoServerContext;
    import com.sap.conn.jco.server.JCoServerContextInfo;
    import com.sap.conn.jco.server.JCoServerErrorListener;
    import com.sap.conn.jco.server.JCoServerExceptionListener;
    import com.sap.conn.jco.server.JCoServerState;
    import com.sap.conn.jco.server.JCoServerStateChangedListener;
    import com.sap.conn.jco.server.JCoServerTIDHandler;
    import com.sap.conn.idoc.jco.*;
    public class StepByStepServer
        static String SERVER_NAME1 = "SERVER";
        static String DESTINATION_NAME1 = "ABAP_AS_WITHOUT_POOL";
        static String DESTINATION_NAME2 = "ABAP_AS_WITH_POOL";
        static MyTIDHandler myTIDHandler = null;
        static
            Properties connectProperties = new Properties();
            connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "172.31.64.74");
            connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "01");
            connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "001");
            connectProperties.setProperty(DestinationDataProvider.JCO_USER, "US9904");
            connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "us9904");
            connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en");
            createDataFile(DESTINATION_NAME1, "jcoDestination", connectProperties);
            connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "3");
            connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, "10");
            createDataFile(DESTINATION_NAME2, "jcoDestination", connectProperties);
            Properties servertProperties = new Properties();
            servertProperties.setProperty(ServerDataProvider.JCO_GWHOST, "172.31.64.74");
            servertProperties.setProperty(ServerDataProvider.JCO_GWSERV, "sapgw01");
            servertProperties.setProperty(ServerDataProvider.JCO_PROGID, "JCO_SERVER");
            servertProperties.setProperty(ServerDataProvider.JCO_REP_DEST, "ABAP_AS_WITH_POOL");
            servertProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, "2");
            createDataFile(SERVER_NAME1, "jcoServer", servertProperties);
        static void createDataFile(String name, String suffix, Properties properties)
            File cfg = new File(name + "." + suffix);
            if(!cfg.exists())
                try
                    FileOutputStream fos = new FileOutputStream(cfg, false);
                    properties.store(fos, "for tests only !");
                    fos.close();
                catch(Exception e)
                    throw new RuntimeException("Unable to create the destination file " + cfg.getName(), e);
        static class MyIDocHandler implements JCoIDocHandler
            public void handleRequest(JCoServerContext serverCtx, IDocDocumentList idocList)
                 System.out.println("IN Handler");   - THIS DIDNT PRINT on the CONSOLE             FileOutputStream fos=null;
                OutputStreamWriter osw=null;
                  try
                       IDocXMLProcessor xmlProcessor =
                            JCoIDoc.getIDocFactory().getIDocXMLProcessor();
                    fos=new FileOutputStream(serverCtx.getTID()+"_idoc.xml");
                    osw=new OutputStreamWriter(fos, "UTF8");
                       xmlProcessor.render(idocList, osw,
                                 IDocXMLProcessor.RENDER_WITH_TABS_AND_CRLF);               
                       osw.flush();
                  catch (Throwable thr)
                       thr.printStackTrace();
                finally
                    try
                        if (osw!=null)
                            osw.close();
                        if (fos!=null)
                            fos.close();
                    catch (IOException e)
                        e.printStackTrace();
        static class MyIDocHandlerFactory implements JCoIDocHandlerFactory
             private JCoIDocHandler handler = new MyIDocHandler();
             public JCoIDocHandler getIDocHandler(JCoIDocServerContext serverCtx)
                  System.out.println("Handler Object created and invoked");
                  return handler;
        static class MyThrowableListener implements JCoServerErrorListener, JCoServerExceptionListener
            public void serverErrorOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Error error)
                System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId);
                error.printStackTrace();
            public void serverExceptionOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Exception error)
                System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId);
                error.printStackTrace();
        static class MyStateChangedListener implements JCoServerStateChangedListener
            public void serverStateChangeOccurred(JCoServer server, JCoServerState oldState, JCoServerState newState)
                // Defined states are: STARTED, DEAD, ALIVE, STOPPED;
                // see JCoServerState class for details.
                // Details for connections managed by a server instance
                // are available via JCoServerMonitor
                System.out.println("Server state changed from " + oldState.toString() + " to " + newState.toString() + " on server with program id "
                        + server.getProgramID());
        static void step2SimpleServer()
             JCoIDocServer server;
            try
                server = JCoIDoc.getServer(SERVER_NAME1);
            catch(JCoException ex)
                throw new RuntimeException("Unable to create the server " + SERVER_NAME1 + ", because of " + ex.getMessage(), ex);
            //JCoServerFunctionHandler stfcConnectionHandler = new StfcConnectionHandler();
            server.setIDocHandlerFactory(new MyIDocHandlerFactory());
            //factory.registerHandler("STFC_CONNECTION", stfcConnectionHandler);
            // additionally to step 1
            MyThrowableListener eListener = new MyThrowableListener();
            server.addServerErrorListener(eListener);
            server.addServerExceptionListener(eListener);
            MyStateChangedListener slistener = new MyStateChangedListener();
            server.addServerStateChangedListener(slistener);
            server.start();
            System.out.println("Server Started");
            System.out.println("The program can be stoped using <ctrl>+<c>");
        static class MyTIDHandler implements JCoServerTIDHandler
            Map<String, TIDState> availableTIDs = new Hashtable<String, TIDState>();
            public boolean checkTID(JCoServerContext serverCtx, String tid)
                // This example uses a Hashtable to store status information. But usually
                // you would use a database. If the DB is down, throw a RuntimeException at
                // this point. JCo will then abort the tRFC and the R/3 backend will try
                // again later.
                System.out.println("TID Handler: checkTID for " + tid);
                TIDState state = availableTIDs.get(tid);
                if(state == null)
                    availableTIDs.put(tid, TIDState.CREATED);
                    return true;
                if(state == TIDState.CREATED || state == TIDState.ROLLED_BACK)
                    return true;
                return false;
                // "true" means that JCo will now execute the transaction, "false" means
                // that we have already executed this transaction previously, so JCo will
                // skip the handleRequest() step and will immediately return an OK code to R/3.
            public void commit(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: commit for " + tid);
                // react on commit e.g. commit on the database
                // if necessary throw a RuntimeException, if the commit was not
                // possible
                availableTIDs.put(tid, TIDState.COMMITTED);
            public void rollback(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: rollback for " + tid);
                availableTIDs.put(tid, TIDState.ROLLED_BACK);
                // react on rollback e.g. rollback on the database
            public void confirmTID(JCoServerContext serverCtx, String tid)
                System.out.println("TID Handler: confirmTID for " + tid);
                try
                    // clean up the resources
                // catch(Throwable t) {} //partner wont react on an exception at
                // this point
                finally
                    availableTIDs.remove(tid);
            public void execute(JCoServerContext serverCtx)
                String tid = serverCtx.getTID();
                if(tid != null)
                    System.out.println("TID Handler: execute for " + tid);
                    availableTIDs.put(tid, TIDState.EXECUTED);
            private enum TIDState
                CREATED, EXECUTED, COMMITTED, ROLLED_BACK, CONFIRMED;
        public static void main(String[] a)
            // step1SimpleServer();
            step2SimpleServer();
            // step3SimpleTRfcServer();

  • Error to send a IDOC from ECC to SUS

    Hi,
    I am trying to connect to SAP SUS System using HTTP adapter using PI 7.0.The scenario is
    ECC ->PI->SAP SRM. I have configured HTTP adapter as the receiver with addressing type as HTTP Destination. I have created a RFC destination of type H pointing to SAP SUS on PI. I have encountered the following error after executing the scenario.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_SERVER</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3>Error during parsing of SOAP header</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>HTTP server code 500 reason Internal Server Error explanation Error during parsing of SOAP header</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have configured HTTP receiver with Addressing type HTTP Destination and configured the HTTP destination field with RFC destination(Connection Type H) created on PI. Here my source and target structures are same i.e DELVRY03. I have triggered DELVRY03 idoc from ECC and i am expecting same xml to be sent to SAP SUS but stuck up with the above mentioned error.
    Someone know how fix this problem?
    Tks,
    Erik

    HI,
    As per my understanding to your scenario, You want to send one IDoc from ECC to SAP SUS system using SAP PI.
    So i hope you must have configured on all the steps required to Send one IDoc to PI syste, Secondly, are you using any Standard interface in PI to send data to SAP SUS system? If yes, you need to create an HTTP Destination for that system and then you have to create XI Receiver Adapter with that HTTP destination to post incoming message to SAP SUS system.
    Your error suggests you are using Plain HTTP adapter to post data to SAP SUS, which is in my understanding is incorrect.
    Regards
    Aashish Sinha
    Edited by: Aashish Sinha on Feb 21, 2011 9:15 AM

  • Out of Memory problem at large IDocs (HRMD_A.HRMD_A06)

    Hello,
    we need help at the following problem:
    We send HRMD_A.HRMD_A06 IDocs in a IDOC->XI->IDOC Scenario.
    In this scenario there is a small graphical Mapping. When
    we send 100 Idocs, after 15 - 30 Minutes all queues are stopped and the error "Out of Memory" is showing.
    We have configured that Large IDocs are running in own queues (Max. 3 parallel), but the error is still there.
    Only Solution this time is to restart the queues repeatly and at anytime the Idocs are all going through.
    Has anyone a idea what we can do ?
    Regards,
    Christian

    Thanks for answers,
    now after 15-30 Minutes a new Error shows: 
    "Timelimit Overstepped"  - In German Original "Zeitlimit Überschritten".
    and all Queues stopped.
    What can i do ?
    Regards
    Christian

  • Problem in HRMD_A Idocs: Object is Locked

    Hi Everyone,
    I would like to ask for assistance on the problem below.
    We've encountered almost everyday failed HRMD_A idocs. Almost all of the idocs have the same error message: "Object is Locked. A locked key has been set for the object."
    The object type is "P".
    Can you help us on how to solve this problem?
    Thanks in advance!

    Hi,
    For the locked object the sender system itself will not send the idoc.
    and hence the error for the lock object might have been seen in the sender system and not the receiver system.
    Yes you can process the idocs which are in error in the receiver system by frequently scheduling reports like
    RBDMANI2-Schedule update of idocs with errors and
    RBDAPP01- for ready for transfer idocs
    I suggest you use the bapi way of transferring data, where the receiving system reads data from the sender system once a day and reads only that data which is changed during that date.
    Regards,
    Divya

  • Problem in sendinfg Idoc's

    Hi All,
    I am facing problem in sending idoc's form one SAP sys to another. I had written a outbound program for sending IDOC's. When i execute the program the idoc is  generated in the sending system ( With status 03 ) but no idocs were posted on the target system. But if i manually try to send the IDOC ( WE19 ) the idocs are posted to the target system.
    Can any one give me an idea where the exact problem lies in...
    Regards,
    Swamy Mantha.

    Hi,
              Ru close the master idoc with a commit .
    <b>*Reward points</b>
    Regards

  • Send an IDoc over JCo

    Hi,
    I'm a newbie and I'm wondering if its possible to send an IDoc with the JCo to the SAP-System.
    It's a work for university, but nobody here has any experiences with SAP.
    I've got a Mini-WAS 6.20 Testsystem (the one with the Flightbooking example on it). I have an IDoc (with an order) generated from an java application.
    My part is to get this IDoc in this SAP-System. Only get it somehow stored, thats all. No checking if order is somehow valid, concerning availability or whatever.
    Question:
    - Can I send an IDoc with JCo?
    - In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?
    - What else must I configure?
    - Is there a good tutorial for my problem?
    Any suggestions are very welcome, since I need a starting point.
    Thanks
    Jonny

    Hi, Johannes!
    <b>- Can I send an IDoc with JCo?</b>
    Yes you can. All you need is SAP Java IDoc Class Library.
    <i>
    The SAP Java IDoc Class Library consists of two parts, the SAP Java Base IDoc Class Library and the SAP Java Connector IDoc Class Library.
    The packages of the SAP Java IDoc Class Library include the software as well as documentation. The SAP Java Base IDoc Class Library provides an API which helps navigating, reading, filling, and modifying IDocs. This base package is middleware independent. Creating, sending, and receiving IDocs is middleware dependent. To make use of the SAP Java Base IDoc Class Library you will need an additional middleware dependent add-on package implementing the defined interfaces like the SAP Java Connector IDoc Class Library. In the package of the SAP Java Connector IDoc Class Library examples are included.
    The Windows NT / 2000 Ports of the SAP Java IDoc Class Library are shipped as zip files. The Unix Ports of the SAP Java IDoc Class Library are shipped as tgz files.</i>
    <b>- In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?</b>
    Storing of IDoc is performed on the receiving part - system does it automatically.
    <b>- What else must I configure?</b>
    You have to set up logical destination for JCo partner as well as inbound partner profile for corresponding IDoc message type.
    <b>- Is there a good tutorial for my problem?</b>
    Working examples and java docs included in SAP Java IDoc Class Library distribution is a good starting point.
    Regards,
    Maxim.

Maybe you are looking for

  • Can I switch all my apple devices to one account ...

    and still access songs, books or programs that were purchased with the abandoned accounts? If I permanently switch accounts on all my apple devices (iPad, MacBook Pro, iPhone, iMac, 2 iPods, Apple TV, Airport Express) to align with one account for iT

  • How can i sync contacts of our general mailbox account used in Office Web App (Office365)?

    Hello, it would be comfortable to share contacts and calenders from Office365 using an iPhone. My local Apple Adressbook is able to show and sync the contacts by setting up an Exchange-account for these general mailbox we created. Using the same cont

  • New 3.1 GHz 2011 iMac 27-inch running 10.6.6 won't update to 10.6.7

    Just purchased the newly released top of the line 27-inch 3.1 GHz iMac today and it came with Mac OS X 10.6.6. I ran software update, says no updates. I downloaded the 10.6.7 update manually from Apple's web site and it says the computer doesn't meet

  • USB key :: error -36

    Hi there. I have a problem with a USB stick on my MBP. (15", 3.06Mhz, 4Gb, snow leopard 10.6.2). When I copy big files (less than 4Gb of course) I have intermittent disconnections of the device with an error -36 displayed in finder. Even if I copy sm

  • How can I import/paste a corporate logo into a title?

    I am new to working with FCP X and am trying to import a corporate logo into a title clip.  Can someone give me an idea of how to go about accomplishing this?  Thanks ever so much, in advance! - Austin