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
Hi,
If its on their webserver you could get it via HTTP_POST or HTTP_GET methods from ABAP.
Regards
Raja
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 a comment