TRFC server

Hi,
I am writing a tRFC server using SAP NW RFC SDK. I am registering my server using RfcRegisterServer() and then i am trying to get the function description of INBOUND_IDOC_PROCESS whose handle i can send to RfcInstallServerFunction().. Below is the code:
sz3xIDOCProcName = RfcGetFunctionDesc(rhRFCConnection,cU("INBOUND_IDOC_PROCESS"),&info);
The above function call is failing and returning NULL. Can you please let me know if the above function call is proper and i should call it in tRFC server?
My install server function is
  eRFCResult = RfcInstallServerFunction(NULL, sz3xIDOCProcName, pf3xEntryPoint,&info);
Thanks in advance,
Poornima.K

Hi Gopal,
This is what I understood after reading your comment.
In order to create RFC destination in ERP system for destination Datastage server, you need to mention Registered program ID details in RFC. So you are in a confusion where that program needs to be created? Please clarify.
If my understanding is correct, you have to register the program id in DataStage Administrator for SAP tool as shown in step 6 in the below link.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/805af1cb-0f17-2d10-0cb5-9e9999cbfadf?QuickLink=index&overridelayout=true
Thanks,
Siva Kumar

Similar Messages

  • How can SAP tRFC server tell client through JCo that function carried out?

    SAPs "Transactional RFC Technical Description" document (release 4.0) says in section Transactional RFC on page 6: "Finally, the server tells the client, that the function has been carried out and the client acknowledges this.".
    How can the server tell this to the client when the server communicates with the client through JCo (Java Connector)?

    System.out.println goes to console, which is not a file... This whole thing is much easier if you use standard logging:
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm

  • 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();

  • SAP Cource BIT528

    Wondering if anyone out there has taken the course BIT528 (The .NET connector course) and if so whether you found it useful.  By the look of the course content it seems like it could be an excellent way to get up to speed on this technology quickly.
    Also, does anyone know any place in North America where it might be offered?  I checked through the SAP Education portal and the only place listed was Thailand.  I have tried emailing SAP but so far no response.
    Any info would be appreciated.
    -Sheldon

    Hi Sheldon,
    how are you doing today ?
    i definitely agree that attendence in the course would be a gr8 way to kick start your development knowledge for interfacing SAP & .NET systems. This course will cover the contents of the Help document provided by SAP on major releases of NCo.
    http://www.microsoft-sap.com/pdf/dotnetconnector.nov02.pdf 
    The online help available is also updated and the definitive help resource
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/frameset.htm
    the video tutorial is also v good :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/57060f70-0701-0010-b1b9-f28ffd0b42b1
    i have not attended the course, when i began developing with NCo, there was no course available (in 2003), and not being in thailand, i would not have the resources to attend it there.
    from the index, it will take you through the NCo help document [which is available with NCo 1.0, and later uptaded when NCo 2.0 & 2.1 were released]
    the development center
    https://www.sdn.sap.com/irj/sdn/developerareas/dotnet?rid=/webcontent/uuid/3ecbe347-0a01-0010-5897-dc8f159ae3de [original link is broken]
    is a brilliant resource, and time spent there is vital to the tasks
    these will again help you out in interfacing, but for SAP system knowledge  [the system you are going to connect to, is out of it's scope]
    with respect,
    amit
    Introduction to SAP data interfaces
    Using Visual Studio.NET
    Creating and using proxies
    SAP client exceptions
    SAP client debugging
    Parameters
    Connector classes in detail
    tRFC and qRFC clients
    Asynchronous RFC programming
    IDoc clients
    RFC server, tRFC server, and IDoc tRFC server
    Solution deployment
    Message was edited by:
            amit chawathe

  • How to call TRFC from diff SAP server?

    hi all,
            i have created one rfc enabled FM on a SAP server, and i am calling that FM from different SAP server using TRFC. I am calling using this statement,
    CALL FUNCTION 'ZMKV_RFC' IN BACKGROUND TASK
      DESTINATION 'zmkv'
    But it doesnt show me any output neither showing any errors? suggest me step by step procedure to do this...i will reward points if i get the requried answer.

    hI Mayank..
    Note: RFC destinations are maintained in Tcode SM59. Test this RFC Destination. And one more thing these RFC Destination names are CASE SENSITIVE.
    So in this statement.
    CALL FUNCTION 'ZMKV_RFC' IN BACKGROUND TASK
    DESTINATION 'zmkv'  "Check the CASE of the RFC Destination and give
    <b>REWARD IF HELPFUL.</b>

  • JCO Server and SAP trfc queue

    Hi,
    we are sending IDocs from our sap system to a JCO server. Let's assume  we are sending 1000 IDocs to it. After sending there are no IDocs in the trfc-queue and the status of all IDocs is "green". Can we assume the JCO server received all 1000 IDocs? Is an  empty trfc-queue always an indicator for a successfull sending process even there are some problems with a weak network(network interruptions). I know IDocs are tansaction based. For my understanding a transaction is okay or not. So an empty trfc queue should indicate everything went fine and all IDocs were received?
    I appreciate any comments on that issue ...
    -Steffen

    If the status of all idocs is green which indicates the communication layer is ok. As you said, the idocs are transaction based. You need to make use of transaction id to confirm everything is fine from the viewpoint of your business logic.
    Dennis

  • Is there a possibility to run tRFC entries alone in Separate application server

    Please let me know if there is a possibility to run tRFC entries alone in separate application server.
    If yes , kindly let me know how it can be tracked and separated to server as we have immediate idocs also which will run via tRFC.
    Thank you !!

    Hi,
    Thank you for your interesst.
    This internet button key is one of buttons located above the keyboard near the power button. What I have achieved to this moment was to stop it functionality in the system by clearing the entries in the fields Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17\ShellExecute and entry
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\7\Association that was http
    After these changes in registry the behavior of the button was suppressed, the Firefox stopped to start unexpectedly all the time – so in system it works. But the problem is still when I have opened Firefox. Every time when you want to surf in internet – the homepage is activated also unexpectedly. I wrote this post with intention to ask if there is a possibility to switch off the functionality of this quick launch button in Firefox. Because I assume Firefox overrides the system setup – this I have made in registry. I tried with some option changes in about:config but without success. And I know that for older versions of firefox was some option in about:config do disable_quick launch button. But in 10.0.2 I couldn't locate it.
    Thank you
    Regards
    Lukasz

  • Automatic Reprocess of Trfc messages in PI production server using RSARFCEX

    Hello All,
    i am getting frequent errors of SYSFAIL in TRFC queue in PI. I am trying to schedule RSARFCEX report as the Background job, please advice me "is this correct solution" and also please tell whether this will effect any other messages other than reprocessing the failed TRFC messages.

    Hi
    RSARFCEX is the report for restarting messages with trfc errors. But if the messages are failed because of wrong entries in ALE configurations in case of IDoc scenarios then you need to resolve them manually.

  • Problem in creatinga sales order idoc into XML file in the same appl server

    Hai....friends....
    I am tring to send an  sales order as iDOC  to a xml port in the same application server....
    1. have created a xml port with path..\usr\sap\RRM\SYS\global\.
    2. assigned it to logical system.
    3.Have a RFC destination of TCP/ip(LOCAL_EXEC)
    but in bd64 after creating  model view when i am generating partner profiles  a tRFC PORT has been automatically created.
    then finally the IDOc has been created but its saying....IDOC CANNOT OR SHOULD NOT BE SENT...
    Pls help me regarding this...
    thx,
    ram

    Hi Thanks for your updates,
    But I got the same error, while pass the data from abap into XML.
    error message,what I am getting is
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource 'file:///C:/tempcustomers.xml'. Line 1, Position 1
    #<?xml version="1.0" encoding="utf-16"?>
    Thanks
    Gowrishankar

  • IDOC Configuration in XI Server

    Hi,
       i need to send idoc(MATMAS03) from R/3 server to XI server.
    In XI server i've done the following configurations:
    1. created a logical system for XI server and R/3 server
    2. Created a RFC destination for R/3 server
    3. Created a port for IDOC adapter using t-code IDX1.
    4. Imported the metadata of MATMAS03 idoc into XI server using tcode IDX2.
    Configuration done at R/3 server:
    1. created a logical system for XI server and R/3 server
    2. Created a RFC destination for XI server
    3. Created a logical port for R/3 and XI server using t-code WE21.
    4. Created partner profile for R/3 and XI server using t-code WE20 and maintained MATMAS in outbound parameter of both the partners.
    Now i'm sending idoc from R/3 system using tcode WE19. In tcode WE02, the status of the idoc shown is "IDOC send to the receiving system/program.
    But when i'm checking tcode WE02 in XI system, its not showing any inbound idoc.
    Do i need to maintain partner profile in XI system also?
    Any help will be highly appreciated.
    Regards
    Manpreet

    Hello Manpreet,
      Lets say ur R/3 System is D10 and XI is P10.
    Configuration on R/3 Side.. sending system..
    1.Create a Port SAPP10 with RFC dest to XI in R/3. WE21
    2.Create a Logical System Type LS in R/3. WE20
    This logical system is for XI so in you Integration server in SLD Logical System name should be same.
    That will do for R/3.
    Now for XI..
    1. Call Transaction IDX1.
    Create a port with name SAPD10 and an RFC dest to R/3.
    Now go to WE19 in R/3 take a successful IDOC and display the same.
    Doubble click on EDIDC and enter Sender/Receiver Port/Partner Number.
    In your case..
    Sender: SAPD10.
    Partner: xxxxx
    Receiver: SAPP10 created above
    Partner: xxxxx created above
    Partner Type: LS.
    And start outbound processing.
    Goto SM58 and check ur TRFC if no messages apper you are successful in sending the IDOC else correct and resend.
    Let me know if you were successful..
    Regards,
    Sri.

  • Problem with Scenario tRFC - XI - File

    Hello,
    Can you tell me if it is possible to implement the scenario
    tRFC -> XI -> File Adapter
    without using a sync-async bridge.
    I am having a hard time implementing this scenario.
    My problem is that I am not able to see the messages in transaction SXMB_MONI in XI.
    Nevertheless, I am able to see the messages on transaction SM58 in the sending system with the following error message
    com.sap.aii.af.rfc.afcommunication.RfcAFWException: alternativeServiceIde
    I know that this message is truncated but I don't know the missing part.
    What I have done is:
    Developed a simple report that calls a RFC with the addition in background task (so it is tRFC).
    Created a RFC Destination of type T (TCP/IP)
    registration
    same program id that I have configured in my RFC Sender Adapter (case-sensitive)
    also with the aplication server's gateway and gateway service.
    On the XI Side I have created the "usual" objects:
    For the receiver side (file adapater) I have created
    Data Types,
    Message Types,
    Message Interfaces
    +
    Message Mapping
    Interface Mapping
    On the sender side I have used the imported RFC structure.
    Can anyone please help.
    Thanks in advance

    Hello again gentlemen,
    Sorry for the late reply but I was unppluged from my computer for the weekend.
    First thanks for your answers.
    Just to make it clear:
    What I am trying to configure is a async scenario, OK?
    So I think Udo got my problem rigth. That's why I am using the addition 'IN BACKGROUND TASK' to call my RFC FM.
    I tested the RFC DESTINATION and it is working fine.
    My doubt was if I could configure a async scenario for
    RFC->XI->File adapter...
    You have answered my question... I know now that it is possible to configure the scenario I am configuring...
    So now what I have to do is figure out why it is not working but that is probably due to a malfunctioning configuration.
    I am closing this message and if I had other problems I will post them later...
    Michal,
    Nice blogs, keep going
    Best regards and thanks
    Vasco

  • IDOC adapter and number of tRFC records

    We have idoc inbound scenario file -> XI -> idoc -> R/3.
    For each file record an IDOC is created.
    Can somebody explain, why only one tRFC record is created containing all IDOCs? Can you influence with interface config how many tRFC records are created? Does settings ' exactly once ' / ' exactly once in order ' have something to do with how many tRFC entries are created?
    We faced a situation with our interface scenario that file unexpectedly contained huge number of records causing huge number of idocs generated in XI. However only one tRFC entry was created that contained all idocs. As consequence the receiving system had performance problems and the tRFC call had to be cancelled.
    As workaround we splitted the source file in file adapter to interval of 1000recs, thus causing multiple tRFC records created and performance was ok in background system.
    Is XI trying to keep IDOCs created out of each incoming message in one "LUW" and send them alltogether in one tRFC call to R/3? Or is there a config parameter that each created IDOC could be sent independent of other idocs still to be created?
    br: Kimmo

    Kimmo,
    There will be one TRFC call per message from XI.
    The whole input file is treated as a XI message.
    The Receiver IDOC Adapter call the SAP system via ONE TRFC call and posts the message.
    By mentioning Exactly Once in the Receiver Idoc Adapter Communication Channel, XI guarantees the delivery of that message.
    One way is to split the file into multiple Messages.
    You can do this via BPM. But this is not advisable for large files.
    We had the same problem for very large files.
    We used XI to just pass through the file from Source system and post as file in the Application Server of SAP.
    We defined a LSMW project for Periodic Processing, which would take this file and post as Idocs in the SAP System.
    Our Scenario
    File -> XI -> File.
    In the Receiver File Adapter, use the Execute Operating System Command to trigger event sapevt in the SAP system.
    You can define events for Background jobs.
    So when XI posts the file in the Application server of SAP, XI will trigger the background event defined in the Communication Channel.
    The LSMW project which has been scheduled to listen to this background event will kick off.
    Hope this helps.

  • JCo Server does not start

    Hi,
    I'm trying to create and start a JCoIDoc.Server on a Web Application Server 700 system. Because I could not find the required classes in the trfc.jar archive on the server I downloaded and packaged the required java connector classes sapidoc.jar and sapidocjco.jar in my EAR file.
    The deployment works fine and the server should be started automatically by a servlet. There are no error entries in the logfile. In addition I can see my own entries in the logfile that the servlet was executed an the server started.
    Nevertheless I can not send anything from an ECC 5.0 system to my java connector server. Using the "netstat -a" command in a DOS console on the Java server I can not even see that the port for incomming idocs is listening.
    Having a look at the ECC 5.0 system using transaction "smgw" I do not see the my JCo Server
    Has anybody an idea what goes wrong or if I forgot anything to realize? The code is quite similar to the jco sample code.
    Or is it in general not possible to start a JCoIDoc.Server on a Web Application Server 700 system?
    Best regards,
    Markus

    you should have no problem doing this....
    However -- as you downloaded the Idoc libraries instead of extracting them for the tar...?
    a) make sure they are accessible (on the classpath) They may need to be in the same directory as the JCO...
    b) make sure they are compatible... read up on the download page and in sapnotes which version exactly you need...
    Or ask your friendly basis admin where he stashed them and use the ones coming with the installation...
    Enjoy

  • JCo Server Load Balancing

    We have created a JCo Server interface using RFC modules in SAP to communicate with an external web based system.  The SAP system calls the external application via tRFC and qRFC as needed from the business transaction.  We have achieved high throughput by clustering our external web application server, putting a load balancer in front of that web application, and finally creating multiple JCo Server instances within own JVMs (currently 6 instances with 5 servers each).  The JCo Server is registered to the central gateway of the SAP system using gwhost, gwserv, and progid.  With this setup we have successfully performed up to 50,000 transactions an hour.
    My understanding is that the SAP gateway will act as a load balancer on the SAP side.  Is this right or should we consider to install a hardware load balancer "in front" of the SAP gateway and try to map this to the message server instead?  Or concern is that our JCo Server process will "flood" the central gateway and take all resources away form the SAP system.  Unfortunately the JCo Server class doesn't allow to connect to any other resource on the SAP system then the central gateway.
    Any suggestions or real live examples are appreciated.
    Stefan

    Hi Stefan
    We are doing a similar project wherein we are calling a middleware server based on the JCO.Server from SAP.
    You did say that you have achieved a throughput of 50000 transactions and we are interested in knowing how ?.
    Could you briefly tell use how you achieved it. In our case we have one instance of the JCO.Server working on the JVM.
    Here is what we did .
    We tried to start two instances of the middle ware server on the same JVM on the same BOX and register it with the gateway . This dint work .
    We were successfull in starting two instances of the middleware server from two different JVM on two different boxes and registering it at the gateway under the same id.
    This we know will work as the gateway will use its load balancing to distribute load between the two instances.
    But we are interested in knowing how we can start more then one server instance on a given JVM.
    Our questions are
    It we have threading in our middleware server, we believe it will not help as if the SAP gateway server has opened an connection with one instance of the middleware server. It is not possible for it to open another one...till the first one is complete. Hence threading within the middleware server is redundant.
    Your thoughts and comments are appreciated.

  • TRFC internals - how does the async processing happen?

    tRFC internals - how does the async processing happen?
    Dear all,
    With the document "[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f078394a-4469-2910-c4bf-853c75674694|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f078394a-4469-2910-c4bf-853c75674694]" there is an excellent place to read about SAP RFCs (remote function calls).
    Pages 94 to 96 describe in detail how tFRC (transactional RFC) works.
    However, there is still something unclear for me with the following sentence on page 94:
    "The truly exciting part happens when the program
    issues a COMMIT WORK command. The recorded calls
    are executed asynchronously in a special set of tRFC
    processing sessions created for each transaction ID..."
    Maybe someone can answer the following questions:
    a) what does exactly trigger and execute the tRFC?
    b) is it the ABAP runtime system itself, spawning the additional task in DIA?
    c) if multiple tRFC LUWs have been recorded, they are all executed in parallel by this procedure!?
    d) does the execution try to utilize all available DIA processes?
    e) how do the rdisp/rfc_... parameter come into the game?
       are they evaluated? We have seen all DIA occupied by the tRFCs executed!
    Best regards,
    Peter
    P.S.: if someone has answers to these ones, more related to error handling, would be great as well
    f) the jobs ARFC*, do they also use parallel processing?
       or is every ARFC* job responsible only for one single LUW?
       (note https://service.sap.com/sap/support/notes/366807 did not give a perfect answer)
    g) and how does the report RSARFCEX work compared to immediate execution?

    That's the problem, it won't.
    internal static string GetAvailabilityGroupFromConnection(SPDatabase db)
    if (!UsesAvailabilityConnection(db))
    return null;
    string dataSource = db.ConnectionString.DataSource;
    string cmdText = string.Format(CultureInfo.InvariantCulture, "\r\n SELECT name FROM sys.availability_groups g\r\n JOIN sys.availability_group_listeners l ON g.group_id = l.group_id\r\n WHERE dns_name = '{0}'\r\n ", new object[] { dataSource });
    string str3 = null;
    using (SqlCommand command = new SqlCommand(cmdText))
    ULS.SendTraceTag(0x302263, ULSCat.msoulscat_WSS_Database, ULSTraceLevel.Medium, "Looking up availability group for listener: {0}", new object[] { cmdText });
    using (SqlDataReader reader = GetSessionFromDatabase(db).ExecuteReader(command))
    while (reader.Read())
    str3 = reader.GetString(0);
    ULS.SendTraceTag(0x302280, ULSCat.msoulscat_WSS_Database, ULSTraceLevel.Medium, "Found group {0} for listener {1}", new object[] { str3, dataSource });
    This piece of code looks at the SPDatabase's connection string (the SQL alias, for example) and executes a T-SQL query looking for that name within SQL Server. Since the SQL alias does not exist within the SQL Server's configuration, it will return a null
    value, and you won't be able to set up the AG config using the AG cmdlets.
    Also, since mobility exists by the very nature of using an AG Listener, using a SQL Alias is redundant.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for