https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-HANA-blog-posts.xml SAP Community - SAP HANA 2024-10-06T11:01:18.609973+00:00 python-feedgen SAP HANA blog posts in SAP Community https://community.sap.com/t5/sap-learning-blog-posts/where-can-learn-how-machine-learning-is-implemented-in-sap-hana-with/ba-p/13784552 Where can learn how machine learning is implemented in SAP HANA with regression? 2024-08-06T15:50:42.437000+02:00 Margit_Wagner https://community.sap.com/t5/user/viewprofilepage/user-id/491 <P>I recommend to access our&nbsp;<A title="Developing AI models with the Python Machine Learning client for SAP HANA" href="https://learning.sap.com/learning-journeys/developing-ai-models-with-the-python-machine-learning-clients-for-sap-hana" target="_blank" rel="noopener noreferrer">Developing AI models with the Python Machine Learning client for SAP HANA</A><SPAN>&nbsp;</SPAN>learning journey.</P><DIV class=""><P><STRONG>Overview<BR /></STRONG><SPAN>At the end of this course, participants will be able to understand how machine learning is implemented in SAP HANA with regression, classification and time series analysis, by using the relevant SAP HANA libraries, SAP HANA Predictive Analysis Library (PAL) and SAP HANA Automated Predictive Library (APL).</SPAN></P><P><STRONG><BR />Learning Objectives<BR /></STRONG><SPAN>Developers and Data Scientists will understand how the Python machine learning client for SAP HANA can be used to build and train various machine learning models, including Regression, Classification and Time series.</SPAN></P><DIV class=""><P><STRONG>Prerequisite<BR /></STRONG>Participants will need a basic understanding of machine learning principles, algorithms, and to be familiar with the technical terminology. A foundational understanding of programming concepts is beneficial. A working knowledge of the Python programming language would be advantageous.</P></DIV><DIV class=""><P class=""><STRONG>Pass all the quizzes and receive a digital badge</STRONG></P></DIV><DIV class=""><DIV class=""><DIV class=""><DIV class=""><P><STRONG>Please ask a question related&nbsp;to the digital learning Journey in the&nbsp;</STRONG><A href="https://groups.community.sap.com/t5/sap-learning-q-a/qa-p/learningqanda-board" target="_blank" rel="noopener noreferrer"><STRONG>Q&amp;A area</STRONG></A><STRONG>.</STRONG></P></DIV><P>Our SAP Learning Experts will get back to you as soon as possible!&nbsp;We are here to support you.</P><P>I appreciate your feedback and we will make sure to continue sharing interesting topics.<BR /><BR />Kind regards<BR />Margit</P></DIV></DIV></DIV></DIV> 2024-08-06T15:50:42.437000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/how-to-connect-to-sap-hana-db-using-x-509-certificate-in-hdbuserstore/ba-p/13785589 How to connect to SAP HANA DB using X.509 certificate in hdbuserstore 2024-08-07T10:41:32.242000+02:00 eason_chen https://community.sap.com/t5/user/viewprofilepage/user-id/226039 <H2 id="toc-hId-1022168708">Overview</H2><P>This guide shows you how to connect to HANA by using X.509 certificate. It can be used for logon with hdbsql, hdbuserstore for ABAP system, etc. In this demo, we would create USER.PSE for authentication and DB user DEMOUSER is mapped to it.&nbsp;</P><P><EM>"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."</EM></P><H2 id="toc-hId-825655203">Host Details</H2><UL><LI>HANA<BR />SID: HA6<BR />Instance number:06<BR />apj-b.openstack.ap-cn-1.cloud.sap&nbsp;<BR />SYSTEMDB@HA6<BR />HA6@HA6&nbsp;</LI></UL><H3 id="toc-hId-758224417"><STRONG>Referrence documents</STRONG></H3><P><A href="https://help.sap.com/docs/SAP_HANA_PLATFORM/b3ee5778bc2e4a089d3299b82ec762a7/2b335f7eec6a450095f110ea961d77cc.html?locale=en-US&amp;version=2.0.05" target="_blank" rel="noopener noreferrer">https://help.sap.com/docs/SAP_HANA_PLATFORM/b3ee5778bc2e4a089d3299b82ec762a7/2b335f7eec6a450095f110ea961d77cc.html?locale=en-US&amp;version=2.0.05</A><BR />3024995 - Connecting to SAP HANA DB using X.509 certificate<BR />2154997 - Migration of hdbuserstore entries to ABAP SSFS</P><H3 id="toc-hId-561710912"><STRONG>Prerequisite</STRONG></H3><P>HANA client is above 2.13.21</P><P>HANA server is above 2.0 SPS05</P><H3 id="toc-hId-365197407"><STRONG>Steps to Follow</STRONG></H3><OL><LI>Create a PSE used for X509 certificate SSO. And it would be issued by a CA. This can be done with SAPGENPSE, Webdispatcher Admin Tool, etc.<BR />We are going to use Webdispatcher Admin Tool in this demo.</LI><OL><LI>Logon to <A href="http://apj-b:8006/sap/hana/xs/wdisp/admin/public/default.html" target="_blank" rel="nofollow noopener noreferrer">http://&lt;hostname&gt;:80&lt;instance number&gt;/sap/hana/xs/wdisp/admin/public/default.html</A><BR />Set PSE File Name: USER.PSE<BR />Set Distinguished Name: CN=DEMOUSER.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE</LI><LI>Create CA request and ask CA to sign it.</LI><LI>Import CA response for the PSE created.</LI><LI>As result, a PSE used for X.509 Certificate-Based User Authentication has been created in folder /usr/sap/HA6/HDB06/apj-b/sec/. This certificate is signed by 'SAPNetCA_G2, O=SAP, L=Walldorf, C=DE'' in this demo.<BR /><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eason_chen_0-1723019360102.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147687iE5EADC38D3939AC1/image-size/medium?v=v2&amp;px=400" role="button" title="eason_chen_0-1723019360102.png" alt="eason_chen_0-1723019360102.png" /></span><P>&nbsp;</P></LI></OL><LI>Configure user mapping.</LI><OL><LI>Log on to tenant DB HA6@HA6 from HANA studio.</LI><LI>Create DB user &lt;USER&gt;&nbsp; in HA6@HA6 if it does not exist.</LI><OL><LI><STRONG>CREATE</STRONG> <STRONG>USER</STRONG> DEMOUSER <STRONG>PASSWORD</STRONG> &lt;password&gt; <STRONG>NO</STRONG> FORCE_FIRST_PASSWORD_CHANGE;</LI></OL><LI>Create X509 Identity Providers. Issuer should be the same in the new created PSE file. When identity provider-based user mappings is used, matching rule also need to be created. e.g.</LI><OL><LI><STRONG>CREATE</STRONG> X509 PROVIDER DEMO_X509_PROVIDER <STRONG>WITH</STRONG> ISSUER 'CN=SAPNetCA_G2, O=SAP, L=Walldorf, C=DE';</LI><LI><STRONG>ALTER</STRONG> X509 PROVIDER DEMO_X509_PROVIDER <STRONG>SET</STRONG> MATCHING RULES 'CN=*.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE';<BR />PS: The identity provider specifies the matching rule 'CN=*.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE'. When the client presents a user certificate with the certificate subject 'CN=DEMOUSER.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE', SAP HANA checks whether the DB user DEMOUSER<STRONG>&nbsp;</STRONG>exists. If the user exists and all other attributes in the certificate match and are in same order, logon is successful.</LI></OL><LI>Mapping DB user &lt;USER&gt; with x509 provider. “ANY” for rule-based mapping.</LI><OL><LI><STRONG>ALTER</STRONG> <STRONG>USER</STRONG> DEMOUSER <STRONG>ADD</STRONG> <STRONG>IDENTITY</STRONG> ANY <STRONG>FOR</STRONG> X509 PROVIDER DEMO_X509_PROVIDER;</LI><LI><STRONG>ALTER</STRONG> <STRONG>USER</STRONG> DEMOUSER <STRONG>ENABLE</STRONG> X509;</LI></OL><LI>Import the certificate of CA “CN=SAPNetCA_G2, O=SAP, L=Walldorf, C=DE” into certificate store of HA6@HA6 as CA_CERT.<UL><LI>2.0 SPS06 and higher:<STRONG><BR />CREATE</STRONG> CERTIFICATE CA_CERT <STRONG>FROM</STRONG> ' -----BEGIN CERTIFICATE-----MIIGPTCCBCWgAwIBAgIKYQ4GNwAAAAAADDANBgkqhkiG9w0BAQsFADBOMQswCQYD<BR />...<BR />7HJNBB1ZTjnrxJAgCQgNBIQ=<BR />-----END CERTIFICATE----- ';</LI><LI>2.0 SPS05:<BR /><STRONG>CREATE</STRONG> CERTIFICATE <STRONG>FROM</STRONG> ' -----BEGIN CERTIFICATE-----MIIGPTCCBCWgAwIBAgIKYQ4GNwAAAAAADDANBgkqhkiG9w0BAQsFADBOMQswCQYD<BR />...<BR />7HJNBB1ZTjnrxJAgCQgNBIQ=<BR />-----END CERTIFICATE----- '&nbsp;<STRONG>COMMENT 'CA_CERT'</STRONG>;<BR />Then you need find out the certificate id with following SQL:SELECT * FROM CERTIFICATES WHERE COMMENT = 'CA_CERT'</LI></UL></LI><LI>Create certificate collection as X509_PSE<BR /><OL><LI><STRONG>CREATE</STRONG> PSE X509_PSE;</LI></OL></LI><LI>Add previous certificate into X509_PSE<BR /><UL><LI>2.0 SPS06 and higher:<STRONG><BR />ALTER</STRONG> PSE X509_PSE <STRONG>ADD</STRONG> CERTIFICATE CA_CERT;</LI><LI>2.0 SPS05:<OL><LI>find out the certificate id with following SQL:<BR />SELECT * FROM CERTIFICATES WHERE COMMENT = 'CA_CERT'</LI><LI><STRONG>ALTER</STRONG>&nbsp;PSE X509_PSE&nbsp;<STRONG>ADD</STRONG>&nbsp;CERTIFICATE &lt;certificate id found with above query&gt;;</LI></OL></LI></UL></LI><LI>Edit the purpose<OL><LI><STRONG>SET</STRONG> PSE X509_PSE PURPOSE X509 <STRONG>FOR</STRONG> PROVIDER DEMO_X509_PROVIDER;</LI></OL></LI></OL><LI>Test the connection with hdbsql.<OL><LI>Log on as ha6adm to OS</LI><LI>cd /usr/sap/HA6/home/sap/hdbclient</LI><LI>./hdbsql -j -A -Z authenticationMethods=x509 -Z authenticationX509=/usr/sap/HA6/HDB06/apj-b/sec/USER.PSE -Z traceFile=stdout -Z traceOptions=debug=info,flush=on -n apj-b.openstack.ap-cn-1.cloud.sap:30615 "SELECT CURRENT_USER, CURRENT_SCHEMA FROM DUMMY;"</LI></OL></LI><LI>Create hdbuserstore and test it.<OL><LI>Log on as ha6adm to OS</LI><LI>cd /usr/sap/HA6/home/sap/hdbclient</LI><LI>./hdbuserstore setX509 X509DEMOUSER apj-b.openstack.ap-cn-1.cloud.sap:30615 /usr/sap/HA6/HDB06/apj-b/sec/USER.PSE</LI><LI>./hdbsql -j -A -U X509DEMOUSER "SELECT CURRENT_USER, CURRENT_SCHEMA FROM DUMMY;"<BR />PS. If you want to use this PSE for X.509 Certificate-Based User Authentication in ABAP system. You need copy file USER.PSE into your ABAP server ${SECUDIR} directory (e.g. /usr/sap/&lt;SID&gt;/D01/sec) and set hdbuserstore accordingly.<BR />e.g. hdbuserstore setX509 DEFAULT apj-b.openstack.ap-cn-1.cloud.sap:30615 /usr/sap/&lt;SID&gt;/D01/sec/USER.PSE</LI><LI>&nbsp;</LI></OL></LI><LI>To reuse this configuration for multiple users. Steps 1, 2.b, 2.d need to be rerun for each new user. Then you may use the PSE created for others and run test as in step 3, 4.</LI></OL><H3 id="toc-hId-168683902"><STRONG>Troubleshooting</STRONG></H3><P><STRONG>Issue 1</STRONG></P><OL><LI><STRONG>Symptom:</STRONG><STRONG><BR /></STRONG>hdbsql connection test was failed.<BR /><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eason_chen_1-1723019360133.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147689i7C85D2FBFF0B092B/image-size/medium?v=v2&amp;px=400" role="button" title="eason_chen_1-1723019360133.jpeg" alt="eason_chen_1-1723019360133.jpeg" /></span><P>&nbsp;</P></LI><LI><STRONG>Analysis:</STRONG></LI><OL><LI><STRONG>Enable HANA debug trace.</STRONG><STRONG><BR />alter</STRONG> <STRONG>system</STRONG> <STRONG>alter</STRONG> configuration ('global.ini','system') <STRONG>set </STRONG>('trace','authentication') = 'debug', ('trace','crypto') = 'debug' <STRONG>with</STRONG> reconfigure;</LI><LI><STRONG>Reproduce the issue and check indexserver trace.</STRONG></LI><LI><STRONG>Disable debug trace.</STRONG><STRONG><BR />alter</STRONG> <STRONG>system</STRONG> <STRONG>alter</STRONG> configuration ('global.ini','system') <STRONG>unset </STRONG>('trace','authentication'), ('trace','crypto') <STRONG>with</STRONG> reconfigure;<BR /><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eason_chen_2-1723019360144.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147688i51D7583310F4FCCA/image-size/medium?v=v2&amp;px=400" role="button" title="eason_chen_2-1723019360144.jpeg" alt="eason_chen_2-1723019360144.jpeg" /></span></LI></OL><LI><STRONG>Root Cause:</STRONG><BR />Mapping between x509 certificate and HANA DB user is not maintained.</LI><LI><STRONG>Resolution:</STRONG><STRONG><BR /></STRONG>Refer to Step 2.4. to map the DB user with x509 certificate.<BR /><BR />PS: In case you don’t want to use rule based mapping, following step can be skipped.<BR /><STRONG>ALTER</STRONG> X509 PROVIDER DEMO_X509_PROVIDER <STRONG>SET</STRONG> MATCHING RULES 'CN=*.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE';<BR />However, you need specific the identity for the user in step 2.4. as following.<BR /><STRONG>ALTER</STRONG> <STRONG>USER</STRONG> DEMOUSER <STRONG>ADD</STRONG> <STRONG>IDENTITY</STRONG> 'CN=DEMOUSER.openstack.ap-cn-1.cloud.sap, O=SAP, C=DE' <STRONG>FOR</STRONG> X509 PROVIDER DEMO_X509_PROVIDER;</LI></OL><P><STRONG><BR />Issue 2</STRONG></P><OL><LI><STRONG>Symptom:</STRONG><STRONG><BR /></STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eason_chen_3-1723019360147.jpeg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147690i69B5EF95D27989BE/image-size/medium?v=v2&amp;px=400" role="button" title="eason_chen_3-1723019360147.jpeg" alt="eason_chen_3-1723019360147.jpeg" /></span></LI><LI><STRONG>Reproduce steps:</STRONG></LI><OL><LI>Log on as ha6adm to OS</LI><LI>hdbuserstore setX509 X509DEMOUSER apj-b.openstack.ap-cn-1.cloud.sap:30615 /usr/sap/HA6/HDB06/apj-b/sec/USER.PSE</LI></OL><LI><STRONG>Analysis:</STRONG><STRONG><BR /></STRONG>ha6adm@<A href="http://apj-b/usr/sap/HA6/HDB06" target="_blank" rel="nofollow noopener noreferrer">apj-b:/usr/sap/HA6/HDB06</A>&gt; hdbuserstore -v<BR />hdbuserstore 2.11.17.1638822267<BR />SYSTEM: Linux / X64<BR />BUILD AT: 2021-12-06 20:28:00<BR />BRANCH: unknown<BR />BUILD MODE: rel<BR />PROCESS ID: 12978</LI><LI><STRONG>Root Cause:</STRONG><BR />HANA client used is lower than 2.13.21.</LI><LI><STRONG>Resolution:</STRONG><STRONG><BR /></STRONG>Upgrade HANA client</LI></OL> 2024-08-07T10:41:32.242000+02:00 https://community.sap.com/t5/technology-blogs-by-members/backup-of-sap-hana-database-on-gcp-using-backup-amp-dr-services/ba-p/13784992 Backup of SAP HANA Database on GCP using backup & DR services 2024-08-12T07:33:01.981000+02:00 DaulatP https://community.sap.com/t5/user/viewprofilepage/user-id/1538866 <P><STRONG>Backup of SAP HANA Database on GCP using backup &amp; DR services</STRONG></P><P>This article contains all the SAP and GCP related technical Snapshots and settings which can be used for configuring HANA Database backup on SUSE Linux Enterprise &amp; RHEL. Operations described in the document are performed when SAP HANA Database is deployed on GCP. SAP has provided several notes which support SAP products on Google.</P><H1 id="toc-hId-893060066"><STRONG>SAP HANA BACKUP ON GCP</STRONG></H1><P>SAP HANA, as a critical component of many business applications, demands robust business continuity and disaster recovery (BCDR) strategies. Any downtime can result in significant financial losses and reputational damage. A well-planned BCDR strategy ensures business continuity, minimizes data loss, and speeds up recovery time. Google Cloud provides a comprehensive platform to safeguard your SAP HANA environment against unforeseen disruptions. This blog goes into the technical aspects of implementing SAP HANA BCDR on Google Cloud.</P><P>Implementing a robust SAP HANA BCDR strategy on Google Cloud is crucial for ensuring business continuity. By carefully evaluating your business needs, leveraging Google Cloud's capabilities, and following best practices, you can protect your SAP HANA environment and minimize the impact of potential disruptions.</P><P><STRONG>Prerequisites:</STRONG></P><UL><LI>All the configured services— see SAP Note 1697613 and SAP Note 1649519— such as&nbsp;nameserver&nbsp;and&nbsp;indexserver&nbsp;must be running. You can check this in the&nbsp;<STRONG>Overview of SAP HANA studio</STRONG>&nbsp;&gt;&nbsp;<STRONG>Operational State</STRONG>&nbsp;&gt; Confirm all services are started.</LI></UL><UL><LI>Create FS for logabackup on disk as BU-DR will backup login on local Disk &amp; take snapshot of Disk on storage.</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_0-1722979627008.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147423i270069A358D8CC96/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_0-1722979627008.png" alt="DaulatP_0-1722979627008.png" /></span></P><UL><LI>Database&nbsp;log_mode&nbsp;must be&nbsp;normal&nbsp;under the HANA Studio configuration tab.</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_1-1722979627021.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147421i36ADD1618268A1EF/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_1-1722979627021.png" alt="DaulatP_1-1722979627021.png" /></span></P><UL><LI>All SAP HANA servers (Compute Engine) that have HANA data to be protected by Backup and DR Service must have been onboarded to Backup and DR Service</LI><LI>All SAP HANA servers (Compute Engine) that have HANA data to be protected by Backup and DR Service must have the Backup and DR agent installed.</LI></UL><P><STRONG>HANA log backup recommendation:</STRONG></P><UL><LI>Make sure to set the HANA Archive log backup path as the basepath_logbackup and basepath_catalogbackup in global.ini</LI><LI>Don't use HANA Archive log mount to store files other than HANA archive log backup</LI><LI>By default archive purge will run with every database backup. This achieves the best recovery RTO</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_2-1722979627041.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147422i561177248058E36A/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_2-1722979627041.png" alt="DaulatP_2-1722979627041.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_3-1722979627048.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147424i2A5BA05B5ACCF82F/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_3-1722979627048.png" alt="DaulatP_3-1722979627048.png" /></span></P><H4 id="toc-hId-1083794718"><SPAN><STRONG>Create the database backup user from HANA Studio:</STRONG></SPAN></H4><P>Choose a database username based on the company's standard. Make sure to create this user account under&nbsp;SYSTEMDB.</P><UL><LI>HANA 2.0 (SPS05 and later): Click the&nbsp;<STRONG>System privilege tab</STRONG>&nbsp;and assign privileges by selecting the following:</LI><UL><LI><STRONG>Backup admin</STRONG></LI><LI><STRONG>Catalog read</STRONG></LI><LI><STRONG>Database backup operator</STRONG>&nbsp;+.&nbsp;<STRONG>Database recovery operator</STRONG></LI><LI><STRONG>Database admin</STRONG></LI><LI><STRONG>Database start</STRONG></LI><LI><STRONG>Database stop</STRONG></LI></UL><LI>Deploy the newly created system user by clicking the&nbsp;<STRONG>green arrow</STRONG>.</LI></UL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_4-1722979627058.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147425i8D602EE4B896C5F3/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_4-1722979627058.png" alt="DaulatP_4-1722979627058.png" /></span></P><P><SPAN><STRONG>Get the instance and SQL port numbers<EM>:</EM></STRONG></SPAN></P><P>You need the HANA instance and SQL Port numbers for system DB.</P><P>To get the instance and SQL port numbers from HANA 2.0 studio:</P><OL><LI>Go to&nbsp;<STRONG>System</STRONG>.</LI><LI>Click the&nbsp;<STRONG>Landscape</STRONG>&nbsp;tab.</LI><LI>Click the&nbsp;<STRONG>Services</STRONG>&nbsp;tab.</LI><LI>Under the&nbsp;<STRONG>Service</STRONG>&nbsp;column, navigate to the&nbsp;nameserver.</LI><LI>Get the value of SQL port. The instance number is the second and third digits of the SQL port number.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_5-1722979627069.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147426i0BFFCADC20CCC383/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_5-1722979627069.png" alt="DaulatP_5-1722979627069.png" /></span></P><P><SPAN><STRONG>Create the SAP HANA&nbsp;</STRONG></SPAN><STRONG>hdbuserstore</STRONG><SPAN><STRONG>&nbsp;key for system DB backup users<EM>:</EM></STRONG></SPAN></P><P>Use this naming convention for the userstore key name: For SYSTEMDB, set the key name to (Database backup username). For example, for database backup username (Actbackup), set&nbsp;SYSTEMDB—key_name— (ACTBACKUP).</P><P><STRONG>Procedure:</STRONG></P><OL><LI>Connect to the HANA database system using SSH and log into (sid)adm:&nbsp;su - (sid)adm</LI><LI>Change directory:&nbsp;cd exe</LI></OL><OL><LI>Create entries in hdbuserstore using command&nbsp;hdbuserstore:&nbsp;./hdbuserstore SET (key_name) (host name):(port) (DB_user_name) (DB_user_password)</LI></OL><P>In this example: hdbuserstore SET GCPBACKUPDR HOSTNAME:30013 GCPBACKUPDR ****** (DB_user_password)</P><OL><LI>Check the keystore:&nbsp;./hdbuserstore list</LI></OL><P><STRONG>Prepare Below command according to above steps :</STRONG></P><P>hdbuserstore SET GCPBACKUPDR HOSTNAME:30013 GCPBACKUPDR ******</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_6-1722979627077.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147427i21B22899BCEA397D/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_6-1722979627077.png" alt="DaulatP_6-1722979627077.png" /></span></P><P>hdbsql -U GCPBACKUPDR</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_7-1722979627087.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147428iD75857280B25317D/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_7-1722979627087.png" alt="DaulatP_7-1722979627087.png" /></span></P><P><STRONG>Set up the log mode and log backup in HANA Studio:</STRONG></P><P>Using the HANA Studio set the HANA log mode and log backup location for Backup and DR to take backups of HANA DB transaction logs:</P><OL><LI>In SAP HANA HDB studio, make sure log backup is set correctly under&nbsp;<STRONG>DATABASE (SYSTEMDB FOR HANA 2.0)</STRONG>&nbsp;&gt;&nbsp;<STRONG>Backup</STRONG>&nbsp;&gt;&nbsp;<STRONG>Configuration</STRONG>&nbsp;page:</LI><UL><LI>Destination type is&nbsp;<STRONG>File</STRONG>.</LI><LI>Destination is set to a local file system mount path.</LI><LI>Backup interval is set to&nbsp;<STRONG>required RPO</STRONG>.</LI><LI>Automatic log backup is enabled.</LI><LI>Database&nbsp;log_mode&nbsp;must be set to&nbsp;<STRONG>normal</STRONG></LI></UL></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_8-1722979627098.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147429iB000E21E0BD1022F/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_8-1722979627098.png" alt="DaulatP_8-1722979627098.png" /></span></P><OL><LI>Check under Database configuration: DATABASE (SYSTEMDB FOR HANA 2.0) &gt; Configuration page. In the filter, type&nbsp;<STRONG>basepath</STRONG>.</LI><LI>Verify that&nbsp;basepath_logbackup&nbsp;is set correctly:</LI><UL><LI>Set the&nbsp;basepath_catalogbackup&nbsp;to the same as&nbsp;basepath_logbackup.</LI><LI>Open the&nbsp;basepath_catalogbackup&nbsp;edit page and set the&nbsp;<STRONG>New value</STRONG>&nbsp;to the same as&nbsp;basepath_logbackup. Click&nbsp;<STRONG>Save</STRONG>. This ensures the backup of the catalog with log backup for point in time recovery.</LI></UL><LI>On the HANA database server, run the re-config for the values to take effect:&nbsp;hdbnsutil -reconfig.</LI></OL><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_9-1722979627104.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147431i3805C1B9D644719C/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_9-1722979627104.png" alt="DaulatP_9-1722979627104.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_10-1722979627110.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147432iC4D2D663A92E6FE6/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_10-1722979627110.png" alt="DaulatP_10-1722979627110.png" /></span></P><P>hdbnsutil -reconfig</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_11-1722979627114.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147430i476AF5415D8E6275/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_11-1722979627114.png" alt="DaulatP_11-1722979627114.png" /></span></P><P><STRONG>Install agent on HANA DB Host :</STRONG></P><P>gcloud storage cp gs://sap-artifacts-ib50/binaries/linux/connector-Linux-11.0.10.417.rpm /tmp/connector-Linux-11.0.10.417.rpm</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_12-1722979627120.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147433i6B6F056D38C28C35/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_12-1722979627120.png" alt="DaulatP_12-1722979627120.png" /></span></P><P>sudo rpm -Uvh /tmp/connector-Linux-11.0.10.417.rpm</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_13-1722979627130.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147434i726349E76933F707/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_13-1722979627130.png" alt="DaulatP_13-1722979627130.png" /></span></P><P>sudo cp /opt/act/cbt/bin/cbt_activate.sh /opt/act/cbt/bin/cbt_activate.sh.bak</P><P>sudo sed 's/bash$/&amp;\nexit 0/' /opt/act/cbt/bin/cbt_activate.sh -i</P><P>&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_14-1722979627136.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147435i169401C648249094/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_14-1722979627136.png" alt="DaulatP_14-1722979627136.png" /></span></P><P><STRONG>Onboard HANA DB host &nbsp;to Backup and DR console and exchange secret :</STRONG></P><P>Select Project &amp; go to Backup DR</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_15-1722979627152.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147436i694D597C6779C334/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_15-1722979627152.png" alt="DaulatP_15-1722979627152.png" /></span></P><P>Select Compute Engine</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_16-1722979627162.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147437i9197AE6017B21F61/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_16-1722979627162.png" alt="DaulatP_16-1722979627162.png" /></span></P><P>Select service Account &amp; Click on next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_17-1722979627169.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147438i2A3F2E6A5F2BF89A/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_17-1722979627169.png" alt="DaulatP_17-1722979627169.png" /></span></P><P>Select Project ID / Zone &amp; Click on Search.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_18-1722979627177.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147440iB6FEF2BD5B4E3600/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_18-1722979627177.png" alt="DaulatP_18-1722979627177.png" /></span></P><P>&nbsp;</P><P>Select DB hostname that you want to configure &amp; Next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_19-1722979627185.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147441iDEC0717F3DC47E47/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_19-1722979627185.png" alt="DaulatP_19-1722979627185.png" /></span></P><P>&nbsp;</P><P>Click on Next:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_20-1722979627194.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147439i813619C9155190E4/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_20-1722979627194.png" alt="DaulatP_20-1722979627194.png" /></span></P><P>Click on Finish :</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_21-1722979627201.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147443iD90FA757B22EC53F/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_21-1722979627201.png" alt="DaulatP_21-1722979627201.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_22-1722979627207.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147444iB96BE5993A9CB276/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_22-1722979627207.png" alt="DaulatP_22-1722979627207.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_23-1722979627218.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147442iE0EF57B030772F3E/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_23-1722979627218.png" alt="DaulatP_23-1722979627218.png" /></span></P><P>RUN SAP HANA Onboarding Wizard.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_24-1722979627228.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147445i227971A929E8E9C3/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_24-1722979627228.png" alt="DaulatP_24-1722979627228.png" /></span></P><P>Enter Secret.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_25-1722979627242.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147447i9ED1E527A95BA4EE/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_25-1722979627242.png" alt="DaulatP_25-1722979627242.png" /></span></P><P><STRONG>Create Secret&nbsp; below:</STRONG></P><P>sudo /opt/act/bin/udsagent secret --reset –restart</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_26-1722979627249.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147446i1F8D0D5CA9068FFE/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_26-1722979627249.png" alt="DaulatP_26-1722979627249.png" /></span></P><P>If get above error remove –restart &amp; give below command.</P><P>sudo /opt/act/bin/udsagent secret --reset</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_27-1722979627256.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147449i351011ED41DBAD41/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_27-1722979627256.png" alt="DaulatP_27-1722979627256.png" /></span></P><P>Copy Key from above command &amp; put in SECRET</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_28-1722979627270.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147448iBAE0A43C805247F2/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_28-1722979627270.png" alt="DaulatP_28-1722979627270.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_29-1722979627282.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147450i591C02AE2F9ABDD3/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_29-1722979627282.png" alt="DaulatP_29-1722979627282.png" /></span></P><P>Host Updated Successfully.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_30-1722979627288.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147452iC26CC5A976A9163A/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_30-1722979627288.png" alt="DaulatP_30-1722979627288.png" /></span></P><P>&nbsp;</P><P>Select HANA SID which needs to onboard &nbsp;&amp; Click on OK.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_31-1722979627295.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147451i92A82A1C191E6859/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_31-1722979627295.png" alt="DaulatP_31-1722979627295.png" /></span></P><P>Select SID &amp; Next.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_32-1722979627302.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147453i7372590EFD68101C/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_32-1722979627302.png" alt="DaulatP_32-1722979627302.png" /></span></P><P>Configure Backup options for HANA SID :</P><P>Provide USER STORE KEY, Select BACKUP Capture Method, Retention &amp; Click on Save.&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_33-1722979627312.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147455i5C49D0F78D8081CA/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_33-1722979627312.png" alt="DaulatP_33-1722979627312.png" /></span></P><P>Click on Next</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_34-1722979627321.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147454i8F3FF2E95E3C9EA4/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_34-1722979627321.png" alt="DaulatP_34-1722979627321.png" /></span></P><P>FINISH</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_35-1722979627326.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147456i8F03553A1E8C6CA2/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_35-1722979627326.png" alt="DaulatP_35-1722979627326.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_36-1722979627336.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147457i2BE39FE139BE904B/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_36-1722979627336.png" alt="DaulatP_36-1722979627336.png" /></span></P><P>Onboarding Finished Successfully.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_37-1722979627347.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147459i03387D5C36B321E9/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_37-1722979627347.png" alt="DaulatP_37-1722979627347.png" /></span></P><P>Run Ad-hoc backup:</P><P>Go to App Manager à Applications</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_38-1722979627360.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147458i398A99AE8B6AA2D4/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_38-1722979627360.png" alt="DaulatP_38-1722979627360.png" /></span></P><P>Select SID &amp; Click on manage backup Configuration.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_39-1722979627382.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147460i09E0053A34E0B013/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_39-1722979627382.png" alt="DaulatP_39-1722979627382.png" /></span></P><P>Select Tamplate created for HANA backup &amp; Profile &amp; click on Apply Plan</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_40-1722979627395.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147461i3B85E43BE987D1E0/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_40-1722979627395.png" alt="DaulatP_40-1722979627395.png" /></span></P><P>&nbsp;</P><P>Apply backup plan.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_41-1722979627408.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147462i2B87E436FB7DBCDA/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_41-1722979627408.png" alt="DaulatP_41-1722979627408.png" /></span></P><P>Click on Okay</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_42-1722979627419.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147463i3DD108749D19F49B/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_42-1722979627419.png" alt="DaulatP_42-1722979627419.png" /></span></P><P>Click on Run Now to run ad-hoc backup.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_43-1722979627436.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147465i7B9429F44DE6A28D/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_43-1722979627436.png" alt="DaulatP_43-1722979627436.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_44-1722979627446.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147464i20DB9741EF3CDA38/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_44-1722979627446.png" alt="DaulatP_44-1722979627446.png" /></span></P><P>Go to Monitor – Job Monitor:</P><P>Backup Job Started.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_45-1722979627458.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147466iF83D00E3E700FB8A/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_45-1722979627458.png" alt="DaulatP_45-1722979627458.png" /></span></P><P>Check backup logs on below OS location:</P><P>tail -f /var/act/log/UDSAgent.log</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_46-1722979627462.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147467i7EF36E14AD175D37/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_46-1722979627462.png" alt="DaulatP_46-1722979627462.png" /></span></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_47-1722979627522.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147468iDCBD4B53569F8E58/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_47-1722979627522.png" alt="DaulatP_47-1722979627522.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DaulatP_48-1722979627540.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/147469iC52B8DD5D1B7EF34/image-size/medium?v=v2&amp;px=400" role="button" title="DaulatP_48-1722979627540.png" alt="DaulatP_48-1722979627540.png" /></span></P><P>Backup Completed Successfully.</P> 2024-08-12T07:33:01.981000+02:00 https://community.sap.com/t5/technology-blogs-by-members/implementing-a-rhel-ha-add-on-cluster-with-sbd-fencing-for-sap-solutions-on/ba-p/13782826 Implementing a RHEL HA Add-On Cluster with SBD fencing for SAP Solutions on IBM Power10 Servers 2024-08-12T07:33:24.938000+02:00 walter_orb https://community.sap.com/t5/user/viewprofilepage/user-id/232027 <H3 id="toc-hId-1151164748">Introduction</H3><P>Red Hat Enterprise Linux (RHEL) for SAP provides a range of solutions for building highly available SAP environments for SAP applications. See <A href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_sap_solutions/9/html/red_hat_ha_solutions_for_sap_hana_s4hana_and_netweaver_based_sap_applications/index" target="_blank" rel="noopener nofollow noreferrer">Red Hat HA Solutions for SAP HANA, S/4HANA and NetWeaver based SAP Applications</A> for an overview of available scenarios.</P><P>This blog describes a sample setup of a RHEL HA Add-On cluster on IBM Power10 servers that can be used as a basis for implementing high availability scenarios for SAP applications. The cluster uses SBD (STONITH Block Device) for node fencing.</P><P>The cluster uses IBM Power10 server partitions (LPARs) as cluster nodes. The information describes installing the high availability packages on each cluster node, setting up the cluster, and configuring the fencing devices.</P><P><STRONG>Target audience:</STRONG> Architects and specialists who are planning or implementing a high availability deployment of SAP applications on IBM Power10 servers.</P><P><STRONG>Conventions for shell examples later in this blog:&nbsp;</STRONG>All commands are executed as root and start with the # sign as the root prompt.&nbsp;Some commands use the \ continuation character to break the command into two or more lines.&nbsp;The output of some commands is omitted and replaced with three dots (...) instead.</P><H3 id="toc-hId-954651243">Cluster node fencing on IBM Power servers</H3><P>STONITH is an acronym for <EM>Shoot The Other Node In The Head</EM> and protects your data from corruption in a split-brain situation. A robust fencing mechanism is essential for a cluster to prevent split-brain problems. You must enable STONITH (fencing) for a RHEL HA Add-On production cluster.</P><P>SBD implements a fencing mechanism through exchanging messages via shared disk devices.&nbsp;SBD-based fencing requires a suitable watchdog timer device. The IBM PowerVM hypervisor implements such a watchdog timer service for Power10 processor-based servers with firmware level MH1030 or higher.</P><P>For more information about SBD-based fencing, see the Red Hat Knowledge Base article&nbsp;<A href="https://access.redhat.com/articles/2941601" target="_blank" rel="noopener nofollow noreferrer">Design Guidance for RHEL High Availability Clusters - sbd Considerations</A>.</P><P>The fence agents <FONT face="courier new,courier">fence_sbd</FONT> and <FONT face="courier new,courier">fence_lpar</FONT> are the two supported fencing agents for implementing STONITH devices on IBM Power servers. <FONT face="courier new,courier">fence_lpar</FONT> provides an alternative fencing mechanism that uses the HMC (Hardware Management Console) and is also supported on older IBM Power servers. For more information, see the Red Hat Knowledge Base article <A href="https://access.redhat.com/solutions/3786791" target="_blank" rel="noopener nofollow noreferrer">How can I configure Power fencing for the IBM Power platform using an HMC in a RHEL High Availability cluster?</A></P><P>It is recommended to use <FONT face="courier new,courier">fence_sbd</FONT> if possible, as it simplifies the setup and also the operational behaviour.</P><H3 id="toc-hId-758137738">Prerequisites</H3><P>The prerequisites for using SBD-based fencing in LPARs running on IBM Power servers are:</P><UL><LI>IBM Power10 servers with firmware level MH1030 or higher (see&nbsp;<A href="https://www.ibm.com/support/pages/power10-system-firmware-fix-history-release-levels-mh10xx" target="_blank" rel="noopener nofollow noreferrer">Power10 System Firmware Fix History</A>)</LI><LI>Cluster nodes must run in Power10 compatibility mode</LI><LI>Red Hat Enterprise Linux version 9.2 or higher</LI><LI>Cluster nodes installed and configured according to the requirements of the SAP application</LI><LI>One or more shared storage devices exclusive to the STONITH configuration</LI></UL><H4 id="toc-hId-690706952">Checking the processor type and compatibility mode</H4><P>On both nodes, run the following command to verify that the processor compatibility mode is set to Power10.&nbsp;The AT_BASE_PLATFORM field shows the actual processor type and the AT_PLATFORM field shows the processor compatibility mode.&nbsp;The processor compatibility mode must be set to Power10. Otherwise, the hypervisor watchdog won't be available.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># LD_SHOW_AUXV=1 /bin/true | grep _PLATFORM AT_PLATFORM: power10 AT_BASE_PLATFORM: power10</code></pre><P>&nbsp;</P><H4 id="toc-hId-494193447"><STRONG>Checking the Power10 hypervisor watchdog</STRONG></H4><P>On both nodes, run the following commands to verify that the Power10 hypervisor watchdog driver is loaded and the watchdog device is available. If one or both commands fail, make sure that the servers and LPARs meet the requirements documented above.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># lsmod | grep pseries_wdt pseries_wdt 262144 0</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># wdctl /dev/watchdog Device: /dev/watchdog Identity: pseries-wdt [version 0] Timeout: 60 seconds Pre-timeout: 0 seconds FLAG DESCRIPTION STATUS BOOT-STATUS KEEPALIVEPING Keep alive ping reply 1 0 MAGICCLOSE Supports magic close char 0 0 PRETIMEOUT Pretimeout (in seconds) 0 0 SETTIMEOUT Set timeout (in seconds) 0 0</code></pre><P>&nbsp;</P><H3 id="toc-hId-168597223">Installing and configuring a RHEL HA Add-On cluster</H3><P>Use the following steps to set up a two-node cluster on IBM Power10 servers. You must perform some steps on both nodes and some steps on either cluster node.</P><H4 id="toc-hId-101166437">Installing the RHEL HA Add-On software</H4><P>Install the software packages that are required for the implementation of a cluster.</P><H5 id="toc-hId-33735651">Checking the RHEL HA repository</H5><P>On both nodes, use the <FONT face="courier new,courier">dnf repolist</FONT> command to check the configured repositories. If the high-availability repository is missing, use the <FONT face="courier new,courier">subscription-manager</FONT> command to enable it.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># dnf repolist Updating Subscription Management repositories. repo id repo name rhel-9-for-ppc64le-appstream-e4s-rpms Red Hat Enterprise Linux 9 for Power, little endian - AppStream - Update Services for SAP Solutions (RPMs) rhel-9-for-ppc64le-baseos-e4s-rpms Red Hat Enterprise Linux 9 for Power, little endian - BaseOS - Update Services for SAP Solutions (RPMs) rhel-9-for-ppc64le-highavailability-e4s-rpms Red Hat Enterprise Linux 9 for Power, little endian - High Availability - Update Services for SAP Solutions (RPMs) rhel-9-for-ppc64le-sap-solutions-e4s-rpms Red Hat Enterprise Linux 9 for Power, little endian - SAP Solutions - Update Services for SAP Solutions (RPMs)</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># subscription-manager repos --enable="rhel-9-for-ppc64le-highavailability-e4s-rpms" Repository 'rhel-9-for-ppc64le-highavailability-e4s-rpms' is enabled for this system.</code></pre><pre class="lia-code-sample language-bash"><code># dnf clean all Updating Subscription Management repositories. 46 files removed</code></pre><P>&nbsp;</P><H4 id="toc-hId--291860573">Installing the RHEL HA Add-On software packages</H4><P>On both nodes, run the following command to install the necessary software packages.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># dnf -y install pcs pacemaker sbd fence-agents-sbd ...</code></pre><P>&nbsp;</P><H3 id="toc-hId--617456797">Configuring a RHEL HA Add-On cluster</H3><H4 id="toc-hId--1182604678">Configuring the firewall services</H4><P>On both nodes, run the following commands to add the high availability service to the RHEL firewall if <FONT face="courier new,courier">firewalld.service</FONT> is installed and enabled.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># firewall-cmd --permanent --add-service=high-availability success</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># firewall-cmd --reload success</code></pre><P>&nbsp;</P><H4 id="toc-hId--1379118183">Starting the PCS daemon</H4><P>Start the PCS daemon that is used for controlling and configuring RHEL HA Add-On clusters through PCS. On both nodes, run the following commands to enable the service and then verify that it is running</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># systemctl enable --now pcsd.service Created symlink /etc/systemd/system/multi-user.target.wants/pcsd.service → /usr/lib/systemd/system/pcsd.service.</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># systemctl status pcsd.service ● pcsd.service - PCS GUI and remote configuration interface Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled; preset: disabled) Active: active (running) since Mon 2024-08-05 13:05:32 CEST; 17s ago Docs: man:pcsd(8) man:pcs(8) Main PID: 42235 (pcsd) Tasks: 29 (limit: 312708) Memory: 248.3M CPU: 1.963s CGroup: /system.slice/pcsd.service ├─42235 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42238 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42248 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42249 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42251 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42255 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42258 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42263 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42267 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42271 /usr/bin/python3 -Es /usr/sbin/pcsd ├─42277 /usr/bin/python3 -Es /usr/sbin/pcsd └─42282 /usr/bin/python3 -Es /usr/sbin/pcsd Aug 05 13:05:30 hdbna1.isicc.de.ibm.com systemd[1]: Starting PCS GUI and remote configuration interface... Aug 05 13:05:32 hdbna1.isicc.de.ibm.com systemd[1]: Started PCS GUI and remote configuration interface.</code></pre><P>&nbsp;</P><H4 id="toc-hId--1575631688">Populating entries for each node in the hosts file</H4><P>On both nodes, add the IP addresses and host names of both hosts to the /etc/hosts file. For more information, see <A href="https://access.redhat.com/solutions/81123" target="_blank" rel="noopener nofollow noreferrer">Setting up /etc/hosts files on RHEL cluster nodes</A>.</P><H4 id="toc-hId--1772145193">Setting a password for the hacluster user ID</H4><P>On both nodes, run the <FONT face="courier new,courier">passwd</FONT> command and enter a password for the <FONT face="courier new,courier">hacluster</FONT> user ID.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># passwd hacluster Changing password for user hacluster. New password: Retype new password: passwd: all authentication tokens updated successfully.</code></pre><P>&nbsp;</P><H4 id="toc-hId--1968658698">Authenticating the cluster nodes</H4><P>Use the following command to authenticate user <FONT face="courier new,courier">hacluster</FONT> to the PCS daemon on the nodes in the cluster. The command prompts you for the password you set in the previous step. On any node, run the following command.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs host auth hdbna1 hdbnb1 -u hacluster Password: hdbnb1: Authorized hdbna1: Authorized</code></pre><P>&nbsp;</P><H4 id="toc-hId-2129795093">Configuring and starting the cluster nodes</H4><P>Configure the cluster configuration file and synchronise the configuration to the specified nodes. The <FONT face="courier new,courier">--start</FONT> option also starts the cluster service on the nodes. On any node, run the following commands to set up the cluster and then check the status of the new cluster.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs cluster setup SAP_CLUSTER --start hdbna1 hdbnb1 No addresses specified for host 'hdbna1', using 'hdbna1' No addresses specified for host 'hdbnb1', using 'hdbnb1' Destroying cluster on hosts: 'hdbna1', 'hdbnb1'... hdbna1: Successfully destroyed cluster hdbnb1: Successfully destroyed cluster Requesting remove 'pcsd settings' from 'hdbna1', 'hdbnb1' hdbna1: successful removal of the file 'pcsd settings' hdbnb1: successful removal of the file 'pcsd settings' Sending 'corosync authkey', 'pacemaker authkey' to 'hdbna1', 'hdbnb1' hdbna1: successful distribution of the file 'corosync authkey' hdbna1: successful distribution of the file 'pacemaker authkey' hdbnb1: successful distribution of the file 'corosync authkey' hdbnb1: successful distribution of the file 'pacemaker authkey' Sending 'corosync.conf' to 'hdbna1', 'hdbnb1' hdbna1: successful distribution of the file 'corosync.conf' hdbnb1: successful distribution of the file 'corosync.conf' Cluster has been successfully set up. Starting cluster on hosts: 'hdbna1', 'hdbnb1'...</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs cluster status Cluster Status: Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-05 13:31:51 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbna1 (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Mon Aug 5 13:31:51 2024 * Last change: Mon Aug 5 13:30:49 2024 by hacluster via crmd on hdbna1 * 2 nodes configured * 0 resource instances configured Node List: * Online: [ hdbna1 hdbnb1 ] PCSD Status: hdbna1: Online hdbnb1: Online</code></pre><P>&nbsp;</P><H3 id="toc-hId--2068282701">Configuring the cluster fencing device</H3><P>Use the following information to create the mandatory fencing device.</P><H4 id="toc-hId-1736768083">Validating the watchdog timer device to use with sbd</H4><P>You can use the following command to verify that the hypervisor watchdog works properly.&nbsp;The command causes the node to reset after a short countdown.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># sbd -w /dev/watchdog test-watchdog WARNING: This operation is expected to force-reboot this system without following any shutdown procedures. Proceed? [NO/Proceed] Proceed Initializing /dev/watchdog with a reset countdown of 5 seconds ... NOTICE: The watchdog device is expected to reset the system in 5 seconds. If system remains active beyond that time, watchdog may not be functional. Reset countdown ... 5 seconds Reset countdown ... 4 seconds Reset countdown ... 3 seconds Reset countdown ... 2 seconds System expected to reset any moment ...</code></pre><P>&nbsp;</P><P>For more information, see the Red Hat support article <A href="https://access.redhat.com/articles/2941231" target="_blank" rel="noopener nofollow noreferrer">Administrative Procedures for RHEL High Availability Clusters - Validating a Watchdog Timer Device (WDT) to Use with sbd</A>.</P><H4 id="toc-hId-1540254578">Getting the WWID of the STONITH SBD devices</H4><P>To configure SBD STONITH, you need one or more shared storage devices. Use <FONT face="courier new,courier">pvs --all</FONT> or <FONT face="courier new,courier">multipath -l</FONT> and note the WWIDs of the shared disk devices that are assigned to both LPARs.</P><P>The following example shows a setup with a single SBD device.</P><H4 id="toc-hId-1343741073">Creating an SBD device</H4><P>On any node, run the following commands to set up and then enable the SBD device.&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd device setup \ device=/dev/mapper/36005076812808157b80000000000124b WARNING: All current content on device(s) '/dev/mapper/36005076812808157b80000000000124b' will be overwritten Type 'yes' or 'y' to proceed, anything else to cancel: y Initializing device '/dev/mapper/36005076812808157b80000000000124b'... Device initialized successfully</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd enable \ device=/dev/mapper/36005076812808157b80000000000124b \ SBD_WATCHDOG_TIMEOUT=10 SBD_STARTMODE=clean Running SBD pre-enabling checks... hdbnb1: SBD pre-enabling checks done hdbna1: SBD pre-enabling checks done Distributing SBD config... hdbna1: SBD config saved hdbnb1: SBD config saved Enabling sbd... hdbna1: sbd enabled hdbnb1: sbd enabled Warning: Cluster restart is required in order to apply these changes.</code></pre><P>&nbsp;</P><H4 id="toc-hId-1315411259">Checking the SBD configuration</H4><P>Check the contents of the SBD configuration file. Since the configuration file was generated by pcs, the contents should be the same on both nodes.&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># cat /etc/sysconfig/sbd # This file has been generated by pcs. SBD_DELAY_START=no SBD_DEVICE="/dev/mapper/36005076812808157b80000000000124b" SBD_OPTS="-n hdbna1" SBD_PACEMAKER=yes SBD_STARTMODE=clean SBD_WATCHDOG_DEV=/dev/watchdog SBD_WATCHDOG_TIMEOUT=10</code></pre><P>&nbsp;</P><P>The following commands show some more details about the available watchdog devices.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd watchdog list Available watchdog(s): /dev/watchdog /dev/watchdog0</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># sbd query-watchdog Discovered 2 watchdog devices: [1] /dev/watchdog Identity: pseries-wdt Driver: pseries-wdt [2] /dev/watchdog0 Identity: pseries-wdt Driver: pseries-wdt</code></pre><pre class="lia-code-sample language-bash"><code># wdctl /dev/watchdog Device: /dev/watchdog Identity: pseries-wdt [version 0] Timeout: 60 seconds Pre-timeout: 0 seconds FLAG DESCRIPTION STATUS BOOT-STATUS KEEPALIVEPING Keep alive ping reply 1 0 MAGICCLOSE Supports magic close char 1 0 PRETIMEOUT Pretimeout (in seconds) 0 0 SETTIMEOUT Set timeout (in seconds) 0 0</code></pre><pre class="lia-code-sample language-bash"><code># wdctl /dev/watchdog0 Device: /dev/watchdog0 Identity: pseries-wdt [version 0] Timeout: 60 seconds Pre-timeout: 0 seconds FLAG DESCRIPTION STATUS BOOT-STATUS KEEPALIVEPING Keep alive ping reply 1 0 MAGICCLOSE Supports magic close char 0 0 PRETIMEOUT Pretimeout (in seconds) 0 0 SETTIMEOUT Set timeout (in seconds) 0 0</code></pre><P>&nbsp;</P><H4 id="toc-hId-1118897754">Testing the watchdog with a stonith operation</H4><P>On both nodes, run the following command to verify that the stonith operation forces the node to reboot.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd watchdog test /dev/watchdog WARNING: This operation is expected to force-reboot this system without following any shutdown procedures Type 'yes' or 'y' to proceed, anything else to cancel: yes System will reset shortly</code></pre><P>&nbsp;</P><H4 id="toc-hId-922384249">Creating the STONITH device</H4><P>The following command shows the device-specific options for the <FONT face="courier new,courier">fence_sbd</FONT> fencing agent.&nbsp;Alternatively, you can check its man pages with <FONT face="courier new,courier">man fence_sbd</FONT>.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith describe fence_sbd ...</code></pre><P>&nbsp;</P><P>On any node, start the cluster and then run the <FONT face="courier new,courier">pcs stonith create</FONT> command to create the STONITH device.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs cluster start --all hdbna1: Starting Cluster... hdbnb1: Starting Cluster...</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith create res_fence_sbd fence_sbd \ devices=/dev/mapper/36005076812808157b80000000000124b</code></pre><P>&nbsp;</P><H4 id="toc-hId-725870744">Verifying the cluster configuration</H4><P>Use the following commands to display the STONITH configuration and the status of the SBD device.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith config Resource: res_fence_sbd (class=stonith type=fence_sbd) Attributes: res_fence_sbd-instance_attributes devices=/dev/mapper/36005076812808157b80000000000124b Operations: monitor: res_fence_sbd-monitor-interval-60s interval=60s</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd config SBD_DELAY_START=no SBD_STARTMODE=clean SBD_WATCHDOG_TIMEOUT=10 Watchdogs: hdbna1: /dev/watchdog hdbnb1: /dev/watchdog Devices: hdbna1: "/dev/mapper/36005076812808157b80000000000124b" hdbnb1: "/dev/mapper/36005076812808157b80000000000124b"</code></pre><pre class="lia-code-sample language-bash"><code># pcs stonith sbd status SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbna1: YES | YES | YES hdbnb1: YES | YES | YES Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 clear 1 hdbnb1 clear</code></pre><pre class="lia-code-sample language-bash"><code># pcs stonith sbd status --full SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbna1: YES | YES | YES hdbnb1: YES | YES | YES Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 clear 1 hdbnb1 clear SBD header on device '/dev/mapper/36005076812808157b80000000000124b': ==Dumping header on disk /dev/mapper/36005076812808157b80000000000124b Header version : 2.1 UUID : c0602a56-64c2-4a42-9d21-8ac0e67b2b46 Number of slots : 255 Sector size : 512 Timeout (watchdog) : 5 Timeout (allocate) : 2 Timeout (loop) : 1 Timeout (msgwait) : 10 ==Header on disk /dev/mapper/36005076812808157b80000000000124b is dumped</code></pre><P>&nbsp;</P><H3 id="toc-hId-822760246">Testing the fencing of the nodes</H3><P>To test the STONITH configuration, you must manually fence the nodes. On the first node, run the following commands to fence the second node and then view the cluster status.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith fence hdbnb1 Node: hdbnb1 fenced</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs status Cluster name: SAP_CLUSTER Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-05 15:07:41 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbna1 (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Mon Aug 5 15:07:41 2024 * Last change: Mon Aug 5 14:59:59 2024 by root via cibadmin on hdbna1 * 2 nodes configured * 1 resource instance configured Node List: * Online: [ hdbna1 ] * OFFLINE: [ hdbnb1 ] Full List of Resources: * res_fence_sbd (stonith:fence_sbd): Started hdbna1 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled sbd: active/enabled</code></pre><P>&nbsp;</P><P>The command has resulted in a reboot of the second node.<BR />After the reboot, log in to the second node. Then, you must clear the <FONT face="courier new,courier">SBD</FONT> device before starting the cluster.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd status SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbna1: YES | YES | YES hdbnb1: YES | YES | NO Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 clear 1 hdbnb1 reset hdbna1.isicc.de.ibm.com</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd device message \ /dev/mapper/36005076812808157b80000000000124b hdbnb1 clear</code></pre><pre class="lia-code-sample language-abap"><code># pcs stonith sbd status SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbna1: YES | YES | YES hdbnb1: YES | YES | NO Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 clear 1 hdbnb1 clear hdbnb1.isicc.de.ibm.com # pcs cluster start Starting Cluster...</code></pre><P>&nbsp;</P><P>Check that the second node joined the cluster and try to fence the first node. On the second node, run the following commands.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs status Cluster name: SAP_CLUSTER Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-05 15:17:15 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbna1 (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Mon Aug 5 15:17:16 2024 * Last change: Mon Aug 5 14:59:59 2024 by root via cibadmin on hdbna1 * 2 nodes configured * 1 resource instance configured Node List: * Online: [ hdbna1 hdbnb1 ] Full List of Resources: * res_fence_sbd (stonith:fence_sbd): Started hdbna1 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled sbd: active/enabled</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith fence hdbna1 Node: hdbna1 fenced</code></pre><pre class="lia-code-sample language-bash"><code># pcs status Cluster name: SAP_CLUSTER Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-05 15:23:21 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbnb1 (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Mon Aug 5 15:23:22 2024 * Last change: Mon Aug 5 14:59:59 2024 by root via cibadmin on hdbna1 * 2 nodes configured * 1 resource instance configured Node List: * Online: [ hdbnb1 ] * OFFLINE: [ hdbna1 ] Full List of Resources: * res_fence_sbd (stonith:fence_sbd): Started hdbnb1 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled sbd: active/enabled</code></pre><P>&nbsp;</P><P>The first node reboots. Wait until it is running, log in to the node, and then try to start the cluster without first clearing the SBD device.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs cluster start Starting Cluster... Error: Unable to start pacemaker: A dependency job for pacemaker.service failed. See 'journalctl -xe' for details.</code></pre><P>&nbsp;</P><P>Because the SBD device is configured with the&nbsp;<FONT face="courier new,courier">SBD_STARTMODE=clean</FONT> option, you must first clear the <FONT face="courier new,courier">SBD</FONT> device before you can start the cluster. You can run the listed <FONT face="courier new,courier">journalctl</FONT> command to get more information about this error.</P><P>Clear the <FONT face="courier new,courier">SBD</FONT> device, start the cluster on the node, and check the cluster status.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd status SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbnb1: YES | YES | YES hdbna1: YES | YES | NO Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 reset hdbnb1.isicc.de.ibm.com 1 hdbnb1 clear</code></pre><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs stonith sbd device message \ /dev/mapper/36005076812808157b80000000000124b hdbna1 clear</code></pre><pre class="lia-code-sample language-bash"><code># pcs stonith sbd status SBD STATUS &lt;node name&gt;: &lt;installed&gt; | &lt;enabled&gt; | &lt;running&gt; hdbna1: YES | YES | NO hdbnb1: YES | YES | YES Messages list on device '/dev/mapper/36005076812808157b80000000000124b': 0 hdbna1 clear hdbna1.isicc.de.ibm.com 1 hdbnb1 clear</code></pre><pre class="lia-code-sample language-bash"><code># pcs cluster start Starting Cluster...</code></pre><pre class="lia-code-sample language-bash"><code># pcs status Cluster name: SAP_CLUSTER Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-05 15:34:51 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbnb1 (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Mon Aug 5 15:34:51 2024 * Last change: Mon Aug 5 14:59:59 2024 by root via cibadmin on hdbna1 * 2 nodes configured * 1 resource instance configured Node List: * Online: [ hdbna1 hdbnb1 ] Full List of Resources: * res_fence_sbd (stonith:fence_sbd): Started hdbnb1 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled sbd: active/enabled</code></pre><P>&nbsp;</P><H3 id="toc-hId-626246741">Configuring the cluster to make an SAP solution highly available</H3><P>At this point, the setup of the base cluster is complete.<BR />From here, you can continue with the standard documentation to configure the cluster for one of the supported SAP high availability scenarios. The&nbsp;<A href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_sap_solutions/9/html/red_hat_ha_solutions_for_sap_hana_s4hana_and_netweaver_based_sap_applications/index" target="_blank" rel="noopener nofollow noreferrer">Red Hat HA Solutions for SAP HANA, S/4HANA and NetWeaver based SAP Applications</A>&nbsp;provides references to documentation for implementing the supported scenarios.</P><P>A comprehensive set of documentation for implementing high availability for a range of SAP application scenarios is also available at <A href="https://cloud.ibm.com/docs/sap?topic=sap-ha-overview" target="_blank" rel="noopener nofollow noreferrer">Implementing High Availability for SAP Applications on IBM Power Virtual Server</A>.&nbsp;Although this documentation is written for implementing a high-availability cluster running on IBM Power Virtual Server in the IBM Cloud, the cluster configuration of the SAP application scenarios is the same whether implemented in a cloud or in an on-premises environment. The main difference is the setup of the base cluster.</P><P>The following output shows the final cluster status of an SAP HANA System Replication cluster after following the instructions in&nbsp;<A href="https://cloud.ibm.com/docs/sap?topic=sap-ha-rhel-hana-sr" target="_blank" rel="noopener nofollow noreferrer">Configuring SAP HANA Scale-Up System Replication in a RHEL HA Add-On cluster</A>.</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code># pcs status --full Cluster name: SAP_CLUSTER Status of pacemakerd: 'Pacemaker is running' (last updated 2024-08-06 11:17:53 +02:00) Cluster Summary: * Stack: corosync * Current DC: hdbna1 (1) (version 2.1.5-9.el9_2.4-a3f44794f94) - partition with quorum * Last updated: Tue Aug 6 11:17:54 2024 * Last change: Tue Aug 6 11:17:34 2024 by root via crm_attribute on hdbna1 * 2 nodes configured * 6 resource instances configured Node List: * Node hdbna1 (1): online, feature set 3.16.2 * Node hdbnb1 (2): online, feature set 3.16.2 Full List of Resources: * res_fence_sbd (stonith:fence_sbd): Started hdbna1 * Clone Set: SAPHanaTopology_HDB_00-clone [SAPHanaTopology_HDB_00]: * SAPHanaTopology_HDB_00 (ocf:heartbeat:SAPHanaTopology): Started hdbna1 * SAPHanaTopology_HDB_00 (ocf:heartbeat:SAPHanaTopology): Started hdbnb1 * Clone Set: SAPHana_HDB_00-clone [SAPHana_HDB_00] (promotable): * SAPHana_HDB_00 (ocf:heartbeat:SAPHana): Promoted hdbna1 * SAPHana_HDB_00 (ocf:heartbeat:SAPHana): Unpromoted hdbnb1 * vip_HDB_00 (ocf:heartbeat:IPaddr2): Started hdbna1 Node Attributes: * Node: hdbna1 (1): * hana_hdb_clone_state : PROMOTED * hana_hdb_op_mode : logreplay * hana_hdb_remoteHost : hdbnb1 * hana_hdb_roles : 4:P:master1:master:worker:master * hana_hdb_site : SiteA * hana_hdb_srah : - * hana_hdb_srmode : syncmem * hana_hdb_sync_state : PRIM * hana_hdb_version : 2.00.079.00 * hana_hdb_vhost : hdbna1 * lpa_hdb_lpt : 1722935854 * master-SAPHana_HDB_00 : 150 * Node: hdbnb1 (2): * hana_hdb_clone_state : DEMOTED * hana_hdb_op_mode : logreplay * hana_hdb_remoteHost : hdbna1 * hana_hdb_roles : 4:S:master1:master:worker:master * hana_hdb_site : SiteB * hana_hdb_srah : - * hana_hdb_srmode : syncmem * hana_hdb_sync_state : SOK * hana_hdb_version : 2.00.079.00 * hana_hdb_vhost : hdbnb1 * lpa_hdb_lpt : 30 * master-SAPHana_HDB_00 : 100 Migration Summary: Tickets: PCSD Status: hdbna1: Online hdbnb1: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled sbd: active/enabled</code></pre><P>&nbsp;</P><H3 id="toc-hId-429733236">Summary</H3><P>This blog post describes a sample implementation of a RHEL HA Add-On cluster on IBM Power10 servers using SBD fencing. SBD fencing simplifies the cluster setup and operation and is the recommended fencing method where available.<BR />The resulting basic cluster implementation, combined with the proven reliability of IBM Power, provides the perfect platform for making a wide range of SAP application scenarios highly available.</P> 2024-08-12T07:33:24.938000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/product-updates-for-sap-business-application-studio-august-2024-edition/ba-p/13803499 Product Updates for SAP Business Application Studio – August 2024 Edition 2024-08-28T13:34:25.572000+02:00 BirgitS https://community.sap.com/t5/user/viewprofilepage/user-id/41902 <P><SPAN>Dear SAP Community,</SPAN></P><P><SPAN>Welcome to the August edition of our Product Updates for SAP Business Application Studio! We are excited to share with you the latest updates, enhancements, and new features that are now available.</SPAN></P><P><SPAN>&nbsp;</SPAN></P><P><STRONG>HDI Container Content Management</STRONG></P><P>The SAP HANA tools in SAP Business Application Studio offer a new management UI for <SPAN><A href="https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-developer-guide-for-cloud-foundry-multitarget-applications-sap-business-app-studio/managing-sap-hdi-containers-and-artifacts" target="_blank" rel="noopener noreferrer">HDI container content</A></SPAN>. The HDI container content manager allows deploying, undeploying, and reading content from a bound HDI container service from and to the current dev space.</P><P>The HDI container content manager can be started via the command palette command “SAP HANA: Start HDI Container Content Manager”. On the first screen a user can select the type of operation: deploy, undeploy, or recover.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="HDIContainerContentManagement1.png" style="width: 926px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/158305iE166242C33CB8543/image-size/large?v=v2&amp;px=999" role="button" title="HDIContainerContentManagement1.png" alt="HDIContainerContentManagement1.png" /></span></P><P>In the next screen a database module bound to an HDI container service must be selected. Once a valid module has been selected the state of the dev space is compared to the state of the database. The results are shown in a table:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="HDIContainerContentManagement2.png" style="width: 926px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/158306iB5A707E4B5655592/image-size/large?v=v2&amp;px=999" role="button" title="HDIContainerContentManagement2.png" alt="HDIContainerContentManagement2.png" /></span></P><P>Depending on the chosen mode files can be deployed, undeployed, or recovered into the current dev space. The mode can be changed at any time via the “Mode” dropdown menu.</P><P>Artifact recovery can, for example, be used to implement <SPAN><A href="https://community.sap.com/t5/technology-blogs-by-sap/intermediate-data-previews-on-calculation-views-without-permissions-to/ba-p/13524247" target="_blank">firefighter scenarios</A></SPAN> in production systems where the current state of the database is unclear or difficult to get. The state of the production container can easily be recovered into a dev space and analyzed or debugged by a firefighter user.</P><P>Undeployment of individual files can be helpful when changing stacked database objects. Via the undeployment operation the entire hierarchy of objects can be recursively undeployed from the database and can be rebuilt from the bottom which can be difficult because of revalidation errors if objects are changed incompatibly.</P><P><SPAN>&nbsp;</SPAN></P><P><STRONG><SPAN>HANA Calculation Views in the Storyboard</SPAN></STRONG></P><P><SPAN><A href="https://help.sap.com/docs/bas/developing-business-applications-using-productivity-tools/modeling-calculation-views?q=calculation%20views" target="_blank" rel="noopener noreferrer">Calculation Views</A> allow the definition of complex scenarios based on data available in an SAP HANA database. When working in a full stack application, you can now view the SAP HANA calculation views used in your project from the storyboard. The storyboard shows the connection between the view and the data model on which your service is based. Find here further information about the <A href="https://help.sap.com/docs/bas/developing-business-applications-using-productivity-tools/storyboard" target="_blank" rel="noopener noreferrer">Storyboard and Project Explorer</A>.</SPAN><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="HANACalculationViews.png" style="width: 924px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/158307i2F031843D7DA7F76/image-size/large?v=v2&amp;px=999" role="button" title="HANACalculationViews.png" alt="HANACalculationViews.png" /></span></SPAN></P><P>&nbsp;</P><P><STRONG>Release of UI5 Tooling 4.0</STRONG>&nbsp;</P><P>This new release is packed with key enhancements, primarily focusing on enabling seamless UI5 2.x compatibility for your projects. Additionally, we've introduced a new feature for automatically generating locale information in the ‘manifest.json’, along with important housekeeping updates. We're committed to minimizing upgrade efforts for our developers. Projects currently using UI5 Tooling 3.x are generally expected to seamlessly transition to UI5 Tooling 4.0. Ready to dive into all the details? Head over to this blog post to explore the full scope of new features, improvements, and upgrade guidance:&nbsp;<SPAN><A href="https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578" target="_blank">https://community.sap.com/t5/technology-blogs-by-sap/ui5-tooling-4-0/ba-p/13769578</A></SPAN></P><P>&nbsp;</P><P><STRONG><SPAN>Updated Java version in SAP Business Application Studio </SPAN></STRONG></P><P><SPAN>To keep SAP Business Application Studio updated with industry standards we want to be aligned with the most recent Java LTS and formally support it. Thus, the default Java version of SAP Business Application Studio was updated to <A href="https://sap.github.io/SapMachine/latest/21" target="_self" rel="nofollow noopener noreferrer">Java 21</A>. All Java extensions were also updated to the latest version. As a Java developer you have the option to choose the Java version, using the ASDF version manager. This allows you to choose the Java version best suited for your purposes.</SPAN></P><P><STRONG><SPAN>&nbsp;</SPAN></STRONG></P><P>For further information on new features, please have a look at the “<SPAN><A href="https://help.sap.com/docs/SAP%20Business%20Application%20Studio/9d1db9835307451daa8c930fbd9ab264/ed631d4ee2214e9f932b03d40b2c7e41.html" target="_blank" rel="noopener noreferrer">What’s new</A></SPAN>” information for SAP Business Application Studio and check our <SPAN><A href="https://roadmaps.sap.com/board?PRODUCT=67837800100800007077&amp;range=2024Q1-2024Q4#Q1%202024" target="_blank" rel="noopener noreferrer">roadmap</A></SPAN><STRONG>. </STRONG><STRONG>If you want to stay up-to-date with news, learning resources, and product and strategy updates:&nbsp;</STRONG>follow our&nbsp;<SPAN><A href="https://blogs.sap.com/tags/67837800100800007077/" target="_blank" rel="noopener noreferrer">tag</A></SPAN>.</P><P>We look forward to seeing how you use these new capabilities to create innovative solutions and drive your projects forward. Stay tuned for more updates and happy coding! <span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></P> 2024-08-28T13:34:25.572000+02:00 https://community.sap.com/t5/application-development-blog-posts/using-amdp-in-badi-implementation-in-sap/ba-p/13800351 Using AMDP in BADI implementation in SAP 2024-08-30T12:19:21.164000+02:00 sowjanya_hr https://community.sap.com/t5/user/viewprofilepage/user-id/150944 <H3 id="toc-hId-1172341432"><STRONG>Introduction to AMDP in Business add in: Revolutionizing ABAP Development</STRONG></H3><P>As businesses move towards SAP HANA, leveraging its in-memory computing capabilities becomes essential for developing efficient and high-performing applications. One of the critical tools in this journey is the ABAP Managed Database Procedures (AMDP). When combined with Business Add-Ins , AMDP provides a powerful way to customize and enhance SAP applications, especially when performance is a concern. In this blog, we'll dive into what AMDP is, how it can be used within Business Add-Ins, and the benefits it brings to the table.</P><P><STRONG><SPAN>What is a Business Add-Ins?</SPAN></STRONG><SPAN>&nbsp;</SPAN></P><P><SPAN>Business Add-Ins (Business Add-Ins) are SAP's standard mechanism for extending the functionality of SAP applications without modifying the original code. Business Add-Ins provide predefined hooks or enhancement spots where custom code can be inserted. This makes Business Add-Ins a powerful tool for customizations in SAP.</SPAN><SPAN>&nbsp;</SPAN></P><P><STRONG><SPAN>Combining AMDP with Business Add-Ins: Why and When?</SPAN></STRONG><SPAN>&nbsp;</SPAN></P><P><SPAN>When implementing Business Add-Ins, the custom logic traditionally runs on the ABAP application server, which might not fully exploit the capabilities of SAP HANA. However, by integrating AMDPs within a Business Add-Ins, you can move resource-intensive operations to the database level. This is particularly useful for scenarios where the custom logic involves complex data retrieval, aggregation, or transformation, as these operations are executed much faster on the HANA database.</SPAN><SPAN>&nbsp;</SPAN></P><P><SPAN>&nbsp;</SPAN><SPAN>&nbsp;</SPAN><STRONG><SPAN>Benefits of Using AMDP in Business Add-Ins</SPAN></STRONG><SPAN>&nbsp;</SPAN></P><OL><LI><STRONG><SPAN>Performance</SPAN></STRONG><SPAN>: By offloading data-intensive operations to the HANA database, you can significantly reduce the time taken to execute these operations, especially on large datasets.</SPAN><SPAN>&nbsp;</SPAN></LI></OL><OL><LI><STRONG><SPAN>Efficiency</SPAN></STRONG><SPAN>: AMDP enables you to write optimized database-specific logic , which is more efficient than executing equivalent logic on the application server.</SPAN><SPAN>&nbsp;</SPAN></LI></OL><OL><LI><STRONG><SPAN>Scalability</SPAN></STRONG><SPAN>: As your data volume grows, AMDP-based solutions can scale more effectively because they leverage the power of in-memory processing directly on the database.</SPAN><SPAN>&nbsp;</SPAN></LI></OL><OL><LI><STRONG><SPAN>Maintenance</SPAN></STRONG><SPAN>: AMDPs can reduce the complexity of ABAP code by delegating heavy data processing tasks to the database level, making the ABAP codebase cleaner and easier to maintain.</SPAN><SPAN>&nbsp;</SPAN></LI></OL><P><STRONG><SPAN>Best Practices</SPAN></STRONG><SPAN>&nbsp;</SPAN></P><UL><LI><STRONG><SPAN>Use Read-Only AMDPs</SPAN></STRONG><SPAN>: Ensure that your AMDP methods are marked as read-only unless you specifically need to update the database. This reduces the risk of unintended side effects and enhances performance.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><STRONG><SPAN>Error Handling</SPAN></STRONG><SPAN>: Implement robust error handling in your AMDP methods to handle any database-related issues gracefully.</SPAN><SPAN>&nbsp;</SPAN></LI><LI><STRONG><SPAN>Testing</SPAN></STRONG><SPAN>: Thoroughly test your AMDP logic with different data volumes to ensure that it performs as expected under various scenarios.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><STRONG><SPAN class=""><SPAN class="">There are some rules if a&nbsp;Business Add-Ins is marked as AMDP</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></STRONG></P><UL><LI><SPAN>&nbsp;It doesn't support any filter values.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>It’s mandatory to assign a fallback class</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>All AMDP&nbsp;Business Add-Ins method must implemented AMDP procedure with same database system</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>AMDP enabled BADI can be instantiated and called like general Business Add-Ins GET BADI and CALL BADI</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN><STRONG><SPAN class=""><SPAN class="">Now we will see the practical things how to use BADI in AMDP</SPAN></SPAN></STRONG><SPAN class="">&nbsp;</SPAN></SPAN></P><P><SPAN>1.Create a enhancement spot in se18 T-code</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_0-1724141233011.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154456i8154340E3FC7BC45/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_0-1724141233011.png" alt="sowjanya_hr_0-1724141233011.png" /></span></P><P><SPAN>2.Create BADI Definition for the Enhance spot.</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_1-1724141233013.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154455i966645EDA774B0E3/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_1-1724141233013.png" alt="sowjanya_hr_1-1724141233013.png" /></span></P><P>&nbsp;</P><P><SPAN>3.Once you created Business Add-Ins definition click on the AMDP Business Add-Ins checkbox</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_2-1724141233015.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154457iE5513D759466C0F2/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_2-1724141233015.png" alt="sowjanya_hr_2-1724141233015.png" /></span></P><P><SPAN>4.Create Interface for that BADI</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_3-1724141233017.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154460iF620DF072E014418/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_3-1724141233017.png" alt="sowjanya_hr_3-1724141233017.png" /></span></P><P><SPAN>5.Once you created interface go to source code-Based</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_4-1724141233018.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154458i90C7600CD9ED956C/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_4-1724141233018.png" alt="sowjanya_hr_4-1724141233018.png" /></span></P><P>&nbsp;</P><P><SPAN>6.There provide ID_AMDP_MARKER_HDB</SPAN><SPAN>&nbsp;interfaces and declare the method&nbsp; and activate it.</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_5-1724141233019.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154459iF213511FDD453D13/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_5-1724141233019.png" alt="sowjanya_hr_5-1724141233019.png" /></span></P><P>&nbsp;</P><P><SPAN>7.We have to create the Fallback class if you didn’t create the fallback class it will gives the error</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_6-1724141233021.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154462iA258EE4C237929FB/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_6-1724141233021.png" alt="sowjanya_hr_6-1724141233021.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_7-1724141233023.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154463i37FCC79BF5E4536E/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_7-1724141233023.png" alt="sowjanya_hr_7-1724141233023.png" /></span></P><P><SPAN>8.Copy the fallback class name now go to eclipse by providing alt+f8 we can find the fallback class in eclipse&nbsp;</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_8-1724141233024.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154461i088B8852FFD07954/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_8-1724141233024.png" alt="sowjanya_hr_8-1724141233024.png" /></span></P><P><SPAN>9.Provide the implementation to the fallback class</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_9-1724141233025.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154464i0D4408F683EED5A6/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_9-1724141233025.png" alt="sowjanya_hr_9-1724141233025.png" /></span></P><P>&nbsp;</P><P><SPAN>10.Now we can activate the&nbsp;<SPAN class="">Business Add-Ins</SPAN></SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_10-1724141233027.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154465iCF270070105D5AD2/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_10-1724141233027.png" alt="sowjanya_hr_10-1724141233027.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_11-1724141233029.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154466i963D382F20FDDF4A/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_11-1724141233029.png" alt="sowjanya_hr_11-1724141233029.png" /></span></P><P><SPAN>11.To call the&nbsp;<SPAN class="">Business Add-Ins</SPAN>&nbsp;we have to create one more ABAP class in eclipse.</SPAN><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_12-1724141446391.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154470i6F422E6E405EB968/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_12-1724141446391.png" alt="sowjanya_hr_12-1724141446391.png" /></span></P><UL><LI><SPAN>We have to use&nbsp;<SPAN class="">Business Add-Ins</SPAN><SPAN class="">?</SPAN> definition name while calling the method&nbsp;</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_13-1724141446393.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154468iFF9D300FA23A110F/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_13-1724141446393.png" alt="sowjanya_hr_13-1724141446393.png" /></span></P><P><SPAN>12.Now create a report program </SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_14-1724141446394.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154469iABF75E0CAD9CBD84/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_14-1724141446394.png" alt="sowjanya_hr_14-1724141446394.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowjanya_hr_15-1724141446398.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/154471i5269F887ABCB2A02/image-size/large?v=v2&amp;px=999" role="button" title="sowjanya_hr_15-1724141446398.png" alt="sowjanya_hr_15-1724141446398.png" /></span></P><P><STRONG>Refer the code Below</STRONG><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-abap"><code>class ZSH_AMDP_FALLBACK_FLIGHTS1 definition public final create public . public section. interfaces IF_AMDP_MARKER_HDB . interfaces IF_BADI_INTERFACE . interfaces ZSH_IF_FLIGHT_DETAILS1 . protected section. private section. ENDCLASS. CLASS ZSH_AMDP_FALLBACK_FLIGHTS1 IMPLEMENTATION. METHOD ZSH_IF_FLIGHT_DETAILS1~fetch_data by DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY USING sflight. et_flight = SELECT * FROM sflight WHERE carrid = iv_carrid; ENDMETHOD. ENDCLASS. CLASS zsh_cl_amdp_badi1 DEFINITION PUBLIC FINAL CREATE PUBLIC . PUBLIC SECTION. INTERFACES : if_amdp_marker_hdb. METHODS : execute IMPORTING VALUE(iv_carrid) TYPE sflight-carrid EXPORTING VALUE(et_flight) TYPE flighttab. PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. CLASS zsh_cl_amdp_badi1 IMPLEMENTATION. METHOD execute BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT OPTIONS READ-ONLY USING ZSH_BADI_DEF_FLIGHT1=&gt;FETCH_DATA. CALL "ZSH_BADI_DEF_FLIGHT1=&gt;FETCH_DATA"(iv_carrid =&gt; :iv_carrid , et_flight =&gt; :et_flight); ENDMETHOD. ENDCLASS. REPORT ZSH_RP_AMDP_BADI1. DATA(lo_obj) = new zsh_cl_amdp_badi1( ). lo_obj-&gt;execute( EXPORTING iv_carrid = 'AA' IMPORTING et_flight = DATA(lt_flight) ). cl_demo_output=&gt;display( lt_flight ). </code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P><STRONG><SPAN class="">Why AMDP Business Add-Ins?&nbsp;</SPAN></STRONG></P><UL><LI><SPAN>AMDP Business Add-Ins are used to execute calls of AMDP&nbsp; procedures from AMDP procedure with enhancement concept.</SPAN><SPAN>&nbsp;</SPAN></LI><LI><SPAN>When you created a BADI inside that Business Add-Ins you have one normal method when you implemented the&nbsp;Business Add-Ins the normal method gets implemented</SPAN><SPAN>&nbsp;</SPAN></LI><LI><SPAN>In case of AMDP Business Add-Ins inside that&nbsp;Business Add-Ins AMDP method will be there instead of normal method.</SPAN><SPAN>&nbsp;</SPAN>So that whenever you implemented the&nbsp;Business Add-Ins AMDP method gets implemented<SPAN>&nbsp;.</SPAN></LI></UL><P><STRONG><SPAN><SPAN class="">Purpose&nbsp; Of AMDP Business Add-Ins</SPAN><SPAN class="">&nbsp;</SPAN></SPAN></STRONG></P><UL><LI><SPAN>To give a full flexibility to the users to&nbsp; implement the AMDP method the way he wants. So as of now when you created AMDP your defining your method also implementing your method inside a AMDP</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>When you create AMDP enhancement you will be creating or defining AMDP method however you will be giving full flexibility to the user.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P><SPAN>&nbsp;</SPAN></P> 2024-08-30T12:19:21.164000+02:00 https://community.sap.com/t5/technology-blogs-by-members/side-effects-in-fiori-triggering-actions-and-updating-data-in-your/ba-p/13851571 Side Effects in Fiori: Triggering Actions and Updating Data in Your Unmanaged RAP Application 2024-09-02T15:28:04.052000+02:00 VarunVarshney https://community.sap.com/t5/user/viewprofilepage/user-id/168367 <H4 id="toc-hId-1306073531">Understanding Side Effects</H4><P><STRONG>Side Effects</STRONG> refer to system behaviors where a user’s action, such as modifying a field or performing a specific task, triggers changes in other parts of the user interface. For instance, updating a field might automatically adjust related fields or data sections. These changes are crucial for maintaining data consistency and ensuring that the user interface reflects the latest information.</P><TABLE width="524"><TBODY><TR><TD width="259.562px" height="30px">User Action</TD><TD width="263.638px" height="30px">Side Effect</TD></TR><TR><TD width="259.562px" height="139px">Triggering an Action</TD><TD width="263.638px" height="139px">After executing an action successfully, the collection for which the action is defined is refreshed automatically if the following conditions apply:</TD></TR><TR><TD width="259.562px" height="30px">1. The action is a bound action.</TD></TR><TR><TD width="259.562px" height="85px">2. The returned instance does not correspond to the bound instance. For example, copy actions.</TD></TR></TBODY></TABLE><P>In scenarios where side effects are not natively supported by the RAP layer, we can achieve similar functionality through Fiori annotations. Specifically, side effects can be implemented through action triggers and subsequent data refreshes in the Fiori layer.</P><H4 id="toc-hId-1109560026">Scenario Overview: Redetermine All Quotations</H4><P>Consider a scenario where you have a button labeled <STRONG>"Redetermine All Quotations"</STRONG>. Upon clicking this button, multiple columns in the item table are updated. For the purpose of this demonstration, we will focus on two key columns that are updated: <STRONG>Ref. Quotation</STRONG> and <STRONG>Quotation Items</STRONG>. The goal is to ensure that these updates are reflected immediately in the Fiori application without requiring manual refreshes.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarunVarshney_3-1725282735513.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161002i218169061311F710/image-size/medium?v=v2&amp;px=400" role="button" title="VarunVarshney_3-1725282735513.png" alt="VarunVarshney_3-1725282735513.png" /></span></P><P>&nbsp;</P><H4 id="toc-hId-913046521">Implementing Side Effects with Fiori Annotations</H4><P>To address the requirement of real-time data updates, follow these steps:</P><OL><LI><P><STRONG>Open the Fiori Project in BAS</STRONG>: Navigate to the annotation.xml file within your Fiori project. This file initially displays the EDMX (Entity Data Model XML) structure.</P></LI><LI><P><STRONG>Add the Required Annotations</STRONG>: Insert the following code snippet into the annotation.xml file to configure side effects for your application. This annotation will ensure that the relevant data is refreshed automatically after executing an action.</P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarunVarshney_0-1725283489852.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161007i29223B982D5D5CDC/image-size/medium?v=v2&amp;px=400" role="button" title="VarunVarshney_0-1725283489852.png" alt="VarunVarshney_0-1725283489852.png" /></span><P>&nbsp;</P><P><BR />&lt;edmx:Edmx xmlns:edmx="<A href="http://docs.oasis-open.org/odata/ns/edmx" target="_blank" rel="noopener nofollow noreferrer">http://docs.oasis-open.org/odata/ns/edmx</A>" Version="4.0"&gt;<BR />&lt;edmx:Reference Uri="<A href="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml" target="_blank" rel="noopener nofollow noreferrer">https://sap.github.io/odata-vocabularies/vocabularies/Common.xml</A>"&gt;<BR />&lt;edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/&gt;<BR />&lt;/edmx:Reference&gt;<BR />&lt;edmx:Reference Uri="<A href="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml" target="_blank" rel="noopener nofollow noreferrer">https://sap.github.io/odata-vocabularies/vocabularies/UI.xml</A>"&gt;<BR />&lt;edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/&gt;<BR />&lt;/edmx:Reference&gt;<BR />&lt;edmx:Reference Uri="<A href="https://sap.github.io/odata-vocabularies/vocabularies/Communication.xml" target="_blank" rel="noopener nofollow noreferrer">https://sap.github.io/odata-vocabularies/vocabularies/Communication.xml</A>"&gt;<BR />&lt;edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/&gt;<BR />&lt;/edmx:Reference&gt;<BR />&lt;edmx:Reference Uri="/sap/opu/odata/sap/ZUI_DRAFT_SALES_ORDERS/$metadata"&gt;<BR />&lt;edmx:Include Namespace="cds_zui_draft_orders"/&gt;<BR />&lt;/edmx:Reference&gt;<BR />&lt;edmx:DataServices&gt;<BR />&lt;Schema xmlns="<A href="http://docs.oasis-open.org/odata/ns/edm" target="_blank" rel="noopener nofollow noreferrer">http://docs.oasis-open.org/odata/ns/edm</A>" Namespace="local"&gt;<BR />&lt;Annotations Target="cds_zui_draft_orders.cds_zui_draft_orders_Entities/Refresh_items"&gt;<BR />&lt;Annotation Term="Common.SideEffects"&gt;<BR />&lt;Record Type="Common.SideEffectsType"&gt;<BR />&lt;PropertyValue Property="TargetEntities"&gt;<BR />&lt;Collection&gt;<BR />&lt;NavigationPropertyPath&gt;_it/to_items&lt;/NavigationPropertyPath&gt;<BR />&lt;/Collection&gt;<BR />&lt;/PropertyValue&gt;<BR />&lt;/Record&gt;<BR />&lt;/Annotation&gt;<BR />&lt;/Annotations&gt;<BR />&lt;/Schema&gt;<BR />&lt;/edmx:DataServices&gt;<BR />&lt;/edmx:Edmx&gt;</P></LI><LI><P><STRONG>Test the Implementation</STRONG>: After updating the annotation file, return to the Fiori application. Open the developer tools and navigate to the network tab. Click the <STRONG>"Redetermine All Quotations"</STRONG> button, which triggers the action with the technical name refresh_items. You will observe a POST call for the action and a subsequent GET call to refresh the entire entity set of items as defined in the annotation.</P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarunVarshney_0-1725282652813.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/160998i815406E9EBDF881F/image-size/medium?v=v2&amp;px=400" role="button" title="VarunVarshney_0-1725282652813.png" alt="VarunVarshney_0-1725282652813.png" /></span><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarunVarshney_1-1725282682419.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161000i711DC0D03961DA79/image-size/medium?v=v2&amp;px=400" role="button" title="VarunVarshney_1-1725282682419.png" alt="VarunVarshney_1-1725282682419.png" /></span><P>&nbsp;</P></LI><LI><P><STRONG>Verify Data Update</STRONG>: Check the data section of the items. You should see the updated values reflected immediately without the need for a manual refresh.</P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VarunVarshney_2-1725282710031.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161001iF1641086A71E15E3/image-size/medium?v=v2&amp;px=400" role="button" title="VarunVarshney_2-1725282710031.png" alt="VarunVarshney_2-1725282710031.png" /></span><H4 id="toc-hId-716533016">Conclusion</H4><P>By leveraging Fiori annotations to implement side effects and action triggers, you can ensure that your unmanaged RAP application remains responsive and up-to-date. This approach effectively addresses the limitations of the RAP layer and enhances the overall user experience by maintaining data consistency in real-time.<BR />Feel free to share your comments and feedback. This approach is designed to keep your data up-to-date in real-time, ensuring a smooth and dynamic experience for your users.</P></LI></OL> 2024-09-02T15:28:04.052000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/how-metadata-enrichment-can-enhance-sap-hana-cloud-vector-engine-on-genai/ba-p/13662543 How Metadata Enrichment can enhance SAP HANA Cloud Vector Engine on GenAI scenarios 2024-09-03T10:28:05.554000+02:00 DKK https://community.sap.com/t5/user/viewprofilepage/user-id/131035 <P><STRONG>Introduction</STRONG></P><P>In the ever-evolving landscape of data-driven businesses, the need for intelligent data applications that can process and analyse vast amounts of data accurately and rapidly has never been more critical. There are already several interesting SAP Blogs regarding the SAP HANA Cloud Vector Engine and Langchain on our community page, such as&nbsp;&nbsp;<A title="HANA Vector Engine and LangChain" href="https://community.sap.com/t5/technology-blogs-by-sap/hana-vector-engine-and-langchain/ba-p/13636959" target="_blank">HANA Vector Engine and LangChain</A>&nbsp;,&nbsp;<A title="SAP HANA Cloud's Vector Engine Announcement" href="https://community.sap.com/t5/technology-blogs-by-sap/sap-hana-cloud-s-vector-engine-announcement/ba-p/13577010" target="_blank">SAP HANA Cloud's Vector Engine Announcement</A>&nbsp;,&nbsp;<A title="Vectorize your Data : SAP HANA Cloud's Vector Engine for Unified Data Excellence" href="https://community.sap.com/t5/technology-blogs-by-sap/vectorize-your-data-sap-hana-cloud-s-vector-engine-for-unified-data/ba-p/13579558" target="_self">Vectorize your Data : SAP HANA Cloud's Vector Engine for Unified Data Excellence</A>&nbsp;,&nbsp;<A title="First steps using the Hana Vector Engine with SAP GEN AI" href="https://community.sap.com/t5/technology-blogs-by-sap/first-steps-using-the-hana-vector-engine-with-sap-gen-ai/ba-p/13649384" target="_self">First steps using the Hana Vector Engine with SAP GEN AI</A>&nbsp; and more. On this blog we will focus on how Metadata Enrichment and the SAP HANA Vector Engine, can improve the performance&nbsp;of Retrieval-Augmented Generation (RAG for short) scenarios.There are multiple ways by which we can leverage metadata enrichment into RAG scenarios, but for the purposes of the present case we will employ the <A href="https://python.langchain.com/docs/integrations/document_transformers/openai_metadata_tagger/" target="_self" rel="nofollow noopener noreferrer">OpenAi Metadata Tagger</A>.</P><P><STRONG>Why do I need Metadata Enrichment?</STRONG></P><P>Metadata enrichment can significantly enhance Retriever-Augmented Generation (RAG) scenarios by providing additional, contextual information that helps in more accurate and relevant document retrieval. This information can include basic information such as the document title and page from which the information was retrieved but can also be extended to host even additional information, such as sentiment of the text chunk, topics discussed, summaries etc. By enhancing the documents with additional metadata the retriever's performance can be improved as these additional information can provide search handles and contextual cues that aid the retriever in finding more accurate matches from the corpus.</P><P>However, in real-life applications, several documents may need to be processed and undergoing the metadata enrichment task manually can be&nbsp;tedious and time consuming task. Nevertheless,&nbsp;by means of GenAI-based document transformers, we can streamline the metadata extraction process.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="tagger1.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99870iB76CF8EFE9E5221A/image-size/large?v=v2&amp;px=999" role="button" title="tagger1.png" alt="tagger1.png" /></span></P><P><STRONG>The benefits of Metadata Enrichments via a Business Example</STRONG></P><P>In today's digital era, online platforms have become a prominent marketplace for a plethora of products, attracting millions of consumers worldwide. Consequently, these platforms are overwhelmed with customer reviews, which are pivotal for businesses to assess customer satisfaction and product performance.<BR />However, manually analysing these reviews can be work-intensive and time-consuming. This is where sentiment analysis, comes into play.</P><P>Sentiment analysis, also known as opinion mining, refers to the use of text analysis, computational linguistics, and machine learning to identify and extract subjective information from source materials. In the context of online marketplaces, this means gauging customer sentiment towards products or services based on their reviews.</P><P><STRONG>Business Cases for Sentiment Analysis of Customer Reviews</STRONG></P><OL><LI><STRONG>Enhancing Customer Experience:</STRONG> The primary objective of any business is to meet and exceed customer expectations. By analysing customer sentiment, companies can gain insights into what customers like or dislike about their products or services. This knowledge can be leveraged to improve product offerings and enhance customer experience, leading to higher customer retention and increased sales.</LI><LI><STRONG>Competitive Advantage:</STRONG> By keeping an eye on the reviews of competitor products, businesses can identify their strengths and weaknesses. Sentiment analysis can provide a competitive advantage by helping firms understand areas where they can differentiate themselves.</LI><LI><STRONG>Reputation Management:</STRONG> Negative reviews can tarnish a company's reputation and affect its bottom line. Sentiment analysis allows for real-time monitoring of reviews, enabling companies to promptly respond to negative feedback and manage their online reputation effectively.</LI><LI><STRONG>Forecasting and Strategic Planning:</STRONG> Sentiment analysis can be used to predict future sales trends based on customer sentiment. This information can be invaluable for strategic planning, inventory management, and decision-making.</LI></OL><P>As already highlighted, sentiment analysis can bring significant value to modern enterprises, however to render those insights meaningful and actionable from a business perspective, more services (such as systems integration, automation or data and analytics) may often be required, For this reason, on this blog we will also discuss how and which services from the SAP Business Technology Platform (BTP) can help us bridge this gap.</P><P><STRONG>Demo</STRONG></P><P>On our scenario, we decided to analyse the category "All Beauty" from the&nbsp;<A title="Amazon Reviews 2023" href="https://amazon-reviews-2023.github.io/" target="_self" rel="nofollow noopener noreferrer">Amazon Reviews 2023</A>&nbsp;. We merged the two available DataSets , Reviews and Product Description, in one. The initial Datasets were few hundreds megabytes in size and provided with Json format. Using the Pandas library and SAP HANA ML API we can effectively process these data and load them in HANA through and easy to use pythonic interface.</P><P>&nbsp;</P><pre class="lia-code-sample language-python"><code>##Connect to SAP HANA ##Read JSON and ##Load data to HANA in Batches import pandas as pd file_path=r'./All_Beauty.jsonl' jsonObj = pd.read_json(path_or_buf=file_path, lines=True, chunksize=1000) with pd.read_json(path_or_buf=file_path, lines=True, chunksize=10) as reader: for i, chunk in enumerate(reader): print(chunk) print(type(chunk)) break chunk.columns = map(str.upper, chunk.columns) display(chunk) chunk["TITLE_WITH_TEXT"] = chunk["TITLE"] + chunk["TEXT"] chunk['SMALL_IMAGES']=chunk['IMAGES'].apply(lambda x: ', '.join([d['small_image_url'] for d in x])) chunk['LARGE_IMAGES']=chunk['IMAGES'].apply(lambda x: ', '.join([d['large_image_url'] for d in x])) chunk = chunk.drop(['IMAGES'], axis=1) display(chunk) print(chunk.dtypes) if i==0: dataframe.create_dataframe_from_pandas( cc, chunk, chunk.iloc[:, [0,1, 2, 3]], table_name='XXXXXX', schema=os.environ['HANA_UNAME'], force=True, replace=True, object_type_as_bin=False, table_structure={ "RATING": "INTEGER", "TITLE_WITH_TEXT": "NCLOB", "TITLE": "NVARCHAR(3000)", "TEXT": "NVARCHAR(5000)", "SMALL_IMAGES": "NVARCHAR(2000)", "LARGE_IMAGES": "NVARCHAR(2000)", "ASIN": "NVARCHAR(150)", "PARENT_ASIN": "NVARCHAR(150)", "USER_ID": "NVARCHAR(150)", "TIMESTAMP": "TIMESTAMP", "HELPFUL_VOTE": "INTEGER", "VERIFIED_PURCHASE": "INTEGER", }, drop_exist_tab=True, allow_bigint=False, geo_cols: list = None, srid: int = 4326, primary_key: str = None, not_nulls: list = None, chunk_size=50000, disable_progressbar=False, upsert=False, append=False ) else: dataframe.create_dataframe_from_pandas( cc, chunk, table_name='XXXXXX', schema=os.environ['HANA_UNAME'], force=False, replace=False, object_type_as_bin=False, table_structure={ "RATING": "INTEGER", "TITLE_WITH_TEXT": "NCLOB", "TITLE": "NVARCHAR(3000)", "TEXT": "NVARCHAR(5000)", "SMALL_IMAGES": "NVARCHAR(2000)", "LARGE_IMAGES": "NVARCHAR(2000)", "ASIN": "NVARCHAR(150)", "PARENT_ASIN": "NVARCHAR(150)", "USER_ID": "NVARCHAR(150)", "TIMESTAMP": "TIMESTAMP", "HELPFUL_VOTE": "INTEGER", "VERIFIED_PURCHASE": "INTEGER", }, drop_exist_tab=False, allow_bigint=False, geo_cols: list = None, srid: int = 4326, primary_key: str = None, not_nulls: list = None, chunk_size=50000, disable_progressbar=False, upsert=False, append=True ) if i == 50: break</code></pre><P>&nbsp;</P><P>As it is very often the case where useful information as per the customer’s sentiment is split among the title and the main context of the review, to leverage the information of both,&nbsp;we combined them into a single column as described below. Furthermore, the product name has been added. (sample code on the above python code).</P><P><SPAN><STRONG>Final Dataset</STRONG>&nbsp;</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="init_dataset.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/99820iF698E5C3C925F39B/image-size/large?v=v2&amp;px=999" role="button" title="init_dataset.png" alt="init_dataset.png" /></span></P><P>At this point we are ready to proceed with our metadata enrichment. For the needs of this study, we decided to use the <STRONG>Metadata Schema</STRONG> outlined below. We can extend our Metadata Schema upon on our needs , for example, we can add the Sentiment of the reviewer regarding the Supplier and more.</P><P>&nbsp;</P><pre class="lia-code-sample language-python"><code> 'SENTIMENT': { 'type': 'string', "description": "The sentiment of the user's review for the product they used", "enum": ["super positive", "positive", "neutral", "negative", "super negative"] }, 'PRODUCT': { 'type': 'string', "description": "The product for which the review is about", }, "ISSUE_TYPE": { "type": "string", "description": "A short description up to 3 words that outline the issue the reviewer is describing", }, "PRICING": { "type": "string", "description": "How the user feels about the pricing of the product", "enum": ["Value for money", "Fair", "Overpriced"] }, "SHIPPING_ISSUE": { "type": "string", "description": "A tag representing whether the reviewer was happy with delivery and shipping services or not", "enum": ["Overly Satisfied", "Satisfied", "Ok", "Not Satisfied", "Not Delivered"] }</code></pre><P>&nbsp;</P><P>With such a metadata schema, and for every review available in our Dataset, we can obtain useful <STRONG>Additional Information</STRONG> regarding :</P><UL><LI><STRONG>User's (overall) Review</STRONG> ("super positive", "positive", "neutral", "negative", "super negative")</LI><LI><STRONG>Product</STRONG> (The product for which the review is about)</LI><LI><STRONG>Issue Type</STRONG> (A short description up to 3 words that outline the issue the reviewer is describing)</LI><LI><STRONG>Pricing</STRONG>&nbsp;Sentiment ("Value for money", "Fair", "Overpriced")</LI><LI><STRONG>Shipping Issue</STRONG> ("Overly Satisfied", "Satisfied", "Ok", "Not Satisfied", "Not Delivered")</LI></UL><P><STRONG>For example,</STRONG></P><P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="md1.png" style="width: 970px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101211i59BC479F8D45AF99/image-size/large?v=v2&amp;px=999" role="button" title="md1.png" alt="md1.png" /></span></STRONG></P><P>With&nbsp;this information now being available and for any&nbsp;new customer inquiry we may receive, we can use the similarity retrieval capabilities of SAP HANA CLOUD Vector Engine to provide improved recommendations based our previous customers reviews for similar products.</P><P><STRONG><STRONG>Example</STRONG></STRONG></P><P>Since, we have completed all the previous steps, we are ready to navigate through the Data. Let's assume that we would like to see which products are good gifts for women. Furthermore, we would like to know based on their price, which ones have been reviewed as&nbsp; "Value for Money" or "Overpriced".</P><P>Using the below python code , we can easily run all the three above mentioned scenarios.</P><P>&nbsp;</P><pre class="lia-code-sample language-python"><code># ### Retrieve Documents from HANA # Create a retriever instance of the vector store retriever = db.as_retriever() from langchain.prompts import PromptTemplate prompt_template = """ You are an expert in answering questions. You are provided multiple context items that are related to the prompt you have to answer. Use the following pieces of context to answer the question at the end. ``` {context} ``` Question: {question} """ PROMPT = PromptTemplate( template=prompt_template, input_variables=["context", "question"] ) chain_type_kwargs = {"prompt": PROMPT} from langchain.chains import ConversationalRetrievalChain from langchain.memory import ConversationBufferMemory memory = ConversationBufferMemory( memory_key="chat_history", output_key="answer", return_messages=True ) qa_chain = ConversationalRetrievalChain.from_llm( llm4, db.as_retriever(search_kwargs={"k": 5, "filter":{"SENTIMENT": "positive"}}),#,"PRICING": "Overpriced"}}), return_source_documents=True, memory=memory, verbose=False, combine_docs_chain_kwargs={"prompt": PROMPT}, ) question = "What is suitable gift for women?" result = qa_chain.invoke({"question": question}) print("Answer from LLM:") print("================") print(result["answer"]) source_docs = result["source_documents"] print("================") print(f"Number of used source document chunks: {len(source_docs)}") for doc in source_docs: print("-" * 80) print(doc.page_content) print(doc.metadata)</code></pre><P>&nbsp;</P><P><STRONG>Outcome of the 1st scenario based on:</STRONG></P><UL><LI>Question = "What is suitable gift for women?" &nbsp;</LI><LI>LLM Template =&nbsp;You are an expert in answering questions. You are provided multiple context items that are related to the prompt you have to answer. Use the following pieces of context to answer the question at the end.</LI><LI>Using = gpt-4-32k</LI><LI><EM><SPAN class=""><SPAN class="">Distance Strategy = Cosine (for the top 5 ones)</SPAN></SPAN></EM></LI><LI><EM><SPAN class=""><SPAN class="">Metadata Filter&nbsp; :&nbsp;"SENTIMENT": "positive"</SPAN></SPAN></EM></LI></UL><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>Answer from LLM: ================ Based on the provided context, suitable gifts for women could include the following options: 1. Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar: This necklace has received positive reviews and has been given as a gift multiple times, with recipients loving it. 2. Best Women Lady Retro Vintage Owl Leather Small Wallet Hasp Purse Clutch Bag: This small wallet has received a five-star review and has been described as a great gift. 3. Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil: This bath bomb gift set has received a five-star review and was loved by the recipient. It is described as suitable for ladies, women, and girlfriends. Overall, jewelry, wallets, and bath bomb gift sets are suitable gift options for women based on the provided context. ================ Number of used source document chunks: 5 -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Five Stars . A gift given by request. {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': '', 'PRICING': '', 'SHIPPING_ISSUE': '', 'RID': 495, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'A gift given by request.', 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AFRFALZIA47O27PD4DKAIEDXIHAQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . A gift given by request.', 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Best Women Lady Retro Vintage Owl Leather Small Wallet Hasp Purse Clutch Bag and Review : Five Stars . great gift {'SENTIMENT': 'positive', 'PRODUCT': 'Best Women Lady Retro Vintage Owl Leather Small Wallet Hasp Purse Clutch Bag', 'ISSUE_TYPE': '', 'PRICING': '', 'SHIPPING_ISSUE': '', 'RID': 12038, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'great gift', 'ASIN': 'B01J9A0LE6', 'PARENT_ASIN': 'B01J9A0LE6', 'USER_ID': 'AEDAAVKRWCWUKLJK7VQUOOGPWC5Q', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . great gift', 'TITLE_PRD': 'Best Women Lady Retro Vintage Owl Leather Small Wallet Hasp Purse Clutch Bag'} -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Necklace . Bought this for a gift and she loved it. {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'None', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 2270, 'RATING': 3, 'TITLE': 'Necklace', 'TEXT': 'Bought this for a gift and she loved it.', 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AGBMHZT2QAQX5NPQVY3K4373QL3Q', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Necklace . Bought this for a gift and she loved it.', 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Nice Gift . Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price! {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'Shipping', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Not Satisfied', 'RID': 403, 'RATING': 4, 'TITLE': 'Nice Gift', 'TEXT': "Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price!", 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AHB5MSCRBLE7Q2W32DSRUO63TKGQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': "Nice Gift . Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price!", 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil - Dry Skin Moisturize, Fit for Bubble &amp; Spa Bath, Handmade Birthday Gift Ideal for Lady, Women, Girlfriend, Men and Review : Five Stars . She loved them! {'SENTIMENT': 'positive', 'PRODUCT': 'Webat Bath Bombs Gift Set', 'ISSUE_TYPE': '', 'PRICING': '', 'SHIPPING_ISSUE': '', 'RID': 6702, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'She loved them!', 'ASIN': 'B01G45HX18', 'PARENT_ASIN': 'B01G45HX18', 'USER_ID': 'AFJY7SJ5EYKD74VHDC2Z3SWWZS6A', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . She loved them!', 'TITLE_PRD': 'Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil - Dry Skin Moisturize, Fit for Bubble &amp; Spa Bath, Handmade Birthday Gift Ideal for Lady, Women, Girlfriend, Men'}</code></pre><P>&nbsp;</P><P><STRONG>Outcome of the 2ond scenario based on:</STRONG></P><UL><LI>Question = "What is suitable gift for women?" &nbsp;</LI><LI>LLM Template =&nbsp;You are an expert in answering questions. You are provided multiple context items that are related to the prompt you have to answer. Use the following pieces of context to answer the question at the end.</LI><LI>Using = gpt-4-32k</LI><LI><EM><SPAN class=""><SPAN class="">Distance Strategy = Cosine (for the top 5 ones)</SPAN></SPAN></EM></LI><LI><EM><SPAN class=""><SPAN class="">Metadata Filter&nbsp; :&nbsp;"SENTIMENT": "positive" ,&nbsp;"PRICING": "Value for money"</SPAN></SPAN></EM></LI></UL><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>Answer from LLM: ================ Based on the provided context, suitable gifts for women could include the "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar" or the "Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil." These items have received positive reviews and are mentioned as being suitable gifts for women. ================ Number of used source document chunks: 5 -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Necklace . Bought this for a gift and she loved it. {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'None', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 2270, 'RATING': 3, 'TITLE': 'Necklace', 'TEXT': 'Bought this for a gift and she loved it.', 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AGBMHZT2QAQX5NPQVY3K4373QL3Q', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Necklace . Bought this for a gift and she loved it.', 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Nice Gift . Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price! {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'Shipping', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Not Satisfied', 'RID': 403, 'RATING': 4, 'TITLE': 'Nice Gift', 'TEXT': "Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price!", 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AHB5MSCRBLE7Q2W32DSRUO63TKGQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': "Nice Gift . Gave as a gift. Shipped to my home instead of recipient's so I had to ship it myself but quality is nice for the price!", 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Five Stars . Gift {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'None', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 570, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'Gift', 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AHWSZ25HCWERF3KIHXNGIRJ6GQ4Q', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . Gift', 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar and Review : Four Stars . Gift {'SENTIMENT': 'positive', 'PRODUCT': "Harlorki Women's Bohemian Jewelry Statement Necklaces", 'ISSUE_TYPE': 'Gift', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 636, 'RATING': 4, 'TITLE': 'Four Stars', 'TEXT': 'Gift', 'ASIN': 'B0107QYW14', 'PARENT_ASIN': 'B0107QYW14', 'USER_ID': 'AETCKBFGU6KOBXRVNDYSJ7C77NXQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Four Stars . Gift', 'TITLE_PRD': "Harlorki Women's Bohemian Jewelry Statement Necklaces Women Rhinestone Gem Pendant Collar"} -------------------------------------------------------------------------------- Product : Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil - Dry Skin Moisturize, Fit for Bubble &amp; Spa Bath, Handmade Birthday Gift Ideal for Lady, Women, Girlfriend, Men and Review : Five Stars . My girlfriend really loved them. Also very in-expensive for how much they cost at most stores. {'SENTIMENT': 'positive', 'PRODUCT': 'Webat Bath Bombs Gift Set', 'ISSUE_TYPE': '', 'PRICING': 'Value for money', 'SHIPPING_ISSUE': '', 'RID': 6518, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'My girlfriend really loved them. Also very in-expensive for how much they cost at most stores.', 'ASIN': 'B01G45HX18', 'PARENT_ASIN': 'B01G45HX18', 'USER_ID': 'AFHWPUQBBAWKC5H3VFSE2ABKXT2A', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . My girlfriend really loved them. Also very in-expensive for how much they cost at most stores.', 'TITLE_PRD': 'Webat Bath Bombs Gift Set, Spa Bomb Fizzies &amp; Ultra Lush Essential Oil - Dry Skin Moisturize, Fit for Bubble &amp; Spa Bath, Handmade Birthday Gift Ideal for Lady, Women, Girlfriend, Men'}</code></pre><P>&nbsp;</P><P><STRONG>Outcome of the 3rd scenario based on:</STRONG></P><UL><LI>Question = "What is suitable gift for women?" &nbsp;</LI><LI>LLM Template =&nbsp;You are an expert in answering questions. You are provided multiple context items that are related to the prompt you have to answer. Use the following pieces of context to answer the question at the end.</LI><LI>Using = gpt-4-32k</LI><LI><EM><SPAN class=""><SPAN class="">Distance Strategy = Cosine (for the top 5 ones)</SPAN></SPAN></EM></LI><LI><EM><SPAN class=""><SPAN class="">Metadata Filter&nbsp; :&nbsp;"SENTIMENT": "positive" ,&nbsp;"PRICING": "Overpriced"</SPAN></SPAN></EM></LI></UL><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>Answer from LLM: ================ Based on the provided context, a suitable gift for women could be the Schöne Bath Bombs, Naughty (Pack of 6). The review states that it is a fun product, although a little expensive for regular use. ================ Number of used source document chunks: 5 -------------------------------------------------------------------------------- Product : Schöne Bath Bombs, Naughty (Pack of 6) and Review : Five Stars . LOVE. A little expensive to be purchased for regular use. For me at least. But so much fun! {'SENTIMENT': 'positive', 'PRODUCT': 'Schöne Bath Bombs, Naughty (Pack of 6)', 'ISSUE_TYPE': 'expensive', 'PRICING': 'Overpriced', 'SHIPPING_ISSUE': 'Ok', 'RID': 8693, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'LOVE. A little expensive to be purchased for regular use. For me at least. But so much fun!', 'ASIN': 'B010TQC4R6', 'PARENT_ASIN': 'B010TQC4R6', 'USER_ID': 'AFHDOY444YBLFP6XMK5YRQI2L23A', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . LOVE. A little expensive to be purchased for regular use. For me at least. But so much fun!', 'TITLE_PRD': 'Schöne Bath Bombs, Naughty (Pack of 6)'} -------------------------------------------------------------------------------- Product : Braun Silk Epil Female Epilator Se7921spa 1 Count and Review : Five Stars . It's a great item! Although it's quite pricey, it does the job! Highly recommended! {'SENTIMENT': 'positive', 'PRODUCT': 'Braun Silk Epil Female Epilator Se7921spa 1 Count', 'ISSUE_TYPE': '', 'PRICING': 'Overpriced', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 4446, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': "It's a great item! Although it's quite pricey, it does the job! Highly recommended!", 'ASIN': 'B00AX3YNPC', 'PARENT_ASIN': 'B00AX3YNPC', 'USER_ID': 'AE3IYBBN6KHZA5DRZUUVLER5DFMQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': "Five Stars . It's a great item! Although it's quite pricey, it does the job! Highly recommended!", 'TITLE_PRD': 'Braun Silk Epil Female Epilator Se7921spa 1 Count'} -------------------------------------------------------------------------------- Product : Fleece Ear Warmers Headband for Men &amp; Women, Thermal Polar Ear Muffs Warmers Keep You Warm and Cozy for Daily Wear, Sports, Running, Skiing and More and Review : Five Stars . Love this product.....unfortunately, I can't afford it again. {'SENTIMENT': 'positive', 'PRODUCT': 'Fleece Ear Warmers Headband', 'ISSUE_TYPE': 'Affordability', 'PRICING': 'Overpriced', 'SHIPPING_ISSUE': 'Satisfied', 'RID': 3341, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': "Love this product.....unfortunately, I can't afford it again.", 'ASIN': 'B00DT4757A', 'PARENT_ASIN': 'B00DT4757A', 'USER_ID': 'AE22XHMBOBJBXUFCTNYLFMD4UKMA', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': "Five Stars . Love this product.....unfortunately, I can't afford it again.", 'TITLE_PRD': 'Fleece Ear Warmers Headband for Men &amp; Women, Thermal Polar Ear Muffs Warmers Keep You Warm and Cozy for Daily Wear, Sports, Running, Skiing and More'} -------------------------------------------------------------------------------- Product : Vivo Per Lei Shea Body Butter Lotion, Leaves Skin Softer to Touch, Devotion (Pack of 2) and Review : Five Stars . Excellent, but over priced. Can get these for a lot less. {'SENTIMENT': 'positive', 'PRODUCT': 'Vivo Per Lei Shea Body Butter Lotion', 'ISSUE_TYPE': 'Overpriced', 'PRICING': 'Overpriced', 'SHIPPING_ISSUE': 'Ok', 'RID': 8921, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'Excellent, but over priced. Can get these for a lot less.', 'ASIN': 'B00J14AOUW', 'PARENT_ASIN': 'B00J14AOUW', 'USER_ID': 'AH563RYOFJ6THIFELPD5Z25Z3WUQ', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . Excellent, but over priced. Can get these for a lot less.', 'TITLE_PRD': 'Vivo Per Lei Shea Body Butter Lotion, Leaves Skin Softer to Touch, Devotion (Pack of 2)'} -------------------------------------------------------------------------------- Product : Cosmetics Brushes, 10-Piece Professional Makeup Brush Set with Gift Box (White) and Review : Five Stars . good quality and service But why the price increase? I bought it at a great price previously {'SENTIMENT': 'positive', 'PRODUCT': 'Cosmetics Brushes', 'ISSUE_TYPE': 'price increase', 'PRICING': 'Overpriced', 'SHIPPING_ISSUE': 'Ok', 'RID': 14836, 'RATING': 5, 'TITLE': 'Five Stars', 'TEXT': 'good quality and service But why the price increase? I bought it at a great price previously', 'ASIN': 'B00KQEHD46', 'PARENT_ASIN': 'B00KQEHD46', 'USER_ID': 'AFZHRCYYM6IJHNZ75THWOEMXUQSA', 'HELPFUL_VOTE': 0, 'VERIFIED_PURCHASE': 1, 'SMALL_IMAGES': '', 'LARGE_IMAGES': '', 'TITLE_WITH_TEXT': 'Five Stars . good quality and service But why the price increase? I bought it at a great price previously', 'TITLE_PRD': 'Cosmetics Brushes, 10-Piece Professional Makeup Brush Set with Gift Box (White)'}</code></pre><P>&nbsp;</P><P><STRONG>Ending</STRONG>, in order to highlight the power of the Metadata Enrichment on GenAi scenarios , let's assume that we want to analyze the Shipping Satisfaction of the reviewers regarding the products which are good for&nbsp;Beauty skin. Since we have already implement this analysis , we can easily plot Word Clouds build on top of :&nbsp;&nbsp;</P><UL><LI><STRONG>Reviews of Customers satisfied with Shipping</STRONG></LI><LI><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Satisfied.png" style="width: 515px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101904i871B8CF504A2480D/image-size/large?v=v2&amp;px=999" role="button" title="Satisfied.png" alt="Satisfied.png" /></span><STRONG>Reviews of Customers not satisfied with Shipping</STRONG></LI></UL><P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Not Satisfied.png" style="width: 515px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/101907i4CDA2BC7D3393C34/image-size/large?v=v2&amp;px=999" role="button" title="Not Satisfied.png" alt="Not Satisfied.png" /></span></STRONG></P><P>Products related to Face, Skin or Eye care tend to be linked with quick delivery. However, products that come in the form of creams or are packaged in bottles may frequently experience poorer quality on shipping services.</P><P><STRONG>Conclusion</STRONG></P><P>In conclusion, the Metadata Tagger proves to be incredibly beneficial when a more focused similarity search is required. This is not only limited to Product Reviews , as we shown on this blog, but also on Customer reviews such as on Utility sector and many more. Furthermore, taking advantage the power <A title="SAP Business Technology Platform" href="https://www.sap.com/products/technology-platform/what-is-sap-business-technology-platform.html" target="_blank" rel="noopener noreferrer">SAP Business Technology Platform</A>&nbsp; , it is really easy to extend the current scenario to a more sophisticated one.</P><P>I would like to thank<STRONG>&nbsp;Dr.Ing. <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/108823">@Dimitrios_Lyras</a></STRONG>&nbsp; for all his assistance on highlighting the usage and power of SAP HANA Vector Engine.</P> 2024-09-03T10:28:05.554000+02:00 https://community.sap.com/t5/technology-blogs-by-members/edi-exceedingly-delirious-interface/ba-p/13852842 EDI - Exceedingly Delirious Interface 2024-09-03T13:13:42.545000+02:00 roberto_vacca2 https://community.sap.com/t5/user/viewprofilepage/user-id/185104 <P>“That’s all folks”:</P><P>surely in your heterodox life , you have come across this inscription that used to head at the end of every Warner Bros show for young and old from 1930 to the present.</P><P>From the newest Bugs Bunny or Porky Pig to the oldest Bosko. &nbsp;How many characters!</P><P>It’s difficult to find someone who never heard about them. &nbsp;Over the years they change to find ways to stay relevant to modern people.</P><P>Characters was extremely crazy.</P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roberto_vacca2_0-1725360816788.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161606iCFF56A97ABDACE7A/image-size/medium?v=v2&amp;px=400" role="button" title="roberto_vacca2_0-1725360816788.png" alt="roberto_vacca2_0-1725360816788.png" /></span></P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roberto_vacca2_1-1725360816795.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/161607i413A365FD3176A5B/image-size/medium?v=v2&amp;px=400" role="button" title="roberto_vacca2_1-1725360816795.png" alt="roberto_vacca2_1-1725360816795.png" /></span></P><P>&nbsp;</P><P>So we can say that “It’s NOT all Folks”.</P><P>The same we could say in techology facilitators. They invent always a new technology to adapt to the audience. But WHY? To make us smile? I really don’t thinks so. Pheraps they play with our lives in a sadistic way, like the poor victims of Bugs Bunny like Yosemite Sam or Elmer Fudd.</P><P>And pay attention: you could study all the economic matters in the world but you’ll never find a motivation to the EDI existence today .</P><P>This intro to say that EDI (or Electronic Data Interchange if you don’t know) &nbsp;was first introduced in 1960 when a man, Ed Gulbert, &nbsp;probably a sad guy animated by greateness to leave a sign in the history, developed a form of electronic comunication between shipment supply chains in the US army.. Yes always them, they like to create sufference in the world.&nbsp;</P><P>In an era before Internet, EDI&nbsp; enabled instant&nbsp; long-distance communication, better than rely&nbsp; on slow postal services. &nbsp;They say… but I always received postal card from vacations… anyway..</P><P>EDI was a critical facilitator of early globalization. If globalization today is a fact, it’s because of EDI. Say thanks to Ed Gui if today we live in this crazy world.</P><P>&nbsp;</P><P>Let’s go to the point.</P><P>What’s EDI in poor words?</P><P>EDI it’s&nbsp; a hierarchical data in&nbsp; an insane flat file format.</P><P>You have to know the schema. But sorry for you but the schema is&nbsp; a copyrighted secret, very huge, and can be interpreted in millions of ways.</P><P>And last but not least: exchange is ad Hoc so you have to buy or create the wheel every single time you have to deal with EDI.</P><P>Good way to make companies spend their money. Thanks EdGui (That’s Iron Maiden reference)</P><P>It’s a Pay to PLAY.</P><P>Tools are old and entreched and they’re expensive because licensing suppresses freely available technology or implementations.</P><P>XML was introduced in 1996, and completely obsoleted this technology over 20 years ago but EDI persist&nbsp; thanks to BIG players &nbsp;inertia in the market.</P><P>It’s a kind of scam.</P><P>If you work for a large company and have access to the tools it’s not bad, but if you’re small or your company want to give a penny for it, you can spend months and still months, getting someone at SPS to cough up what is at the end of the day just a text file. Probably billions are shaved off the global economy each year by EDI.</P><P>&nbsp;</P><P>Learning EDI is hard as learning to swim sure, all master and knowledge lovers would say “keep trying, resist, never give up”… That’s not the matters we talk about.</P><P>The problem is that they are asking you to swim across the ocean, arms and legs, when you have ships, boats, planes, jets at your disposal.</P><P>&nbsp;</P><P>I’m agree with you, if you give me TIME, FOOD, ASSISTANCE and everything I would need, probably I could survive. But the question remains: “WHY?” Probably company is conviced to pay less? It’s the same question when your city’s major thinks that it’s not a problem if someone remains in the road. The main thing to support is the city and his power.</P><P>&nbsp;</P><P>So, after all, are you still convinced to use EDI? Probably I will write down the implementation that I choosed to adopt but against my will. With no tools, because tools costs they say. Without informations, because knowledge on EDI is copyrigthted.</P><P>Why I did it? Not because I was comanded, not for sure. Probably because you should always try everything, before talking about something, even though you want to speak about it badly.</P><P>&nbsp;</P><P>That’s NOT all Folks <span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></P><P>*All ri</P> 2024-09-03T13:13:42.545000+02:00 https://community.sap.com/t5/technology-blogs-by-members/dynamically-query-table-content-by-help-of-sql-script/ba-p/13853765 Dynamically Query table content by help of SQL script 2024-09-04T09:45:54.188000+02:00 JoergBoeke https://community.sap.com/t5/user/viewprofilepage/user-id/159568 <H1 id="toc-hId-918886851">How To Query any table content by HANA SQL Script</H1><P>&nbsp;</P><P>Have you ever had the problem that data within tables does not match with your expectations?</P><P>Especially working with SAP BW -BW4/HANA is often happens that data in dataloads&nbsp; might stall the upload to e.g. Business Warehouse solutions caused by strange characters or strings.</P><P>Analyzing the individual tables might consume a lot of time because sometimes you know the problematic sting but you’re not sure what column of table is carrying that false information.</P><P>&nbsp;</P><P>My little help script can brighten your day.</P><P>The script can be used directly in SQL console ( proper authorization required to execute or analyze the desired table(s)) or can be used in table functions or HANA procedures.</P><P>In first part of script all declarations are made and you need to exchange the part (yellow highlighted) within the modification area.</P><P>Working with SAP HANA tables you need to define the table schema, table name ( of physical table or HANA view, as well as the name for temporary table (don’t forget to add the ‘#’ prefix.</P><P>During execution, the script will analyze the given table and generates it’s structure.</P><P>In second step, the script will query the table for defined search string ‘ %bier%’ in my case.</P><P>The query inserting the lookup result (<STRONG>select</STRONG> 'INSERT INTO ' || TEMP_TABLE_NAME ||…) can be modified as well. In my case it just looks for the top3 occurances.</P><P>As said, all tables can be used as select criteria in SOURCE_TABLE parameter.</P><P><STRONG>Restrictions:</STRONG></P><P>Due to my actual restriction to read the structure from sys.table_columns views are not supported but could be added in coding similar to my access to table_columns as shown below</P><P>All entries in screen display SAP schema SYS and its official views, available in any SAP HANA system ( by having SELECT authorizations on that schema)</P><P>&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HANA system views" style="width: 123px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/162048iC25D05BBB234B662/image-size/large?v=v2&amp;px=999" role="button" title="HANA_views.png" alt="HANA system views" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">HANA system views</span></span></P><DIV class="">&nbsp;</DIV><P>Just use the following script</P><P><STRONG>&nbsp;</STRONG>SAP HANA SQL SCRIPT CODE</P><P><EM><STRONG>DO</STRONG></EM></P><P><EM><STRONG>BEGIN</STRONG></EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM><EM>&nbsp;&nbsp;<STRONG>DECLARE</STRONG> SQLQUERY <STRONG>NCLOB</STRONG>;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> SEARCH_STRING <STRONG>NVARCHAR</STRONG>(5000);</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> TEMP_TABLE_NAME <STRONG>nvarchar</STRONG>(256);</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> SOURCE_TABLE <STRONG>nvarchar</STRONG>(256);</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> SCHEMA_NAME <STRONG>nvarchar</STRONG>(30);</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> MYcolumn_name&nbsp; <STRONG>NVARCHAR</STRONG>(5000);</EM></P><P><EM>--declare cursor for looping over dynaic columns</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>DECLARE</STRONG> <STRONG>CURSOR</STRONG> cur <STRONG>FOR</STRONG>&nbsp;&nbsp; <STRONG>SELECT</STRONG> COLUMN_NAME</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>FROM</STRONG> SYS.TABLE_COLUMNS</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>WHERE</STRONG> SCHEMA_NAME = :schema_name <STRONG>AND</STRONG> TABLE_NAME = :SOURCE_TABLE;</EM></P><P><EM>&nbsp;--MODIFICATION AREA----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>---set YOUR values-----e.g. the search expression 'bier' might not suit you</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCHEMA_NAME&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = YOUR_TABLE_SCHEMA;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SOURCE_TABLE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = YOUR_SPECIFIC PHYSICAL_TABLE';</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TEMP_TABLE_NAME&nbsp; &nbsp; = '#tempTABLENAME';</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SEARCH_STRING&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=&nbsp; '%bier%';</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>--build dynamic internal temporal table for all column Look Up</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>WITH</STRONG> columns <STRONG>as</STRONG> (</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>SELECT</STRONG></EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <STRONG>position</STRONG>,</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; '"' || column_name ||</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; '" ' || data_type_name ||</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; '(' || <STRONG>length</STRONG> ||</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; (<STRONG>case</STRONG> <STRONG>when</STRONG> scale <STRONG>is</STRONG> <STRONG>null</STRONG> <STRONG>then</STRONG> '' <STRONG>else</STRONG> ',' || scale <STRONG>end</STRONG>) || ')' <STRONG>as</STRONG> columnStr</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>from</STRONG> sys.table_columns</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>where</STRONG> table_name = :SOURCE_TABLE</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>order</STRONG> <STRONG>by</STRONG> <STRONG>position</STRONG></EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>SELECT</STRONG></EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;'create local temporary table ' || TEMP_TABLE_NAME || ' ( ' || String_Agg(columnStr, ', ' <STRONG>order</STRONG> <STRONG>by</STRONG> <STRONG>position</STRONG>) || ');'</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>into</STRONG> "SQLQUERY" <STRONG>from</STRONG> columns;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>EXECUTE</STRONG> <STRONG>IMMEDIATE</STRONG> :SQLQUERY;</EM></P><P><EM>-- end of create temp table</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>--Now do the real SQL Work to spot the data you're looking for</EM></P><P><EM>--loop over the columns of given table</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<STRONG>FOR</STRONG> column_row <STRONG>as</STRONG> cur</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM><EM>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<STRONG>DO</STRONG></EM></P><P><EM>---MYcolumn_name for the just selected colum</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; MYcolumn_name := column_row.COLUMN_NAME;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>--Search in individual column only for top 3---matter of your specific changes in SQL Querying the data in given table</EM></P><P><EM>--MODIFICATION AREA----</EM></P><P><EM>-- The insert query string can be modifies as well <span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></EM></P><P><EM><STRONG>select</STRONG> 'INSERT INTO ' || TEMP_TABLE_NAME || ' ("' || MYcolumn_name || '") SELECT top 3 "' || MYcolumn_name || '"&nbsp; FROM ' ||SCHEMA_NAME || '.' || SOURCE_TABLE || ' WHERE "' || MYcolumn_name || '" like '||</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <STRONG>CHAR</STRONG>(39) || SEARCH_STRING || <STRONG>CHAR</STRONG>(39)&nbsp; || ';' <STRONG>into</STRONG> "SQLQUERY"&nbsp; <STRONG>from</STRONG> dummy;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; --run SQL Query</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>EXECUTE</STRONG> <STRONG>IMMEDIATE</STRONG> :SQLQUERY;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>END</STRONG> <STRONG>FOR</STRONG>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EM></P><P><EM>--display found data at the end</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>SELECT</STRONG> 'SELECT * FROM ' || TEMP_TABLE_NAME <STRONG>into</STRONG> "SQLQUERY" <STRONG>from</STRONG> dummy;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>EXECUTE</STRONG> <STRONG>IMMEDIATE</STRONG> :SQLQUERY;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- clean up tmp tables</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>SELECT</STRONG> 'DROP TABLE ' || TEMP_TABLE_NAME <STRONG>into</STRONG> "SQLQUERY" <STRONG>from</STRONG> dummy;</EM></P><P><EM>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <STRONG>EXECUTE</STRONG> <STRONG>IMMEDIATE</STRONG> :SQLQUERY;</EM></P><P><EM><STRONG>END</STRONG>;</EM></P> 2024-09-04T09:45:54.188000+02:00 https://community.sap.com/t5/crm-and-cx-blogs-by-sap/quotation-creation-enablement-in-recurring-services/ba-p/13859193 Quotation Creation Enablement in Recurring Services 2024-09-09T09:42:40.882000+02:00 Rahul58 https://community.sap.com/t5/user/viewprofilepage/user-id/1552859 <P><SPAN>​<SPAN><SPAN>​<SPAN><STRONG><SPAN>​<STRONG><SPAN>Quotation Creation enablement in recurring services<STRONG><SPAN>​<SPAN>&nbsp;</SPAN></SPAN></STRONG></SPAN></STRONG></SPAN></STRONG></SPAN></SPAN></SPAN></SPAN></P><P><SPAN><SPAN>​<SPAN>Overview&nbsp;<SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN></P><P><SPAN>There are business cases to increase the Service revenue by sending some kind of notifications like quotations to the customer on regular basis.<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>As a Service manager, I should be able to create Service order quotation at a regular interval throughout the life cycle of the customer asset. Business sometimes sells machines without recurring Service contracts where the service cycle is long. For example, the Weighing scale requires a service once in 3 years for the life span of 20 years. For this case, no service contract is required but these regular services are done chargeable basis.<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>However, to increase the service business revenue, the customers are to be reminded regularly by sending out quotations. Once the customer accepts the quotation, the services are created and executed. In a way, this is one way of marketing campaign for the regular services on the customer asset without service contract.<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></P><P><SPAN>Now the recurring service solution has been enhanced to create the Service order quotation as call object from the maintenance plan.<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>Maintenance Plan: -&nbsp;<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>Basically, the Maintenance plans are defined and scheduled to generate the call objects on a regular intervals. Regular maintenance aids in maintaining a customer's assets at their best performance levels while reducing the likelihood of breakdowns and the costs associated with repairs.&nbsp;<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>This solution creates and executes orders/Quotations at specified intervals/usage, drastically improving asset production efficiency and minimizing breakdowns. Notably, this enhancement to&nbsp; create service order quotation will improve the service revenue.<SPAN>&nbsp;</SPAN></SPAN></P><P><SPAN>You can refer below blogs to know more about maintenance plan :-<SPAN>&nbsp;</SPAN></SPAN></P><UL><LI><A href="https://community.sap.com/t5/crm-and-cx-blogs-by-sap/effectively-adopting-recurring-service-process-from-s-4-hana-service/ba-p/13633284" target="_blank"><SPAN>SAP S/4 HANA Service, Maintenance Plan, Preventive Maintenance, Recurring Service, Execution Order Item<SPAN>&nbsp;</SPAN></SPAN></A></LI><LI><A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-sap/types-of-maintenance-plans/ba-p/13574995" target="_blank"><SPAN>Types of Maintenance Plans - SAP Community <SPAN>&nbsp;</SPAN></SPAN></A><P><SPAN>&nbsp;</SPAN></P><P><SPAN>Process Overview: -&nbsp;<SPAN>&nbsp;</SPAN></SPAN></P><P>&nbsp;</P><P style=" text-align: center; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul58_0-1725866242719.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/163835i2A7D30BBBE716D26/image-size/medium?v=v2&amp;px=400" role="button" title="Rahul58_0-1725866242719.png" alt="Rahul58_0-1725866242719.png" /></span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</P><P><SPAN>As a service manager, one can create a maintenance plan with the below input. <SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></P><UL><LI><SPAN><SPAN>Service contract (optional)<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN></LI><LI><SPAN><SPAN>Technical object (Optional)<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN></LI><LI><SPAN><SPAN>Service order template (Mandatory)<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN></LI><LI><SPAN><SPAN>Service quotation as the call object<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN></LI><LI><SPAN><SPAN>Description (Mandatory)<SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></SPAN><P style=" text-align : left; "><SPAN><STRONG><SPAN>Inform the user about the incompleteness of the data to generate Service Order Quotation <SPAN> <SPAN>&nbsp;</SPAN></SPAN></SPAN></STRONG></SPAN></P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;</P><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul58_1-1725866242723.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/163836i8B2A2B8588BCF38E/image-size/medium?v=v2&amp;px=400" role="button" title="Rahul58_1-1725866242723.png" alt="Rahul58_1-1725866242723.png" /></span></P><SPAN><SPAN>Prerequisite :-<SPAN>&nbsp;</SPAN></SPAN></SPAN><UL><LI><SPAN><SPAN>&nbsp;In order to get Service Order Quotation in Service Call object drop down list while creating Maintenance Plan, copy control customizing from Template to Quotation &amp; Contract to Quotation need to be maintained.<SPAN>&nbsp;</SPAN></SPAN></SPAN><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul58_2-1725866242730.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/163837iD7EA78F97D0282D0/image-size/medium?v=v2&amp;px=400" role="button" title="Rahul58_2-1725866242730.png" alt="Rahul58_2-1725866242730.png" /></span></P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul58_0-1725867347102.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/163848iD45398D84A992C2B/image-size/medium?v=v2&amp;px=400" role="button" title="Rahul58_0-1725867347102.png" alt="Rahul58_0-1725867347102.png" /></span></LI><LI><SPAN class=""><SPAN class="">Contract or Technical Object should have partner data.</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></LI></UL></LI></UL></LI></UL><P style=" text-align : left; "><SPAN>Schedule Maintenance plan: -</SPAN><SPAN>&nbsp;</SPAN></P><P style=" text-align : left; "><SPAN>&nbsp;</SPAN></P><P style=" text-align : left; "><SPAN>While Generating call object (Service order or Service order quotation), Org data and Partner data are filled into the call objects</SPAN><SPAN>&nbsp;</SPAN></P><UL><LI><SPAN>Data are copied from&nbsp; the Service contract If service contract exists in the Maintenance item&nbsp;</SPAN></LI><LI><SPAN>if contract is not maintained in Maintenance Plan the same should be copied from Technical Object. If Technical object is also not maintained or Technical Object doesn’t have these data do not allow to generate call object without partner data and org data.</SPAN><SPAN> </SPAN></LI></UL><P><SPAN><SPAN class=""><SPAN class="">Copy Org Data and Partner Data Flow -&nbsp;</SPAN></SPAN><SPAN class="">&nbsp;</SPAN></SPAN></P><P>&nbsp; &nbsp; &nbsp; &nbsp;<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Rahul58_2-1725867597385.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/163852i62403CBDB91DFD99/image-size/medium?v=v2&amp;px=400" role="button" title="Rahul58_2-1725867597385.png" alt="Rahul58_2-1725867597385.png" /></span></P><P><SPAN>Process the Service Order Quotation: -</SPAN><SPAN>&nbsp;</SPAN></P><UL><LI><SPAN>Review the data in the Service Order quotation</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Fix them if there are any errors reported</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Release the quotation to the customer (send to customer)</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Complete the quotation either accepting the quotation or rejecting</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>Follow on Service order will be created if the quotation is Accepted</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><UL><LI><SPAN>No follow-on action from the quotation if rejected</SPAN><SPAN>.</SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>Backward sync between quotation and Maintenance plan: -</SPAN><SPAN> </SPAN><SPAN>&nbsp;</SPAN></P><UL><LI><SPAN>System will update the completion date and the status to ‘completed’ in the Maintenance plan in either cases&nbsp; ‘Accepted’ or ‘Rejected’ (both the cases).</SPAN><SPAN> </SPAN><SPAN>&nbsp;</SPAN></LI></UL><P><SPAN>&nbsp;</SPAN></P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P> 2024-09-09T09:42:40.882000+02:00 https://community.sap.com/t5/technology-blogs-by-members/transforming-supply-chain-in-transportation-with-generative-ai-on-sap-btp/ba-p/13855687 ‌‌ Transforming Supply Chain in Transportation with Generative AI on SAP BTP 2024-09-12T09:04:29.592000+02:00 AkshayR https://community.sap.com/t5/user/viewprofilepage/user-id/128641 <H1 id="toc-hId-918945536"><STRONG>Transforming Supply Chain in Transportation with Generative AI on SAP BTP&nbsp;&nbsp;</STRONG></H1><H1 id="toc-hId-722432031"><STRONG><span class="lia-unicode-emoji" title=":railway_car:">🚃</span><span class="lia-unicode-emoji" title=":mountain_railway:">🚞</span><span class="lia-unicode-emoji" title=":ship:">🚢</span><span class="lia-unicode-emoji" title=":bullet_train:">🚅</span><span class="lia-unicode-emoji" title=":train:">🚆</span><span class="lia-unicode-emoji" title=":high_speed_train:">🚄</span></STRONG></H1><P style=" text-align : justify; ">In an era where efficiency and agility are paramount, the transportation sector faces increasing pressure to innovate and streamline supply chain operations. Leveraging Generative AI (Gen AI) on the SAP Business Technology Platform (BTP) can catalyze a transformative approach to managing logistics, routing, maintenance, and demand forecasting. This article delves into a detailed use case i have been ideating for implementing Gen AI in supply chain transformation, utilizing advanced SAP technologies like SAP HANA Cloud Vector Engine, Business Application Studio (BAS), UI5/Fiori, OData V4, Work Zone, Build, S/4HANA APIs, SAP DataSphere, Integration Suite, SAP AI Core, and Generative AI Hub.&nbsp;</P><H2 id="toc-hId-655001245">Use Case: Generative AI for Supply Chain Transformation and Efficient Transportation operations</H2><H3 id="toc-hId-587570459"><STRONG>Business Challenge</STRONG></H3><P style=" text-align : justify; ">A large logistics company faces challenges in maintaining efficient transportation operations. Key issues include:</P><P style=" text-align : justify; ">-&nbsp;<STRONG>Inefficient Routing: </STRONG>Existing routing methods do not account for real-time traffic data, leading to delays and increased fuel costs.<STRONG><BR />- Predictive Maintenance: </STRONG>The fleet suffers from unexpected breakdowns, resulting in costly repairs and unplanned downtime.<STRONG><BR />- Demand Forecasting: </STRONG>Inaccurate predictions lead to overstocking or stockouts, affecting service levels.</P><H3 id="toc-hId-391056954">Solution Architecture</H3><P style=" text-align : justify; ">The proposed solution integrates multiple SAP technologies, leveraging their capabilities for a comprehensive Generative AI solution.</P><H4 id="toc-hId-323626168"><SPAN>Using Retrieval Augmented Generation and Generative AI on SAP BTP</SPAN></H4><P style=" text-align : justify; "><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="sap gen ai reference architecture.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/162869i4A39BA4F64BB59A1/image-size/large?v=v2&amp;px=999" role="button" title="sap gen ai reference architecture.png" alt="sap gen ai reference architecture.png" /></span></SPAN></P><P style=" text-align : justify; ">&nbsp;<A title="RAG and Gen AI Reference Architecture" href="https://discovery-center.cloud.sap/refArchDetail/ref-arch-open-ai" target="_self" rel="nofollow noopener noreferrer">RAG and Gen AI Reference Architecture&nbsp;</A></P><H4 id="toc-hId-127112663"><STRONG>Understanding the Generative AI Landscape</STRONG></H4><P style=" text-align : justify; ">To effectively utilize Generative AI in supply chain transformation, it is essential to understand the different model types and their applications in this context.</P><OL style=" text-align : justify; "><LI><STRONG>Transformer-based Models</STRONG><UL><LI><STRONG>Definition: </STRONG>Transformer models use self-attention mechanisms to weigh the relevance of different input data points, making them suitable for sequence-to-sequence tasks such as language translation and time-series prediction.</LI><LI><STRONG>Application: </STRONG>In the transportation supply chain, Transformer models can analyze historical delivery routes and predict optimal paths based on real-time traffic data. For instance, a model can assess patterns in delivery times, identifying peak traffic hours, and suggest alternative routes that minimize delays.</LI></UL></LI><LI><STRONG>Generative Adversarial Networks (GANs)</STRONG><UL><LI><STRONG>Definition: </STRONG>GANs consist of two neural networks—a generator and a discriminator—that create realistic data by competing against each other.</LI><LI><STRONG>Application: I</STRONG>n transportation, GANs can generate synthetic data to simulate various traffic conditions and assess how these conditions might affect delivery times. This data can help in training predictive models without the need for extensive historical data, which may not be available for rare events (e.g., natural disasters).</LI></UL></LI><LI><STRONG>Variational Autoencoders (VAEs)</STRONG><UL><LI><STRONG>Definition: </STRONG>VAEs are generative models that learn to encode data into a latent space and can reconstruct data from this representation.</LI><LI><STRONG>Application: </STRONG>VAEs can be used to analyze customer demand patterns by reconstructing data on past orders. This analysis can provide insights into seasonal variations in demand, enabling better inventory management and resource allocation.</LI></UL></LI></OL><P style=" text-align : justify; "><STRONG>SAP AI Core and Generative AI Hub: </STRONG>These platforms provide the necessary tools and frameworks to develop, deploy, and manage AI models. They support various model types, enabling the selection of the best-suited architecture for specific tasks.</P><P style=" text-align : justify; "><STRONG>SAP HANA Cloud Vector Engine: </STRONG>This engine provides advanced analytics and supports complex queries against large datasets. It is essential for generating embeddings that represent various data points (e.g., routes, delivery times, traffic conditions).</P><P style=" text-align : justify; "><STRONG>SAP DataSphere: </STRONG>DataSphere serves as the central data management solution, integrating data from various sources like GPS systems, traffic reports, and historical delivery records. It ensures data quality and accessibility for AI models.</P><P style=" text-align : justify; "><STRONG>SAP S/4HANA APIs: </STRONG>By utilizing these APIs, the AI models can interact with the company's existing ERP systems, fetching real-time data for analysis and decision-making.</P><P style=" text-align : justify; "><STRONG>SAP Integration Suite: </STRONG>This suite facilitates seamless integration between different systems and applications, allowing for the smooth flow of data across platforms.</P><P style=" text-align : justify; "><STRONG>SAP UI5/Fiori: </STRONG>The user interface can be developed using UI5/Fiori, providing intuitive dashboards that visualize insights from the AI models and allowing users to interact with the system easily<STRONG>.</STRONG></P><P style=" text-align : justify; "><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="build wz reference architecture.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/162871i18D324231BCAABA1/image-size/large?v=v2&amp;px=999" role="button" title="build wz reference architecture.png" alt="build wz reference architecture.png" /></span></STRONG></P><DIV class=""><P style=" text-align : justify; "><SPAN class=""><A title="Establish a central entry point with SAP Build Work Zone" href="http://Establish%20a central entry point with SAP Build Work Zone" target="_self" rel="nofollow noopener noreferrer">Establish a central entry point with SAP Build Work Zone</A></SPAN></P><H4 id="toc-hId--69400842">Implementation Steps</H4><P style=" text-align : justify; "><STRONG>1. Data Collection and Integration:&nbsp;</STRONG></P><P style=" text-align : justify; ">1.1 Use <STRONG>SAP DataSphere </STRONG>to consolidate data from various sources, including:</P><UL style=" text-align : justify; "><LI><STRONG>GPS Tracking: </STRONG>Real-time location data from vehicles.</LI><LI><STRONG>Maintenance Records: </STRONG>Historical data on vehicle servicing and repairs.</LI><LI><STRONG>Traffic Reports: </STRONG>Data from third-party APIs that provide real-time traffic conditions.</LI></UL><P style=" text-align : justify; ">1.2. Clean and preprocess the data to ensure it is suitable for model training.</P><P style=" text-align : justify; "><STRONG>2. Model Development:</STRONG></P><P style=" text-align : justify; ">Choose appropriate models based on the specific tasks:</P><UL style=" text-align : justify; "><LI><STRONG>Routing Optimization: </STRONG>Use Transformer-based models&nbsp;to analyze historical delivery routes and predict optimal paths based on real-time traffic data.</LI><LI><STRONG>Predictive Maintenance: </STRONG>Implement VAEs&nbsp;to analyze patterns in maintenance records, predicting when a vehicle is likely to require servicing.</LI><LI><STRONG>Demand Forecasting: </STRONG>Utilize GANs&nbsp;to create synthetic datasets that simulate various demand scenarios, training models that can better forecast future orders.</LI></UL><P style=" text-align : justify; "><STRONG>Generating Embeddings:</STRONG></P><UL style=" text-align : justify; "><LI>Use the <STRONG>HANA Cloud Vector Engine</STRONG>&nbsp;to generate embeddings from the cleaned data. These embeddings represent complex relationships in the data, allowing for more sophisticated analytics and querying capabilities.</LI><LI>This step enables <STRONG>Retrieval-Augmented Generation (RAG)</STRONG>, where generated insights are combined with retrieved data to improve accuracy.</LI></UL><P style=" text-align : justify; "><STRONG>3. API Integration:</STRONG></P><P style=" text-align : justify; ">Utilize <STRONG>SAP S/4HANA APIs</STRONG> to fetch real-time data from the ERP system and return predictions from the AI models.&nbsp;For example, when a delivery is scheduled, the system can query the API to fetch current traffic conditions and suggest an optimal route.</P><P style=" text-align : justify; "><STRONG>4. User Interface Development:</STRONG></P><P style=" text-align : justify; ">Create a user-friendly dashboard using <STRONG>SAP UI5/Fiori&nbsp;displaying:</STRONG></P><UL style=" text-align : justify; "><LI>Real-time insights into fleet performance.</LI><LI>Predictive maintenance alerts.</LI><LI>Demand forecasts.</LI></UL><P style=" text-align : justify; ">Users can interact with the system to adjust parameters and view the impact on predictions.</P><P style=" text-align : justify; "><STRONG>5. Feedback Loop:</STRONG></P><P style=" text-align : justify; "><STRONG>Implement a feedback mechanism to continuously improve the AI models including:</STRONG></P><UL style=" text-align : justify; "><LI>Collecting data on the accuracy of predictions.</LI><LI>Adjusting model parameters based on real-world outcomes.</LI><LI>Regularly retraining models with new data to enhance their performance.</LI></UL><P style=" text-align : justify; "><STRONG>Merits and Limitations of Generative AI in SAP</STRONG></P><H4 id="toc-hId--265914347"><STRONG>Benefits</STRONG></H4><P style=" text-align : justify; ">1. <STRONG>Enhanced Decision-Making: </STRONG>By providing insights derived from predictive analytics, businesses can make informed decisions that lead to reduced costs and improved operational efficiency. For instance, real-time routing suggestions can cut delivery times and fuel expenses.</P><P style=" text-align : justify; ">2. <STRONG>Scalability: </STRONG>The architecture built on SAP BTP allows for easy scaling to accommodate growing data volumes and user demands, ensuring that the system can adapt to future needs.</P><P style=" text-align : justify; ">3. <STRONG>Integration: </STRONG>SAP's robust integration capabilities ensure that generative AI models can seamlessly interact with existing systems, enhancing the overall efficiency of supply chain operations.</P><P style=" text-align : justify; ">4. <STRONG>Real-Time Insights: </STRONG>By leveraging real-time data, the solution enables immediate adjustments to operations, optimizing performance continuously and improving customer satisfaction.</P><H4 id="toc-hId--462427852"><STRONG>Limitations</STRONG></H4><P style=" text-align : justify; ">1. <STRONG>Data Quality: </STRONG>The effectiveness of generative AI models relies heavily on the quality of the data used. Poor data can lead to inaccurate predictions and insights, ultimately affecting decision-making.</P><P style=" text-align : justify; ">2. <STRONG>Complexity:</STRONG> Developing and maintaining generative AI models can be complex, requiring skilled resources and ongoing management to ensure optimal performance.</P><P style=" text-align : justify; ">3. <STRONG>Cost: </STRONG>The initial investment in technology and resources may be significant, though it is often offset by the long-term benefits of improved efficiency and decision-making.</P><P style=" text-align : justify; ">4. <STRONG>Ethical Considerations: </STRONG>As with any AI application, ethical considerations surrounding data privacy and bias must be addressed. Organizations must ensure compliance with data regulations and ethical standards.</P><H4 id="toc-hId--1156658452"><STRONG>Conclusion</STRONG></H4><P style=" text-align : justify; ">Integrating generative AI into the supply chain transformation process in transportation presents a significant opportunity for organizations to enhance their efficiency and decision-making capabilities. By leveraging SAP BTP technologies, including the HANA Cloud Vector Engine, DataSphere, AI Core, and S/4HANA APIs, businesses can develop sophisticated models that provide real-time insights and predictive analytics.</P><P style=" text-align : justify; ">As organizations embrace this innovative approach, they must remain mindful of the challenges and limitations while continuously seeking to improve their models and practices. The future of supply chain management in transportation lies in the hands of those willing to harness the power of generative AI to drive transformative change. By embracing these technologies and methodologies, companies can not only stay competitive in an evolving landscape but also set new standards for efficiency and customer satisfaction.<BR /><BR /><STRONG>Inspiration for my current article:&nbsp;</STRONG>SAP Generative AI and Joule was introduced around&nbsp;SAP TechEd 2023, and the buzz around its application in BTP and SAP began to grow. I had an incredible opportunity to be the first developer&nbsp;in my previous company to work on a Gen AI use case even before SAP started offering various Gen AI offerings across its portfolio in 2024. I co-developed a customer service assistant utilizing SAP Gen AI and BTP with Ethan Jewett(SAP Alumni Mentor and my manager I was fortunate to work with during and after my Graduate school where I focused on AI and Data Mining) and Abesh Bhattacharjee(SAP Author, Mentor, and an awesome teammate I learned a lot from on and off work in a short time I interacted with him). After reading Ethan's blog on 'Leveraging the richness of SAP data and processes in GenAI systems' and Abesh's blog on '<SPAN class="">Dr RAG and Mr HyDE'&nbsp;i was inspired to think and ideate how Generative AI can be applied to enhance supply chain transportation industry/customers. I'm excited to share my insights and ideas in the above article. cc:&nbsp;&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/14186">@esjewett</a>&nbsp;<a href="https://community.sap.com/t5/user/viewprofilepage/user-id/237">@abesh</a>&nbsp;<BR /></SPAN></P><P style=" text-align : justify; "><SPAN class=""><a href="https://community.sap.com/t5/c-khhcw49343/Digital+Technologies/pd-p/33d804ef-26b2-4f01-b858-ddef6871cb3b" class="lia-product-mention" data-product="181-1">Digital Technologies</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+BTP+Security/pd-p/842ea649-eeef-464c-b80c-a64b03e40158" class="lia-product-mention" data-product="99-1">SAP BTP Security</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+S%25252F4HANA/pd-p/73554900100800000266" class="lia-product-mention" data-product="799-1">SAP S/4HANA</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+HANA+Cloud%25252C+SAP+HANA+database/pd-p/ada66f4e-5d7f-4e6d-a599-6b9a78023d84" class="lia-product-mention" data-product="40-1">SAP HANA Cloud, SAP HANA database</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Analytics+Cloud/pd-p/67838200100800006884" class="lia-product-mention" data-product="3-1">SAP Analytics Cloud</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Fiori+Elements/pd-p/ed5c1ef6-932f-4c19-b2ba-1be375109ff5" class="lia-product-mention" data-product="21-1">SAP Fiori Elements</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Integration+Suite/pd-p/73554900100800003241" class="lia-product-mention" data-product="23-1">SAP Integration Suite</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Build+Process+Automation/pd-p/73554900100800003832" class="lia-product-mention" data-product="1213-1">SAP Build Process Automation</a>&nbsp;&nbsp;,<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Innovation+Management/pd-p/67837800100800007096" class="lia-product-mention" data-product="663-1">SAP Innovation Management</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/Sustainability/pd-p/140502597117949649788634441139048" class="lia-product-mention" data-product="1145-1">Sustainability</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Supply+Chain+Management/pd-p/01200615320800000492" class="lia-product-mention" data-product="862-1">SAP Supply Chain Management</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/Travel+and+Transportation/pd-p/189126846661201547308884" class="lia-product-mention" data-product="292-1">Travel and Transportation</a>&nbsp; <a href="https://community.sap.com/t5/c-khhcw49343/Machine+Learning/pd-p/240174591523510321507492941674121" class="lia-product-mention" data-product="2-1">Machine Learning</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/Artificial+Intelligence/pd-p/c3c3a408-33ea-4c2a-ae6f-05461e76982d" class="lia-product-mention" data-product="307-1">Artificial Intelligence</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Agile+Data+Preparation/pd-p/73555000100700000092" class="lia-product-mention" data-product="397-1">SAP Agile Data Preparation</a>&nbsp;<SPAN><a href="https://community.sap.com/t5/c-khhcw49343/SAP+Enterprise+Architecture+Designer/pd-p/73555000100700000443" class="lia-product-mention" data-product="566-1">SAP Enterprise Architecture Designer</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+BTP%25252C+Cloud+Foundry+runtime+and+environment/pd-p/73555000100800000287" class="lia-product-mention" data-product="443-1">SAP BTP, Cloud Foundry runtime and environment</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Data+Intelligence/pd-p/73555000100800000791" class="lia-product-mention" data-product="15-1">SAP Data Intelligence</a>&nbsp; <a href="https://community.sap.com/t5/c-khhcw49343/SAP+Datasphere/pd-p/73555000100800002141" class="lia-product-mention" data-product="16-1">SAP Datasphere</a>&nbsp;<a href="https://community.sap.com/t5/c-khhcw49343/SAP+Alert+Notification+service+for+SAP+BTP/pd-p/73555000100800001401" class="lia-product-mention" data-product="407-1">SAP Alert Notification service for SAP BTP</a>&nbsp;</SPAN></SPAN></P></DIV> 2024-09-12T09:04:29.592000+02:00 https://community.sap.com/t5/technology-blogs-by-members/strengthening-high-availability-for-sap-in-aws-environments/ba-p/13785163 Strengthening High Availability for SAP in AWS Environments 2024-09-14T17:52:36.442000+02:00 HongzhuQiao https://community.sap.com/t5/user/viewprofilepage/user-id/834265 <P><SPAN>SAP has&nbsp;over 437,000&nbsp;customers in 190 countries. It</SPAN><SPAN>&nbsp;is a leading provider of enterprise applications and supply chain management.&nbsp;</SPAN>SAP systems are integral to business operations and demand a highly reliable infrastructure to ensure uninterrupted service. Implementing high availability (HA) in AWS requires well thought out planning, especially when integrating tools like Pacemaker to manage SAP services and databases. This guide will delve into advanced strategies to enhance the robustness of HA setups, ensuring that SAP systems remain operational and resilient against disruptions.</P><P>In this blog with coauthor Santa Uppala (Architect), we will focus on Suse implementation,&nbsp; most of which can be easily adjusted to Redhat. We will share the lessons learned through years of real customer experiences, combined with the latest AWS and SAP guidelines.&nbsp;</P><P>We start with a way to simplify resources in HA setup called "Simple-Mount". Then we continue on to other important topics.</P><P><STRONG>Simple-Mount Configuration </STRONG></P><P>SUSE has introduced a new ASCS and ERS cluster solution using a simple-mount file system structure. This simplifies the NFS shared file system and relies on SYSTEMD for managing filesystem dependencies, enhancing robustness over traditional configurations. This is now the recommended default for both NetWeaver ENSA1 and S/4HANA ENSA2 (Amazon Web Services) <A href="https://documentation.suse.com/sbp/sap-15/html/SAP-S4HA10-setupguide-simplemount-sle15/index.html?_gl=1*13105js*_gcl_au*MzA0Njc3MDgwLjE3MjIxNzkzMDk.*_ga*MTgwMDMzNTgxNy4xNzIxODU4MTI5*_ga_JEVBS2XFKK*MTcyMjE3OTMxMy4yLjEuMTcyMjE4MDYzMy42MC4wLjA." target="_blank" rel="noopener nofollow noreferrer">(SUSE Documentation)</A>.</P><P>Traditionally, we control EFS, for example, /usr/sap/SID/ASCS00 and /usr/sap/SID/ERS10, via cluster, and mount the relevant file system in one node of the cluster where the service is active. We have found that EFS could become a bottleneck and even cause instability issue when doing switching over. We have been trying to find a simplified approach.&nbsp; Suse recently proposed Simple Mount Architecture where we no longer need to control EFS resources by cluster. Instead, we simply mount EFS on all cluster nodes.</P><P>Here is a description of how to manage EFS.</P><OL><LI>Maintain /etc/fstab on all nodes of the cluster. As a viable alternative, we could use systemd resource control for the same purpose and enable the resource so filesystems are mounted post reboot.&nbsp;</LI><LI>Mount on all nodes. Make sure to check if all filesystems are automatically mounted after reboot.</LI><LI>In cluster resource groups, do not configure resources to manage EFS. Remove such configurations if already existing.</LI></OL><P>For more information, please refer to</P><P><A href="https://www.suse.com/c/simple-mount-structure-for-sap-application-platform/" target="_blank" rel="noopener nofollow noreferrer">Simple Mount Structure for SAP Application Platform | SUSE Communities</A></P><P>&nbsp;</P><P><STRONG>Cluster Failover Monitoring</STRONG></P><P>It is critical to monitor HA and got alerted when it happens so basis could check SAP systems to ensure all SAP systems are operational and all batch jobs are properly handled. Here we show a concrete case of failover monitoring and Service*Now incident generation.</P><P>When cluster failover happens, cluster manager will perform a series of actions to trigger the main application service failover from one node to the other node in the cluster. From AWS perspective, there is a ReplaceRoute event, which we could capture and then setup necessary actions to alert administrators.</P><P>From AWS console, we create a cloudwatch rule which will be triggered by ReplaceRoute event. And this event will designate a SNS target that can be subscribed by email thread and Service*Now incident trigger.</P><P>Here is the setup,</P><P>Event pattern</P><P>{<BR />&nbsp; "source": ["aws.ec2"],<BR />&nbsp; "detail-type": ["AWS API Call via CloudTrail"],<BR />&nbsp; "detail": {<BR />&nbsp;&nbsp;&nbsp; "eventSource": ["ec2.amazonaws.com"],<BR />&nbsp;&nbsp;&nbsp; "eventName": ["ReplaceRoute"]<BR />&nbsp; }<BR />}</P><P>In this event rule, we setup its target to a SNS topic, which Service*Now could subscribe and trigger incidents and alerts.</P><P>&nbsp;</P><P><STRONG>Monitor SAP Resources using Cloudwatch Application Insights</STRONG></P><P>Using Application Insights we can monitor SAP Resources such as Central services and HANA DB operational status. Dashboards can be created as a single pane of glass to monitor the performance and availability at database, resources, OS and AWS Infrastructure layers. Additionally, it correlates and analyzes log data to identify warnings of common problems such as sync state,&nbsp; resource utilization, replication issues and critical process failures in the HANA database.</P><P><STRONG>Redundant Cluster Communication:</STRONG></P><P>It is recommended to define a redundant communication channel (a second ring) in Corosync for SUSE clusters. This improves fault tolerance by providing a backup communication path between cluster nodes (Amazon AWS Documentation).</P><P>e.g.</P><P>nodelist {<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node {<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ring0_addr: 11.0.1.132<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ring1_addr: 11.0.1.75<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nodeid: 1<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; node {<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ring0_addr: 11.0.2.139<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ring1_addr: 11.0.2.35<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nodeid: 2<BR />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR />}</P><P>We can refer to</P><P><A href="https://docs.aws.amazon.com/sap/latest/sap-hana/sap-hana-on-aws-cluster-configuration.html" target="_blank" rel="noopener nofollow noreferrer">https://docs.aws.amazon.com/sap/latest/sap-hana/sap-hana-on-aws-cluster-configuration.html</A></P><P>The conversion from single ring to dual ring can be done without any downtime. Here are the steps:</P><OL><LI>Get another set of IPs by adding IP from AWS console<BR />EC2 -&gt; Networking -&gt; Manage IP addresses -&gt; Assign more IPs.</LI><LI>Change corosync by using the following command on all nodes<BR />crm corosync edit</LI><LI>Enable the new configuration<BR />corosync-cfgtool -R</LI><LI>Validate the configuration<BR />corosync-cmapctl</LI></OL><P>If outage is allowed, we can do a “crm cluster stop” and make changes to /etc/corosync/corosync.conf,&nbsp;<BR />then do “crm cluster start”</P><P><STRONG>Monitoring Location Constraints using Custom Scripts</STRONG></P><P>One of the most important aspects in the HA Resource failover is the location constraints. Sometimes, back and forth failover creates a negative location constraint in the CRM config file which acts as a lock mechanism instructing the DC node not to failover the resources at any given circumstances, this will result in the unsuccessful failover if undetected. In order to avoid this we need to setup a custom monitoring to detect these location lock entries and delete it in timely manner.&nbsp;</P><P><STRONG>Cluster Resource Configuration via AWS Launch Wizard</STRONG></P><P>AWS Launch Wizard has become increasing popular and helped cloud architect/engineers to automate the provisioning the SAP clusters with pacemaker. Here is a reference on the topic.<BR /><A href="https://aws.amazon.com/blogs/apn/simplify-accelerate-and-automate-sap-deployment-using-aws-launch-wizard-for-sap/" target="_self" rel="nofollow noopener noreferrer">Simplify, Accelerate, and Automate SAP Deployment Using AWS Launch Wizard for SAP</A><BR /><BR />We illustrate the results from using AWS Launch Wizard for SAP, where all the best practices and latest recommendations are already built in. We will illustrate with ASCS/ERS instances as it embodies the recommendations such as simple mount.&nbsp;</P><P>Here is the crm status,</P><P>Node List:<BR />* Online: [ nodeps01 nodeps02 ]</P><P>Full List of Resources:<BR />* res_AWS_STONITH (stonith:external/ec2): Started nodeps02<BR />* Resource Group: grp_DWS_ASCS01:<BR />* rsc_ip_DWS_ASCS01 (ocf::suse:aws-vpc-move-ip): Started nodeps02<BR />* rsc_sap_DWS_ASCS01 (ocf::heartbeat:SAPInstance): Started nodeps02<BR />* Resource Group: grp_DWS_ERS10:<BR />* rsc_ip_DWS_ERS10 (ocf::suse:aws-vpc-move-ip): Started nodeps01<BR />* rsc_sap_DWS_ERS10 (ocf::heartbeat:SAPInstance): Started nodeps01</P><P><BR />Now the whole configuration as a reference,</P><P>node 1: nodeps01 \<BR />attributes maintenance=off<BR />node 2: nodeps02 \<BR />attributes maintenance=off<BR />primitive res_AWS_STONITH stonith:external/ec2 \<BR />op start interval=0 timeout=180 \<BR />op stop interval=0 timeout=180 \<BR />op monitor interval=120 timeout=60 \<BR />params tag=dwspacemaker profile=cluster pcmk_delay_max=15<BR />primitive rsc_ip_DWS_ASCS01 ocf:suse:aws-vpc-move-ip \<BR />params ip=192.168.10.20 routing_table=rtb-12345678 interface=eth0 profile=cluster \<BR />op start interval=0 timeout=180 \<BR />op stop interval=0 timeout=180 \<BR />op monitor interval=60 timeout=60 \<BR />meta target-role=Started<BR />primitive rsc_ip_DWS_ERS10 ocf:suse:aws-vpc-move-ip \<BR />params ip=192.168.10.30 routing_table=rtb-12345678 interface=eth0 profile=cluster \<BR />op start interval=0 timeout=180 \<BR />op stop interval=0 timeout=180 \<BR />op monitor interval=60 timeout=60 \<BR />meta target-role=Started<BR />primitive rsc_sap_DWS_ASCS01 SAPInstance \<BR />operations $id=rsc_sap_DWS_ASCS01-operations \<BR />op monitor interval=120 timeout=60 on-fail=restart \<BR />params InstanceName=DWS_ASCS01_nodepa01 START_PROFILE="/sapmnt/DWS/profile/DWS_ASCS01_nodepa01" AUTOMATIC_RECOVER=false \<BR />meta resource-stickiness=5000 failure-timeout=60 migration-threshold=1 priority=10 target-role=Started<BR />primitive rsc_sap_DWS_ERS10 SAPInstance \<BR />operations $id=rsc_sap_DWS_ERS10-operations \<BR />op monitor interval=120 timeout=60 on-fail=restart \<BR />params InstanceName=DWS_ERS10_nodeer01 START_PROFILE="/sapmnt/DWS/profile/DWS_ERS10_nodeer01" AUTOMATIC_RECOVER=false IS_ERS=true \<BR />meta priority=1000 target-role=Started<BR />group grp_DWS_ASCS01 rsc_ip_DWS_ASCS01 rsc_sap_DWS_ASCS01 \<BR />meta resource-stickiness=3000 target-role=Started<BR />group grp_DWS_ERS10 rsc_ip_DWS_ERS10 rsc_sap_DWS_ERS10<BR />colocation col_sap_DWS_no_both -5000: grp_DWS_ERS10 grp_DWS_ASCS01<BR />location loc_sap_DWS_failover_to_ers rsc_sap_DWS_ASCS01 \<BR />rule 2000: runs_ers_DWS eq 1<BR />order ord_sap_DWS_first_start_ascs Optional: rsc_sap_DWS_ASCS01:start rsc_sap_DWS_ERS10:stop symmetrical=false<BR />property cib-bootstrap-options: \<BR />have-watchdog=false \<BR />dc-version="2.1.5+20221208.a3f44794f-150500.6.14.4-2.1.5+20221208.a3f44794f" \<BR />cluster-infrastructure=corosync \<BR />maintenance-mode=false \<BR />stonith-enabled=true \<BR />stonith-action=off \<BR />stonith-timeout=600s \<BR />last-lrm-refresh=1716118611<BR />rsc_defaults rsc-options: \<BR />resource-stickiness=1 \<BR />migration-threshold=3<BR />op_defaults op-options: \<BR />timeout=600 \<BR />record-pending=trueINFO: "config" is accepted as "configure"</P><P><STRONG>Conclusion:</STRONG></P><P>Maintaining healthy cluster configuration is paramount to the stability of SAP systems. We have observed positive results after addressing the points outlined in this blog. It is an iterative process, and we will continue this innovative journey to minimize system interruptions, ensure proper alerts, and enhance our ability to handle exceptions.</P><P><STRONG>References:</STRONG></P><P><A href="https://www.suse.com/c/simple-mount-structure-for-sap-application-platform/" target="_blank" rel="noopener nofollow noreferrer"><SPAN>Simple Mount Structure for SAP Application Platform</SPAN></A></P><P><A href="https://www.suse.com/c/first-certified-simple-mount-cluster-ever/" target="_blank" rel="noopener nofollow noreferrer"><SPAN>First certified simple-mount cluster ever!</SPAN></A></P><P><A href="https://documentation.suse.com/sbp/sap-15/html/SAP-S4HA10-setupguide-simplemount-sle15/index.html?_gl=1*13105js*_gcl_au*MzA0Njc3MDgwLjE3MjIxNzkzMDk.*_ga*MTgwMDMzNTgxNy4xNzIxODU4MTI5*_ga_JEVBS2XFKK*MTcyMjE3OTMxMy4yLjEuMTcyMjE4MDYzMy42MC4wLjA." target="_blank" rel="noopener nofollow noreferrer"><SPAN>SAP S/4 HANA - Enqueue Replication 2 High Availability Cluster With Simple Mount</SPAN></A></P><P><A href="https://aws.amazon.com/blogs/awsforsap/updated-guidance-for-sap-pacemaker-configuration-abap-sap-central-services-ascs/" target="_blank" rel="noopener nofollow noreferrer"><SPAN>Updated Guidance for SAP Pacemaker configuration – ABAP SAP Central Services (ASCS)</SPAN></A></P><P><A href="https://docs.aws.amazon.com/sap/latest/sap-netweaver/sles-netweaver-ha-cluster-resources.html" target="_blank" rel="noopener nofollow noreferrer"><SPAN>SAP NetWeaver on AWS High Availability for SLES Planning</SPAN></A></P> 2024-09-14T17:52:36.442000+02:00 https://community.sap.com/t5/supply-chain-management-blogs-by-members/stock-transport-for-quality-stock-with-inspection-lot-and-blocked-stock/ba-p/13865031 Stock Transport for Quality Stock (with Inspection Lot) and Blocked Stock 2024-09-18T09:10:53.661000+02:00 daferriero1 https://community.sap.com/t5/user/viewprofilepage/user-id/798318 <P><STRONG>Stock Transport for Quality Stock (with Inspection Lot): Our Solution for Managing Material Transfers between Storage Locations</STRONG></P><P>In my experience working with Pharmaceutical Companies that have warehouses located far from production sites, one of the main challenges we faced was managing the transfer of stock under inspection between different storage locations. Anyone who has worked with SAP ECC or SAP HANA knows that the system does not allow the use of Stock Transport Orders (STO) between storage locations for materials under quality control, unless you have one of the more advanced versions of SAP EWM. This limitation creates operational difficulties and often requires complicated workarounds.</P><P>However, thanks to the experience gained in the field, we discovered that with some adjustments and by using a lesser-known feature, introduced by SAP a few years ago, it is possible to bypass this limitation without having to adopt more complex solutions like EWM.</P><P><STRONG>The Challenge: Transferring Stock under Inspection</STRONG></P><P>In a production context, transferring materials between warehouses, especially when they are still under inspection, presents a series of challenges. In our case, the company needed to move materials from the production warehouse to an external one while inspection lots were still active (it’s common practice for Pharmaceutical Product to wait the analysis closure). We found that without the proper adjustments, SAP would not allow the transfer to proceed, effectively blocking the logistical process and generating delays.</P><P><STRONG>The Discovery: Using Spare Parts Management</STRONG></P><P>After various research and testing in the field, we found a solution that initially seemed unrelated to our case: <STRONG>Spare Parts Management</STRONG> in SAP. This option can be found in <STRONG>SPRO &gt; Logistics Execution &gt; Service Parts Management</STRONG>, and while it is seemingly designed for spare parts, with some code, it turned out to be perfect for managing our standard products being transferred between warehouses.</P><P>This wasn’t an immediate realization, I must admit. At first glance, the Spare Parts Management menu didn’t seem applicable to our situation. However, I decided to experiment with this path, considering that the alternatives (such as adopting SAP EWM) were more complex and costly. In the end, it turned out to be a winning choice.</P><P><STRONG>The Key Modifications</STRONG></P><P>The modifications we made to make this solution work were relatively simple but crucial. We activated the function that allows <STRONG>source stock determination</STRONG> during the transfer process. This was done through the following path:</P><P><STRONG>SPRO &gt; Logistics Execution &gt; Service Parts Management &gt; Transfer and Inventory Management &gt; Activate Source Stock Type Determination</STRONG>.</P><P>Another challenge I faced was the configuration of <STRONG>storage locations</STRONG> to which quarantine stock could be transferred. We had to modify table /SPE/V_POD_STL to configure the destinations correctly and resolve a key duplication error.</P><P>From that moment the stock status is visible at each position in the Stock Transfer Order (Delivery -&gt; Source Stock Type) and the Delivery (tab Administration).</P><P><STRONG>The ABAP Intervention: Customizing the Exit to Manage Quarantine Stock</STRONG></P><P>This is where my experience proved crucial. By itself, SAP is not able to properly link the stock movement from the production warehouse to the goods receipt at the storage warehouse, especially when dealing with quarantine stock. We had to work on <STRONG>Exit ZQAAT001</STRONG> to insert specific ABAP code that would allow the system to differentiate the types of incoming stock.</P><P>I worked closely with the development team to ensure that the Exit could read the stock status directly from the Stock Transport Order (STO), a critical operation to ensure the material flow worked correctly. This was one of the most challenging parts but also one of the most satisfying once successfully completed.</P><P><STRONG>The Double Inspection: How We Managed Two Lots</STRONG></P><P>Another difficulty we encountered was managing the <STRONG>two inspection lots</STRONG> generated for the same material being transferred (it’s necessary to set for the material two kinds of inspection lots: 04 and 08. In SAP, an inspection lot is triggered both when the material is produced (lot type 04) and when it is received at the destination warehouse (lot type 08). To avoid having to make the Usage Decision (UD) twice, we had to customize the process so that the UD of the first lot would be automatically copied to the second.</P><P>Here, the customization of <STRONG>follow-up actions</STRONG> in the standard program <STRONG>RQEVAI30</STRONG> or via transaction <STRONG>QA10</STRONG> came into play. We decided to automate the copy action of the UD and the stock transfer from "Q" (quarantine) to unrestricted or blocked stock, depending on operational needs.</P><P>This part of the configuration took time to optimize, but in the end, once implemented, it significantly reduced errors in the workflow and improved the efficiency of our quality management.</P><P>Anyway, to not have any misalignment which appears only later on during the process, the SAP note 48815 and the program ZQEVAC20 should be adapted and linked at each Usage Decision. So, taking the UD the system check and resolve possible differences between MM and QM.</P><P><STRONG>Conclusions:</STRONG></P><P>We are able to transfer unrestricted use, blocked and quarantine stock using STO and managing any kind of shipment documents.</P><P>Looking back, I can say that this implementation required a mix of experimentation, teamwork, and a bit of creativity in adapting a feature that was not originally designed for this purpose. However, the solution we adopted brought great operational benefits, enabling seamless transfer of stock under inspection between warehouses.</P><P>This experience taught me that even when a solution doesn't seem immediately available, it’s always worth exploring all the options offered by the system. Often, as in this case, a lesser-known feature can turn out to be the key to solving a complex problem.</P> 2024-09-18T09:10:53.661000+02:00 https://community.sap.com/t5/sap-for-retail-blogs/best-practice-key-figures-for-retail-core-processes/ba-p/13869384 Best-practice key figures for retail core processes 2024-09-20T12:47:53.620000+02:00 johann_heider2 https://community.sap.com/t5/user/viewprofilepage/user-id/584169 <P><STRONG>The </STRONG><STRONG>important role of key figures for companies</STRONG></P><P>Key figures are far more than just simple numbers that quantify the success or failure of a company. In the complex and dynamic world of modern business, they are essential for understanding business performance and ensuring financial stability. Especially for retail companies operating in a highly competitive market, KPIs are invaluable. Not only do they provide insight into a company's financial position, but they also serve as indispensable tools for strategic planning, risk management and decision-making at all levels of management.<BR /><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_0-1726654751724.png" style="width: 762px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167821i717041C2E28CD85C/image-dimensions/762x324?v=v2" width="762" height="324" role="button" title="johann_heider2_0-1726654751724.png" alt="johann_heider2_0-1726654751724.png" /></span></P><P>In detail, these metrics enable companies to gain deeper insights into their business processes. They help to maximize profitability by uncovering weak points and identifying potential cost savings. At the same time, they enable you in better understanding of customer behavior, which can be a decisive competitive advantage, especially in the retail sector. The ability to interpret this data correctly and translate it into concrete measures can make the difference between success and failure in a highly competitive market.</P><P>The selection and application of the right key figures is of crucial importance. It is not just about collecting data, but also analyzing and using it in the right context. This is the only way to make well-founded decisions that stabilize the company in the short term and keep it on course for success in the long term. In the following, we will present a detailed overview of the most important key figures along the various process steps that are essential for sustainable and profitable corporate management.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_1-1726654751735.png" style="width: 745px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167823i3FA30F97E4DC81EC/image-dimensions/745x474?v=v2" width="745" height="474" role="button" title="johann_heider2_1-1726654751735.png" alt="johann_heider2_1-1726654751735.png" /></span></P><P><STRONG>Key figures in retail: analysis of stationary vs. online retail</STRONG></P><P>In today's digital era, we are witnessing a profound transformation of the retail landscape that goes far beyond the way products are sold. Both department stores and online retail have their own unique challenges and opportunities that are reflected in specific metrics. These metrics are not only indicators of success in each of these two sectors, but also indispensable tools for developing and adapting business strategies that are tailored to the respective market requirements.</P><P>In stationary retail, where the focus is on the physical shopping experience, key figures such as space productivity, customer frequency and the conversion rate are of central importance. Floor space productivity indicates how much revenue is generated per square meter of retail space and is a key factor in the profitability of a store. Customer frequency, i.e. the number of visitors who enter the store, provides important insights into how well a location is performing and how effectively marketing campaigns are reaching the target group. Finally, the conversion rate shows what percentage of these visitors make a purchase, which allows conclusions to be drawn about the product range and sales strategy.</P><P>On the other side of the spectrum is the online retail, which is characterized by completely different dynamics. Here, key figures such as the bounce rate, the average shopping basket value and the repurchase rate play a prominent role. The bounce rate shows how many visitors leave a website after viewing a single page, which can indicate problems with the user-friendliness or relevance of the offer. The average basket value provides information on how much a customer spends on average when making a purchase, which is an important indicator of the effectiveness of cross-selling and upselling strategies. The rate of repurchase, on the other hand, measures customer loyalty and is crucial for the long-term success of an online retailer.</P><P>Another key difference is the way customer loyalty and experience are measured. In department stores, factors such as personal advice and the design of the sales area play an important role in customer satisfaction and loyalty, while in online retail, aspects such as website usability, loading times and the checkout process are crucial. These different focal points are also reflected in the respective key figures and require an adapted approach for each case.</P><P>To develop a successful omnichannel strategy that seamlessly links both sales channels, it is essential to understand and harmonize the specific key figures of both worlds. Only through a holistic analysis and a deep understanding of the differences and similarities can companies operate successfully in today's highly fragmented retail landscape and remain competitive in the long term. In the following, we will take a detailed look at the most important key figures of both forms of retail and examine their implications for management.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_2-1726654751740.png" style="width: 761px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167822iF5C7C20A05AF1939/image-dimensions/761x293?v=v2" width="761" height="293" role="button" title="johann_heider2_2-1726654751740.png" alt="johann_heider2_2-1726654751740.png" /></span></P><P><STRONG>Insert AI Technology: &nbsp;Machine Learning with ABAP Managed Database Procedure for merchandise management</STRONG></P><P>Optimizing the allocation of goods at the point of sale (POS) has the potential to significantly increase the sales rate. The aim of this measure is to avoid empty stock by distributing goods in line with demand. Not only current stock and sales data, but also planning data is considered in order to ensure precise allocation.</P><P>In A/B tests, a potential increase in sales of 11 million euros per year was achieved through a 2% higher sales rate. These impressive results illustrate the significant impact that improved merchandise distribution can have on commercial success.</P><P>The technical implementation of this optimization takes place in an SAP BW/HANA system, whereby existing data is used for analysis and training. In particular, the integration of the SAP HANA Predictive Analytics Library and the Automated Predictive Library plays a central role here. These libraries enable a well-founded prediction of requirements and precise planning.</P><P>It only takes 12 minutes to calculate the optimum merchandise allocation for around 7,000 points of sale. The results are then transferred to the ERP system, where they are made available for merchandise and assortment planning. The shortened calculation time also enables simulations to be carried out, giving companies the flexibility to run through various scenarios and thus determine the best possible allocation.</P><P>This holistic and data-driven approach enables companies not only to optimize their product availability, but also to significantly increase their sales and improve the efficiency of their processes at the same time.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_3-1726654751755.png" style="width: 753px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167824iB3BA9FD310340604/image-dimensions/753x670?v=v2" width="753" height="670" role="button" title="johann_heider2_3-1726654751755.png" alt="johann_heider2_3-1726654751755.png" /></span></P><P><STRONG>&nbsp;</STRONG><STRONG>Technological platforms for core retail processes</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_4-1726654751764.png" style="width: 755px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167826i41413492DA5FFEED/image-dimensions/755x304?v=v2" width="755" height="304" role="button" title="johann_heider2_4-1726654751764.png" alt="johann_heider2_4-1726654751764.png" /></span></P><P><STRONG>Data &amp; analytics solutions</STRONG></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johann_heider2_5-1726654751773.png" style="width: 752px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/167825iD47A49827EC10845/image-dimensions/752x347?v=v2" width="752" height="347" role="button" title="johann_heider2_5-1726654751773.png" alt="johann_heider2_5-1726654751773.png" /></span></P><P>&nbsp;</P> 2024-09-20T12:47:53.620000+02:00 https://community.sap.com/t5/sap-learning-blog-posts/where-can-i-acquire-the-skills-to-use-monitor-and-performance-tools-within/ba-p/13874201 Where can I acquire the skills to use monitor and performance tools within SAP HANA Cockpit? 2024-09-23T13:37:17.641000+02:00 Margit_Wagner https://community.sap.com/t5/user/viewprofilepage/user-id/491 <P><FONT size="3">I recommend to access our&nbsp;<A title="Using Monitoring and Performance Tools in SAP HANA" href="https://learning.sap.com/learning-journeys/using-monitoring-and-performance-tools-in-sap-hana" target="_blank" rel="noopener noreferrer">Using Monitoring and Performance Tools in SAP HANA</A><SPAN>&nbsp;</SPAN>learning journey</FONT></P><DIV class=""><P><STRONG>Overview<BR /></STRONG><SPAN>This SAP Learning Journey equips you with skills to use monitor and performance tools, troubleshoot performance issues, investigate SQL statements, address hardware performance issues, manage workload, and use capture and replay using SAP HANA cockpit. You will gain practical knowledge through hands-on exercises and real-world scenarios. By the end, you'll be proficient in investigating system performance within your organization. Get ready to embark on this exciting and comprehensive journey!</SPAN></P><DIV class=""><P><STRONG>Learning objectives</STRONG></P><UL><LI><SPAN>Develop proficiency in using monitor and performance tools within SAP HANA Cockpit for effective system performance analysis.</SPAN></LI><LI>Acquire the skills to troubleshoot performance issues, including investigating SQL statements and addressing hardware performance issues.</LI><LI>Gain expertise in workload management to ensure efficient system operation and resource utilization.</LI><LI>Learn how to utilize capture and replay functionalities to simulate and analyze system workloads, enabling informed decisions for performance improvements.</LI></UL></DIV><P><STRONG>Prerequisites</STRONG></P><UL><LI><A class="" href="https://learning.sap.com/learning-journeys/installing-and-administering-sap-hana" target="_blank" rel="noopener noreferrer">Installing and Administering SAP HANA</A></LI></UL></DIV><DIV class=""><P><STRONG>Please ask a question related&nbsp;to the digital learning Journey in the&nbsp;</STRONG><A href="https://groups.community.sap.com/t5/sap-learning-q-a/qa-p/learningqanda-board" target="_blank" rel="noopener noreferrer"><STRONG>Q&amp;A area</STRONG></A><STRONG>.</STRONG></P></DIV><DIV class=""><DIV class=""><P class=""><SPAN>Our SAP Learning Experts will get back to you as soon as possible!&nbsp;We are here to support you.</SPAN>&nbsp;</P></DIV></DIV><DIV class=""><DIV class=""><DIV class=""><DIV class=""><P><FONT size="3">I appreciate your feedback and we will make sure to continue sharing interesting topics.</FONT><BR /><BR /><FONT size="3">Kind regards</FONT><BR /><FONT size="3">Margit</FONT></P></DIV></DIV></DIV></DIV> 2024-09-23T13:37:17.641000+02:00 https://community.sap.com/t5/technology-blogs-by-sap/product-updates-for-sap-build-code-september-2024-edition/ba-p/13875426 Product Updates for SAP Build Code – September 2024 Edition 2024-09-26T14:49:39.442000+02:00 BirgitS https://community.sap.com/t5/user/viewprofilepage/user-id/41902 <P><SPAN>Dear SAP Community,</SPAN></P><P><SPAN>As we wrap up another exciting month, we wanted to take a moment to share some of the latest updates with you. With September coming to a close, we are getting ready for two major events in the SAP Community - Devtoberfest and TechEd. For more information, be sure to read the rest of this release information. </SPAN></P><P>&nbsp;</P><P><STRONG>Support SAP S/4HANA Cloud Service Integration for Data Model and App Logic</STRONG></P><P><SPAN>You can use our <A href="https://help.sap.com/docs/build_code/d0d8f5bfc3d640478854e6f4e7c7584a/337848fc83f24738a9f3a15a88f1fa76.html" target="_self" rel="noopener noreferrer">generative AI assistant Joule in SAP Build Code</A> to help you to write code quickly and easily by providing natural language prompts. As you know, we are constantly listening to your feedback to make our tools even better. One request we got was to enable AI support for external service scenarios. We are excited to tell you that it is now possible to use Joule to generate code for your integrated SAP S/4HANA Cloud services. </SPAN></P><P><SPAN>You start by creating your full-stack application, importing an external SAP S/4HANA Cloud service, and defining the data model and services. (With Joule, you can easily create your data model and services.)</SPAN></P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DataModelAndService2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170356iEF1172CC35A942AD/image-size/large?v=v2&amp;px=999" role="button" title="DataModelAndService2.png" alt="DataModelAndService2.png" /></span><SPAN>Data Model and Service creation with the help of Joule</SPAN></P><P><SPAN>With our new feature, it is now possible to use Joule to enhance the data model you created before: You can add associations between the external entity and local entities, and you can expose the external entity to a local service via a projection.</SPAN></P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="AddAssociation2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170359i47D6A88DC14C93D5/image-size/large?v=v2&amp;px=999" role="button" title="AddAssociation2.png" alt="AddAssociation2.png" /></span><SPAN>Using Joule to add an association between the entity Books and the external entity A_BusinessPartner</SPAN></P><P><SPAN>We've also added support for custom logic generation to read the associated external SAP S/4HANA Cloud entity and to manipulate the exposed external entity.</SPAN></P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="CreateLogic2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170362iB851BCE131209742/image-size/large?v=v2&amp;px=999" role="button" title="CreateLogic2.png" alt="CreateLogic2.png" /></span><SPAN>Using Joule to add a custom logic reading data from the external entity A_BusinessPartner</SPAN></P><P><SPAN>&nbsp;</SPAN></P><P><STRONG>SQL Notebooks for SAP HANA</STRONG></P><P>SAP Build Code offers <SPAN><A href="https://code.visualstudio.com/blogs/2021/11/08/custom-notebooks" target="_blank" rel="noopener nofollow noreferrer">notebook</A></SPAN> functionality, similar to the well-known Jupyter notebooks. Since Q3 2024 the SAP HANA tools in SAP Build Code offer a notebook experience for executing SQL statements on an SAP HANA Cloud database.</P><P>To get started, create an SAP HANA dev space. Inside the dev space, create a file with the <STRONG>.notebook</STRONG> extension and open it. The file will be opened with the default notebook editor. Next, create a code block. The default code block type should be “SAP HANA Connection Management”. This code block type allows opening, closing, and selecting a database connection. Typing ‘#’ opens the value help with the available commands.</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SelectDatabaseConnection1.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170411i2759A8673B8DE6C3/image-size/large?v=v2&amp;px=999" role="button" title="SelectDatabaseConnection1.png" alt="SelectDatabaseConnection1.png" /></span><SPAN>Choose the “List database connections” Command</SPAN></P><P>Choose the “List database connections” command and execute the code block. A list of the available database connections from the SAP HANA Database Explorer view will be shown. You can choose a database connection to use for the notebook by clicking on its name in the list. The selected database will be highlighted with a different background color.</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SelectDatabaseConnection2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170413iFDA794B786DC0979/image-size/large?v=v2&amp;px=999" role="button" title="SelectDatabaseConnection2.png" alt="SelectDatabaseConnection2.png" /></span><SPAN>Select Database Connection</SPAN></P><P>Now you can create another code block for executing SQL statements. Be sure to change the code block type to “SAP HANA SQL” by clicking on the “SAP HANA Connection Management” indicator in the bottom right corner and choosing “SAP HANA SQL” from the subsequent dialog.</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ExecuteSQLQueries1.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170414iF97A9101B1A3ABE2/image-size/large?v=v2&amp;px=999" role="button" title="ExecuteSQLQueries1.png" alt="ExecuteSQLQueries1.png" /></span><SPAN>Execute SQL Queries</SPAN></P><P>Add one or more SQL statements and execute the code block. The results will be shown below the code block.</P><P style=" text-align: center; "><span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ExecuteSQLQueries2.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170416i3A3A28613A8C7748/image-size/large?v=v2&amp;px=999" role="button" title="ExecuteSQLQueries2.png" alt="ExecuteSQLQueries2.png" /></span><SPAN>Add SQL Statements&nbsp;and Execute the Code Block</SPAN></P><P>You can add more code and markdown blocks as needed.</P><P><SPAN>&nbsp;</SPAN></P><P><STRONG>Use the Joule functionality to enhance your MDK projects in SAP Build Code</STRONG></P><P>Remember back in June when we announced you could create and <A href="https://community.sap.com/t5/technology-blogs-by-sap/how-to-develop-sap-mdk-applications-in-sap-build-code/ba-p/13725637" target="_blank">manage your mobile development kit (MDK) apps directly from the SAP Build lobby</A> and continue their development using the Storyboard in SAP Build Code? We're thrilled to share another exciting update on that front!</P><P><SPAN>You can now take advantage of the generative AI assistant Joule to enhance your existing MDK projects in SAP Build Code. For further details, I recommend to read <A href="https://community.sap.com/t5/technology-blogs-by-sap/streamline-sap-mdk-development-with-the-power-of-generative-ai-and-joule/ba-p/13878601" target="_blank">this blogpost</A> written by my colleague Jitendra.</SPAN></P><P>&nbsp;</P><P><STRONG><SPAN>Devtoberfest and TechEd</SPAN></STRONG></P><P><SPAN>Get ready for an exciting journey of learning and collaboration with Devtoberfest and SAP TechEd Virtual!</SPAN></P><P>From September 23rd to October 25th, 2024, join us for Devtoberfest, a celebration of coding and collaboration within the SAP Community. This virtual event is designed to prepare you for the highly anticipated SAP TechEd. My colleague Ravi summarizes all you need to know about <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-build-code-at-devtoberfest-by-sap-teched-2024/ba-p/13868402" target="_blank">SAP Build Code at Devtoberfest</A>. For further information, read the <SPAN><A href="https://community.sap.com/t5/devtoberfest-blog-posts/devtoberfest-2024-welcome/ba-p/9358?sap-outbound-id=C5C40C877E97CD6101872ADE15DCDDA2A45F79F2" target="_blank">Devtoberfest 2024 Welcome</A></SPAN> blog post and join <SPAN><A href="https://community.sap.com/t5/devtoberfest/gh-p/Devtoberfest?sap-outbound-id=C5C40C877E97CD6101872ADE15DCDDA2A45F79F2" target="_blank">the Devtoberfest group</A></SPAN> in SAP Community to take part in this great event!</P><P><SPAN>And don't forget to mark your calendar for <A href="https://www.sap.com/events/teched.html?" target="_blank" rel="noopener noreferrer">SAP TechEd Virtual</A> on October 8-9, 2024, your gateway to the latest innovations and advancements in SAP technologies! <A href="https://www.sap.com/events/teched/virtual/flow/sap/te24/catalog/page/catalog?tab.day=20241008" target="_blank" rel="noopener noreferrer">The session catalog</A> is now live, featuring a wide range of topics across various tracks, including the <EM>Application Development and Automation</EM> and the <EM>Data and Analytics</EM> tracks, where you'll find dedicated sessions on SAP Build Code. You are looking for a summary where to find SAP Build Code at SAP TechEd? Then I recommend to read this <A href="https://community.sap.com/t5/technology-blogs-by-sap/sap-build-code-sessions-at-sap-teched-in-2024/ba-p/13868358" target="_blank">blog post</A>.</SPAN></P><P><SPAN>Don't miss these opportunities to enhance your technical expertise and connect with the SAP community.</SPAN></P><P><SPAN>&nbsp;</SPAN></P><P><STRONG>Let Us Hear Your Voice!</STRONG><STRONG><BR /></STRONG><BR />We prepared a short survey, focused on improving the product to better fit your needs. By participating, you can help us improve SAP Build Code and SAP Business Application Studio. It should only take 5 minutes to complete. Please&nbsp;<SPAN>take <A href="https://sapinsights.eu.qualtrics.com/jfe/form/SV_0IzHvNRC3Zelrj8" target="_self" rel="nofollow noopener noreferrer">the survey</A> now</SPAN>.</P><P><SPAN>&nbsp;</SPAN></P><P>For further information on new features, please check our roadmaps: <SPAN><A href="https://roadmaps.sap.com/board?PRODUCT=73555000100800004515&amp;range=2024Q1-2024Q4#Q3%202024" target="_blank" rel="noopener noreferrer">roadmap for SAP Build Code</A></SPAN>, <SPAN><A href="https://roadmaps.sap.com/board?PRODUCT=73554900100800001361" target="_blank" rel="noopener noreferrer">SAPUI5 Road Map</A></SPAN>. And have a look at <SPAN><A href="https://help.sap.com/whats-new/cf0cb2cb149647329b5d02aa96303f56?Component=Cloud%20Logging%3BCloud%20Transport%20Management%3BContinuous%20Integration%20%26%20Delivery%3BDocument%20Management%20Service%3BMobile%20Services%3BSAP%20Alert%20Notification%20Service%3BSAP%20BTP,%20Cloud%20Foundry%20Runtime%3BSAP%20Build%3BSAP%20Business%20Application%20Studio&amp;locale=en-US&amp;version=Cloud" target="_blank" rel="noopener noreferrer">What's New in SAP Build Code</A></SPAN>, the <SPAN><A href="http://help.sap.com/disclaimer?site=https://help.sap.com/whats-new/67f60363b57f4ac0b23efd17fa192d60" target="_blank" rel="noopener noreferrer">What's New Viewer for SAPUI5</A></SPAN> and the <SPAN><A href="https://cap.cloud.sap/docs/releases/" target="_blank" rel="noopener nofollow noreferrer">SAP Cloud Application Programming Model Release Notes</A></SPAN><STRONG>. </STRONG><STRONG>If you want to stay up-to-date with news, learning resources, and product and strategy updates for SAP Build Code:&nbsp;</STRONG>follow our&nbsp;<SPAN><A href="https://community.sap.com/t5/c-khhcw49343/SAP%2520Build%2520Code/pd-p/73555000100800004372" target="_blank">tag</A></SPAN>.</P><P>We look forward to seeing how you use these new capabilities to create innovative solutions and drive your projects forward. Stay tuned for more updates and happy coding! <span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:">😊</span></P> 2024-09-26T14:49:39.442000+02:00 https://community.sap.com/t5/technology-blogs-by-members/guide-to-use-hana-nse-in-the-bw-4hana-system/ba-p/13864974 Guide to use HANA NSE in the BW/4HANA system 2024-09-30T10:39:42.626000+02:00 AndreyF https://community.sap.com/t5/user/viewprofilepage/user-id/158026 <P>It is critical for the HANA systems not to overload the memory, because loads/unloads are affecting the performance drastically.</P><P>We are constantly working on reducing the memory footprint to improve the performance and avoid buying additional memory since that could be complicated by various reasons like hardware costs, unavailability of particular memory planks in the market, a necessity to reconfigure the current landscape etc.</P><P>So, in addition to archiving, we decided also to implement a HANA NSE.</P><P>Native storage extension is quite a flexible tool to reduce the data memory footprint, which is not so complicated to set up.</P><P>&nbsp;</P><P>NSE makes much sense e.g. in the SAP BW/4HANA environment, since you usually have quite a lot of data, plus it supports a scale-out scenario, the only thing you need to know, is that HANA does not consider the NSE table for the redistributions, so you need to take care of them manually if needed.</P><P>&nbsp;</P><P>&nbsp;</P><P>You can put to the NSE tables, table Indexes, table partitions, or single table columns, they will be kept in the storage, and only the required pages will be loaded, not the whole table/column.</P><P>This has an effect also on the storage sizing, the page loadable objects require more storage space and also will be a bit slower for the querying, so this should be taken into account</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreyF_0-1726217702279.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/166059i2375FEDF6545A146/image-size/medium?v=v2&amp;px=400" role="button" title="AndreyF_0-1726217702279.png" alt="AndreyF_0-1726217702279.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>There could be several ways to identify it, there is a recommended way from SAP to run the NSE Advisor, but as I know some customers do not want to create additional load on HANA with the statistics collection, so they do it with the commonsense analysis, e.g. checking the EWA for the biggest tables which is not accessed too much, or put to the NSE the data which is not needed to be queried/reloaded often, e.g. the data for the previous years in the reporting which needs</P><P>&nbsp;</P><P>In our experience, we did not find a significant increase in the HANA load with the Advisor activated, so we decided to go with the NSE advisor</P><P>&nbsp;</P><P>You cannot run NSE load unit conversion DDLs on the following types of SAP HANA system tables:</P><P>Tables that were created on SAP HANA versions 2.0 SPS 00 or earlier, and never rewritten or merged into later/higher SAP HANA versions.</P><P>In our scenario we used HANA 2.0 SP5, so we followed the note 2927591, but for the different SPs you need to follow the different notes</P><P>&nbsp;</P><P>&nbsp;</P><P>So first of all, you need to convert the tables into the HANA 2.0 format, in our case there were ~1000 tables with the old format, and the conversion took around 2 hours. There were no problems in the normal BW/HANA operations, only many alerts appeared during the conversions of these tables, but you can ignore them. In general, you can test this process in the quality system to ensure there are no problems during the conversions</P><P>&nbsp;</P><P>Before that, you need to find all of them, by running the following select:</P><P>&nbsp;</P><P>select * from M_CS_COLUMNS_PERSISTENCE where PERSISTENCE_TYPE = 'VIRTUAL_FILE' or PERSISTENCE_TYPE = 'VIRTUAL_PAGED'</P><P>&nbsp;</P><P>It also makes sense to run the delta merge for the tables to be converted:</P><P>&nbsp;</P><P>select count(*) from &lt;table_name&gt;</P><P>merge delta of &lt;table_name&gt; force rebuild</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>Download the stored procedure for your SP from the relevant SAP note, e.g. for HANA 2.0 SP7 you would need SAP Note 3320095</P><P>&nbsp;</P><P>After you create the procedure in HANA, you need to execute the following:</P><P>CALL PREPARE_PAGE_LOADABLE_PERSISTENCE('&lt;schema_name&gt;', ?)</P><P>&nbsp;</P><P>&nbsp;</P><P>After the procedure successfully executed you need to start the NSE advisor, and let it run for quite some time, depends on your scenario. E.g. if you have only the monthly reports you cannot do any analysis before the whole month passed, the data would not be relevant&nbsp;</P><P>&nbsp;</P><P>Start NSE_ADVISOR:</P><P>ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','system') SET ('cs_access_statistics','collection_enabled') = 'true' WITH RECONFIGURE;</P><P>&nbsp;</P><P>After you have collected all the necessary statistics you can disable it:</P><P>ALTER SYSTEM ALTER CONFIGURATION ('indexserver.ini','system') SET</P><P>('cs_access_statistics','collection_enabled') = 'false'</P><P>WITH RECONFIGURE;</P><P>&nbsp;</P><P>In our scenario we did not disable that, so it keeps running, and we have new inputs every 2-3 months for the objects which we could put into NSE</P><P>&nbsp;</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreyF_1-1726217702289.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/166060iC80309DE9A50021C/image-size/medium?v=v2&amp;px=400" role="button" title="AndreyF_1-1726217702289.png" alt="AndreyF_1-1726217702289.png" /></span></P><P>&nbsp;</P><P>The $trexexternalkey$ values stand for the indexes, which HANA recommend to put into the NSE, since they are not being accessible too often.</P><P>&nbsp;</P><P><STRONG>Putting the data into NSE:</STRONG></P><P><STRONG>You can run it for the table:</STRONG></P><P>alter table &lt;schema_name&gt;.&lt;table_name&gt;_BOOKM page loadable</P><P><STRONG>for the column:</STRONG></P><P>alter table &lt;schema_name&gt;."/BI0/SCO_ITEM_NO" alter ("SID" ALTER PAGE LOADABLE)</P><P><STRONG>for putting the index of the table to NSE you need at first finding the name of it</STRONG></P><P>SELECT SCHEMA_NAME, TABLE_NAME, INDEX_NAME, INDEX_TYPE, CONSTRAINT FROM INDEXES WHERE TABLE_NAME = &lt;table_name&gt;;</P><P>&nbsp;</P><P>After finding the index name:</P><P>&nbsp;</P><P>ALTER INDEX &lt;schema_name&gt;."_SYS_TREE_CS_#1816272_#0_#P0" PAGE LOADABLE;</P><P>&nbsp;</P><P>&nbsp;</P><P><STRONG>to get it back to the default behavior you need to run the following command:</STRONG></P><P>ALTER TABLE "&lt;table_name&gt;" DEFAULT LOADABLE CASCADE;</P><P>ALTER INDEX &lt;schema_name&gt;."_SYS_TREE_CS_#1816272_#0_#P0" default LOADABLE;</P><P>&nbsp;</P><P>&nbsp;</P><P><STRONG>To check the tables in the NSE you can run the following command:</STRONG></P><P>select * from tables where load_unit = 'PAGE'</P><P><STRONG>To check the indexes in the NSE you can run the following command:</STRONG></P><P>select * from indexes where load_unit = 'PAGE'</P><P><STRONG>To check the columns in the NSE you can run the following command:</STRONG></P><P>select * from m_cs_all_columns where load_unit = 'PAGE'</P><P>It's also important to know, how much memory you saves by putting the data into the NSE, and here are 2 ways of doing it</P><DIV class="">Usually, in the NSE Advisor, you see the amount of memory you will save putting the table to the NSE, with summing up the memory size in the main memory columns</DIV><DIV class="">&nbsp;</DIV><DIV class="">select * from Sys.M_CS_NSE_ADVISOR</DIV><DIV class=""><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreyF_0-1727253289984.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170985i8AA648F4A117F352/image-size/medium?v=v2&amp;px=400" role="button" title="AndreyF_0-1727253289984.png" alt="AndreyF_0-1727253289984.png" /></span><P>&nbsp;</P></DIV><DIV class="">&nbsp;</DIV><DIV class="">&nbsp;</DIV><DIV class="">if you are not using advisor, you can run the select * from m_cs_all_columns where table_name = 'RSBATCHDATA' and check memory_size_in_total, for e.g. a column or index which you want to put into NSE</DIV><DIV class=""><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AndreyF_1-1727253289988.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/170986iCF74583A8045F899/image-size/medium?v=v2&amp;px=400" role="button" title="AndreyF_1-1727253289988.png" alt="AndreyF_1-1727253289988.png" /></span><P>In our system, we saved around 2 TB of memory, which helped a lot in improving the HANA performance and satisfaction of our users.</P><P>&nbsp;</P><P>&nbsp;</P></DIV> 2024-09-30T10:39:42.626000+02:00 https://community.sap.com/t5/sap-learning-blog-posts/where-can-i-learn-configuring-the-python-machine-learning-client-for-sap/ba-p/13883062 Where can I learn configuring the Python machine learning client for SAP HANA (hana-ml)? 2024-09-30T15:16:52.971000+02:00 Margit_Wagner https://community.sap.com/t5/user/viewprofilepage/user-id/491 <P><FONT size="3">I recommend to access our&nbsp;<A title="Developing Regression Models with the Python Machine Learning Client for SAP HANA" href="https://learning.sap.com/learning-journeys/developing-regression-models-with-the-python-machine-learning-client-for-sap-hana" target="_blank" rel="noopener noreferrer">Developing Regression Models with the Python Machine Learning Client for SAP HANA</A><SPAN>&nbsp;</SPAN>learning journey.</FONT></P><P><STRONG>Overview<BR /></STRONG><SPAN>In this enablement you will apply the machine learning workflow using the Python machine learning client for SAP HANA, also known as hana-ml. You will look at the steps from feature extraction to model evaluation, using the California housing dataset as scenario.</SPAN></P><DIV class=""><P><STRONG>Learning objectives</STRONG></P><UL><LI><SPAN>Configuring the Python machine learning client for SAP HANA (hana-ml) and connecting to SAP HANA Cloud</SPAN></LI><LI>Accessing and visually exploring SAP HANA data using HANA dataframes via Python</LI><LI>Training a regression model for the California housing dataset using&nbsp; hana-ml Predictive Analysis Library (PAL) functions</LI><LI>Performing Model Evaluation to show the model accuracy obtained</LI></UL><P><STRONG>Prerequisites</STRONG></P><UL><LI><SPAN>Basic Structured Query Language (SQL) knowledge is highly desirable.</SPAN></LI><LI>If you need some foundational information, you can also refer to:<SPAN>&nbsp;<BR /></SPAN><A class="" title="Developing AI Models with the Python Machine Learning Client for SAP HANA" href="https://learning.sap.com/learning-journeys/developing-ai-models-with-the-python-machine-learning-clients-for-sap-hana" target="_blank" rel="noopener noreferrer">Developing AI Models with the Python Machine Learning Client for SAP HANA</A></LI></UL></DIV><DIV class=""><P><STRONG>Please ask a question related&nbsp;to the digital learning Journey in the&nbsp;</STRONG><A href="https://groups.community.sap.com/t5/sap-learning-q-a/qa-p/learningqanda-board" target="_blank" rel="noopener noreferrer"><STRONG>Q&amp;A area</STRONG></A><STRONG>.</STRONG></P></DIV><DIV class=""><DIV class=""><P class=""><SPAN>Our SAP Learning Experts will get back to you as soon as possible!&nbsp;We are here to support you.</SPAN>&nbsp;</P></DIV></DIV><DIV class=""><DIV class=""><DIV class=""><DIV class=""><P><FONT size="3">I appreciate your feedback and we will make sure to continue sharing interesting topics.</FONT><BR /><BR /><FONT size="3">Kind regards</FONT><BR /><FONT size="3">Margit</FONT></P></DIV></DIV></DIV></DIV> 2024-09-30T15:16:52.971000+02:00 https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/partition-of-acr-table-drc-statutory-reporting-in-sap-s-4hana-2021-on/ba-p/13882813 Partition of ACR Table (DRC-Statutory Reporting) in SAP S/4HANA 2021 (On Premise) 2024-10-04T15:19:01.941000+02:00 sairam6481 https://community.sap.com/t5/user/viewprofilepage/user-id/338065 <P><STRONG>Title:</STRONG> Partition of ACR Table (DRC-Statutory Reporting) in SAP S/4HANA 2021 (On-Premise)</P> <P><STRONG>Introduction:</STRONG><BR />Hi Friends!</P> <P>This is my second blog post and aims to explain the concept of partitioning the ACR table for DRC (Statutory Reporting) in SAP S/4HANA 2021, focusing on its significance, how it differs from other partitioning approaches, and potential issues during implementation. I will divide the discussion into three key areas: like what is partition and How its different partition from other, implementation and other issues.</P> <P>In SAP S/4HANA, <STRONG>partitioning</STRONG> refers to the process of splitting large database tables into smaller, more manageable pieces, called partitions. This enhances database performance, particularly for large tables, by distributing the data across different sections and improving query efficiency, load balancing, and parallel processing.</P> <P>There are two main types of partitioning in SAP HANA:<BR /><STRONG>1. Row Store Partitioning:</STRONG><BR />• <STRONG>Row-based</STRONG> partitioning is less common in S/4HANA because SAP HANA primarily operates as a columnar database. Row-based partitioning might still be used in specific cases where the nature of the data requires it.<BR /><STRONG>2. Column Store Partitioning:</STRONG><BR />• This is the most common type in SAP HANA, as it aligns with its in-memory, columnar design. Column store tables are split into partitions based on certain criteria, typically by ranges of values or hash-based partitioning.<BR /><STRONG>• Types of Column Store Partitioning:</STRONG><BR /><STRONG>o Range Partitioning:</STRONG> The table is split based on value ranges of a particular column (e.g., date or ID ranges).<BR /><STRONG>o Hash Partitioning:</STRONG> Rows are distributed across partitions using a hash function, spreading the data evenly.<BR /><STRONG>o Round Robin Partitioning:</STRONG> Data is distributed in a cyclic manner across partitions</P> <P><BR /><STRONG>Why do we need to partition tables in HANA ?</STRONG><BR />As HANA can not hold more than 2 billion records per column store table or per partition , any table which has crossed more than 1.5 billion rows are valid candidates of partitioning . It also helps in parallel procession of queries , if they are distributed across nodes in case of HANA scale out scenario producing results faster .</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_1.jpg" style="width: 892px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173212iB33CAAB60E98581C/image-size/large?v=v2&amp;px=999" role="button" title="blog_1.jpg" alt="blog_1.jpg" /></span></P> <P><STRONG>Enable partitioning:</STRONG><BR />In this section, I’ll explain how to enable partitioning for the <STRONG>SRF_REP_RUN_DATA</STRONG> table, which is a key component in SAP's Advanced Compliance Reporting (ACR) and Statutory Reporting. Partitioning is essential for managing large datasets, ensuring system performance, and preventing table overflow.<BR /><STRONG>1. Enabling Partitioning through TCI Note 3354120</STRONG><BR />The partitioning for the <STRONG>SRF_REP_RUN_DATA</STRONG> table can be activated after implementing the TCI (Transport-based Correction Instructions) note <STRONG>3354120</STRONG>. This note consolidates fixes and improvements for Statutory Reporting and introduces partitioning capabilities to manage large data volumes more effectively.<BR /><STRONG>2. Steps to Enable Partitioning</STRONG><BR />After implementing the TCI note, follow these steps to activate partitioning for the <STRONG>SRF_REP_RUN_DATA</STRONG> table:<BR /><STRONG>a. Implement TCI Note 3354120</STRONG><BR />Ensure that your system has applied TCI 3354120, which includes various improvements for Statutory Reporting, including partitioning support. This is a consolidated fix and comes with the necessary tools for enabling partitioning.<BR />b. <STRONG>Execute Program SRF_ACTIVATE_TABLE_PARTITIONS</STRONG><BR />Once the TCI is implemented, the system introduces a new program: <STRONG>SRF_ACTIVATE_TABLE_PARTITIONS.</STRONG> You can run this program to enable partitioning for the <STRONG>SRF_REP_RUN_DATA</STRONG> table.<BR />o Navigate to the transaction code <STRONG>SE38</STRONG> and execute the program <STRONG>SRF_ACTIVATE_TABLE_PARTITIONS.</STRONG><BR />o This will partition the table, optimizing data handling, and enhancing system performance, especially for large datasets.<BR />c. <STRONG>Post-Execution Check</STRONG><BR />After running the program, you can verify whether the partitioning has been successfully applied by checking the table's structure in <STRONG>SE14</STRONG> or <STRONG>DBACOCKPIT.</STRONG></P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blog_2.jpg" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173213i2F8693786F7C7D8F/image-size/medium?v=v2&amp;px=400" role="button" title="Blog_2.jpg" alt="Blog_2.jpg" /></span></P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Blog_3.jpg" style="width: 573px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173214iE03A541AE830B6FC/image-dimensions/573x115?v=v2" width="573" height="115" role="button" title="Blog_3.jpg" alt="Blog_3.jpg" /></span></P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_4.png" style="width: 493px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173215i35FACFC4CAC938E8/image-dimensions/493x229?v=v2" width="493" height="229" role="button" title="blog_4.png" alt="blog_4.png" /></span><BR /><BR /><STRONG>Before Partition :</STRONG></P> <P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_5.jpg" style="width: 638px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173217iCEEC628BA846D940/image-dimensions/638x211?v=v2" width="638" height="211" role="button" title="blog_5.jpg" alt="blog_5.jpg" /></span></STRONG></P> <P>After Partition:</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_6.jpg" style="width: 654px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173218i4D542B2B1F752E5B/image-dimensions/654x225?v=v2" width="654" height="225" role="button" title="blog_6.jpg" alt="blog_6.jpg" /></span></P> <P>we have enabled partition through program "SRF_ACTIVATE_TABLE_PARTITIONS " in the test systems.</P> <P>1. We observed that running this program has automatically partitioned table "SRF_REP_RUN_DATA". Is this program applicable only for this table or is there any impact on any other DRC table? Yes only <STRONG>SRF_REP_RUN_DATA</STRONG></P> <P><BR />2. Do we need to follow any specific steps to run this program in production? e.g. Down time etc.---- No. we can do as its like transport movement</P> <P><STRONG>Issues :</STRONG><BR />In this section will explain the issue after post implementation<BR />Issue 1 :</P> <P>Post implementation of the TCI 3354120 , we observed that all the logs of the prior runs are not visible . Even the logs are not showing for the new runs<BR /><STRONG>Before TCI Note : 3354120 :</STRONG></P> <P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_7.jpg" style="width: 607px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173219iA348679A362E4D6E/image-dimensions/607x384?v=v2" width="607" height="384" role="button" title="blog_7.jpg" alt="blog_7.jpg" /></span></STRONG></P> <P><STRONG>After TCI note :</STRONG> Logs lost for all previous runs and New Runs</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_8.jpg" style="width: 627px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173220i87976E4D7104E8CF/image-dimensions/627x174?v=v2" width="627" height="174" role="button" title="blog_8.jpg" alt="blog_8.jpg" /></span><BR />As per SAP suggestion kindly implement the note <STRONG>3367884</STRONG> clear the cache as mentioned in the note <STRONG>2319491</STRONG> then logs appeared (<STRONG>Immediately will not appear wait for some time</STRONG>)</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_9.jpg" style="width: 559px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173221i72FE55AB49FEBEE1/image-dimensions/559x339?v=v2" width="559" height="339" role="button" title="blog_9.jpg" alt="blog_9.jpg" /></span></P> <P><STRONG>Issue 2:</STRONG> Record Count is same, but entries are increasing</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_10.jpg" style="width: 563px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173222i9813F74EE330371D/image-dimensions/563x267?v=v2" width="563" height="267" role="button" title="blog_10.jpg" alt="blog_10.jpg" /></span></P> <P><BR />so total entries in table increased but count of entries in partition is same.</P> <P>There are 2 partitions seen in HANA. But all records are in Partition 1 . Please clarify after report run for partition , are there any further post actions. And, when will records go into Partition 2 with zero records ?</P> <P>For <STRONG>SRF_REP_RUN_DATA</STRONG> table I can see that in <STRONG>SE16N</STRONG> there are 1,707,345,316 and at the same time in <STRONG>DB02/DBACOCKPIT</STRONG> transaction I can see below 5 partitions</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_11.jpg" style="width: 496px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173223i4E901D10AFFDC3D9/image-dimensions/496x197?v=v2" width="496" height="197" role="button" title="blog_11.jpg" alt="blog_11.jpg" /></span><BR /><BR />Checking it from application layer would be ideal as it abstracts all the backend HANA computations which will always be in a flux due to data being written to it. You could try to refresh the screen in HANA and check, but the still recommend checking the data count from application layer SE16N/DB02/DBACOCKPIT.<BR />Tcode :<STRONG> DB02</STRONG></P> <P><STRONG><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="db02.jpg" style="width: 539px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173224iB4ABD1522D35AAF0/image-dimensions/539x169?v=v2" width="539" height="169" role="button" title="db02.jpg" alt="db02.jpg" /></span></STRONG></P> <P>Select Diagnostics and Table</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_13.jpg" style="width: 461px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173225i37D426D01DF19745/image-dimensions/461x153?v=v2" width="461" height="153" role="button" title="blog_13.jpg" alt="blog_13.jpg" /></span><BR /><BR />Click on execute</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_14.jpg" style="width: 577px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173226iD27533456F5C1BDD/image-dimensions/577x216?v=v2" width="577" height="216" role="button" title="blog_14.jpg" alt="blog_14.jpg" /></span></P> <P>Is SAP automatically creating these sub-partitions?<BR /><STRONG>SAP:</STRONG> Yes, SAP automatically creates the sub-partition.system will do automatically partition once threshold limit of 50 percentage</P> <P><BR /><STRONG>Issue 3 :</STRONG> We have observed one thing once successfully at the time of refresh of system . we got an error “ <STRONG>EC0x006: Table partitioning not enabled on SRF_REP_RUN_DATA</STRONG> “. To resolve this issue to we added manually table entries mentioned in the below image to the table SRF_PARTITION</P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_15.jpg" style="width: 612px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173227iD171809BF890B488/image-dimensions/612x104?v=v2" width="612" height="104" role="button" title="blog_15.jpg" alt="blog_15.jpg" /></span></P> <P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="blog_16.jpg" style="width: 609px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/173228iF8B7A2952CB89E53/image-dimensions/609x253?v=v2" width="609" height="253" role="button" title="blog_16.jpg" alt="blog_16.jpg" /></span></P> <P>&nbsp;</P> <P><STRONG>Conclusion:</STRONG></P> <P>This blog post addressed Partition of ACR table (SRF_REP_RUN_DATA) and some known issues with their solutions.&nbsp;<SPAN>GenAI was used to help generate this content.</SPAN> Stay Tuned!.</P> <P>Thank you for going through the post. Your feedback and comments will help me make it more relevant to the community.</P> <P>First Blog : <A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/predictive-accounting-in-sap-s-4hana-1909/ba-p/13507148" target="_blank">https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/predictive-accounting-in-sap-s-4hana-1909/ba-p/13507148</A></P> <P>&nbsp;</P> <P>Regards,</P> <P>Durga Sai Ram</P> 2024-10-04T15:19:01.941000+02:00