2025 Mar 03 6:17 AM - edited 2025 Mar 04 7:33 AM
Dear Experts,
Environment: SAP S/4HANA CLOUD 2502
I call an API by postman with get method success,
https://cpx.cbc.gov.tw/API/DataAPI/Get?FileName=BP01D01
but get exception while using abap code in s/4hana cloud as below
--> SSL handshake with cpx.cbc.gov.tw:443 failed after 421
METHOD if_oo_adt_classrun~main.
" Create HTTP client; send request
TRY.
DATA(lo_destination) = cl_http_destination_provider=>create_by_url(
'https://cpx.cbc.gov.tw/API/DataAPI/Get' ).
DATA(lo_http_client) = cl_web_http_client_manager=>create_by_http_destination( i_destination = lo_destination ).
DATA(lo_request) = lo_http_client->get_http_request( ).
lo_request->set_query( query = 'FileName=BP01D01' ).
DATA(lo_response) = lo_http_client->execute( i_method = if_web_http_client=>get ).
DATA(lv_json_results) = lo_response->get_text( ).
CATCH cx_root INTO DATA(lx_exception).
out->write( lx_exception->get_text( ) ).
ENDTRY.
ENDMETHOD.
How can I do to solve this issue.
Request clarification before answering.
After upload the certificate of API to "Maintain Certificate Trust List" APP,
I can call API success without exception.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.