2015 Sep 02 10:29 AM
Dear Experts,
I have one requirement for sending sms. I have developed this sms scenario as per requirement but this requirement is working fine in development and quality system not working in production system.For sms scenario , we are passing third party url to code. I had debugged the code in production system but i got http_communication_failure error in
if_http_client->receive method. why it is giving this error in production system. Can you please help me on this issue. It would be helpful to me.
Regards,
Puneet Mittal
2015 Sep 03 8:41 AM
Hi Puneet Mittal,
Try using Function module HTTP_POST to call
external URL.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = <YOUR URL HERE>
RFC_DESTINATION = 'SAPHTTP'
IMPORTING
STATUS_CODE = STATUS_CODE
STATUS_TEXT = STATUS_TEXT
TABLES
REQUEST_ENTITY_BODY = REQUEST_ENTITY_BODY
RESPONSE_ENTITY_BODY = RESPONSE_ENTITY_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS.
Thanks Rudra !!!!
We need to call these methods after result method. Is it right ?
Regards,
Puneet Mittal
2015 Sep 02 10:37 AM
Could you explain better what kind of error is happening?
IF_HTTP_CLIENT is a interface which has some implementations, such as CL_HTTP_CLIENT class. There is tree exceptions in this class:
HTTP_COMMUNICATION_FAILURE
HTTP_INVALID_STATE
HTTP_PROCESSING_FAILED
Try to check wich errorcode return debugging this method
2015 Sep 02 10:42 AM
Hi Alves,
I got sy-subrc = 1 i.e. http_communication_failure. error and response method gives application server error <> 404 resource not found.
Regards,
Puneet Mittal
2015 Sep 02 10:54 AM
It seems you have no permission in Production to do that.
Try to check with basis, probably he can handle it
2015 Sep 02 11:01 AM
Thanks for reply . But in quality system it is working fine but not working on production system. Is there any settings we missed out. Can you help me out.
Regards,
Puneet Mittal
2015 Sep 02 11:16 AM
Hi,
HTTP 404 means the connection to the server is fine but server is not able to run what was requested. When you say it works fine in Q but not P, are you sure you are using the same URL in both the system. It seems the URL you are using in P is not right. Check for Carriage Return/Line feed in the URL string.
If it is same try these methods out to refresh content first from the same class CL_HTTP_CLIENT.
IF_HTTP_CLIENT~REFRESH_COOKIE
IF_HTTP_CLIENT~REFRESH_REQUEST
IF_HTTP_CLIENT~REFRESH_RESPONSE
R
2015 Sep 02 11:21 AM
Thanks Rudra !!!!
We need to call these methods after result method. Is it right ?
Regards,
Puneet Mittal
2015 Sep 02 11:30 AM
2015 Sep 03 5:24 AM
Dear Rudra,
Firstly thanks for giving information.
But this scenario is working fine in development system as well quality system but not working on production system. I don't think it will resolve this issue.
Is there any settings need to be done by basis team for sending sms ?
If yes , is it possible to send the list.
Regards,
Puneet Mittal
2015 Sep 03 8:41 AM
Hi Puneet Mittal,
Try using Function module HTTP_POST to call
external URL.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = <YOUR URL HERE>
RFC_DESTINATION = 'SAPHTTP'
IMPORTING
STATUS_CODE = STATUS_CODE
STATUS_TEXT = STATUS_TEXT
TABLES
REQUEST_ENTITY_BODY = REQUEST_ENTITY_BODY
RESPONSE_ENTITY_BODY = RESPONSE_ENTITY_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS.
2015 Sep 03 8:51 AM
Firstly thanks to all for support me !!!
My issue has been resolved.
Regards,
Puneet Mittal
2025 Mar 17 9:41 AM
Hi puneet,
I am facing sam error can you please help me out.
Regards
Bala
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |