2014 Nov 04 9:44 AM
Hi All,
I am trying to send and receive the data from (BZSt: USt-IdNr. Bestätigung), i had used the methods in CL_HTTP_CLIENT class. But in the receive method i am getting Communication failure error.
Below is the Code, Please suggest me where i went wrong.
REPORT ZZ_N_TEST4.
data i_url TYPE string.
data i_client type ref to if_http_client.
DATA p_ustid TYPE stceg.
DATA pu_ustid TYPE stceg.
data: w_string type string ,
w_result type string ,
r_str type string .
p_ustid = 'XXXXXXX'.
pu_ustid = 'XXXXXXX'.
CONCATENATE 'http://evatr.bff-online.de/evatrRPC?UstId_1=' p_ustid '&UstId_2=' pu_ustid
'&Druck=nein' INTO i_url.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = i_url
IMPORTING
client = i_client
call method i_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2.
IF sy-subrc <> 0.
write: 'Error while send:', sy-subrc.
ENDIF.
call method i_client->receive
exceptions
http_communication_failure = 11
http_invalid_state = 2
http_processing_failed = 3.
clear w_result .
IF sy-subrc <> 0.
WRITE: 'Error While receiving:', sy-subrc.
ENDIF.
w_result = i_client->response->get_cdata( ).
2014 Nov 04 9:58 AM
Hi
Once check that link in your browser, copy and paste.
And check the link is correct or not.
regards.
laxman
2014 Nov 04 10:01 AM
Hi Laxman,
In the website it is specified to ask in that way.
BZSt: USt-IdNr. Best&auml;tigung
regards,
NarsiReddy.
2014 Nov 04 10:10 AM
I didnt understand what u said.
once i jave faced problem like this communication failure, at that that my link hase been modified by the third party sms system.
so please check.
regards.
laxman
2014 Nov 04 10:19 AM
HI Laxman,
In that website it was specified that:
Example syntax for a simple confirmation request:
https://evatr.bff-online.de/evatrRPC?UstId_1=DE123456789&UstId_2=AB1234567890&Firmenname=
& Location = & ZIP = & Street = & print =
Please suggest me if i was wrong..
regards,
NarsiReddy.
2014 Nov 04 3:30 PM
2014 Nov 05 8:17 AM
Hi,
A communication issue might mean that the SAP system may not be able to connect to host evatr.bff-online.de .
To test this get your infrastructure guys to "telnet" from the SAP instance operating system to that host with port 80.
It is not likely your SAP environment will be allowed (due to firewall rules) to directly access the internet. This is pretty normal in most companies.
You may need to go via a proxy server (see importing params PROXY_HOST and PROXY_SERVICE of method CREATE_BY_URL), if your company has one available to go out to the internet from your network. Your infrasructure team should be able to help confirm this and tell you the details.
Hope that helps.
Cheers,
Katan