Skip to Content
avatar image
Former Member

BDC for Internet Apps

I am trying to get a file from a company but the only way they will give it to me is for me to logon and go through the process online for getting the file. They will not FTP the file or put the file somewhere I can get it from them. Does anybody know of a way to create a "BDC" for internet applications? In other words create a job that goes to their website, logs on, clicks the file I need, and downloads it. Their support team mentioned something about WebMessage but I could not get any good results via an internet search.

Thanks in advance.

Mike

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Dec 03, 2003 at 03:06 PM

    Hi,

    If its on their webserver you could get it via HTTP_POST or HTTP_GET methods from ABAP.

    Regards

    Raja

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      If you want to use CL_HTTP_CLIENT, its not available in 4.6C. But if you are happy with function modules HTTP_POST and HTTP_GET are avaialbe in 4.6C.

      Go to SE38 and type in "RSHTTP*" you will get a list of porgrams and you can play around with them and find out. (for e.g for HTTP_GET you could try program RSHTTP20)

      Hope this helps.

      Regards

      Raja

  • Dec 03, 2003 at 05:20 PM

    Since Web AS 6.10 you can use the HTTP client capabilities to make http calls from within ABAP programs. See the online documentation of the Web AS regarding the Internet Communication Framework (its the layer below the BSP stuff).

    Getting information or files programmatically from web sites which are build for human interaction can be tricky. For example several web servers only accept http requests that come from real browsers. Since you can create the complete http request from scratch including authentification information and headers, you can build it that it looks like a real browser request, this can be tough.

    A simple request looks like:

    -

    -


    data: client type ref to if_http_client,

    proxy_host type string,

    proxy_port type string,

    scheme type i,

    content type string,

    ...

    call method cl_http_client=>create

    exporting host = 'www.sap.com'

    service = '80'

    proxy_host = proxy_host

    proxy_service = proxy_port

    scheme = '1'

    importing client = client.

    client->request->set_header_field( name = '~request_uri'

    value = '/specialinfo/wisdom/all' ).

    client->request->set_header_field( name = '~request_method'

    value = 'GET' ).

    • send and receive

    client->send( ).

    client->receive( ).

    • display content

    content = client->response->get_cdata( ).

    ...

    -

    -


    best regards,

    Dirk

    Add comment
    10|10000 characters needed characters exceeded