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 :-)


8 comments:

Anonymous said...

Hi Martin,

thank you for your blog, but can you clarify how exactly I can used user sybsso (or any other, besides sybnpl). I'm using "su sybnpl" command to use this one, but other are not created. Have you created them in your system?
I've installed 7.52 SP04 on ubuntu, and currently stuck with an attempt to increase it's DB size. I've found this blog https://blogs.sap.com/2019/12/22/resize-ase-database-in-npl-7.52-sp-04/ but when I call "sp_configure "allow updates to system tables", 1" I get a permission denied reply. So I want to try with another user.

Thanks again :)

Danil.

Martin Maruskin said...

Hi Danil,

To be honest I'm not exactly how I managed to run to that other sybase DB user - sybsso. I guess it was there I do not think I had to create it.
Sorry I can't help much in here.

Anonymous said...

That blog https://blogs.sap.com/2019/12/22/resize-ase-database-in-npl-7.52-sp-04/ does work and is the best solution I have found to increase the db free space (and fix the hole issue in table sysusages, which was probably deliberately set by SAP to prevent users from using that trial system on large scale).
Suggestions:
su -l sybnpl
pw:
isql -Usapsa -X -SNPL
pw:
> use master
> go
> sp_configure 'max memory', 736621
> go
Result message … etc
(1 row affected) … etc
> exit <<< MY SUGGESTION iS TO EXIT USER sapsa
isql -Usapsso -X -SNPL <<< then log to the db with user sapsso
pw:
> sp_configure "allow updates to system tables", 1
> go
(1 row affected) ...etc

Martin Maruskin said...

Thanks for sharing!

Anonymous said...

Hi Matin,

I've just been though the steps to install AS ABAP 752SP04 Developer Edition on OpenSUSE 15.1 within a VirtualBox VM.

I had some problems with the step:
SAP ASE: Deactivating Granular Permissions
Which is how I found your blog.
- Thanks very much as it solved my problem. I can see from the other comments it was not just me that you helped.

New problem/question.
According to the first paragraph of Julie Plummer's blog -
https://blogs.sap.com/2019/07/01/as-abap-752-sp04-developer-edition-to-download/

"The ABAP application server on ASE 16.0 provides a great platform for trying out the ABAP language and toolset. It is extensively pre-configured with Fiori launchpad, SAP Cloud Connector, SAP Java Virtual Machine, pre-configured backend /frontend connections, roles, and sample applications."

There should be a cloud connector.

Did you find one? When I try https://localhost:8443/ in my VM there is nothing there (not the usual unsafe website message that you can proceed past).

So I downloaded the Linux installer for the Cloud Connector from https://tools.hana.ondemand.com/#cloud

Some bad news from the installation log -
JAVA version is not correct. The supported versions are 1.7 and 1.8. Current java is 11.0.6

So I'm wondering if you have been more successful in connecting AS ABAP 752SP04 Developer Edition with a SAP Cloud Platform Trial Account so that OData services can be consumed while developing SAPUI5 apps?

Thanks again
DT

Martin Maruskin said...

Hi DT,

thanks for stopping by and dropping a comment!
Unfortunately I haven't worked with SAP Cloud Connector with relation to NW Developer Edition yet!
I just tried nwo and downloaded the SAP Cloud Connector. For Java I took SAP JVM as mentioned https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/f069840fa34c4196a5858be33a2734ea.html but nwo I'm fighting with wrong directories as my JAVA is in different directly where the Connector expects it to be :(
go.sh command gives me "Unable to locate java executable"
I will try to see this error later ...
cheers

Anonymous said...

Hi Martin,

Thanks for the reply.

I made some progress and can report successful integration between AS ABAP 752 SP04 running on OpenSUSE 15.1 and WebIDE running in SCP Trial Account (NEO).

Key steps:
1. As you did, I also downloaded the SAP JVM from https://tools.hana.ondemand.com/#cloud
2. After installing I checked the environment variable JAVA_HOME in Terminal and it still pointed to /usr/lib64/jvm/jre-11-openjdk
3. In file /etc/java/java.conf I set JAVA_HOME=/usr/java/sapjvm_8_latest
4. Reinstalled the sac rpm file (using --force as it said it was already installed)
5. Cloud Connector can now be accessed on https://localhost:8443/
6. Configured the Cloud Connector as per https://developers.sap.com/tutorials/cp-connectivity-create-secure-tunnel-neo.html (most of the screens are still the same as those shown).
7. Created a new Destination in my trial SCP account so that WebIDE can access the AS ABAP 752 SP04 system via the cloud connector (using the virtual host and port).
8. Test by creating a new Worklist app from template in WebIDE and selecting the Destination/System from the Service Catalogue in the wizard.

Hope this helps you.
Best regards
DT

Martin Maruskin said...

Thank DT, for sharing your experience!