2023 Jul 27 12:03 PM
We are facing an issue while posting the sms in abap report.
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
EXPORTING
URL = WF_STRING
IMPORTING
CLIENT = HTTP_CLIENT
EXCEPTIONS
ARGUMENT_NOT_FOUND = 1
PLUGIN_NOT_ACTIVE = 2
INTERNAL_ERROR = 3
OTHERS = 4.
CALL METHOD HTTP_CLIENT->SEND
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2.
CALL METHOD HTTP_CLIENT->RECEIVE
EXCEPTIONS
HTTP_COMMUNICATION_FAILURE = 1
HTTP_INVALID_STATE = 2
HTTP_PROCESSING_FAILED = 3.
RC_VALUE = SY-SUBRC.
CLEAR RESULT .
RESULT = HTTP_CLIENT->RESPONSE->GET_CDATA( ).
REFRESH RESULT_TAB .
HTTP_COMMUNICATION_FAILURE = 1
sy-subrc = 1
<html><head><title>Application Server Error</title>##<style type="text/css">##body { font-family: arial, sans-serif;}##</style>##</head>##<BODY text="#172972" link="#808080" vlink="#808080"##alink="#8e236b" bgcolor=white leftmargin="0" topmargin="0"##mar
RESULT_TAB contains: <html><head><title>Application Server Error</title>
Where this Application Server Error can be rectified.
Thanks
2023 Jul 27 12:22 PM
Seems to me the http is not open for your sap system. Try sending the data using rfc destination
2023 Jul 27 1:27 PM
In fact you didn't post the full answer from RESULT (truncated after ##mar). I hope you defined it as STRING type to receive all characters.
2023 Jul 28 5:43 AM
sir, i am attaching the complete error log.
and does the sms triggering required SSL certificate also...
Thank you.error-log-copy.txt
2023 Jul 28 8:00 AM
Hi Ravi,
the Error is:
If you establish an HTTP connection, then it is an SSL connection and this leads to the error, because the certificate is not trusted. See transaction SMICM in the logs for more details. You have to import the certificate from your SMS application (URL you are referring to) into the SAP system. You can do this in transaction STRUST.
After you have imported the certificate, the error should no longer be thrown.
Regards
Jim
2023 Jul 28 9:26 AM
Concerning the step 3
I guess the OP doesn't know STRUST, so will be in trouble with that step, hopefully there are lots of answers to provide more details, like How to replace productive SSL PSE in AS ABAP - Basis Corner - Support Wiki (sap.com)
Also, it's important to say that CREATE_BY_URL was called without SSL_ID, consequently it's the SSL Client (Anonymous) PSE which is concerned.
NB: it's "HTTP connection" with "https://..." passed to CREATE_BY_URL.
2023 Jul 28 12:52 PM
As we asked the sms service provider about the SSL certificate. But they donot provide any SSL certificate for sms.
2023 Jul 28 1:08 PM
When called in your code, some certificate is checked. Hence the error message. This error message can be seen in more detail in the SMICM log. Here you can see exactly what is called and where it fails.
If the URL in the code
URL = WF_STRING
called with HTTPS?
2023 Jul 28 2:06 PM
ravi.kumar109 This is the public key of the certificate, so usually you can go to the browser, type the URL and you can get the certificate
e.g. to get https://answers.sap.com public key with Edge:
Etc.
More information by searching:
then you have 3 certificates, which you must download and install in STRUST.
2023 Jul 28 2:06 PM
2023 Aug 01 7:59 AM
Thank you sir, While testing came to know that when executing the report, it is showing error SSSLERR_PEER_CERT_UNTRUSTED,
It means need to add SSL certificate in TCODE STRUST. (which certificate , where can i get it)
But when, testing the same program with addition of function module CALL FUNCTION 'HR_URL_CALL_BROWSER'
EXPORTINGThem SMS is triggering and browser is opening. It is not giving error SSSLERR_PEER_CERT_UNTRUSTED.
This is not checking TCODE- STRUST.
But when i am triggering the program in background with function 'HR_URL_CALL_BROWSER' , it not working because web browser is not opening.
2023 Aug 01 11:45 AM
ravi.kumar109 It's normal that it works when you are using the browser on your frontend, which works differently. With ABAP server, you must register/authorize centrally what you want to access.
2023 Aug 02 7:20 AM
Thank you sandra.rossi & Thank you Shkelqim Turkaj. I got the point, programatically we can shoot the sms using web browser,
But if u want to shoot it without browser or in background then u need to authorize the settings. But main point is I am working as abaper the object is assigned to me. What content need to define in STRUST and in other T-codes setting. (like. URL need to pass in HTTP sm59 etc) .
Thank you.
2023 Aug 02 9:16 AM
ravi.kumar109 As an ABAPer, it's not your role to setup STRUST.
Anyway, if people are willing you to do it, we already answered to you (see the external link to the wiki). What issue do you have with setting up STRUST? Why do you want to setup SM59? (of course, it's the recommended way to use SM59, but why starting with SM59, although your priority is STRUST, and SM59 is currently not needed to make it work).
2023 Jul 28 9:13 AM
Thanks, better paste the text directly (well, it's the classic SSSLERR_PEER_CERT_UNTRUSTED, answered many times in the forum):
500 Native SSL error
Error: -14
Version: 7210
Component: ICM
Date/Time: Fri Jul 28 09:43:36 2023#
Module: icxxconn_mt.c
Line: 1989
Server: xyz_pps_00
Error Tag: {00000c47}
Detail: IcmConnInitClientSSL: SapSSLSessionStart failed (-102): SSSLERR_PEER_CERT_UNTRUSTED