2006 Jul 05 5:50 PM
Hello.
I am trying to receive a file by HTTP. The file is in a server in the same network as SAP. This server uses IIS and requires authentication.
I am using the following piece of code:
DATA: url TYPE STRING,
http_client TYPE REF TO IF_HTTP_CLIENT,
return_code TYPE I,
content TYPE STRING.
url = 'http://192.168.0.1:6100/file.bmp'.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = url
IMPORTING
CLIENT = http_client
http_client->send( ).
http_client->receive( ).
http_client->response->get_status( IMPORTING code = return_code ).
content = http_client->response->get_cdata( ).
http_client->close( ).
When i run the program i get a popup that asks for a login. I put in the correct login but it wont accept it (Note: The login includes a domain: domain\user) and after 3 times i get a 401 error from the server.
How can i authenticate in the iis server?
Thank you
Nuno Silva
Hi Silva,
I have use the same thing thing in Different Way, Like..
We Don't have any http server . but as per our requirement we have to upload a file into SAP Daily a night 01.00 AM. We have tried this this thing with local PC in the same network but it will not work , Then we create a FTP server .
We have created our legecy system like that it's will donwnload the file in FTP server at 12.00. and SAP will catch from there.
hope it will be useful.
Thanks
Swati....
2006 Jul 06 9:45 AM
Anyone got any ideas on how to pass the authentication credentials?
Thank you
Nuno Silva
2007 Feb 12 8:08 AM
try this:
call method http_client->request->set_authorization
EXPORTING
username = 'xyz'
password = 'xxx'.
2007 Feb 13 7:01 AM
Hi Silva,
I have use the same thing thing in Different Way, Like..
We Don't have any http server . but as per our requirement we have to upload a file into SAP Daily a night 01.00 AM. We have tried this this thing with local PC in the same network but it will not work , Then we create a FTP server .
We have created our legecy system like that it's will donwnload the file in FTP server at 12.00. and SAP will catch from there.
hope it will be useful.
Thanks
Swati....
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |