2024 Dec 31 6:55 AM - edited 2025 Jan 02 5:26 AM
Dear Experts,
I have a requirement to develop custom application in HANA Public Cloud where user selects specific supplier to approve then it should automatically publish RFQ. Lo_http_client being generated but session getting terminated at lo_http_client->execute method and not catching at exceptions. Request your valuable inputs to take it forward. below is the sample code for your reference written in Behavior save/create method. Thank you
lo_url = 'https://{hostname}/sap/opu/odata/sap/API_RFQ_PROCESS_SRV/SubmitForApproval?RequestForQuotation='7000000010''
lo_http_client = cl_web_http_client_manager=>create_by_http_destination(
i_destination = cl_http_destination_provider=>create_by_url( lo_url ) ).
Try
DATA(lo_response) = lo_http_client->execute(
i_method = if_web_http_client=>post ).
CATCH cx_web_message_error cx_web_http_client_error cx_http_dest_provider_error. "#EC NO_HANDLER
" data(lv_msg) = lo_Response->get_text( ).
ENDTRY.
Request clarification before answering.
Hello All,
Request you to close this thread i got the solution. we need to pass cookies along with csrf token will help resolve the issue and make successful API call.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
54 | |
10 | |
9 | |
8 | |
5 | |
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.