Call to Web Sevice in External (non SAP) system from SAP CRM

Hi,
I have to make a call to External system from SAP CRM 5.0 system. The external system will provide a sample webservice which SAP will try to initiate
Can you please tell me:
1. What settings/object needs to be maintained in SAP in order to make this call.
2. how I can make a call to this Web-Service from a BADI and pass the values to web service and also capture the returning value.
Please explain in detail
Thanks,
Mike

Hi Oliver,
I have gone through the documentation and had been able to create a proxy object, uploaded the WSDL file (from local directory) and created logical port,
However, when testing the service, I didn't received a sucess message but
<CX_AI_SYSTEM_FAULT>
  <CODECONTEXT>Local</CODECONTEXT>
  <CODE>ERROR_WEBSERVICE_RUNTIME_INIT</CODE>
  <ERRORTEXT>Error when instantiating the Web service runtime (Error when initializing SOAP client application: ' error_text' )</ERRORTEXT>
  <LANGUAGE />
  </CX_AI_SYSTEM_FAULT>
  </cls:CX_AI_SYSTEM_FAULT>
What might be the Problem ?

Similar Messages

  • How to stop start SAP system from SAP transactions?

    Hi Experts,
    How can i stop start the SAP system from SAP screens? Are there any transaction for this  need?
    thanks,
    philaphi

    Hi,
    Use Tcode RZ03 -->  Control --> Stop SAP Instance.
    Best Regards,
    Sachin.

  • Call to Web Sevice in external system from SAP CRM

    Hi,
    I have to make a call to External system from SAP CRM 5.0 system. The external system will provide a sample webservice which SAP will try to initiate
    Can you please tell me:
    1. What settings/object needs to be maintained in SAP in order to make this call.
    2. how I can make a call to this Web-Service from a BADI and pass the values to web service and also capture the returning value.
    Please explain in detail
    Thanks,
    Mike

    Mike,
    You should honestly search the SDN site for consuming web services with ABAP.  There are some good examples.
    However the general procedure is easy:
    1.  Generate an ABAP proxy using the WSDL provided to you by the external program
    2.  Configure an HTTP destination for the server of the web services (needed for HTTPS calls)
    3.  Configure the logical port for the web service using lpconfig
    4.  Write the abap code to call the webservice via the proxy.  Works very similar to FM call in my opinion.
    To expose a webservice(bapi being called from outside) you need to do a little more work
    1.  Create a web services for the RFC enabled function module via SE80
    2.  Use wsadmin and wsconfig to make the service available
    3.  Publish the service out to the UDDI as needed.
    Once again this code is pretty well documented in the standard help and SDN.  Do a simple search on ABAP proxies and you will find what you need.
    Take care,
    Stephen

  • Call to webservice External (non sap) system from SAP CRM

    Hi,
    I have to make a call to External system from SAP CRM 5.0 system. The external system will provide a sample webservice which SAP will try to initiate
    Can you please tell me:
    1. What settings/object needs to be maintained in SAP in order to make this call.
    2. how I can make a call to this Web-Service from a BADI and pass the values to web service and also capture the returning value.
    Please explain in detail
    Thanks,
    Mike

    Hi,
    Check this
    Calling web service from ABAP - version 4.6C

  • How to consume a web service provided by third party system from SAP system

    Hi Friends,
    Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
    Do we get an URL to create a client proxy for consuming the web service?
    Thanx in advance,
    Ram

    Hi Ram,
    of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
    <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
    which is the actual adress of the service.
    An example service can be found here:
    <a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
    containing the WSDL URL at
    <a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
    You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
    have fun,
    anton

  • DBACOCKPIT Connection for SAP systems with SAP Router

    Hello!
    We are trying to integrate all the remote SAP systems and their databases (primarily Oracle) into DBACOCKPIT of SAP Solution Manager 7.1.
    Our SAP Solution Manager is running on Windows with Oracle 11.2.0.2
    The most SAP systems (Unix and Windows) can only be reached from SAP Solution Manger over the SAP Router connection.
    It means no direct ping from Solution Manager server to the Server of managed system will work.
    Question
    Is it possible to integrate such SAP systems (with SAP Router) into DBACOCKPIT of Solution Manager?
    According to sap note 1265134 only the DBCON-connection will be required.
    By doing so (tcode SOLMAN_SETUP), we get TNS errors.
    Do we miss some additional steps (adapting tnsnames.ora of SOLMAN with the entry of managed system), etc.?
    Thank you!
    regards

    SAP-SDN wrote:
    > We of course can reach these systems via SM59.
    >
    > The question still is whether or not the several SAP systems with Oracle that can be reached from Solution Manager over SAP Router can be integrated into DBACOCKPIT of SAP Solution Manager in order to gather/ analyze performance data?
    Systems can be reached via SM59, then what's the problem ?
    In fact, this 'is' the standard procedure. This is as normal as you could have Solution manager in same 'network' with rest of the remote systems.
    Answer should be yes, you can manage several remote sap systems from sap solution manager dbacockpit.
    Thanks

  • Calling a web service in external system from SRM

    Hi folks,
    A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how I'll get a return. Please let me know in detail.
    Thanks,
    Prem

    Prem,
    Hi. You can call the service via HTTP protocol. Pass them values (SET_DATA), and receive a response (GET_DATA), via xml/html.
    In your code you would need to create the xml data to pass them, and evaluate the returned xml.
    Process...
    Data setup
    1) Create the XML to send them
    Working with the external service
    2) Open the HTTP connection
    2a) cl_http_client=>create_by_url (IF_HTTP_CLIENT)
    2b) lr_client->authenticate
    3) Call the to send them the XML
    3a) lr_client->request->set_data
    3b) lr_client->send
    4) Call the lr_client->receive to return the response
    5) Close the connection lr_client->close
    Data evaluate
    6) Evaluation the returned XML and process.
    Hope this helps
    Cheers
    Rob
    Code example below.. (There are loads of SAP examples depending on which release you are on).
    Process the call to the HTTP client - logic copied from RSHTML01     *
    Open IF_HTTP_CLIENT
      call method cl_http_client=>create_by_url
        exporting
          url                = l_url
        importing
          client             = lr_client
        exceptions
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          others             = 4.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                   with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
          raising oops.
      endif.
    Authenticate the user
      if not g_int_type-usr is initial.
        move: g_int_type-usr      to l_user,
              g_int_type-password to l_password.
        call method lr_client->authenticate
          exporting
            username = l_user
            password = l_password.
      endif.
    Allow for Cookies
      lr_client->propertytype_accept_cookie = lr_client->co_enabled.
    Set the server protocol
      select single gsval into l_server_protocol
        from z77s0
          where grpid = c_grpid
          and   semid = c_server_protocol.
      if sy-subrc eq 0
      and not l_server_protocol is initial.
        move l_server_protocol to l_st_server_protocol.
        call method lr_client->request->set_header_field
          exporting
            name  = '~server_protocol'
            value = l_st_server_protocol.
      endif.
      Send out the XML
      Set body to XML data
        lr_client->request->set_data( g_xxml ).
        save_xml( i_role = cl_xml_document=>c_role_oreq ).
        l_request_length = xstrlen( g_xxml ).
      If Data is sent through then we need certain flags set
        lr_client->request->set_header_field(
                                   name = 'Content-Type'
                                   value = zcl_tem_bsp=>c_xml_content ).
        call method lr_client->request->set_header_field
          exporting
            name  = '~request_method'
            value = 'POST'.
      Set length of string to the header fields
        if not l_request_length is initial.
          move l_request_length to l_st_request_length.
          lr_client->request->set_header_field(
                                    name = 'content-length'
                                    value = l_st_request_length ).
        endif.
      Send the request
        call method lr_client->send
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            http_invalid_timeout       = 4
            others                     = 5.
        check_for_error 'Send'.
      Receive the response
        call method lr_client->receive
          exceptions
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            others                     = 4.
        check_for_error 'Receive'.
      Determined returned XML or HTML
        g_xxml = lr_client->response->get_data(  ).
      Determine the header fields for failure validation
        if lr_client->response->get_header_field( '~status_code' )
              between 200 and 299.
          save_xml( i_role = cl_xml_document=>c_role_ires ).
        else.
          l_status_code =
            lr_client->response->get_header_field( '~status_code' ).
          l_descript_1 =
            lr_client->response->get_header_field( 'error' ).
          l_descript_2 =
            lr_client->response->get_header_field( 'errortext' ).

  • Need to call up a webservice created in external system from SAP

    Hi folks,
    A web service is created in the external system and I need to access this web service from a BADI. Can you tell me how can I call this web service (the external system is giving me a URL) and how to capture the return value from the web service. Please let me know in detail.
    Thanks,
    Prem

    Hi,
    I have the same requirement and have created a new Proxy-Object, uploaded the WSDL file (locally) and Created a Logical port.
    In the Logical Port under the tab Call Parameter I've defined the URL of the web-service.
    Since I was not able to upload the WSDL by selecting the option URL/HTTP Destination due to error message "HTTP error (return code 400, message "ICM_HTTP_CONNECTION_FAILED")
    Message no. SPRX090" so uploaded the file locally.
    However, when testing the service, I didn't received a sucess message but:
    <CX_AI_SYSTEM_FAULT>
    <CODECONTEXT>Local</CODECONTEXT>
    <CODE> ERROR_WEBSERVICE_RUNTIME_INIT </CODE>
    <ERRORTEXT> Error when instantiating the Web service runtime (Error when initializing SOAP client application: ' error_text' ) </ERRORTEXT>
    <LANGUAGE />
    </CX_AI_SYSTEM_FAULT>
    </cls:CX_AI_SYSTEM_FAULT>
    What might be the Problem ?
    /Manik

  • Calling Non SAP programe from SAP program

    Hi Experts...
    Can we cal Non SAP programs Like Windows EXE programs from ABAP programs ?
    If yes Then How .....
    Regards ...
    ..Ashish

    Hi Ashish ,
    Ya we can call a non SAP program from SAP program.
    For example we can call a EXE program from the SAP program using the RFC connection created in SM59.
    In Sm 59 you can create a TCP/IP connection and give the path of the executable there.

  • How to implement SSO to non-SAP systems using SAP logon ticket?

    Hello,
    We would like to implement Single Sign On between our SAP Netweaver system and a Siebel which is a non-SAP system using SAP logon tickets.
    Can anyone please give me some leads on this, in particular:
    1. Is there a JAVA API or an SAP plug-in that can be implemented on the Siebel machine to extract the SAP logon ticket?
    2. As the other machine might seat on a complete different domain, is it possible to implement SAP logon ticket without using cookies (perhaps through the HTTP header?
    3. In case you think using SAP logon tickets is not the best solution here I would be happy to hear any other suggestions you might have.
    Roy

    Hi,
    I'm currently using SAML as well. Unfortunately the SAP J2EE cannot work as authority (identity provider) but what you can do is using an open implementation of SAML such as opensso which is an open version of SUNs Java System access manager.
    There are a couple of other projects such as opensaml, apache's wss4j or shibboleth that might be interesting in this context.
    I just installed opensso and got it working with SAP J2EE 7.0 using SAPs JAAS SAMLLoginModule to authenticate users within SAP J2EE.
    In this scenario opensso serves as identity provider just as you need! There are a couple of Policy agents available on SUNs Download site you can use with Apache, Tomcat, JBOSS, WebSphere, Bea Web Logic etc. in order to authenticate! Otherwise you just directly authenticate against opensso. When installing opensso you can configure the type of user store you want  to use! By default it uses LDAP but you can also use different types of user store using JDBC or other mechanisms. Since you have a Directory Service you could easily connect it to your existing directory.
    There is also a way to map user ids directly in opensso by adding a uid mapping class. I created some documentation with lots of screenshots about using opensso with SAP J2EE. You can easily use opensso with any other system that supports SAML. In the case of SAP the usage is currently limited to SAML versions 1.0 and 1.1. Version 2.0 is not yet supported but should be in one of the following versions.
    Here are some links you might want to check:
    OpenSAML: https://spaces.internet2.edu/display/OpenSAML/Home
    wss4j: http://ws.apache.org/wss4j/
    shibboleth: http://shibboleth.internet2.edu/
    opensso: https://opensso.dev.java.net/
    On SDN you will find a documentation on how to connect SUN Java System Access Manager to SAP J2EE (see https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/906d9fc6-31b9-2910-1385-90edad7d7570). As I said opensso is based on the SUN Access Manager code and looks quite the same. So you can adapt this documentation in order to configure opensso or you can just ask me for the documentation.
    Hope this is helpful...
    Let me know if you need further assistance on this topic
    Cheers

  • Uploading data from non sap system to sap system

    hi to all experts,
    my requirement is to upload data into the sap system from non sap system . the data is in  a flat file ,but the problem is that  in the flat file all the field lengths and fields are not in order or same as sap system. How to upload the data into sap system ....

    hi,
    the data is in a flat file,but the problem is that in the flat file all the field lengths and fields are not in order or same as sap system.
    If the data is in excel sheet use this FM.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME                      = P_FILE
          I_BEGIN_COL                   = 1
          I_BEGIN_ROW                   = 1
          I_END_COL                     = 17
          I_END_ROW                     = 3000
        TABLES
          INTERN                        = itab
    EXCEPTIONS
      INCONSISTENT_PARAMETERS       = 1
      UPLOAD_OLE                    = 2
      OTHERS                        = 3
    It will read the data from excel sheet column wise and then store it in ITAB. you can change the order after reading the file.
    In case of Text file use FM  GUI_UPLOAD.
    You can change the order of the fileds after reading it from file, but the length and all you have to make compatible to SAP standard fields.
    Regards,
    Sachin

  • Fm for calling save dialouge box to save file in a system from sap

    fm for calling save dialouge box to save file in a system from sap
    Step by step of its usage pls,
    thank you,
    Regards,
    Jagrut BharatKumar Shukla

    hi
    FM is
    <b>POPUP_TO_DECIDE_LIST</b>
    USAGE:
    CASE r_ucomm.
    WHEN 'SAVE'.
    DATA: l_answer." no need to specify type
    DATA: t_spopli LIKE spopli OCCURS 0 WITH HEADER LINE.
    t_spopli-varoption = 'PDF'.
    APPEND t_spopli.
    t_spopli-varoption = 'EXCEL'.
    APPEND t_spopli .
    CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
             EXPORTING
    *          CURSORLINE               = 1
    *          MARK_FLAG                = ' '
    *          MARK_MAX                 = 1
    *          START_COL                = 0
    *          START_ROW                = 0
               textline1                = 'SELECT THE FORMAT OF THE OUTPUT'
    *          TEXTLINE2                = ' '
    *          TEXTLINE3                = ' '
               titel                    = 'SAVE AS'
    *          DISPLAY_ONLY             = ' '
            IMPORTING
              ANSWER                   =  l_answer
             tables
               t_spopli                 = t_spopli
            EXCEPTIONS
              NOT_ENOUGH_ANSWERS       = 1
              TOO_MUCH_ANSWERS         = 2
              TOO_MUCH_MARKS           = 3
              OTHERS                   = 4  .
           IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    IF l_answer = '2'.
    CALL FUNCTION 'GUI_DOWNLOAD'
    endif.
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Bulk Load into SAP system from external application

    Hi,
    Is there a way to perform a bulk load of data into a SAP system from an external application?
    Thanks
    Simon

    Hello,
    My external application is a C program and I think I want to use IDocs and RFC to communicate with the SAP system.
    Simon

  • How to call an EXE file on a remote system from SAP system?

    Hi Friends,
    I want to execute an EXE file existing on the remote system from SAP system. Could some one give me an idea of how to execute that?
    Thanx in advance,
    Ram

    Hi Ram,
    Try this
    SXPG_COMMAND_EXECUTE
    Reward if this helps,
    Satish

  • Launch a RFC in a SAP system from Redwood CPS

    Hi,
    How can I launch a rfc in a SAP system from Redwood ?
    Ex : in SE37, the function DATE_GET_WEEK, with a date (DD.MM.YYYY) as input parameter returns the corresponding week (YYYYWW)
    Regards.

    Hi,
    SAP CPS uses an RFC to communicate with a target SAP system via the XBP interface so that Jobs can be executed.  The CPS executable only knows of the calls that are appropriate to that interface or function modules created when CPS transports are loaded.  If there was an RFC type interface that exposed your function to an external executable then of course CPS could execute the executable.
    Regards,
    Simon

Maybe you are looking for