2016 Aug 23 8:37 AM
Dear Experts,
Good day. I am using HTTP_CLIENT to download image from URL. The program perfectly working in client 150 ( development ) . But the same program does not work in Client 300 ( development test ). Same servers but different client. I have tried to search in SCN but couldn't find any relevant. Really appreciate if could get some input .Please find my code below.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = url
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc = 0.
http_client->send( ).
http_client->receive( ).
CALL METHOD http_client->response->get_status
IMPORTING
code = lv_i
reason = err_string.
content = http_client->response->get_data( ).
http_client->close( ).
Regards
Shankar
2016 Aug 23 9:25 AM
It looks like something is missing on the "settings side" of the system.
in fact, if it is running in a client (150) from a technical point of view should be fine also in any other client.
Take a look at Client Architecture - Components of SAP Communication Technology - SAP Library
Best regards.
Dear Experts,
Good day. I am using HTTP_CLIENT to download image from URL. The program perfectly working in client 150 ( development ) . But the same program does not work in Client 300 ( development test ). Same servers but different client. I have tried to search in SCN but couldn't find any relevant. Really appreciate if could get some input .Please find my code below.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = url
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc = 0.
http_client->send( ).
http_client->receive( ).
CALL METHOD http_client->response->get_status
IMPORTING
code = lv_i
reason = err_string.
content = http_client->response->get_data( ).
http_client->close( ).
Regards
Shankar
2016 Aug 23 9:25 AM
It looks like something is missing on the "settings side" of the system.
in fact, if it is running in a client (150) from a technical point of view should be fine also in any other client.
Take a look at Client Architecture - Components of SAP Communication Technology - SAP Library
Best regards.
2016 Aug 24 10:52 AM
Hi Francesco,
Thanks for the input . The link was useful. But i couldn't find any hint from the link related to this issue.
Thanks and Regards
Shankar
2016 Aug 24 2:45 PM
I have solved the issue by using FM HTTP_GET which has the same functionality.
CALL FUNCTION 'HTTP_GET'
EXPORTING
absolute_uri = lv_url
IMPORTING
response_entity_body_length = lv_length
TABLES
response_entity_body = i_tab_data
response_headers = i_tab_response_headers
EXCEPTIONS
connect_failed = 1
timeout = 2
internal_error = 3
tcpip_error = 4
data_error = 5
system_failure = 6
communication_failure = 7
OTHERS = 8.
IF sy-subrc <> 0.
e_message-msg_txt = '404 NOT FOUND!' .
EXIT.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |