https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/Python-qa.xml SAP Community - Python 2024-05-20T11:11:34.057545+00:00 python-feedgen Python Q&A in SAP Community https://community.sap.com/t5/technology-q-a/importing-python-module-in-datasphere-dataflow/qaq-p/12807425 Importing python module in datasphere dataflow 2023-09-19T08:01:38+02:00 t_ravichandra https://community.sap.com/t5/user/viewprofilepage/user-id/721885 <P>Hi Team,</P> <P>Is it possible to import custom module in dataflow. I have many custom modules which needs to be used in many flow, and hence i want to import these modules. Could someone help in how to achieve this.</P> 2023-09-19T08:01:38+02:00 https://community.sap.com/t5/technology-q-a/execute-sql-queries-against-delta-format-tables-in-azure-data-lake-using/qaq-p/12754180 Execute SQL queries against delta format tables in Azure Data Lake using Jupyter Lab notebook 2023-09-27T19:29:06+02:00 jeffelliott https://community.sap.com/t5/user/viewprofilepage/user-id/780518 <P><STRONG>Scenario</STRONG>: We have delta format tables residing in an Azure data lake. We want to be able to run SQL queries against the delta tables from within a Jupyter notebook in Jupyter lab in SAP Data Intelligence. We would like to be able to use the Data Intelligence connection object to the Azure data lake, if possible.</P> <P><STRONG>Questions</STRONG>:</P> <OL> <LI>Is it possible to achieve the above scenario using Python in a Jupyter notebook?</LI> <LI>If yes to #1, how is this accomplished? Are there examples or documentation showing the method?</LI> </OL> <P>Thanks.</P> 2023-09-27T19:29:06+02:00 https://community.sap.com/t5/technology-q-a/pandas-function-to-read-table-data-in-datasphere-dataflow-script-editor/qaq-p/12747386 Pandas function to read table data in Datasphere Dataflow script editor 2023-09-28T12:01:32+02:00 t_ravichandra https://community.sap.com/t5/user/viewprofilepage/user-id/721885 <P>Hi Team,</P> <P>Can someone please help me in getting the Pandas DataFrame function to read table data in Dataflow python transformation editor.</P> 2023-09-28T12:01:32+02:00 https://community.sap.com/t5/supply-chain-management-q-a/can-t-reach-to-odbc-driver-for-abap-to-download/qaq-p/12782380 Can't reach to ODBC Driver for ABAP to download 2023-10-10T16:46:08+02:00 sametgundogan https://community.sap.com/t5/user/viewprofilepage/user-id/169616 <P>Hello everyone,</P> <P>I want to download ODBC driver for ABAP to connect to my SAP system with python. I try to get it from<A href="https://me.sap.com/notes/3078820/E" target="_blank" rel="noopener noreferrer"> this site</A>. But I see only the writing "You are not authorized!".</P> <P>I requested and got the authorization of Software Download. But I still get the same error. I sent the link and my boss tried to download from his account and he got the same error.</P> <P>How can I reach the driver? Is there any one who faced with this problem and solved? Or know the solution?</P> 2023-10-10T16:46:08+02:00 https://community.sap.com/t5/technology-q-a/available-python-build-packs/qaq-p/12731184 Available Python Build Packs 2023-10-12T14:00:20+02:00 draschke https://community.sap.com/t5/user/viewprofilepage/user-id/14869 <P>Hi experts,</P> <P>I'm writing to enquire about the availability of the XSA Buildpacks listed on the <A href="https://help.sap.com/docs/SAP_HANA_PLATFORM/cf8b4c5847374960a68b55cb86eae013/684a8a79827047998b3c1e8519dec10f.html?locale=en-US" rel="noopener noreferrer">Available XSA Buildpacks page</A>.</P> <P>Is it possible to download them? </P> <P>I ask because the <STRONG>python buildpack</STRONG> listed there has a significantly higher version compared to the current XSA.</P> <PRE><CODE>buildpacks version position enabled locked ------------------------------------------------------------ sap_java_buildpack 1.4.1 1 true false sap_nodejs_buildpack 3.2.3 2 true false sap_python_buildpack 1.2.3 2 true false<BR /></CODE></PRE> <PRE><CODE>3364625 - EXTENDED APPLICATION SERVICES 1 Release 1.1.4 Buildpacks: SAP Java Buildpack: 1.8.41 SAP Node.js Buildpack: 4.5.1 SAP Python Buildpack: 0.5.3<BR /></CODE></PRE> 2023-10-12T14:00:20+02:00 https://community.sap.com/t5/technology-q-a/how-to-set-privileges-for-hana-machine-learning-in-cloud-foundry/qaq-p/12803334 How to set privileges for HANA Machine Learning in Cloud Foundry ? 2023-10-13T08:17:49+02:00 marcus_schiffer https://community.sap.com/t5/user/viewprofilepage/user-id/195686 <P>Hi,</P> <P>We need to use HANA_ML python package in HANA database in a Cloud Foundry App in BTP. While the code works perfect when running it on a jupyter notebook, it gives unsufficient privilege errors when calling it from within a cloud foundry deployment. (e.g. the ataframe.create_dataframe_from_pandas method fails).</P> <P>We use the same code and user/password combination in both cases.</P> <P>Any help appreciated on how to set authorization or how to allow deletion of tables from the CF deployment.</P> <P>Regards</P> <P>Marcus</P> 2023-10-13T08:17:49+02:00 https://community.sap.com/t5/technology-q-a/how-to-use-hana-ml-python-package-in-a-hana-hdi-container-and-how-to-assign/qaq-p/12779628 How to use HANA-ML python package in a HANA HDI Container and how to assign correct priveledges? 2023-10-26T09:39:52+02:00 marcus_schiffer https://community.sap.com/t5/user/viewprofilepage/user-id/195686 <P>Hi ,</P> <P>we are struggling with the use of an HDI container for machine learning with the python hana-ml package in Python.</P> <P>In a previous question <A href="https://answers.sap.com/questions/13984833/how-to-set-privileges-for-hana-machine-learning-in.html?childToView=13984942" target="test_blank" rel="noopener noreferrer">https://answers.sap.com/questions/13984833/how-to-set-privileges-for-hana-machine-learning-in.html?childToView=13984942</A> a topic on missing priviledges was raised. The answer in the end was to use the user/pw combination from the sharedaccesskey in the service definition. However, when using this user it needs to be hard coded. How can we assign priviledges "CREATE ANY" to the user which can be read via the python service object in python ? This is a different user. Also in the documentation it is not recommended to give CREATE ANY to a user in HDI container.</P> <P>How can this issue be solved ?</P> <P>Or is machine learning with python in general not allowed / recommended in a DHDI container ? That would however significantly reduce the value of the python approach.</P> <P>Regards</P> <P>Marcus</P> 2023-10-26T09:39:52+02:00 https://community.sap.com/t5/technology-q-a/how-can-i-connect-my-app-to-a-cloud-connector-through-python/qaq-p/12813824 How can I connect my App to a Cloud Connector through Python 2023-11-03T13:07:20+01:00 amartiinezg https://community.sap.com/t5/user/viewprofilepage/user-id/883606 <P>Im trying to connect my App deployed on Foundry that are consuming oData services through Destination Instance Service, XSUAA and Connectivity Service. The destination is configured correctly because when I try to access it with curl it does. Im using requests library of Python with CFEnv for get credentials of services.</P> 2023-11-03T13:07:20+01:00 https://community.sap.com/t5/technology-q-a/error-could-not-connect-to-the-endpoint-url-while-deploying-tutorial-model/qaq-p/12802972 Error: Could not connect to the endpoint URL while deploying Tutorial Model 2023-11-03T17:16:58+01:00 md_tcon07 https://community.sap.com/t5/user/viewprofilepage/user-id/886275 <P>Hello Experts, <BR /><BR />I am new to AI Core and followed the Tutorial Series to get to know the environment. (<A href="https://developers.sap.com/tutorials/ai-core-deploy.html#9dce1464-4b13-4f64-93ae-306986ef92cd" rel="noopener noreferrer">Make Predictions for House Prices with SAP AI Core | SAP Tutorials</A>)</P> <P><BR />Unfortunately I've encountered an error I am unable to resolve. In the last steps of the Tutorial, while trying to deploy the model on a server, the error "Could not connect to the endpoint URL" appears. </P> <P>I would be very grateful for your assistance.</P> <P><IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2225966-screenshot-2023-11-03-171022.png" /></P> 2023-11-03T17:16:58+01:00 https://community.sap.com/t5/technology-q-a/connecting-to-sap-hana-from-azure-databricks-using-hdbcli-89009-socket/qaq-p/12747321 Connecting to SAP HANA from Azure Databricks Using hdbcli: [89009] Socket connect timeout 2023-11-07T20:34:04+01:00 yxu7785 https://community.sap.com/t5/user/viewprofilepage/user-id/797765 <P>Hi all,</P> <P>I'm trying to connect to a SAP HANA generic database using the following Python code:</P> <PRE><CODE>from hdbcli import dbapi<BR />conn = dbapi.connect(address='xx.x.xx.xx', port='xx', user='xx', password='xx', encrypt=True, sslValidateCertificate=False) </CODE></PRE> <P>When I run the code locally using VSCode with VPN connected, it is able to connect to HANA. However, after I move to an Azure Databricks environment approved by SAP and used by SAP employees internally, the connection code keeps giving me the following error:</P> <PRE><CODE>Error: (-10709, 'Connection failed (RTE:[89009] Socket connect timeout (60000 ms) (Some IP -&gt; Some other IP))')</CODE></PRE> <P>I'm 80% sure that the Azure Databricks environment should be using an IP allowed to access the HANA database. (I've tried to access another HANA Tenant database while inside this Azure Databricks environment and the connection code works flawlessly.) But I could be wrong.</P> <P>I've been searching online but few posts have the same error as mine. And the ones with the same error aren't using the same SAP product. Would really appreciate it if anyone could help with this! Thank you.</P> 2023-11-07T20:34:04+01:00 https://community.sap.com/t5/technology-q-a/how-to-install-sap-netweaver-rfc-sdk-7-50/qaq-p/12756737 How to install SAP NetWeaver RFC SDK 7.50 2023-12-05T14:52:18+01:00 gama827 https://community.sap.com/t5/user/viewprofilepage/user-id/887096 <P>I need to install a python library called "pyrfc" but I have realized that I need to install SAP NetWeaver RFC SDK 7.50 first .</P> <P>But I have not been able to do it because the official SAP place to download it is down <A href="https://me.sap.com/notes/2573790" target="test_blank" rel="noopener noreferrer">https://me.sap.com/notes/2573790</A> and <A href="https://me.sap.com/softwarecenter" target="test_blank" rel="noopener noreferrer">https://me.sap.com/softwarecenter</A> too.</P> <P>So I don't find any place to download it nowadays.</P> <P>I need that library to connect to SAP ERP and to SAP BW. If you know another way to achieve that I'll appreciate it a lot.</P> <P>Thanks in advance!</P> 2023-12-05T14:52:18+01:00 https://community.sap.com/t5/technology-q-a/seeking-assistance-with-python-script-for-multi-action-execution-in-sac-api/qaq-p/12817472 Seeking Assistance with Python Script for Multi-Action Execution in SAC API 2024-01-03T21:58:59+01:00 pradeep_prakash2 https://community.sap.com/t5/user/viewprofilepage/user-id/191276 <P>Hello Community,</P> <P>I'm reaching out for support regarding an issue I'm encountering while trying to trigger a multi-action using Python with the SAC API. Despite extensive research and testing, I've hit a roadblock that I hope someone here can help me resolve.</P> <P><STRONG>Background and Research:</STRONG></P> <OL> <LI><STRONG>SAC API Documentation:</STRONG> I've consulted the official SAC API documentation for details on APIs but found no explicit mention of Python support for multi-actions.</LI> <LI><STRONG>Successful ABAP Implementation:</STRONG> A blog post in SAP Community Blogs shows successful multiAction execution using ABAP, indicating API support in different programming environments.</LI> <LI><STRONG>Execution via Postman:</STRONG> Following SAP KB Article 3407120, I've successfully replicated the multi-action execution using Postman, confirming the viability of necessary API calls.</LI> </OL> <P><STRONG>Python Implementation Challenge:</STRONG> My script successfully runs multi-actions when initiated from Postman to Visual Studio. However, integrating code for obtaining the API token, CSRF token, and building headers for the multi-action endpoint is problematic.</P> <P> <STRONG>Code Snippets and Output:</STRONG> I'm providing code and execution output (with sensitive data omitted). The issue seems to lie in the headers section of the <STRONG>run_multi_action</STRONG> function, where the session/Bearer/csrf token combination is not accepted. Replacing the <STRONG>run_multi_action </STRONG>header with one from Postman triggers successful script execution.</P> <P>-----------------------------------------------------------------Actual Code------------------------------------------------------------------------------</P> <P>import json</P> <P>import requests</P> <P>import base64</P> <P>import os</P> <P># Constants</P> <P>API_OAUTH_CLIENT_ID = '&lt;&lt;Client ID&gt;&gt;'</P> <P>API_SECRET = '&lt;&lt;secret key&gt;&gt;'</P> <P>API_URL_BASE = 'https://&lt;&lt;sac tenent URL&gt;&gt;/api/v1/csrf'</P> <P>API_TOKEN_URL = 'https://&lt;&lt;sac tenent URL&gt;&gt;/oauth/token'</P> <P>API_MULTIACTION_URL = "https://&lt;&lt;sac tenent URL&gt;&gt;/executions"</P> <P>AUTH_URL = 'https://&lt;&lt;sac tenent URL&gt;&gt;/oauth/authorize'</P> <P>def get_api_token():</P> <P> """Retrieve the API token."""</P> <P> print("get_api_token: started")</P> <P> auth = f'{API_OAUTH_CLIENT_ID}:{API_SECRET}'</P> <P> token_headers = {</P> <P> 'Authorization': f'Basic {base64.b64encode(auth.encode()).decode()}',</P> <P> 'Content-Type': 'application/json'</P> <P> }</P> <P> params = {'grant_type': 'client_credentials'}</P> <P> try:</P> <P> response = requests.post(API_TOKEN_URL, headers=token_headers, params=params)</P> <P> data = json.loads(response.content.decode('utf-8'))</P> <P> api_token = data['access_token']</P> <P> print(len(api_token))</P> <P> return response.json()</P> <P> except requests.RequestException as e:</P> <P> print(f"Error getting API token: {e}")</P> <P> return None</P> <P>def get_crsf_token(api_token):</P> <P> """Get the CSRF token."""</P> <P> headers = {</P> <P> 'Authorization': f'Bearer {api_token}',</P> <P> 'x-sap-sac-custom-auth': 'true',</P> <P> 'x-csrf-token': 'fetch'</P> <P> }</P> <P> try:</P> <P> response = requests.get(API_URL_BASE, headers=headers)</P> <P> response.raise_for_status()</P> <P> return response</P> <P> except requests.RequestException as e:</P> <P> print(f"Error getting CSRF token: {e}")</P> <P> return None</P> <P>def run_multi_action(api_token, csrf_token, csrf_cookies):</P> <P> """Run a multi-action with the provided tokens and cookies."""</P> <P> headers = {</P> <P> 'x-csrf-token': csrf_token,</P> <P> 'Content-Type': 'application/json',</P> <P> 'Authorization': f'Bearer {api_token}',</P> <P> 'Cookie': f'signature; JSESSIONID={csrf_cookies["JSESSIONID"]}; __VCAP_ID__={csrf_cookies["__VCAP_ID__"]}'</P> <P> }</P> <P> payload = json.dumps({"parameterValues": []})</P> <P> print("Sending request to:", API_MULTIACTION_URL)</P> <P> print("Headers:", headers)</P> <P> print("Payload:", payload)</P> <P> try:</P> <P> response = requests.post(API_MULTIACTION_URL, headers=headers, data=payload)</P> <P> response.raise_for_status()</P> <P> return response.text</P> <P> except requests.RequestException as e:</P> <P> error_message = f"Request Exception: {e}"</P> <P> if hasattr(e, 'response'):</P> <P> error_message += f"\nResponse: {e.response.text}\nStatus Code: {e.response.status_code}"</P> <P> print(error_message)</P> <P> return None</P> <P>def main():</P> <P> """Main function to execute the script logic."""</P> <P> print("Script started")</P> <P> api_token_info = get_api_token()</P> <P> if not api_token_info:</P> <P> print("Failed to get API token")</P> <P> return</P> <P> api_token = api_token_info['access_token']</P> <P> print(f"Token Length: {len(api_token)}")</P> <P> csrf_response = get_crsf_token(api_token)</P> <P> if not csrf_response:</P> <P> return</P> <P> csrf_token = csrf_response.headers['x-csrf-token']</P> <P> csrf_cookies = csrf_response.cookies</P> <P> multi_action_response = run_multi_action(api_token, csrf_token, csrf_cookies)</P> <P> if multi_action_response:</P> <P> print(multi_action_response)</P> <P>if __name__ == "__main__":</P> <P> main()<BR /> <BR /> -----------------------------------------------------------------Code End------------------------------------------------------------------------------</P> <P>Output</P> <P>Script started<BR /> get_api_token: started<BR /> 2038<BR /> Token Length: 2038<BR /> Sending request to: &lt;&lt;sac tenent URL&gt;&gt;/api/v1/multiActions/t.cfgsd50/executions<BR /> Headers: {'x-csrf-token': '&lt;&lt;csrf_token&gt;&gt;', 'Content-Type': 'application/json', 'Authorization': 'Bearer &lt;&lt;bearer_token&gt;&gt;', 'Cookie': 'signature; JSESSIONID=&lt;&lt;session_id&gt;&gt;; __VCAP_ID__=&lt;&lt;vcap_id&gt;&gt;'}<BR /> Payload: {"parameterValues": []}<BR /> Request Exception: 401 Client Error: Unauthorized for url: &lt;&lt;sac tenent URL&gt;&gt;/api/v1/multiActions/&lt;&lt;multiaction_id&gt;&gt;/executions<BR /> Response: Unauthorized<BR /> Status Code: 401</P> <P><STRONG>New Challenge with Bearer Token:</STRONG></P> <UL> <LI><STRONG>Token Length Discrepancy:</STRONG> The Bearer token response in Python is truncated at 2038 characters, whereas tokens from Postman are approximately 2082 characters long. I'm puzzled about why this discrepancy is occurring with Python.</LI> </UL> <P><STRONG>Steps Taken to Investigate:</STRONG></P> <OL> <LI><STRONG>Verification Script:</STRONG> I created a small script to check the Bearer token length, which confirmed the 2038 character.</LI> <LI><STRONG>Cross-Usage Test:</STRONG> Using the Python-generated Bearer token in a Postman script worked, indicating the token is valid despite its shorter length.</LI> <LI><STRONG>Cookie Analysis:</STRONG> Initially suspecting the cookie, I observed it's a constant in our Postman code. Hardcoding this cookie in my Python code worked only while the Postman session was active. Once inactive (after 60 mins), it resulted in an Unauthorized error.</LI> <LI><STRONG>Removing Cookie from Headers:</STRONG> Excluding the cookie from headers in Python led to an Unauthorized error.</LI> <LI><STRONG>Comparing Cookie Behavior:</STRONG> In Postman, the cookie appears when calling the CSRF token, but not in Python. Hardcoding the Postman cookie in the Python script for the CSRF token had the same limited success as before - it worked only while the Postman session was active.</LI> </OL> <P><STRONG>Specific Problem:</STRONG> The headers section in the <STRONG>run_multi_action</STRONG> function seems to be the issue. When using headers from Postman, the script works, but not with the generated headers in Python.</P> <P> <STRONG>Request for Assistance:</STRONG> Could anyone provide insights or suggestions on how to correctly format or authenticate the headers in Python for successful multi-action execution? Any help or guidance would be greatly appreciated.</P> 2024-01-03T21:58:59+01:00 https://community.sap.com/t5/technology-q-a/how-to-access-destination-from-bas-which-created-using-python-app-deployed/qaq-p/13596319 How to access destination from BAS which created using python app deployed in Cloud Foundry Space 2024-02-06T12:13:38.095000+01:00 ipravir https://community.sap.com/t5/user/viewprofilepage/user-id/15221 <P>Hello Experts,</P><P>Basic details of my requirement with all followed steps:</P><P>I have deployed a basic Python API into Cloud Foundry space and able to access the same using direct call.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_1-1707216013133.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61211i94F284D1158F1311/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_1-1707216013133.png" alt="ipravir_1-1707216013133.png" /></span></P><P>No, created a destination using same API under connectivity:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_2-1707216121309.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61213i67ABFE94CB50BB1D/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_2-1707216121309.png" alt="ipravir_2-1707216121309.png" /></span></P><P>I want to use the same service into SAPUI5 application using Data Source and Service Selection, however I am getting "Service in unavailable" for selected destination as below:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_3-1707216471657.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61214iAA7F2609041D9040/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_3-1707216471657.png" alt="ipravir_3-1707216471657.png" /></span></P><P>Then I created the project without using data source, but selected "add deployment configuration" option from "project attribute" section and then selected the maintained destination under Cloud Foundry as below screen:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_4-1707216743379.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61217i71F4C327E0DF18A3/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_4-1707216743379.png" alt="ipravir_4-1707216743379.png" /></span></P><P>Then modified the mta.yaml and xs-app.json by including below details respectively:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_5-1707217483017.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61229iA1DE36A5FF734CF3/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_5-1707217483017.png" alt="ipravir_5-1707217483017.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_6-1707217495417.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61230i7C89E2433169C321/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_6-1707217495417.png" alt="ipravir_6-1707217495417.png" /></span></P><P>Added below code to use destination inside SAPUI5 app:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_7-1707217585179.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61232iB5C02B4FBD867937/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_7-1707217585179.png" alt="ipravir_7-1707217585179.png" /></span></P><P>but getting below error:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_8-1707217652244.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61235i811AFAF211938907/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_8-1707217652244.png" alt="ipravir_8-1707217652244.png" /></span></P><P>Please help me on this, how can a python API can be used inside SAPUI5 application or any additional steps need to be followed.</P><P>Note: the maintained destination is working fine on BAS. Please find curl details from terminal:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ipravir_9-1707217814273.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/61239i0A429679AA073E7C/image-size/medium?v=v2&amp;px=400" role="button" title="ipravir_9-1707217814273.png" alt="ipravir_9-1707217814273.png" /></span></P><P>&nbsp;</P><P>Followed link:&nbsp;</P><P><A href="https://blog.sap-press.com/how-to-integrate-a-python-app-with-sap-business-application-studio-for-an-sap-s4hana-cloud-system" target="_blank" rel="noopener nofollow noreferrer">https://blog.sap-press.com/how-to-integrate-a-python-app-with-sap-business-application-studio-for-an-sap-s4hana-cloud-system</A></P><P><A href="https://community.sap.com/t5/technology-blogs-by-members/developing-flask-application-in-bas-and-consuming-it-into-sap-ui5/bc-p/13589597#M165768" target="_blank">https://community.sap.com/t5/technology-blogs-by-members/developing-flask-application-in-bas-and-consuming-it-into-sap-ui5/bc-p/13589597#M165768</A></P><P>Regards,</P><P>Praveer.</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-02-06T12:13:38.095000+01:00 https://community.sap.com/t5/technology-q-a/i-want-to-connect-sap-system-to-access-all-the-tables-using-python/qaq-p/13596887 I want to connect SAP system to access all the tables using Python 2024-02-06T18:53:01.661000+01:00 AmitRajawat https://community.sap.com/t5/user/viewprofilepage/user-id/1391987 <P>I want to access SAP internal tables using Python.</P> 2024-02-06T18:53:01.661000+01:00 https://community.sap.com/t5/technology-q-a/exceedance-error-in-manifest-yml-file-config-cloud-foundry-btp/qaq-p/13618012 Exceedance error in manifest.yml file config - Cloud Foundry BTP 2024-02-25T02:38:43.526000+01:00 joaopaulo https://community.sap.com/t5/user/viewprofilepage/user-id/1386244 <P>I'm trying to deploy a Python Application using the Cloud Foundry CLI in a trial BTP account. When I try to push the project, the terminal shows me the following message as output:</P><pre class="lia-code-sample language-bash"><code>memory quota_exceeded, memory instance_memory_limit_exceeded, app_instance_limit app_instance_limit_exceeded</code></pre><P>I have tried every way to change the "manifest.yml" file, but in every attempt I'm warned that a certain service has exceeded the trial account limit.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de Tela 2024-02-24 às 22.35.23.png" style="width: 475px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/70479iBD02A64A3AEA094A/image-size/large?v=v2&amp;px=999" role="button" title="Captura de Tela 2024-02-24 às 22.35.23.png" alt="Captura de Tela 2024-02-24 às 22.35.23.png" /></span></P><P>How should I proceed?</P> 2024-02-25T02:38:43.526000+01:00 https://community.sap.com/t5/technology-q-a/sap-hana-ml-arimax-with-sap-ai-core/qaq-p/13623098 SAP hana_ml ARIMAX with SAP AI Core 2024-02-29T01:03:10.117000+01:00 matthewbest https://community.sap.com/t5/user/viewprofilepage/user-id/17290 <P>Hi,</P><P>I am wanting to use SAP's PAL ARIMAX model (with Python) for a particular use-case in which we would like to use BTP SAP Hana Cloud DB for dataset/model storage and then also use SAP AI Core, flask, Docker etc.. Ultimately trying to avoid using SAP Hana Data Lake or non-sap data storage such as AWS3.</P><P>First question, is it possible/acceptable to use SAP PAL ("hana_ml") ARIMAX on Hana Cloud DB and then utilize the power of AI Core for model inference via API? Or has anyone done something like this? If so, could you please share any tutorials/github repositories you've come across showing this process.&nbsp;</P><P>Second question, how can I import and access ARIMAX model. I'm able to access ARIMA as follows&nbsp;</P><DIV><DIV><SPAN>&lt; from</SPAN><SPAN> hana_ml.algorithms.pal.tsa.arima </SPAN><SPAN>import</SPAN><SPAN> Arima &gt; ....</SPAN><SPAN>but getting errors when trying the other ARIMA models such as SARIMA/ARIMAX. Please advise.&nbsp;&nbsp;</SPAN></DIV></DIV><P>Thank you so much for any thoughts and/or guidance.&nbsp;</P> 2024-02-29T01:03:10.117000+01:00 https://community.sap.com/t5/crm-and-cx-questions/quote-2-0-post-requests-of-a-rest-client/qaq-p/13664692 Quote 2.0: Post requests of a Rest Client 2024-04-09T18:53:43.498000+02:00 Lola_234 https://community.sap.com/t5/user/viewprofilepage/user-id/1397006 <P>Dear SAP Community,</P><P>I am currently sending a post request with the following command in an if loop :&nbsp;</P><P><FONT color="#000000"><STRONG>RestClient.Post(url, data, headers) .</STRONG></FONT> The paramaters url, data and headers are already specified . The problem is that i have further commands after sending the request from the CPQ system in the if loop, that I want to execute. Once The RestClient is run, the further requests are no longer executed.&nbsp;</P><P><SPAN>Does anyone have any suggestions or idea, where or how I can solve such an issue ?</SPAN></P><P><SPAN>Best regards&nbsp;</SPAN></P><P><SPAN>Lola</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-04-09T18:53:43.498000+02:00 https://community.sap.com/t5/technology-q-a/sap-scripting-findbyid/qaq-p/13675184 SAP scripting findbyID 2024-04-18T21:22:50.480000+02:00 waddoum81 https://community.sap.com/t5/user/viewprofilepage/user-id/865699 <P>Hello friends,</P><P>I generated an SAP script and it runs perfectly fine when executed from the vbs file however after I convert it to Python, it keeps giving an error&nbsp;(619, 'SAP Frontend Server', 'The control could not be found by id.')... any suggestions? this is the part giving the error, its supposed to select a checkbox in a table in VA13 tcode... thanks!!</P><P>VBS</P><P>session.findById("wnd[0]").maximize<BR />session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT").getAbsoluteRow(0).selected = true<BR />session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT/txtVBAP-POSNR[0,0]").setFocus<BR />session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT/txtVBAP-POSNR[0,0]").caretPosition = 1</P><P>PYTHON</P><P>session.findById("wnd[0]").maximize()</P><DIV><DIV><SPAN>session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT").getAbsoluteRow(2).selected = True</SPAN></DIV><DIV><SPAN>&nbsp;session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT/txtVBAP-POSNR[0,2]").setFocus()</SPAN></DIV><DIV><SPAN>&nbsp;session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4411/subSUBSCREEN_TC:SAPMV45A:4912/tblSAPMV45ATCTRL_U_ERF_ANGEBOT/txtVBAP-POSNR[0,2]").caretPosition = 1</SPAN></DIV><DIV>&nbsp;</DIV><DIV><SPAN>&gt;&gt; this is how i'm creating the session</SPAN></DIV><DIV><DIV><DIV><SPAN>SapGuiAuto = win32com.client.GetObject(</SPAN><SPAN>'SAPGUI'</SPAN><SPAN>)</SPAN></DIV><DIV><SPAN>application = SapGuiAuto.GetScriptingEngine</SPAN></DIV><DIV><SPAN>connection = application.Children(</SPAN><SPAN>0</SPAN><SPAN>)</SPAN></DIV><DIV><SPAN>session = connection.Children(</SPAN><SPAN>0</SPAN><SPAN>) &nbsp; </SPAN></DIV></DIV></DIV></DIV> 2024-04-18T21:22:50.480000+02:00 https://community.sap.com/t5/technology-q-a/llm-rag-and-cloud-foundry-no-space-left-on-device/qaq-p/13680627 LLM, RAG and Cloud Foundry: No space left on device 2024-04-24T11:48:33.733000+02:00 marcus_schiffer https://community.sap.com/t5/user/viewprofilepage/user-id/195686 <P>Hi,</P><P>&nbsp;</P><P>we were following a set of blogs and tutorials like:</P><P><A href="https://community.sap.com/t5/technology-blogs-by-sap/enhancing-s-4hana-with-sap-hana-cloud-vector-store-and-genai/ba-p/13655191" target="_blank">https://community.sap.com/t5/technology-blogs-by-sap/enhancing-s-4hana-with-sap-hana-cloud-vector-store-and-genai/ba-p/13655191</A></P><P><A href="https://developers.sap.com/tutorials/ai-core-genai-hana-vector.html" target="_blank" rel="noopener noreferrer">https://developers.sap.com/tutorials/ai-core-genai-hana-vector.html</A></P><P>&nbsp;</P><P>We need to use the features in a cloud foundry python app. Unfortunately the installation of</P><P>package&nbsp;</P><DIV><DIV><SPAN>sentence-transformers (as part of the requirements.txt file) always leads to a "no space left on device" error during build.</SPAN></DIV><DIV><SPAN>The memory limit is set to 8G, the disk space to 10G in the manifest.yml.</SPAN></DIV><DIV>&nbsp;</DIV><DIV><SPAN>How can we solve this issue in the SAP BTP cloud foundry environment ?</SPAN></DIV><DIV>&nbsp;</DIV><DIV><SPAN>Any help is highly appreciated.</SPAN></DIV><DIV>&nbsp;</DIV><DIV><SPAN>Regards</SPAN></DIV><DIV><SPAN>Marcus&nbsp;</SPAN></DIV></DIV><P>&nbsp;</P> 2024-04-24T11:48:33.733000+02:00 https://community.sap.com/t5/technology-q-a/configuration-of-job-scheduler-in-btp-with-python-flask/qaq-p/13694679 Configuration of job-scheduler in BTP with python flask 2024-05-08T08:11:32.561000+02:00 marcus_schiffer https://community.sap.com/t5/user/viewprofilepage/user-id/195686 <P>Hi,</P><P>we are struggling with the setup of a job-scheduler for a pyython flask app on cloud foundry in the BTP.</P><P>The job must call the app via the approuter.</P><P>Following tutorials, we created a check_authorization method with:</P><P>&nbsp;</P><DIV><DIV><EM>access_token = request.headers.get('authorization')[7:]</EM></DIV><DIV><DIV><EM>security_context = xssec.create_security_context(access_token, uaa_service.credentials)</EM></DIV><DIV><DIV><EM>isAuthorized = security_context.check_scope('openid')</EM></DIV><DIV>&nbsp;</DIV><DIV>We granted&nbsp;<DIV><DIV><SPAN>&nbsp;</SPAN><SPAN>"grant-as-authority-to-apps"</SPAN><SPAN>: [</SPAN><SPAN>"$XSSERVICENAME(job-scheduler)"</SPAN><SPAN>] to a scope in xs-security.json and the scope is evaluated to True by security_context.check_local_scope("admin") in both cases (from job and from user)</SPAN></DIV></DIV></DIV><DIV>&nbsp;</DIV><DIV>When called via the job-scheduler, the&nbsp;<EM>security_context.check_scope('openid') however&nbsp;</EM>gives false, when called with a user it is True.&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>What might still be missing here ? Or do we need to check against another scope than 'openid' in the check_scope ?</DIV><DIV>&nbsp;</DIV><DIV>Any help appreciated.</DIV><DIV>Regards</DIV><DIV>Marcus</DIV></DIV></DIV></DIV> 2024-05-08T08:11:32.561000+02:00