cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BAS mta app local run with calls to SAP B1 db return 403 1/3 and work fine 2/3, work if deployed

arthuroo
Discoverer
0 Likes
724

Dear SAP Community,

I have an MTA app in SAP Business Application Studio, and I want to run it locally (localhost) for my JavaScript development.

 

This application is connected to a destination on the BTP to get data from the SAP B1 database (on-premise database) via B1if.

 

I am experiencing an issue with my AJAX calls to the SAP B1 database (using a destination defined in my BTP Cloud Foundry environment).

 

To log into my SAP BAS environment, I use the default SAP Identity Provider.

 

Please find attached some useful information about my destination, my BTP environment, and my BAS configuration, HAR file.

destination_SAP_B1_DATABASE_via_B1IF.png

BTP_cf_environment.PNG

architecture.PNG

lauch_action.PNG

request_cookie_2.PNG

SAP_BAS_instance.PNG

xs-app_json_BAS.PNG

 

Explanation:

 

The calls work fine for the first/second requests, but for the third call, I get a 403 Forbidden error each time.

 

This issue only occurs in the local environment/execution of the BAS MTA application. Once the application is deployed, everything works fine. However, this is not practical for our IT development.

 

I have tested the calls in Postman, and all the calls work fine, just like the deployed version of my app.

 

I have noticed that during the local execution of my application, an "ARBE" cookie is automatically set and sent with the request.

 

I have no control over the generation, deletion, or use of this cookie (http only).

 

Example:

 

To give you a clean view of my issue, I ran an example where I execute three AJAX calls to the SAP B1 database locally—two succeed and one fails with a 403 error. The ARBE cookie is generated and sent with each call.

 

Building and deploying the application for every update, testing, and logging are very time-consuming. I hope you can help me find a solution.

According to "Collect Logs for SAP Business Application Studio Issues":

Here is the information:

Date and time the issue occurred: 04/12/2024 17:57

The browser console logs can be found in the attachment with the HAR file (log_browser2, HAR_file_of_the_process2(to heavy for be here, can be send by mail if you need it).

The extension installation log is available in the attachment (install_logs_BAS.txt).

I had already oppened a case on the SAP services and maintenance Dashboard (https://me.sap.com/cases/002075129500013387192024) and after a call the support redirected me here, so i hope fine a solution for my issue. 

Thanks in advance for any help.

Best regards,

Arthur, Product Owner.

Accepted Solutions (0)

Answers (1)

Answers (1)

arthuroo
Discoverer
0 Likes