Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Download CSV from URL

Former Member
0 Kudos

I need download a CSV file from a URL, I am using the Function SCMS_HTTP_GET_WITH_URL passing the url in parameter URL of the function.

But the function is returning the error message: "Error in HTTP Access: IF_HTTP_CLIENT->RECEIVE 1 ICM_HTTP_CONNECTION_FAILED", know somebody how run this function?

Exists others function or any Class to this action?

Edited by: Claudeni Dias on May 27, 2010 7:32 PM

3 REPLIES 3

Former Member
0 Kudos

Try the FM WS_EXECUTE

CALL FUNCTION 'WS_EXECUTE'
              EXPORTING
                program            = v_url
              EXCEPTIONS
                frontend_error     = 1
                no_batch           = 2
                prog_not_found     = 3
                illegal_option     = 4
                gui_refuse_execute = 5
                OTHERS             = 6.

0 Kudos

Thanks by response Paulo,

But I need that program execute in background mode, this function only run in Online mode.

Do you know other function that run in background mode?

0 Kudos

Try to call FM HTTP_GET..

DATA: it_body     TYPE STANDARD TABLE OF x255,
      it_header   TYPE STANDARD TABLE OF char255.

CALL FUNCTION 'HTTP_GET'
  EXPORTING
    absolute_uri                      = 'www.google.com/file.csv'
    proxy                             = 'www.google.com'
  tables
    response_entity_body              = it_body
    response_headers                  = it_header
*   REQUEST_HEADERS                   =
  EXCEPTIONS
    connect_failed                    = 1
    timeout                           = 2
    internal_error                    = 3
    tcpip_error                       = 4
    data_error                        = 5
    system_failure                    = 6
    communication_failure             = 7
    others                            = 8.

.. and upload it_body to Application Server

Best Regards,

Paulo Carvalho