TCP/IP Connection from ABAP

Hello everybody.
Does anybody know the way how to create TCP/IP connection from ABAP? I need to establish TCP/IP connection from Appication server to external server(not sap) to retrieve some data. I assume that it can be done using RFC calling technique, but i think that i have to register needed functionality as RFC in external server. To skip this step i need an explicit TCP/IP from abap.
Thank you for helping.
Yours sincerely,
Nguyen Hai Long.
Edited by: Long Nguyen on Jun 24, 2008 10:06 AM

Thank you all. I found an example in the internet http://documentation.softwareag.com/Crossvision/sap231/pages/drfc2rpc.htm. The situation force me to overpass my laziness and to use RFC
Yours sincerely,
Nguyen Hai Long

Similar Messages

  • Setup connectivity from ABAP to Java stack

    Hi
    I'm struggling to make connectivity setup from ABAP to Java stack. Objective is to call a java method published on javastack from a report/FM. Can some one guide me with some examples. Appreciate all your responses.
    Thanks

    Hello Yadagiri,
    I found three links that may help you
    http://help.sap.com/saphelp_nw70/helpdata/en/43/783e2beabd1ad0e10000000a114cbd/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/45/f662fb6cc604ace10000000a114a6b/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/45/0e78275adc6cbfe10000000a114a6b/frameset.htm
    I hope it helps!
    With regards,
    Caio Cagnani

  • Possible to monitor TCP / IP connection from MIDlet??

    Hello,
    Does anybody know if it's possible to monitor the TCP / IP connection on a handset from within a MIDlet?
    Could we have a MIDlet running in the background that sniffs information about a user's WAP activities?
    Will something like this be possible with Android?
    Thanks so much!
    Karim Varela
    http://www.i-booze.com

    No, you cannot do that with MIDP.
    About Android: sure you can do it there: it's open source!

  • TCP IP connection From Solaris to Window?

    Hello Friends,
                           I have SCM installed on Solaris OS,and SCM optimizer installed on WIndow OS.I need to Connect SCM Solaris to SCM window, Thought RFC type TCP/ip Connection.
    For Example  In Solaris SCM for TCP/IP-Program name is d:\apo\opt\ctm\bin\ctmsvr.exe and Host is Window SCM host name.
    i need to know whether this Connection will work or If does not work Please Give the any Solution Friends.

    Thank you all. I found an example in the internet http://documentation.softwareag.com/Crossvision/sap231/pages/drfc2rpc.htm. The situation force me to overpass my laziness and to use RFC
    Yours sincerely,
    Nguyen Hai Long

  • Open more than 65k TCP/IP connections

    Hello,
    is it any possibility to open more than 65535 TCP/IP connections from one IP address as client? Because each connection occupied one port, I can't make more than 65k. Can be established more outgoing connections (as client) from one port to more different servers simultaneously? Thank you for any advice.
    Ceny

    The naive way will only let you open about 32K sockets before it fails.
    In order to get more you need to reuse the socketnumbers:
    #include <sys/socket.h>
    void BindSockToPort(int fd, int port) {
        sockaddr_in sa= {AF_INET,  port, INADDR_ANY};
        unsigned int one= 1;
        setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one);
        if(bind(fd, (sockaddr*) &sa, sizeof sa)) perror("bind");
    }Then you can connect.
    From same port you must of course connect to different endpoints.
    And this has of course nothing to do with sun studio C++. But I had just solved the problem myselfes, so...

  • Error when connect from portal system (abap ) to external ssl client - sm59

    Hi I am tryign to setup a ssl connection from the abap sm59 portal system to an exteral server.. I have setup the certs that the client has given me in strust.but i m gettign the ffg error.
    sysno      60
    sid        PID
    systemid   370 (Solaris on SPARCV9 CPU)
    relno      7110
    patchlevel 0
    patchno    150
    intno      20020600
    make       multithreaded, Unicode, 64 bit, optimized
    profile    /usr/sap/PID/SYS/profile/PID_DVEBMGS60_pidevdb
    pid        3911
    [Thr 01] Thu Jun 14 08:38:48 2012
    [Thr 01] TRACE FILE TRUNCATED
    [Thr 07] Thu Jun 14 08:39:07 2012
    [Thr 07] *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL
    [Thr 07]    session uses PSE file "/usr/sap/PID/DVEBMGS60/sec/SAPSSLA.pse"
    [Thr 07] SecudeSSL_SessionStart: SSL_connect() failed
    [Thr 07]   secude_error 536871970 (0x20000422) = "SSL record with the wrong SSLPlaintext.version received"
    [Thr 07] >>            Begin of Secude-SSL Errorstack            >>
    [Thr 07] ERROR in ssl3_get_record: (536871970/0x20000422) SSL record with the wrong SSLPlaintext.version received
    [Thr 07] <<            End of Secude-SSL Errorstack
    [Thr 07]   SSL_get_state() returned 0x00002120 "SSLv3 read server hello A"
    [Thr 07]   SSL NI-sock: local=57.24.111.151:34110  peer=57.24.110.116:5081
    [Thr 07] <<- ERROR: SapSSLSessionStart(sssl_hdl=10720d530)==SSSLERR_SSL_CONNECT
    [Thr 07] *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT {00020a7c} [icxxconn_mt.c 1957]
    When i change the sm59 connection not to use ssl. it give me a pop up screen . and asks me to enter user and password...
    He then  give me a private key file .. i.e a .pfx file but not sure how to load this in strust. I tried to convert in useign sapgenpse. but it fails with teh ffg error
    12% sapgenpse import_p12  -p /usr/sap/PID/amos/amos_client.pse /usr/sap/PID/amos/amos_client_pk.pfx
    import_p12: MISSING password for PKCS#12 file "/usr/sap/PID/amos/amos_client_pk.pfx"
    Please enter PKCS#12 encryption  password: *******
    PKCS#12/PFX file contains 1 keypair:
      1. FriendlyName = "amos.server.interface.webuser.web_int.cert"
         X.509v3 (type=Both) RSA-2048 (signed with sha1WithRsaEncryption)
         Subject="CN=AMOS WebService Interface Client, OU=IT&S MRO, O=South African Airways (Pty) Ltd, L=OR Tambo International Airport, SP=Gauteng, C=ZA"
         Issuer ="[email protected], CN=ca.flysaa.com, OU=Certificate Authority, O=South African Airways (Pty) Ltd, L=OR Tambo International Airport, SP=Gauteng, C=ZA"
    ERROR: Incomplete certification path -- NEED certificate of "[email protected], CN=ca.flysaa.com, OU=Certificate Authority, O=South African Airways (Pty) Ltd, L=OR Tambo International Airport, SP=Gauteng, C=ZA"!
    I have attached a doc of what it looks like.. appreciate any help

    Hi,
    There is an error in the publishing of template
    Template :"bbpsc02" is not publised in ITS.
    Go to T.code: SE80
    Publish all the templates again and check
    Check with your SAP  BASIS team for the help
    Regards
    Ganesh

  • How to connect external webservice from ABAP

    Hi,
    Please see code pasted below and tell me what is wrong.
    We try to connect external webservice via https. Should I install certificate is SAP for this connection? (if YES, how can I do this?)
    Should I configure something else in SAP to connect external webservice via https?
      DATA: client type ref to if_http_client,
            lv_content type String,
            lv_xml_string type string,
            lv_length type I,
            lv_response type I,
            lv_node type ref to IF_IXML_NODE,
            lv_xml_doc type ref to cl_xml_document.
    ****Create the HTTP client
    call method cl_http_client=>create_by_url
       EXPORTING
         url    = 'http://services-demo.krd.pl/raina/1.0/KrdAPI.asmx'
       IMPORTING
         client = client
       EXCEPTIONS
         others = 1.
    CALL METHOD CL_HTTP_CLIENT=>CREATE
      EXPORTING
        HOST               = 'services-demo.krd.pl'
         SERVICE = '443'
        SCHEME  = '2'
       PROXY_HOST         =
       PROXY_SERVICE      =
       SCHEME             = SCHEMETYPE_HTTP
       SSL_ID             =
       SAP_USERNAME       =
       SAP_CLIENT         =
      IMPORTING
        CLIENT             = client.
    EXCEPTIONS
       ARGUMENT_NOT_FOUND = 1
       PLUGIN_NOT_ACTIVE  = 2
       INTERNAL_ERROR     = 3
       others             = 4
    CONCATENATE
    '<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
    ' xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
    'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rain="http://raina.krd.pl">'
    '<soapenv:Header/>'
    '<soapenv:Body>'
    '<rain:Login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">'
    '<id xsi:type="xsd:string">B03EB34F02</id>'
    '<password xsi:type="xsd:string">Akquinet99</password>'
    '<appId xsi:type="xsd:string">test</appId>'
    '<appInstId xsi:type="xsd:string">test</appInstId>'
    '<custom xsi:type="xsd:string">test</custom>'
    '</rain:Login>'
    '</soapenv:Body>'
    '</soapenv:Envelope>'
    INTO lv_content.
    CALL METHOD client->request->set_header_field
        EXPORTING
          name  = '~request_method'
          value = 'POST'.
    CALL METHOD client->REQUEST->SET_HEADER_FIELD
      EXPORTING
        NAME  = '~request_uri'
        VALUE = '/raina/1.0/KrdAPI.asmx?'.
      CALL METHOD client->request->set_header_field
        EXPORTING
          name  = 'Content-Type'
          value = 'text/xml; charset=utf-8'.
      call method client->request->set_header_field
        EXPORTING
          name  = 'SOAPAction'
          value = 'Login'.
      lv_length = STRLEN( lv_content ).
      call method client->request->set_cdata
        EXPORTING
          data   = lv_content
          offset = 0
          length = lv_length.
    ****Make the call
      client->send( ).
    ****Receive the Response Object
      call method client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          others                     = 4.
    *****Get the response content
      client->response->GET_STATUS( IMPORTING CODE = lv_response ).
      lv_xml_string = client->response->get_cdata( ).
    Regards,
    Michal

    HI ,
            Error in accessing External Web Service
    Calling a secured external web service from ABAP
    Edited by: A kumar on Aug 21, 2008 11:58 AM

  • Connection to MySQL from ABAP

    Hi
    How to configure any connection from SAP to MySQL, I want to use result in ABAP.
    I heard about legacy JDBC to MySQL but which transaction is for this ? and what I need? Netveawer and somehitng more?
    Edited by: Kosmo on Oct 20, 2009 10:43 AM

    It isn't possible

  • Outgoing TCP connections from VM have very low firewall state idle timeout -- how do you adjust?

    When I create a TCP connection from a VM to the internet, if I'm idle for more than a few minutes (say a SSH session), the TCP flow is torn down by some AZURE networking element in between.
    Incoming connections from the internet in don't seem to be affected.
    I assume this is an Azure firewall timeout somewhere.
    Is there any way to raise this?

    Hi,
    Thanks for posting here.
    Here are some suggestions:
    [1] - You can make sure the TCP connection is not idle. To keep your TCP connection active you can keeping sending some data before 60 seconds passes. This could be done via chunked transfer encoding; send something or you can just send blank lines to keep
    the connection active.
    [2] - If you are using WCF based application please have a look at below link:
    Reference:
    http://code.msdn.microsoft.com/WCF-Azure-NetTCP-Keep-Alive-09f50fd9
    [3] - If you are using TCP Sockets then you can also try ServicePointManager.SetTcpKeepAlive(true, 30000, 30000) might be used to do this. TCP Keep-Alive packets will keep the connection from your client to the load balancer open during a long-running HTTP
    request. For example if you’re using .NET WebRequest objects in your client you would set ServicePointManager.SetTcpKeepAlive(…) appropriately.
    Reference -
    http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.settcpkeepalive.aspx
    Hope this helps you.
    Girish Prajwal

  • Connect to COM(OBJECTS/METHODS) FROM ABAP

    Dear all.
    How can I connect to COM objects/methods from abap?
    Could give me link to example.

    Yes this method raises and exception with this message
    Message ID:          FDT_CORE
    Message number:      085
    DO_IM_DATETIME is not in the context
    The method SET_VALUE corresponds to IF_FDT_CONTEXT. This is the method's calls
          lv_name = 'DO_IM_DATETIME'.
          TRY.
              o_context->set_value( iv_name =  lv_name
                                    ia_value = lv_element_tzone ).
            CATCH cx_fdt INTO lx_fdt.
              RAISE incorrect_parameter.
          ENDTRY.
    I reactivate the aplication, the function, the expression and the data objects.
    But the method is still giving this exception.
    I have only this exception when I try to set up this two parameters:
    DO_IM_DATETIM of type Timepoint
    DO_IM_LANGU which is binding to the element type LANGU
    But in my BRFPlus Function Context I do have this two parameters.
    Thanks !

  • Q: TCP Connections from an Applet

    Hi,
    is it possible to build a tcp socket connection on a specified port on the webserver with an unsigned applet?
    as example: the applet is stored on the webserver, port 80.
    somebody calls the applet with a webbrowser, and another connection, maybe port 7777, is build back to the webserver?
    I just have to know if it is possible.
    thanks for information

    Yes

  • Error while calling java program from ABAP

    Hi Experts,
    We are trying for RFC inbound scenario.
    We followed the below blog
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    We are working with SAP JCO 3.0.2
    We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
    After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
    If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
    But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
    'STFC_CONNECTION' could not be found in the server repository.
    If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
    'RFCPING' could not be found in the server repository.
    We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
    Please help us in resolving this issue.
    Thanks
    Prince

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Regards,
    Sree

  • Create EJB and call it from ABAP

    Hi all,
    I have written a stand-alone-Java application, which should be converted into a web application, which has no gui.
    This application should be triggered by a abap-program.
    Following questions, do I have to write a servlet and a ejb or is it possible to call the ejb directly from the abap-program?
    What do I have to do make an outbound call from abap?
    Thank you for your support.
    Kind regards, Patrick.

    Hi.
    You can call the EJB directly from Abap. XI uses this functionality extensively.
    Follow these steps:
    1)  Deply the bean on the java stack.
    2)  You now need to setup a RFC destination in the JCO RFC Provider service in the j2ee visual adminstrator. Point the Repository section to the application server you want to run the Abap reort on. When you do this the j2ee engine will register itself as a possible RFC destination on this application server.You can choose your own program id...
    3) You then need to goto tran sm59 on the app server where the Abap report is going to run and setup a connection of tcp type to the j2ee machine. Specify the same program id you used in step in the technical settings.
    4) Then just use the bean name when you do the rfc call in the abap report.
    Hope this helps if U have not done it yet.

  • Calling Java API from ABAP using JCo

    I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
    Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
    Exception in server JCOSERVER01:
    com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
    This is caused by either a) erroneous server settings, b) the backend system has
    been shutdown, c) network problems. Will try next startup in 1 seconds.
    Connect to SAP gateway failed
    Connect_PM  TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       hostname 'gateway' unknown
    TIME        Thu Apr 26 13:46:32 2007
    RELEASE     640
    COMPONENT   NI (network interface)
    VERSION     37
    RC          -2
    MODULE      ninti.c
    LINE        336
    DETAIL      NiPGetHostByName2: hostname 'gateway' not found
    SYSTEM CALL gethostbyname_r
    COUNTER     1.
    Can anyone please help me out. Do I need to do any setting?
    I'll surely reward points.
    Thanks & Regards,
    Nilesh Kumar

    Hi Nilesh,
    From the error i think that the error is with the hostname.
    Please enter the the Application Server IP/Hostname.
    If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
    Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
    with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
    If App Server is IP then replace with
    <i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
    Let me know if it is throwing any error.
    Thanks,
    Prashil

  • Call Java Program from ABAP Program

    Dear all,
    In our scenario, we need to let ABAP call services provided by a standalone Java program. From online help I found some overview introduction and I'd make the called program a registered program in a RFC with type "T" (TCP/IP Connection). Can anybody give some concrete documentation? A step-by-step guide would be greatly appreciated.
    Best Regards
    Jerome

    check this thread
    Re: Calling Java API from ABAP using JCo

Maybe you are looking for

  • 3D shapes black, too dark (Adobe solution doesn't work)

    I am experiencing the problem in CS6 described here: http://helpx.adobe.com/photoshop/kb/3d-shapes-black-or-dark.html However, the file provided by Adobe as a solution is an empty text file. Is this a mistake? I followed the instructions but it did n

  • How to allow custom colors to SSRS Pie-Chart?

    Hi,  I have a pie-chart in my report. Can anybody please tell me How I can allow custom color to each part/slice of the piechart..??or How i can assign cutom pallete to pie-chart? BhushanBhushan

  • Pros and Cons using "Type" vs "Element" in Req/Resp Messages PL?

    Assume I have an asynchrone BPEL process and want to define the inbound myBPELRequestMessage and myBPELResponseMessage. As well known I can specify (in "Structure") a "Type" or "Element" for the Message. What is recommended? From my point of view for

  • Making DVDs from DVCPRO HD footage

    I DVCPro HD media (Panasonic HVX200 camera) in FCP timelines. I need to quickly create DVD's for translation of foreign language interviews - so quality can be so so. At this point, I've been advised to use Compressor, selecting Best Quality 16:9 90

  • CSS 80 to 443 redirect with wildcard

    Hello, I am doing a 80 to 443 redirect on a 11503 CSS and would like to know if I can do a "wildcard" redirect for after the / ?  For example: I currently have this content test-redirect     vip address 10.10.10.10     redirect "https://test.domain.c