Skip to Content
0
Jun 15, 2023 at 05:25 PM

S/4Hana onpremise OData V4 Service is not accessible in CAPM project

8670 Views Last edit Jun 15, 2023 at 11:49 PM 2 rev

Hello All,

When I am trying to consume the AIF service: /sap/opu/odata4/aif/msgmonitoring_api/default/aif/messagehandling/0001/ (which is V4 service in the S/4Hana On premise system) in the CAPM project in BTP, I am getting an error:

reason: AxiosError: Error during request to remote service. Request failed with status code 401

Can you please help me how to fix the issue? I have provided all the steps/configurations followed below.

Note: When I try to access V2 service its working fine. I am facing this issue for AIF V4 service.
Error:

image.png

Logs:

image.png

mta.yaml:

image.png

Settings in Package.json:

image.png

Destination:

image.png

Code to consume OData service in CAPM:

image.png

Attachments

image.png (117.7 kB)
image.png (42.1 kB)
image.png (90.5 kB)
image.png (93.4 kB)
image.png (42.8 kB)
image.png (131.4 kB)