Example program: Executing an HTTP Request - Connectivity - SAP Library

To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
You can also go back to the SAP help page.

Hi,
The examples are calling a browser but that is not what we are looking for. What we are looking for is (via ABAP) to send our http request and receive back the anwser. They (http://ec.europa.eu/taxation_customs/vies/) provide the SOAP message (WSDL : (http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl). My question is if it is possible witout using XI and yes how? If I understand it correctly is should be possible via ABAP (example program RSWF_TEST_HTTP), but if I create my own program I get the message HTTP-Receive: RC=400  ICM_HTTP_CONNECTION_FAILED. Maybe the ABAP code is correct, but maybe I should change some settings or configure something else.
Jan

Similar Messages

  • How can java programs execute automatically when it connects to network

    Good Day dears...
    How can java programs execute automatically when it connects to network.
    Thanks in Advance friends Shackir

    884924 wrote:
    Good Day dears...
    How can java programs execute automatically when it connects to network.What is "it"? That is, execute when what connects to the network?
    Your computer? If that's what you mean, this is not a Java question. It's an OS operational/administrative question. Executing any program, whether written in Java or not, based on some system event has to do with that system, not with the program. If it's possible to do this, you'd do it exactly the same way for a Java program as you would for any other program.
    Or is "it" the program itself? If this is what you mean, then it's a nonsensical question. For the program to connect to the network and detect that it has connected to the network, it must already be executing, so asking how to execute it at that point is meaningless.
    Finally, I'll point out that "connecting to the network" is a pretty meaningless phrase. Or rather, it has so many potentially valid meanings that it's impossible to know which one you're referring to when you use that phrase. And I'd be willing to bet you don't have a clear picture of that yourself.

  • Can the Quiz application executable perform HTTP requests? 

    I am looking to use the quiz application in our website. Our
    devloper has asked the following question?
    Can the application executable perform HTTP requests"?

    Hi,
    I think it is talking the default browser language as US and seraching for the properties file of that language.
    I think the sol for this prob is change the
    Question.properties -
    >Question_en.properties
    Thanks & Regards,
    Lokesh

  • Executing an HTTP Request in ABAP Code

    Hi,
    I have to write an ABAP program to check VAT numbers before making any VAT declaration. SAP checks the logic of the number, however it does not check if a VAT number is still valid for that company. The European Commission has a website (http://ec.europa.eu/taxation_customs/vies/) where you can check centrally all VAT numbers used in the EU. According to the Commission's web site it should be possible to have an open interface. A SOAP service is available (Its WSDL file can be obtained also on the website).
    Does anyone has an idea how this can be done (Current SAP version = SAP ECC 6.0) taken into account there is no XI (or IP) aviable or set up or used.
    Thanks,
    Jan

    Hi,
    The examples are calling a browser but that is not what we are looking for. What we are looking for is (via ABAP) to send our http request and receive back the anwser. They (http://ec.europa.eu/taxation_customs/vies/) provide the SOAP message (WSDL : (http://ec.europa.eu/taxation_customs/vies/api/checkVatPort?wsdl). My question is if it is possible witout using XI and yes how? If I understand it correctly is should be possible via ABAP (example program RSWF_TEST_HTTP), but if I create my own program I get the message HTTP-Receive: RC=400  ICM_HTTP_CONNECTION_FAILED. Maybe the ABAP code is correct, but maybe I should change some settings or configure something else.
    Jan

  • Connectivity - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    Hi Jin-Chong
    many thanks for you help. But the problem still persists.
    1. We don't have $ODBCINI. There are no conection issues at all. Connection is performed by IBM Data Server Client (db2client) db2 connect to ...
    2. For which stored procedures do we need to apply these Grants?  We manually exported the available historical data from the TrendingDB to CSV files, connected to the database server with db2 connect... (on the app server), imported these CSV with the same user, it all went smoothly. We granted some DML's to the database user. also granted DBADM and SECADM to the database user as well, just to be sure there are no permission issues. 
    The Error message seems to indicate There is a problem finding the correct driver for monitoring database, since it says,
          networkLayer    "ODBC"
            DBMS    "DB2"
    com.sap.connectivity.cs.core.CSError: Specified RDBMS is invalid : DB2.
    - Maby IBM Data Server Client (db2client) is not supported for monitoring database at all?
    - Do we have to install additional DB2 clients like DB2 CLI driver or ODBC client instead?
    Thanks in advance
    Sem

  • Escalation of Service Requests - Service Request Management - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    Cameron, what are you trying to accomplish? A service request can only have one owner and that owner assignment can be done manually, service request assignment rules, or workflow. If you are looking at visibility to service requests by a group of users then I would recommend using Book of Business.

  • Dynamic Programming -  Application Development on AS ABAP - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    Thanks for this info. I hope that you soon overcome the challenges of improving SP8 because it is quite a challenge to develop on the current release. I my case especially with regards to the integration of HANA functionalities into the BW data flow through HAP and AMDP.
    Is there a place to see the latest status on this issue (thread/blog etc.)?

  • Writing to BI on demand using http request in ABAP code

    Hi Gurus
    I am getting ICM_HTTP_CONNECTION_FAILED error when I execute a program which contains HTTPS request. The purpose of the program is to write in bi.demand.com. The HTTP error code is 400.
    Also in SMICM I get the following error:
    ERROR => NiBufIConnect: non-buffered connect pending after 5000ms (hdl 29;XX.XXXXX.com:443) [nibuf.cpp    4611]
    WARNING => Connection request from (25/133/3) to host: XX:XXXXXX.com, service: 443 failed (NIECONN_REFUSED)
    210 ACCLIMATION, acclimation-PC, 12:38:29, M3, W0, SE38, 6/2 [icxxconn_mt.c 2321]
    What should I do to correct this?
    Thanks in advance.
    Regards
    Sunny

    Hi Sunny,
    None of this looks familiar to me.  What is the url that you are trying to request?
    Are there potentially any proxy servers between your machines and the internet that need to be configured into your application?
    Cheers
    Steve

  • Help with http request

    Please, help me with two problems I have to solve. I'm beginner in Java.
    1. Create a simple program that sends http request for index.html and shows the result.
    2. Create a simple program that gets the list of messages from a give mailbox over POP3 (server, username, pass - give as params).
    Thank you!

    But I think that I need request like this:
    GET /index.html HTTP/1.1
    Host: www.example.com
    and as a result (maybe) something like this:
    HTTP/1.1 200 OK
    Date: Mon, 23 May 2005 22:38:34 GMT
    Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
    Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
    Etag: "3f80f-1b6-3e1cb03b"
    Accept-Ranges: bytes
    Content-Length: 438
    Connection: close
    Content-Type: text/html; charset=UTF-8Well, under the covers, that will be what you have.
    It says "simple program" - do you think you are expected to connect your own socket and send a request you build from scratch yourself? Unlikely.
    As for the response - you can probably skip the headers and just display the content that follows (in your example 438 bytes).

  • Empty HTTP request received in SAP RFC test connection type G

    Hi all,
      While checking the RFC connection i am getting error,
    response_line               HTTP/1.0 500 Empty HTTP request received
    server_protocol             HTTP/1.0
    status_code                 500
    status_reason               Empty HTTP request received
    Please let me know if this is right.

    Hi,
      We are trying to connect to an external server. So, we are using Connection Type as G.
    RFC connection Test status is 500.
    But in our case, Idoc is getting generated but it is in the XI Box, throwing the below error,
    <?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="1">
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="SECURITY">SECURITY_VERIFY_ERROR</SAP:Code>
    <SAP:P1>Check Signature</SAP:P1>
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText>Signature error Error while valdiating the digital signature. Theerror was com.sap.security.core.ws.wss.NoSecurityHeaderException No wsse:Security header has been defined for role soap:finalActor. Please verify the</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace="" />
    <SAP:Stack>Error during message security handling in inbound channel: Security profile 'Check Signature'</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Since the RFC is working now, we were not able to find what is the issue. Even SSL certificates are valid.

  • HTTP requests & Access from a SAP Environment + DMZ

    Dear Experts,
    I don't know if i write in the right topic but if it is wrong, do accept my apologize.
    Currently, i have installed a SAP ECC 6.0 IDES + a SAP EP 7.0 Enterprise Portal + a SAP Solution Manager 7.0 (SAP Zone) with a SAP Router whitch is in a DMZ (See image this link for more details : http://img149.imageshack.us/img149/1603/sdniu3.jpg)
    In the SAP Zone, when i try to connect to Internet everything works. From the LAN or from other place, impossible to connect to http://<hostname>:5XX00/irj/portal from EP7 for example.
    I have poor skills in network and security and i would like to know what do you suggest me?
    1/ Can a SAP WebDispatcher be usefull in the DMZ?
    2/ Do i have to install IIS or APACHE for this?
    My own goal is to access for HTTP Request (http://<hostname>:5XX00/irj/portal for example) from the LAN or outside the NetWork.
    Thank you very much in advance for your helps.
    Best regards,
    Pascal.

    Hello Rainer Kunert,
    thank you for replying. I forget to say that there are only 2 ports opened to "outside" the SAP Zone. Inside the SAP Zone, i can sign in the portal with the port 5XX00 for example. For security reason, there will be only one way to pass throught the DMZ via 1 or 2 ports maximum. Outside the SAP Zone, i could access to the SAP System with SAP Logon but with a t-code whitch use http request (for example se80 for a package program) there is no effect but inside the SAP Zone, everything's ok.
    I just want to know what do you mean by "Web Application Firewall" and "appliance". Do you have an example or something explaining it please?
    Thank you very much again.
    Best regards,
    Pascal.

  • Simple example of connecting SAP and VB

    Hi Experts
    Can anyone help me providing material or simple example program of connecting SAP and VB for data transfer.
         Its being a tough task for me, pls help me out.
    Thanks in advance.
    Regards
    Rajaram

    Form VB.NET appliaction you have two ways to connect to SAP system and execute BAPI. Either through webservices or by using NCo. Choice depends upon you appliaction requirement.
    For starting with NCo go through
    http://help.sap.com/saphelp_nw04s/helpdata/en/a9/4a57c1bac80e4e977d8cd9b3ecab89/frameset.htm
    OR
    THIS IS ANOTHER WAY TO LOGIN TO SAP THROUGH VB TRY THIS.
    Logon with the SAPLogon control, Use an RFC call from the SAP Function
    Control, and get the results with the SAP Table Factory Control. . .
    You must have SAPGui's FULL install on your machine for this to work (Or at
    least SAPLogon and the RFC toolkit)
    This VBScript example might help, it calls RFC_READ_TABLE in sap, and emails
    the results back to a user from a selected query (In this case uses that are
    locked out.
    This should show you how this could work in practice.
    Thanks,
    Will
    ' Email Locked out SAP users details to user in a .csv file through MS
    Exchange / CDO
    Dim ctlTableFactory, RFC_READ_TABLE, eQUERY_TAB, tblOptions, tblData,
    tblFields, funcControl, objConnection, ctlLogon
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
    Set ctlLogon = CreateObject("SAP.LogonControl.1")
    Set funcControl = CreateObject("SAP.Functions")
    Set ctlTableFactory = CreateObject("SAP.TableFactory.1")
    Set objWindowsScriptShell = CreateObject("WScript.Shell")
    Set objConnection = ctlLogon.NewConnection
    Set filOutputobjFileSystemObject.CreateTextFile("E:\SAP Scripts\LockedUsers.CSV", True)
    objConnection.ApplicationServerobjWindowsScriptShel l.RegRead("HKLM\Software\AccantiaEDI\SAPServer")
    objConnection.SystemobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SID")
    objConnection.SystemNumber = "00"
    objConnection.ClientobjWindowsScriptShell.RegRead(" HKLM\Software\AccantiaEDI\SAPClient")
    objConnection.Language = "EN"
    objConnection.UserobjWindowsScriptShell.RegRead("HK LM\Software\AccantiaEDI\SAPSAPUser")
    objConnection.PasswordobjWindowsScriptShell.RegRead ("HKLM\Software\AccantiaEDI\SAPSAPPassword")
    booReturn = objConnection.Logon(0, True)
    If booReturn True Then
    'MsgBox " Cannot log on! "
    'MsgBox booReturn
    filOutput.WriteLine "ERROR CALLING LOGGING INTO SAP - FAILED LOGINS
    UNKNOWN"
    Stop
    Else
    'MsgBox " Logon OK."
    funcControl.Connection = objConnection
    Set RFC_READ_TABLE = funcControl.Add("RFC_READ_TABLE")
    Set strExport1 = RFC_READ_TABLE.Exports("QUERY_TABLE")
    Set strExport2 = RFC_READ_TABLE.Exports("DELIMITER")
    Set tblOptions = RFC_READ_TABLE.Tables("OPTIONS") '
    Set tblData = RFC_READ_TABLE.Tables("DATA") '
    Set tblFields = RFC_READ_TABLE.Tables("FIELDS") '
    strExport1.Value = "USR02"
    strExport2.Value = ","
    tblOptions.AppendRow
    tblOptions(1, "TEXT") = "LOCNT > 0 OR UFLAG = 128"
    tblFields.AppendRow
    tblFields(1, "FIELDNAME") = "BNAME"
    tblFields.AppendRow
    tblFields(2, "FIELDNAME") = "LOCNT"
    tblFields.AppendRow
    tblFields(3, "FIELDNAME") = "UFLAG"
    If RFC_READ_TABLE.Call = True Then
    If tblData.RowCount > 0 Then
    filOutput.WriteLine "UserName,FailedLogins,LockedFlag"
    ' MsgBox tblData.RowCount
    For intRow = 1 To tblData.RowCount
    filOutput.WriteLine tblData(intRow, "WA")
    Next
    Else
    filOutput.WriteLine "NO FAILED LOGINS OR LOCKED USERS"
    End If
    Else
    filOutput.WriteLine "ERROR CALLING SAP REMOTE FUNCTION CALL -
    FAILED LOGINS UNKNOWN"
    End If
    End If
    Set filOutput = Nothing
    MailProfile = "MS Exchange Settings"
    Set objSession = CreateObject("MAPI.Session")
    LogonOK = objSession.Logon(MailProfile)
    Set objMessage = objSession.Outbox.Messages.Add
    objMessage.Subject = "SAP Users Report - Locked Users + Failed Logins"
    strSetMessage = "There are " & tblData.RowCount & " users that are
    either locked due to failed logins, or have at least 1 failed login attempt
    on system " & objWindowsScriptShell.RegRead("HKLM\Software\Accant iaEDI\SID")
    & vbcrlf &
    reward if useful

  • Program to execute BLT in xMII from SAP R/3

    Hi all,
    This an extension of [Calling Services and Queries in SAP xMII 11.5 from ABAP|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9f101377-0c01-0010-269f-c3ee905d583b] by Bimal Mehta.
    I have made the code ready to use since it takes lot of time to have the declaration and checking and all.
    Can anyone tell me how to post this as a Blog or in the Wiki ?
    REPORT  ZCALL_XMII_TRANS                              .
    parameters: p_trans(50) type c ,               " xMII Transaction
                p_rfcdes    type rfcdest DEFAULT 'SAP_XMII'," RFC Destination Created
                p_user(10)  type c ,               " xMII User Name
                p_pass(10)  type c .               " xMII Password
    * Data Declaration for RFC Connection
    data : i_rfc_destination type rfcdest.
    data : client type ref to IF_HTTP_CLIENT .
    * Data Declaration for Path, UserName, Password
    data : path type string.
    data:  if_query_field type TIHTTPNVP with header line,
           it_query_field type TIHTTPNVP .
    data:  i_user_name(5),
    * Transaction to be called in SAP xMII
           i_transaction type string,
    * Password of xMII
           i_user_password type string,
           if_str  type string,
           if_query type string.
    * This method checks for Existing RFC Connection of Name
    * i_rfc_destination and passes the parameters to CLIENT
    * Assign Parameters to Variables
    i_transaction     = p_trans.
    i_rfc_destination = p_rfcdes.
    i_user_name       = p_user.
    i_user_password   = p_pass.
    CALL METHOD
      CL_HTTP_CLIENT=>CREATE_BY_DESTINATION
      EXPORTING
        DESTINATION              = i_rfc_destination
      IMPORTING
        CLIENT                   = client
      EXCEPTIONS
        ARGUMENT_NOT_FOUND       = 1
        DESTINATION_NOT_FOUND    = 2
        DESTINATION_NO_AUTHORITY = 3
        PLUGIN_NOT_ACTIVE        = 4
        INTERNAL_ERROR           = 5
        others                   = 6.
    IF SY-SUBRC <> 0.
      write: / 'Destination Not Found'.
    ENDIF.
    * set request method
    CALL METHOD client->request->set_header_field
      EXPORTING
        name  = '~request_method'
        value = 'GET'.
    *build request path to XAcute Transaction
    path = '/Runner'.
    clear if_query_field.
    if_query_field-name = 'OutputParameter'.
    if_query_field-value = '*'.
    append if_query_field to it_query_field.
    clear if_query_field.
    if_query_field-name = 'Transaction'.
    * This is the Business Logic Transaction to be called in xMII
    if_query_field-value = i_transaction.
    append if_query_field to it_query_field.
    if not i_user_name is initial.
      if_query_field-name = 'XacuteLoginName'.
    * User name for the xMII
      if_query_field-value = i_user_name.                 " User Name
      append if_query_field to it_query_field.
      if_query_field-name = 'XacuteLoginPassword'.
      perform get_password
      using i_user_password
      changing if_str.
      if_query_field-value = if_str.
      append if_query_field to it_query_field.
    endif.
    * build query string
    if_query = cl_http_utility=>fields_to_string( fields = it_query_field
                                                  encode = 0 ).
    * build path
    */Runner?OutputParameter=*&Transaction=<Transaction Name>
    * &XacuteLoginName=<uname>&XacuteLoginPassword=<password>
    concatenate path '?' if_query into path.
    condense path.
    * Sets Header Field for the method with the Path
        CALL METHOD client->request->set_header_field
          EXPORTING
            name  = '~request_uri'
            value = path.
    * send request
        call method client->send
          EXCEPTIONS
            http_communication_failure = 1
            others                     = 4.
        if sy-subrc <> 0.
          call method client->close( ).
          WRITE / 'HTTP_COMMUNICATION_FAILURE'.
        endif.
    * get response
        CALL METHOD client->receive
          EXCEPTIONS
            http_communication_failure = 1
            http_invalid_state         = 2
            http_processing_failed     = 3
            OTHERS                     = 4.
        if sy-subrc <> 0.
          call method client->close( ).
          WRITE  / 'HTTP_COMMUNICATION_FAILURE'.
        endif.
        call method client->close( ).
        if sy-subrc <> 0.
          write 'NO_XML_DOCUMENT'.
        else.
          write:  / 'Execution Completed'.
        endif.
    *& Form get_password
    * get password string from base64 encoded value
    * -->i_password_encoded: encoded password
    * <--e_password: decoded password
    FORM get_password USING i_password
    CHANGING e_password.
      data: i_pwd type string,
      e_pwd type string.
      i_pwd = i_password.
      e_pwd = cl_http_utility=>decode_base64( encoded = i_pwd ).
      e_password = e_pwd.
    ENDFORM. " get_password

    https://www.sdn.sap.com/irj/sdn/submitcontent

  • HTTP/S connection to the SAP System failed

    Dear SDN,
    I am trying to connect my EP System (Enterprise Portal 6.0 SP 15) to MMSCMDEV System(SCM 4.0 Development System).
    Please note SCM 4.0 has external ITS on server MMLCADEV (both are in same network). EP is in different domain.
    User Mapping has been done while making the system connection.
    1. Ttransaction service test is successful to MMSCMDEV from EP (System Administration->Support->Support Desk->SAP Application->Test and Configuration Tools->Transaction with parameters "service - transaction; tcode - /sapapo/ac04; SAP GUI Type - SAP GUI for Windows").
    2. While uploading transaction using Role Upload, I m not able to view any transaction and get the error as : System connection failed.
    3. System Connection Tests to ITS & WAS fails with error: HTTP/S connection test failed.
    The SAPGUI HTML is available thru ITS.
    Please help me resolve issue.

    Well I just tried to create the SAP Transaction Iview, putting the tcode I need.
    I am able to see them properly , both in  Wingui as well as webgui.
    I used a test role and attached it to my user Id and another test id (this exists in both systems and user mapping is done for it.)
    I am able to see the iviews working from my Id , but in the test id : it gives an error as : Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    Unable to lookup System 'MMSCMTST'. Please check the system object and the alias..
    See the details for the exception ID in the log file
    and : com.sap.portal.appintegrator.sap.Transaction::Transaction/WebGuiSSOLayer
    Can somebody tell me why this should have happened ?
    Regards,
    Chandani

  • How to post multiple http requests using a single http connection in java

    I am using the httpurlconnection class and it allows only to post one request on a connection. I require to post multiple http requests by opening a single connection. Code examples please. Thanx in advance.

    Hi
    I found this article through Google. I hope it helps a little
    http://www.developer.com/tech/article.php/761521
    D

Maybe you are looking for

  • Is there any way Acrobat 8 Professional will work on Windows 7, 64 bit?

    Hello, I just upgraded to a new computer with Windows 7 64bit. Acrobat 8 Professional doesn't seem to work with this setup.  Is that true? On install of CS3 the installer asked me for the adobePDF.dll, which after searching online for help I found th

  • Cfelseif with cfscript

    Hi all, I want to add to this code with an elseif Will it work to put in before the else in the udf.cfm code below the following? TIA: elseif (referer contains 'yahoo.com') StartPos=ReFindNoCase('q=.',referer); if (StartPos GT 0) { EndString=mid(refe

  • Debug Flash Player

    I am very new to Flex development and have had no luck trying to install the ActiveX flash player. I believe that I am supposed to use the one that was supplied with Flex Builder 3 found in <install location>/Player/win. From what I have garnered fro

  • Safari Login Issues

    Hello, On my mac i have two accounts, one has admin rights and the other is a standard user. Now, on the admin account i can login to facebook with no issues whatsoever, however on the standard account when i click login it says "Safari can't load th

  • SAP Router Configuration

    Hello Gurus I need help to configure SAP Router in my server, can somebody guide me the process how to configure it. Details of my server SAP Version - 640 Oracle - 10.2.0.2.0 O/S - Windows - 2003 Server/ SP1 Thanks & Regards Shishir