Saturday, November 30, 2019

Power up your SAP NetWeaver Application Server ABAP Developer edition

In this post I try to describe what are interesting things how you can either enhance, tune, make more advanced and similar sort of things to your SAP NetWeaver Application Server ABAP Developer edition you may have installed. In next text I will call it this edition of SAAP NW AS ABAP just simply miniSAP.

With regards to where to get the miniSAP from and how to installed it on your machine refer to my blog here. Even that blog post is dedicated to 7.52 SP04 version of the miniSAP; the most of things listed here are valid for previous releases of the miniSAP as well; like SAP NetWeaver AS ABAP 7.52 SPS1, SAP NetWeaver AS ABAP 7.51 SPS2 or SAP NetWeaver AS ABAP 7.02 SP11, or SAP NetWeaver AS ABAP 7.03 SP04 etc.


1. LICENSE
Once the miniSAP is installed it comes with temporary license (installation number = INITIAL) that is valid for 90 days. It is possible to keep extending it for another 90 days once it expires. SAP says in theory license can be prolonged indefinitely. Here’s how to prolong your license.

First find out what is your Active Hardware Key. You can find it in t-code SLICENSE. Navigate your web browser to go.support.sap.com/minisap and find a radio button entry called “NPL - SAP NetWeaver 7.x (Sybase ASE)”, fill up a few personal data and put your Active Hardware Key into field called “Hardware Key”. Once you hit GENERATE button on the page you will be prompted to save NPL.txt file to your machine. Now to login as SAP* into 000 client and go to t-code SLICENSE again. Select license type “NetWeaver_SYB” and delete it via menu Edit->Delete License. Then choose button called Install and browse for the NPL.txt that was generated from SAP license site. See below pic how SLICENSE screen changes before/after you extend license for 1st time. That’s it; you got another 90 days to play with your miniSAP J


You can refer to my special blog post dedicated just to Extending NW Developer Editions license for details.

2. SPEED UP DB
2.1 removing granular permissions
By default, the ASE DB for NW comes with security feature called Granular Permissions. The feature supports fine-tune of separation of duties for role-based security. As normally this is not a use case for developer editions it can be switched off to let the system perform faster. Notice that you need to switch your user while you are already logged into your OS.
My attempt to change granular permission failed for first time when I tried to do it with sabnpl user. Instead I used user sybsso:
1> sp_configure 'granular permission',0
2> go
Msg 5861, Level 16, State 2:
Server 'NPL', Procedure 'sp_configure', Line 1310:
The current 'max memory' value '736443', is not sufficient to change the parameter 'enable granular permissions' to '0'. 'max memory' should be greater than 'total logical memory' '736621' required for the configuration.
(return status = 1)

To fix this I had to reconfigure the memory. Following command needs to be used under sapsa user:
/sybase/NPL% isql -Usapsa -X -SNPL
Password:
1> sp_configure 'max memory',740621
2> go
(1 row affected)
 Parameter Name   Default     Memory Used   Config Value   Run Value              Unit             Type   
 ---------------- ----------- ------------- -------------- ------------ ---------------- -------
 max memory            180224     1481242         740621         740621   memory pages(2k) dynamic
Configuration option changed. ASE need not be rebooted since the option is dynamic.
Changing the value of 'max memory' to '740621' increases the amount of memory ASE uses by 912 K.
(return status = 0)

Now 2nd attempt to change granular permission was successful:
/sybase/NPL% isql -Usapsso -X -SNPL
Password:
1> sp_configure 'granular permission',0
2> go
(1 row affected)
 Parameter Name              Default     Memory Used   Config Value        Run Value    Unit   Type   
 --------------------------- ----------- ------------- -------------- ------------ ------ -------
 enable granular permissions           0           0              0                   0 switch dynamic
Configuration option changed. ASE need not be rebooted since the option is dynamic.
Changing the value of 'enable granular permissions' does not increase the amount of memory Adaptive Server uses.
(return status = 0)

2.2 switching off DB auditing
Auditing creates a lot of records in the DB so again if we aim to gain most of performance in developer edition of AS ABAP it is better to switch it off. Be logged as sapsso user and execute following commands:
1> sp_configure 'auditing',0
2> go
 Parameter Name   Default     Memory Used   Config Value   Run Value    Unit     Type   
 ---------------- ----------- ------------- -------------- ------------ ------   -------
 auditing                   0           0              0              0 switch  dynamic
(1 row affected)
Configuration option changed. ASE need not be rebooted since the option is dynamic.
Changing the value of 'auditing' does not increase the amount of memory Adaptive Server uses.
(return status = 0)

In case of issues with memory allocated to the DB server you can use command for checking of memory configuration:
1> sp_cacheconfig
2> go


3 DB OPTIMIZATION
This is more related to SAP Basis people who know what can be done in t-code DBACOCKPIT. However, in order to make the DBACOCKPIT work you need to provide password (of user sapsa) for DB connection via t-code DBCO. The DBCO is just simple table maintenance view. There is an entry called “+++SYBADM” present. Just switch to edit view and supply your password for user sapsa in there. This will enable DBACOCKPIT t-code.

4 GENARATE ABAP loads – You can have ABAP loads generated (including BSPs and WebDynpros) by running it in via t-code SGEN. Notice that this can be very time consuming activity. Also size of your system can grow up significantly. However once this activity is accomplished it means that there won’t be any “compiling ABC in separate task” message in the system status bar popping up anymore. See some more details about SGEN here.

5 GENARATE TEST DATA
Data that are based on Flight data model (tables SPFLI , SFLIGHT, SBOOK) which are most of DEMO* ABAP programs can be generated via t-code BC_DATA_GEN. See details here.

Data that are based on Enterprise Procurement Model (EPM) can be generated by t-code SEPM_DG. See details here.

Data for SAP Fiori Reference Application. Run t-code SEPM_REF_APPS_DG - EPM Reference Apps Data Generator (ABAP rep REF_APPS_DG)

5. ABAPGit
In order to leverage all ABAP open source projects that are out there (see dotabap.org) and many more I advise to install ABAPGit report from here. See details here. By “many more” I mean that the ABAPGit opens you whole new world of managing your source code as we now it from different development ecosystems than SAP.

6. ABAP in Eclipse (AiE) = ABAP Development Tools (ADT)
In order to start developing ABAP in Eclispse environment you need to install Eclipse first and then the Eclipse menu Help -> Install New Software all the plugins that are needed. See details here: Connecting to SAP backend with Eclipse,  How to install SAP NetWeaver Application Server ABAP 7.03 SP04 Trial – Ready for ABAP in Ecplipse (AiE), What are Eclipse based SAP development tools?
For general setup of ABAP Back-end for ABAP Development Tools see this guide.

7. TRANSPORT SYSTEM (Enhanced SAP Change and Transport System (CTS+)) This come handy in case you need to transporting none ABAP objects via CTS. Means none ABAP objects are transported via on premise ABAP Server.
As starting point for all information on CTS+ refer to tools.hana.ondemand.com/#abap

Update on 2021NOV22:

8 DELETE OLD ABAP DUMPS

In case there are many ABAP dumps generated in the system, those data can occupy the database as well. The ABAP dump data is stored in table SNAP. ABAP report RSSNAPDL can be used to delete those. In addition, one can setup a job to do this task on regular basis. Similarly, in t-code ST22 there is a possibility to re-organize the ABAP dumps

9 SLIM DOWN DB FOOTPRINT

NW Developer AS ABAP system can easily grow its DB footprint. Just but generating too much traces, logs, forgotten installation/patch executables files etc. You can check following folders on your server to asses whether the files in there can be deleted, Needless to say that you need to be careful while deleting anything to do not harm your system – be sure you take a backup before any action!:

Executable files that might not be needed e.g.:

/hana/shared/HDB/exe/linuxx86_64/HDB_2.00.012.02.1506602370_f3eed173a5f0431baee8be0c50f3a88b67840452


DB traces:

/usr/sap/HDB/HDB02/vhcala4hci/trace

/usr/sap/HDB/HDB02/vhcala4hci/trace/DB_HDB


There can be many other things that you may want or need to customize, setup or change from default state in which came in your miniSAP. Just to mention few more that coming to my mind: splash screen in GUI (that famous “water drop” symbol that comes as default), customize t-code SE80 – development workbench which has plenty of settings (also splash screen is there). Feel free to share your experience what else you changed in your install of miniSAP :-)


Monday, November 11, 2019

miniSAP - SAP NetWeaver 7.52 SP04, installation

It is being quite a tradition for last few years that SAP published on yearly basis an ABAP development environment for developers. Last year it was SAP NetWeaver 7.52 SP01. This year it is SAP NetWeaver 7.52 SP04. I normally call these versions as “miniSAP” even thou this term is not used anymore by SAP. Due to some legal restrictions (SAP can’t distribute installed software) the ABAP developer edition comes as a set of installation files. This time it is 11 files most of them 1,4GB of volume each. These files as usual can be downloaded from SAP Community Trials and Downloads site. To download it just search for “7.52 SP04” like via this link. A part of the install file an OS is needed. Here normally I go with open version of SUSE Linux called openSUSE currently in version 15.1 64 bit. A plenty of other Linux OS are supported see below official installation guide. As VM environment I used VirtualBox.

Again within this release of the ABAP developer edition an installation procedure is very well described in blog by Julie Plummer -> see below the first link under more information. Thus, I’m not providing the installation step by step. I just focus on one issue that I faced.


Notes related to VirtualBox:

1 No Menu Devices shown in the VM window: in case a Menu Devices of VirtualBox is not shown (needed to install Guest Additions): just exit from scale mode (Right Ctrl + C). Then 'Devices' menu will appear.

2 Installation of VirtualBox Guest Additions into the VM: add new optical drive to the VM, point it to e.g. "c:\Program Files\VirtualBox\VBoxGuestAdditions.iso"
then run command in VM: /run/media//VBox_FAs_5.2.8/autorun.sh
to get the VirtualBox Guest Additions installed in your VM. I needed it because I took a slice different approach while unpacking the installation file. In the installation guide (see below the first link under more information) the files are copied to your VM and un-rar-ed there. I unpacked it in my host OS and via the VirtualBox Guest Additions’s Shared Folders I made them available in my VM as well.

3 Elevation of admin rights that are needed to run the install: elevate user admin rights: use command "sudo su" or "sudo -i"


Notes to the installation itself:
Once installation runs as started via command: “./install.sh” following message related to license can be observed:




My install was aborted only once and that was due to following error I faced:

ERROR      2019-11-11 01:40:34.324 (root/sapinst) (startInstallation) [iaxxbjsmod.cpp:83] id=modlib.jslib.caughtException errno=MUT-03025
Caught ESAPinstException in module call: Assertion failed: Unable to verify database access for login SAPSR3. Refer to trace file sapinst_dev.log for further information.

This was pretty much same error message I got last year while installing SAP NetWeaver 7.52 SP01. So I thought it has something to do with expired Sybase DB license that contains the file located at /sybase/NPL/SYSAM02_0/licenses/SYBASE_ASE_TestDrive.lic. However, in my case the file was correctly pointing to March 31st 2021 means it wasn’t expired. In attempt to fix this issue I tried to follow up a comment located in SDN thread. Basically the trick was in the setup of /etc/hosts file. Normally the file format shall be like following:

10.0.2.15 vhcalnplci vhcalnplci.dummy.nodomain

But I put it as opposite:

10.0.2.15 vhcalnplci.dummy.nodomain vhcalnplci

After restarting the linux server (the VM) the installation shall be kicked off with OS command:
install.sh –s

This means the parameter -s suppresses the hostname check. Employing a different format of /etc/hosts the installation worked like a charm.


Enjoy the 7.52 SP04 miniSAP!

More information:

Sunday, November 3, 2019

SAP TechEd 2019 Barcelona my recap

Note: The blog is cross posted on my blog at SCN.

I had a privilege to attend SAP TechEd this year again. It was possible through SAP TechEd 2019 Tutorial Mission contest.

This year due to my workload within project work, I almost forgot about the contest and I finished it very late in August. I think it was even on very last day for the contest's mission - a few hours before deadline. Then I forgot about it again. I thought that I was lucky enough on last year so there is no chance for me to make it happen this year too. Sometime in mid of September a tweets from people who succeeded with the contents started to pop up. I again assumed the TechEd would not be for me this year. How big my surprise was when an email from Developers@sap.com showed up in my mailbox. That was approximately 2 weeks before the event. Afterwards it went very quickly, booking flight ticket and hotel in Barcelona, building an agenda...

So I was there, attending the SAP TechEd again. I flown in a night before it started to be fresh for a conference. From last year, I knew what to pack to take with me. This time there was a nice present to all attendances - a reusable bottle for water. Which served very well, all participants helped conserve a water. Although I saw a one small drawback. The phone app needed separate registration to take a part in water refill program. I can understand that the registration thing hold some people back from participating. Perhaps it would be easier to make an authentication via some social network ID (twitter/facebook/google) or even via SAP ID...

The TechEd started with opening keynote on Tuesday morning. I think it is a kind of tradition to kick off such event with great visual presentation supported by music. It feels like one is on rock start concert and not on the conference. For TechEd veterans it is perhaps normal for me it is still amazing to experience it. I liked Juergen Mueller attitude shown during the key note. Bringing 17 years old programmer girl on a stage was great thing. The future of the world belongs to the youth of the world - also SAP gets that. At her age, I was trying to program some very basic graphic things in Pascal language on 286 type of computer at high school. She did her programming for her school assignment in cloud environment - very different times.
What was announced during the key note? I just focus on things that were related to topics I followed – data warehousing/analytics, integration and ABAP.

At first, an Intelligent Enterprise (IE) was discussed focusing on four examples of End-to-End processes (like Design to Operate, Total Workforce Management, Source to Pay and Lead to Cash). All this was described while emphasize an X data that is flowing around Experience part of the IE and O data flowing around Operation part of the EI whereas Intelligence is central part of the IE.


Later a BTP - Business Technology Platform (reference architecture) was introduced. It is next evolution of SAP’s digital platform. More less umbrella term comprising of four pillars: DB & data management, Analytics, App Development & Integration and finally Intelligent Technologies that are underlying technology foundation.


Next announcement was about SAP HANA Cloud. Which cloud solution based on HANA platform that address storage (multi-level data tiering), performance scaling, processing, quality, and consumption of data. It comes with services like Data Warehouse Cloud (see below) and SAP Analytics Cloud (SAC). Will be available before Christmas 2019. What I got from its presentation is that it is HANA based SaaS offering.


Now into more details of four pillars of the BTP. Within first pillar - DB & Data Management it was nice to see that SAP BW/4HANA has still a prominent spot within SAP business architecture in a category of on-premise apps. In cloud category there is a brand new solution called SAP Data Warehouse Cloud. I do not know how to call it better I tend to refer it as "DWaaS". This abbreviation can be seen in URLs pointing to UI of this solution e.g. https://*.hanacloudservices.cloud.sap/dwaas-ui/ so I guess I am not that far from naming it correctly. The DWaaS aims to be logical DW solution for dynamically changing landscapes. It can consume data coming from SAP BW, BW4, SAP SQL DW, SAP HANA etc. It is SAP’s response to new DWH requirements in cloud world. It is not a product coming out from project blueberry that I heard about on TechEd 2018. However, from what I understand it leverages part of functions that were developed during the blueberry project. More than 2k customers registered for DWaaS already at the time of the key note. Needless to say the DWaaS is in GA as of Q4 this year and DWaaS is one of services of the SAP HANA Cloud.

Concerning second pillar – Analytics. SAP Analytics Could (SAC) will be as of Q4 this year embedded into SuccessFactors. This follows announcement from Las Vegas TechEd where same thing was announced just in case of S4/HANA. The SAC is now primary analytics tools across SAP product portfolio. One more announcement with regards SAP’s BusinessObjects portfolio. Beta version 4.3 of SAP BusinessObjects BI platform will be available in December this year.

Next, the third pillar App Development & Integration. I liked how CPI – Cloud Platform Integration is developing. Especially within integration of SAP solutions and 3rd-party apps via SAP Cloud Platform Open Connectors. Integration flows and data mapping are available on API Business Hub (api.sap.com) now. This is similar to what other integration (IaaS) companies are doing like mulesoft with their templates or built.io (now part of software ag) with flows. ML is used here to suggest best mapping fields by ML based content advisor. There is currently Open Connectors available to provide integration with 160+ systems.

The fourth pillar intelligent technologies. These comprises of Conversational AI, Intelligent RPA, IoT Cloud, IoT Edge. It was announced that will be 200 ML cases live by end of 2019. There was an interested demo show cased for automated user behavior mining. It started by identifying processes that can be automated. There is a tool called “spotlight by SAP” that provides overview of process (e.g. transactions in SAP ERP) that require a lot of manual effort. KPIs like total time spend in UI can be analyzed. Once the process candidate for automation is identified via Intelligent RPA tool, a bot can be created based on data from the user behavior mining. These solutions are coming from SAP spotlight. That is internal SAP startup focused on tools for process transparency and data-driven actions that developed the Spotlight by SAP tool.

Now to the TechEd’s sessions. Unlikely to my first year at the TechEd I was this time more picky while building my agenda. As rule of thumb, I always had a backup session scheduled in case some session would not be interesting enough for me. Anyhow, I attended approximately 20+ sessions, again related to topics I followed – data warehousing/analytics, App development / ABAP. Below I mention few of them.

Data warehousing/analytics
I enjoyed session about “SAP Analytics Cloud, Analytics Designer: Road Map (AIN828)” by David Stocker. I appreciate David’s sense of humor for example while mentioning that lady sitting close to him in the plane on the way to TechEd that had whole P/L printed with her and studying it whole trip :) yeah who on the earth would print the P/L :)

“Integrating SAP Analytics Cloud in SAP Applications (AIN103)” I learned that SAC is now strategic analytics platform for all core SAP business applications. Interesting demos were presented related to Digital Boardroom. Although it is separated product but it is based on different content in the SAC. Normally there are two flavors of the SAC implementation. One is embedded – means it sits on the same system just different tenant is provisioned to customer. Other one is cross app where data is coming from multiple apps to the SAC.

“Modeling a Data Warehouse with SAP Data Warehouse Cloud (AIN378)”. A hands-on session on administration, creating data models and reporting in SAP Data Warehouse Cloud.

“One Data Management Strategy with SAP DW Cloud and BW/4HANA (AIN207)” – presentation on how DWaaS fits into business and IT user’s needs.

“SAP Data Hub: Data Integration with Enterprise Applications (DAT202)” – Data Hub is gaining traction also with newly ABAP, BW, SCP integration and SAC Push API.

“Intelligent Planning with SAP Analytics Cloud (AIN105)” – session so called SAC for planning. It was nice to see all what the SAC is capable of in terms of planning. We will see how all this will cope with current SAP portfolios of planning solutions like BPC (standard/embedded/optimized/simplified, ...)

“Integrating SAP Analytics Cloud in Third-Party Applications (AIN370)” - hands-on session on integration API for SAP Analytics Cloud. We build simple JAVA SCP app that consumed SAC’s API.

“SAC, BW/4HANA, and SAP Data Warehouse Cloud (AIN376)” - hands-on session. I tried examples on how to consume BW/4 query in SAC. This seems to be important feature as BW queries (former BEx queries) will be only objects that the SAC can consume out of the BW/4.

“Overview of SAP BW/4HANA 2.0 (AIN208)” and    “SAP BW/4HANA: Road Map (AIN832)” – BW/4 is around for some time its 2nd version was introduced earlier this year. My only regret is to see that BW/4 simplifications (see BW4SL SAP Notes) are fixed and there are no plans to bring more functionalities of classic BW (like Analysis Process Designer) to BW/4.


App Development & Integration
Session “Unboxing SAP Cloud Platform (CAA115)”, I learned here that SAP Business Application Studio will replaced Web IDE going forward. How subaccount can be created for one account on SCP. In addition, there were interesting information about Neo part of the SCP although it is still supported but as SAP wants to give its customer option to go to any of hyperscalers so focus will be on CloudFoundry part of the SCP.

“Optimize Your Custom ABAP Code for SAP HANA (CAA104)” – For me a many new ABAP concepts were presented like: host expressions (here ABAP can derive correct type of variables from context), CTE - Common Table Expression (temporary results sets in SQL queries that can be accessed in other SQL statements), ABAP SQL Windowing (dividing data sets into subsets), hierarchies within CDS views, new built-in ABAP types, and so on.

“Road Map: ABAP Platform (CAA800), ABAP Strategy (CAA100) and Get the Big Picture of the ABAP RESTful Programming Model (CAA103)”. From product direction point of view, there are two main forks:
1. On-prem = SAP NW AS for ABAP7.5 (versions 7.50, 7.51. 75.2), these are only in maintenance mode
2. Cloud = 
           2.1 SAP S/4HANA Cloud or ABAP Platform for SAP S/4HANA
          2.2 SAP Cloud Platform ABAP Environment (steampunk), not innovation code line
More on steampuk. At last year’s TechEd there was RAP (RESTful ABAP Programming) model introduced. That was with so-called unmanaged scenario where programmer need to code all (e.g. CRUD) operations. Now there is managed scenario where some of functionality like Insert/Update/Delete is delivered out of the box. This certainly speeds up developing of Fiori apps. ABAP is still evolving but now with strategy = “cloud first but not cloud only”.


I spent some time at show flor too. SAP was running many interested things there. Few of them to mention: “unconference” meetups, community lounge, developer garage, community talks / community theater, app space where attendees had a chance to work on SAP tutorials, open source bar where few OSS projects that SAP contributes to were presented, learning zone, SAP runs SAP and others. SAP and especially people from SAP Developer and Community Relations team did pretty good job in here.

Funny thing happened on Tuesday night. I was so focused and in rush to complete tutorials in app space that I did not notice that people are leaving for the day. Security people had to kick me off from there :)

In closing, I want to say that it was great experience to be at the TechEd this year again. I met some people I know from different SAP gatherings (like Inside Tracks and/or Code Jam) there at the TechEd too. Not mentioning meeting strangers over morning coffee or during a lunch. Simply the TechEd is the place where community comes together. So thank you SAP community for having me.

PS: One more thing I want to mention waste management at the TechEd facility. I was very surprised to see that there were no dedicated bins for recyclables (paper, glass, metals, plastics). All the waste produced by conference attendees was just thrown into one type of bin for common trash. I do not think they separate and recycle it later. If the facility operator does not care about it – SAP should. Even it would mean to pick different operator/location IMHO.

- image credits: twitter -