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

Similar Messages

  • 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

  • Going through messages in PI using http requests

    Hi,
    I'm researching for an external tool that will handle PI channels.
    I'm aware of the stop, start and status actions that can be used in an http request.
    But what if I want more detailed information?
    For example, if a channel is in status error, is there an http request to get details about the error?
    What about messages? Is there a request I can use to find out what messages came through the channel?
    So what else can I get using http requests besides the basic 3 actions?
    What about RFC calls? Can they be used to get more information on channels/errors/messages?
    Someone has a guide, about the http calls/RFC that can be used.
    Thanks!

    Thing is that one of the requirements is to limit the need to go to SAP and check the errors.
    Also, there is a need to watch for certain message, not necessarily if only error occurred and trigger stuff in my application.
    The tool I'm working on is an enterprise one that also interacts with other applications in the organization, so if I want to create dependencies between different applications covered in my tool I need to get more information than just the status of the channel.
    So, I hope for some additional http calls to get more information, but if there are none, then I'll have to do with what we have

  • HTTP request failed :Error code 500 internal server error

    In PI 7.0 system we are getting http error for rwb and exchage profile portal function
    Detail:
    HTTP request failed : Errro code 500 internal server error
    ( http://hostname:50000/adapterframework/rtc)
    If I do a connection test  for  ping(sap >bc >ping) from SICF, I am getting HTTP error.
    Please help me out to resolve this problem.
    I would be thankful for your suggestion

    from SM59 I tested the connection of INTEGRATION_DIRECTORY_HMI(HTTP connection to ABAP system)
    detail:
    staus HTTP response 500
    status text : internal server server
    duration test call 17173 ms
    Please help me out to resolve this issue

  • How to send a http-request from abap?

    I want to send a xml file through a http-request ,what should i do?

    Welcome to SDN
    you can use cl_http_client class to do that. search the abap general forum with key word cl_http_client and you will find lot of examples.
    Regards
    Raja

  • Executing HTTP Request from ABAP

    Hi Experts,
    I am trying to fill & submit an http form through abap using CL_HTTP_CLIENT class methods "request". here is my code:-
    DATA: client TYPE REF TO if_http_client.
    Create Client-Object
    CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
      EXPORTING
        url                = url_string
      IMPORTING
        CLIENT             = client
      EXCEPTIONS
        ARGUMENT_NOT_FOUND = 1
        PLUGIN_NOT_ACTIVE  = 2
        INTERNAL_ERROR     = 3
        others             = 4.
    IF sy-subrc <> 0.
      WRITE: / 'Client Object could not be created. SUBRC=', sy-subrc.
      EXIT.
    ENDIF.
    Set Header Field of request
    CALL METHOD client->request->if_http_entity~set_header_field
      EXPORTING
        name  = '~request_enctype'
        value = 'multipart/form-data'.
    CALL METHOD client->request->if_http_entity~set_header_field
      EXPORTING
        name  = '~request_method'
        value = 'POST'.
    try posting form fields
    CALL METHOD client->request->if_http_entity~set_form_field
      EXPORTING
        name  = 'datasource'
        value = 'GSAPO'.
    CALL METHOD client->request->if_http_entity~set_form_field
      EXPORTING
        name  = 'feedtype'
        value = 'full'.
    CALL METHOD client->request->if_http_entity~set_form_field
      EXPORTING
        name  = 'data'
        value = xml_string.
    CALL METHOD client->send
    EXPORTING
       TIMEOUT                    = CLIENT->CO_TIMEOUT_INFINITE
      EXCEPTIONS
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3
        http_invalid_timeout       = 4
        OTHERS                     = 5
    IF sy-subrc <> 0.
      WRITE: / 'Request could not be sent - communication error. SUBRC=',
                                                                 sy-subrc.
      EXIT.
    ENDIF.
    Receive Response
    CALL METHOD client->receive
      EXCEPTIONS
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3
        OTHERS                     = 4.
    IF sy-subrc <> 0.
      WRITE: 'Response not obtained - communication error SUBRC = ' ,
    sy-subrc.
      EXIT.
    ENDIF.
    Close HTTP connection
    CALL METHOD client->close
      EXCEPTIONS
        http_invalid_state = 1
        OTHERS             = 2.
    IF sy-subrc <> 0.
      WRITE 'HTTP connection in undefined state'.
      EXIT.
    ENDIF.
    *End of code.
    The problem here is I am getting exception "http_connection_failed" in recieve method.
    Can any body help me out.
    Thanks in advance.
    Madhu.

    is the http destination within intranet or internet? do you connect to internet via proxy server?
    Raja

  • Load Balancing HTTP requests to ABAP App Servers options?

    Looking at SAP Documentations, SAP recommends to use the Web Dispatcher to load balance HTTP requests to multiply ABAP App servers. 
    My question is that the only solution? or can we use hardware such as the F5 BigIP to perform the same job?
    Any thoughts?

    In collaboration with SAP and SAP customers, F5 Networks has created a solution that delivers security, high availability, and improved performance for SAP web and portal technologies.
    By deploying F5 Networks solutions with SAP NetWeaver, enterprises extend their control over their Network and Application traffic, and ensure the fast and secure delivery of their applications.
    Benefits of F5 for SAP NetWeaver and Enterprise SOA
    u2022 Cuts SAP Enterprise Portal login time by more than half for WAN users
    u2022 Speeds document downloads
    u2022 Reduces SAP server CPU utilization by 44%
    u2022 Provides a 20x reduction in the number of SAP server-side connections
    Further details, case studies and deployment guides on;
    http://www.f5.com/solutions/applications/sap/netweaver/
    F5 certification information on SAP Website
    http://www.sap.com/partners/directories/SoftwareISVSolutions.epx?context=21B87D61C0F646A22B2A6DB254A010CA8C9C141B7529F029910FE6FF9EEEC5A701BF20EED61AC07159D98BAA068EBE1B8C5C7665EA2226374E942CF1D2A49D20AB1BFDFA1E0B68EC41E3058F04A85F105D5002CF1A11383C905D9FE5DDB951251A4B574B0BBE58309F67667A3B95877FEF85F1EF8B2C1A9F6FBA3BF5066D9534%7c01518B8BD6BF02F55A5A72E5947F2C45
    Hope this helps. Thanks

  • Using BAPI's in ABAP code

    Hi bapi Guru's,
    I am asked to use bapi's(Instead of BDC's) for data upload .I am not getting good documentation on 'USING BAPI's IN ABAP',Like Defining structures, and what are the FM's to be called like bapi_commit.
    Any Info is Appriciated.
    Regards
    satish

    Sorry Satish,
    Maybe this is going off topic a little, bit perhaps also its relevant as you have been asked to move from BDC's to BAPIs.
    Juan,
    When I talk about debugging, there are two levels to this:
    <b>1. Debugging by the programmer</b>
    In this case, how can it be easier to debug an error from a BAPI than from the screen?  For a sales order, for example, when you enter a delivery date of 01.01.2000 for an item, via BDC you will get an error message as the item is entered (something along the lines of delivery date is in the past), and you will see exactly the date you have entered, and if you don't understand the error, you can click on F1 and it will give you the long description of the error.  Via a BAPI, you would get the error message, and you MIGHT get the item number and the date in question.  But if you don't understand the error what do you do then?  Debug the BAPI itself?  You could, but isn't this a rather lengthy way to get to the root of the problem?  In general, any errors you get calling BAPIs/BDCs are errors with your master data, or breaking business rules, you shouldn't have to debug standard code to tell you whats going wrong, the application can tell you.
    <b>2. Debugging by the end user</b>
    When you implement a BAPI/BDC this will be related to an interface/automated transaction etc.  When its in production you will occassionally get errors (due to bad master data, not fully capturing all the business logic in your custom coding [it happens], technical issues etc.)  What do you do then?  In the case of BDC you can do nothing.  The error is recorded, and you can get end users to process the errors by stepping through the screens (which they already know how to use) and make corrections as required.  In the case of BAPIs, you have to record the error in a table or a file, then develop some kind of interface to display the errors, then develop some kind of process for re-processing the errors.  If the data used to call the BAPI is not correct then you also need to provide a facility for changing the data before reprocessing.  Normally you do none of this because its too much work and you end up having all errors coming back to the SAP team who have to debug and change table entries etc. to get it all to work.  I would not say that this makes BAPIs easier to debug.
    Oops, just realised my pasta is burning!!!
    Anyway, think I got my point across.  Not personal but feel quite strongly about this topic.  To me BDC's are still a relevant tool despite the push for Idocs/BAPIs.
    Cheers,
    Brad

  • Can I use OLAP variable in ABAP Code of infoobject filter

    I have 0FISCPER infoobject in filter section of info-package while loading data.
    Below OLAP varaibles has below dynamic values that are being calculated at run time.
    0P_PRFP2 -  (Current fiscal period - 2)   ex: 2010010
    0P_PRFP1 -  (Current fiscal period - 1)   ex: 2010011
    0FPER    -    (Current fiscal period )        ex: 2010012
    I want to write ABAP CODE FOR using filter values from 0P_PRFP2 to 0FPER. (Last 3 fiscal periods - ex: 2010010 to 2010012).
    how to  use above standard OLAP variables in ABAP CODE to assign l_t_range (low or  high).

    try this using ABAP routine option (6)
    DATA: curryear(4)           type N,
                 currperiod(2)         type N,
                 prevper1(2)           type N,
                 prevyear1(4)         type N,
                 prevper2(2)           type N,
                 prevyear2(4)         type N,
                 prevfiscperYr1(7)   type N,
                 prevfiscperYr2(7)   type N,
                 prevfiscper1(3)      type N,
                 prevfiscper2(3)      type N,
                 w_length1              type i,
                 w_length2              type i.
      curryear = SY-DATUM+0(4).
      currperiod = SY-DATUM+4(2).
      If currperiod EQ '01'.
        prevyear1 = curryear - 1.
        prevper1   =  '12'.
        prevyear2 = curryear - 1.
        prevper2   = '11'.
      elseif currperiod EQ '02'.
        prevyear1 = curryear.
        prevper1   = '01'.
        prevyear2 = curryear - 1.
        prevper2   = '12'.
      else.
        prevyear1 = curryear.
        prevper1   =   currperiod - 1.
        prevyear2 = curryear.
        prevper2   = currperiod - 2.
      endif.
      w_length1 = STRLEN( prevper1 ).
      If w_length1 = 1.
        concatenate '0' prevper1 into prevper1.
      Endif.
      w_length2 = STRLEN( prevper1 ).
      If w_length2 = 1.
        concatenate '0' prevper2 into prevper2.
      Endif.
      concatenate '0' prevper1 into prevfiscper1.
      concatenate '0' prevper2 into prevfiscper2.
      concatenate prevyear1 prevfiscper1 into prevfiscperYr1.
      concatenate prevyear2 prevfiscper2 into prevfiscperYr2.
      l_t_range-low = prevfiscperYr2.
      l_t_range-high = prevfiscperYr1.
    *  modify l_t_range index l_idx from l_t_range.
    l_t_range-sign   = 'I'.
    l_t_range-option = 'BT'.
    modify l_t_range index l_idx.

  • How to read the Image Data using HTTp Request response

    i want to read image data from server please send me any code or answers.
    and also i want to exit application using button control for iphone simulator.
    thanks in advance.

    You would do a URLRequest and download the image. You could save it to disk and then load it or directly create a new image with the binary data.

  • Refresh used component display by ABAP code in another used component

    Hi,
    I have a contract (WEB UI component 'IUCONH') which contains used components, among others: actions ('GSACTIONS') and attachments ('GS_CM'). I enhanced the GSACTIONS so that it changes  the content of contract attachments programatically (changing documents by use of BOL: status of documents, deleting...). However, although the backend content changes, the GS_CM UI component doesn't know that and doesn't change the list of the displayed documents till user refreshes the browser. If attachments' view is expanded for the first time after the action has been taken, then it displays correct content (obviously, due to 'lazy' initialization).
    I need to initiate frontend refresh of one used component from another (that is, the program within GSACTIONS should initiate refresh in GS_CM).
    How can I do this?
    Thanks in advance!
    KR,
    Igor

    Hi Igor,
    You can call publish_current( ) method on your context node at the place where you programmatically change the content to make them reflect directly. The syntax will be as follows:
    me->typed_context-><node_name>->collection_wrapper->publish_current( ).
    Replace <node_name> with the node where you change the data.
    Try this and check if it works.
    Regards,
    Shiromani

  • A new socket for every http-request?

    Do I have to make a new socket for every http-request? The code below doesn't work because it is two requests in a row. The first GET works, but the second doesn't. I thought that the purpose of a socket is that you set it up once and then you should be able to do arbitrary communication between the two peers. Maybe that is just the case with sockets only but not if you use sockets to perform http.
    Thank you for your answers! Nice greetings from Austria (not Australia)!
    Stefan :)
    package httptest;
    import javax.net.ssl.*;
    import java.io.*;
    import java.net.*;
    public class Conn2 {
        private PrintWriter out;
        private BufferedReader in;
        private Socket socket;
        public Conn2()
            try {
             socket = new Socket("www.google.at", 80);
             out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())));         
             if (out.checkError())
              System.out.println("SSLSocketClient:  java.io.PrintWriter error");
             in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                System.out.println("Connect erfolgreich.");
         } catch (Exception e) {
             System.err.println(e);
        public void test()
            String inputLine;
            // 1. GET
            out.println("GET / HTTP/1.0");
         out.println();
         out.flush();
         try
                while ((inputLine = in.readLine()) != null)
                    System.out.println(inputLine);
            catch(IOException e)
                System.err.println(e);
            // 2. GET
            out.println("GET / HTTP/1.0");
         out.println();
         out.flush();
            try
                while ((inputLine = in.readLine()) != null)
                    System.out.println(inputLine);
            catch(IOException e)
                System.err.println(e);
    }

    Normally in the HTTP protocol, the server will close the connection after every request. So after you do the first GET, the server sends you the result and closes the connection. You have to open a new connection for the second GET.
    You can set specific headers to keep the connection open, which makes things faster if you have to do multiple GET's quickly after another. Lookup the specification of the HTTP protocol on http://www.ietf.org/
    Maybe it's easier to use a HTTP client library like Apache's HTTPClient: http://jakarta.apache.org/commons/httpclient/ so that you don't have to implement all the difficulties of the HTTP protocol yourself.

  • How to use HTTPS to retrieve a set of files from a distant server?

    Hi !
    i am interested in some samples or links showing how is it possible to use HTTPS in a java code in a standalone application ( could be swing based or whatever) that allows an HTTPS connection to a distant server ( specefic file repository) so that downloading some data files could be possible.i am also interested to know what conditions should be available to make such connection possible ( specefic port number? specefic authentication? login? password? and does the Operating system on the distant server interfere with that ? etc...)
    thanks!

    in fact i tried to test a sample code by i got this exception :
    Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
         at HTTPSConnector.main(HTTPSConnector.java:30)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:285)
         at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:191)
         at sun.security.validator.Validator.validate(Validator.java:218)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:954)
         ... 12 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
         at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174)
         at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
         at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:280)
         ... 18 moreand here si the sample code:
    package foo;
    import java.net.URL;
    import java.io.*;
    import javax.net.ssl.HttpsURLConnection;
    public class Test
    public static void main(String[] args)
    throws Exception
    String httpsURL = "https://your.https.url.here/";
    URL myurl = new URL(httpsURL);
    HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
    InputStream ins = con.getInputStream();
    InputStreamReader isr=new InputStreamReader(ins);
    BufferedReader in =new BufferedReader(isr);
    String inputLine;
    while ((inputLine = in.readLine()) != null)
    System.out.println(inputLine);
    in.close();
    }so what this error is due to? and how to fix it ?.
    thanks!

  • Flat file using http

    Hi guys,
    I work on pi 7.1.
    A flat file is sent to me using http request. I want to read the file, remove the heading and then convert it to xml and pass it into R3 through an idoc.
    Do anybody have any suggestions.
    Thanks
    Ugur

    Thank you for the link. I have been working using that document. But the problem is that i  can not trigger a break point in that code, so i can not manipulate with that data coming in.
    Have you any input to how to invoke the debugger.
    Regards

  • How to send a http request to a non java appln

    I have one legacy web application running which can handle only http request . So I need to connect (using http request) and send my request and get the response, without opening that application in browser.
    Any idea
    1) How to connect to non - java appln from a java appln ?
    2) How to use the Httprequest without displaying the page using browser?

    You can try one of three routes:
    Open a socket and write the HTTP request and parse the HTTP response yourself
    Use java.net.URLConnection
    Use Jakarta Common's HttpClient at jakarta.apache.org- Saish

Maybe you are looking for

  • HELP! NEW TO MAC SERVER MAIL

    Call me a dumb but I am new to our Snow Leopard Server software coming from a Windows server. I have watched tutorials at Lynda.com and went through manuals but don't understand how to set up our client mail. We are confused with the instructions bec

  • Document to pdf conversion

    can any body help me how to convert word document to pdf

  • Removing Last Word in Columns in Numbers '09

    I've got a column full of names. Some names are multiple words, like, "Bob & Nancy Smith", while others are 2 words, first and last name. I just want to remove the final word, the last name, in each cell. Formulas I've found on this forum only apply

  • How to view all open tabs?

    I know how to view all open tabs for one Safari window but how do you view all open tabs for all open windows?

  • Boot a computer from sd card in a wp8

    How to boot a bios computer from the sd card (mount as usb mass stor dev) installed in a windows phone 8.1 device?