on 12-02-2009 4:36 AM
Hi All,
I am fetching the exchange rate data from Web using FM HTTP_GET.
CALL FUNCTION 'HTTP_GET'
EXPORTING
absolute_uri = c_path
rfc_destination = 'SAPHTTP'
TABLES
response_entity_body = it_body
response_headers = it_header
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.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
This works fine in foreground.
But when i schedule in background job,its gives error saying 'error in opening rfc destination'.
I tried using rfc destination 'SAPHTTPA',but it gives error saying 'Document does not contain any data'.
Pls. let me know any suggestions to resolve this.
Thanks,
Supriya.
Hi All,
When running HTTP_GET (or any program or FM using it) in background you need to:
1) Use SAPHTTPA as RFC_Destination (make sure SAPHTTPA starts on App Server in SM59 TCP/IP Connection)
2) Obtain the IP Address of the URL you are using in ABSOLUTE_URI (using ping)
3) Add this IP and Hostname to the Host File of the Server the SAP Instance is running on for ex>
10.30.192.16 www.fuba.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check executing RSHTTP20 program both in foreground and background.
Is c_path referring to something on your frontend?
-- Subramanian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.