Tuesday, December 31, 2013

How to start application development on SAP platforms

To get an SAP system where someone could evaluate possibility of SAP platforms, to try new ideas or just simply to play with it is quite difficult to have. It is one of main obstacles and real pain point for new developers or start-up companies that would like to start with development for SAP. Even with possibilities like cloud computing this stays an issue. Within the year 2013 we have seen some things coming from SAP which may to improve the current status quo.
First of all instead of offering trial version of SAP system as downloadable software (like it was miniSAP in past) there is a push of the software to the cloud. In the cloud developers can try out the software without need to install it. This also contributes to the simplification of whole process.

However or luckily few of offerings are still on-promise basis. By this developers can save on cloud provider fees. I personally hope that this will remain for long time. I know a lot of developers which do not have money to use cloud based offerings. Providing only cloud based solution only SAP would close their software for such a people e.g. students.

FOR DEVELOPERS:

Currently there are following SAP offerings for developers. Here I recognize between cloud and on premise offerings:

On premise:

ABAP based SAP NetWeaver:
SAP NetWeaver ABAP Trial 7.02 SP11 Win 64 bit Version, 3.387 GB
SAP NetWeaver AS ABAP 7.03 SP04 64-bit Trial, 3.912 GB

SAP Sybase Adaptive Server:

SAP Sybase IQ:

SAP Sybase ADS (Advantage Database Server):

SAP Sybase SQL Anywhere:

SAP NetWeaver Gateway:

PowerBuilder:

SAP Event Stream Processor:

SAP 3D Visual Enterprise:

BI Software:
SAPUI5:

Cloud:

HANA:
SAP HANA, developer edition (currently SAP HANA Version SPS6, Revision 68) hosted over following could providers: CloudShare, Amazon Web Services, KT ucould biz, SmartCoupt PT
SAP NetWeaver Application Server ABAP 7.4 hosted by SAP could servers

SAP BW Powered by HANA:

SAP Mobile Platform:

SAP Sybase Adaptive Server:

SAP Mobile Platform:

SAP NetWeaver Process Orchestration:

SAP NetWeaver Gateway:

BI Software:

FOR START-UPS / COMPANIES:

There is a program so called PartnerEdge Program which enables companies to maintain relation with SAP. There are following certain areas so called innovation packs in which companies can establish cooperation:

currently: Mobile apps, Integrated apps, Cloud apps, Business Intelligence, Apps for SAP Business One and Big Data

There are several models under which you can establish the relation. For example participation in the program within first year can be even for free. See all the details at sapadpc.com e.g. overview here.

Closing words: as everything within our life’s is being constantly changing also the links provided here may get changed over the time. Therefore always refer to developers.sap.com for the latest changes/updates.

Monday, December 16, 2013

What is SAP ID Service?

Within intensively rise of could computing there is a need to authenticate the users before accessing an could application. Moreover there is a business requirement to have single sign on so users predominantly want to avoid entering login credentials again to web browser while they attempt to access app in the cloud. To fulfill all of these the best option for developer of could app is to use identity management system. By this the cloud based app doesn't need to even administrate the users. By the identity management system another identify provider (IdP) system is used. This can be 3rd party SAML IdP. SAP has some offering in the field as well. It is SAP NetWeaver single sign-on or SAP ID Service (IDS).

In further I will focus on latter one. IDS is SAP's identity provider in the cloud. It is used by SAP also e.g. to manage an access to SAP web sites like sap.com, SAP Store, SMP or SCN. As default IdP it is used by SAP HANA Cloud Platform (formerly known as neo). Basically what IDS does is to verifying user identity, grant authentication and enable secure single sign-on. User just needs to have maintain his/her profile once (it is so called identity) with one password and with that he/she will be granted to access the app. Once user access particular app which has access is managed by IDS via web browser first it is redirected to IDS service (accounts.sap.com). The IDs then checks weather user is authorized to access the app as per user profile/identity. Once it is authorized web browser is forwarded to particular app.

The SAP ID Service is hosted at accounts.sap.com. It has its own component on SMP as: BC-IAM-IDS SAP ID Service.

Monday, December 9, 2013

Direct Extractor Connection (DXC)

Some time ago I blogged about ODP – Operational Data Provisioning which is API is used for internal connection of SAP Data Services (DS former BODS) to (BW) application extractors (before solely used by BW). There is another similar solution which complements ODP. It is so called Direct Extractor Connection (DXC).

Currently there are following options how to transform data from SAP Business Suite to HANA:

  • SAP Data Services (DS)
  • SAP Landscape Transformation (SLT)
  • Sybase Replication Server

With respect Direct Extractor Connection (DXC) consider following features: It is data provision tool (ETL tool). It is utilizing existing BW data sources. It is not real time solution. There are not possible complex transformations means no extra features or so called simple ETL.
Data provided by DXC is exposed directly to HANA's XS engine. Delta mechanism via data is being transformed is done by HANA's IMDSO (In-Memory DataStore Object) with activation processing. There will be particular datasource having its own IMDSO object sin HANA where the data will be flowing into HANA. You may not be able to change datasource key in standard TA RSA2 or RSA6. Therefore to change enable change of key of datasource you can user ABAP report ROSOA_CHANGE_KEY. The ABAP report comes with SAP note 1677278 - DataSource: Changing the key definition (A version). Load of data to HANA happens similarly as any other BW load. You can use InfoPackage (encapsulated into Process Chain) for that. On HANA side all tables are created: active data, change log, systems table. You need to use these tables in HANA model later.

Prerequisites / availability:
DXC needs at least ECC 6.0
DXC became generally available with HANA SP4

For more details check out following sources:
1710236 - SAP HANA DXC: DataSource Restrictions
1583403 - Direct extractor connection to SAP HANA
1670518 - SAP HANA Direct Extractor Connection: Monitoring
1714852 - Troubleshooting SAP HANA DXC issues
1677278 - DataSource: Changing the key definition (A version)

Thursday, November 28, 2013

Unified SAP Developer License

This week SAP announced unified SAP Developer License. It is much expected initiative from many developers. This is license which will be used for most of ABAP and Java downloads available on SCN’s Download Center and SAP cloud offerings for developers. I guess that none of us lazy ABAP developer will ever read it fully. Bu what is most important to is and I quote from Juergen Schmerder blog:

Yes, that does mean you are free to share your ABAP projects on Github!) and it is free of charge and not limited in time.

So thank you SAP to make us – ABAP developers happy!


You can find full license terms here.

Monday, November 11, 2013

How to read other’s program data

When it comes to enhancing SAP functionality we usually talks about user exists, BAdIs and enhancement points. Their main purpose is to extent SAP standard functionality. As particular customer needs may differ from what is offered by standard enhancements are needed to fulfill that particular need. Therefore SAP ABAP programmers are very well known of them.

What does it take to implement the enhancement? Basically you need to find a point in standard code where you plug-in your part of enhancement code. It is not an easy to do so and it takes a lot of
debugging. What is even tricky you may get into the situation where you exactly know where to put the code but you do not have all the input information in order to produce desired output information. This is often case as input parameters of standard function modules or forms may be very limited. So some information that is needed may not be at the right place. But case can be that data is there sitting in memory just it is not part of interface of that standard functionality. Therefore you need to explore what are global data of that program module which were loaded in memory. This can be done using ABAP field symbols. Field symbol enables you to access the place in memory. It is placeholder or symbolic name for other field. It doesn't physically store the data for the field, it just points to its contents. It can point to any data object. Prerequisite is that the field symbol needs to be declared first before is assigned to the data object.

Field symbol has following declaration syntax:
FIELD-SYMBOLS <fs> [typing].

Here’s syntax for assigning Field symbol to the data object:
ASSIGN dobj TO <fs>.

Once we do not need Field symbol we can cancel assignment by following statement:
UNASSIGN <fs>.

Now let’s go back to original topic of how we can read global data from other programs. In order to read it you need to know what the ABAP program is where data object is used. Also it is necessary to make sure that a data object in that ABAP program has a value. Once we know that we prepare variable in format:

(PRG)DOBJ

Where PRG is the name of an ABAP program and DOBJ is the name of a global data object of this program. Let see in following short ABAP fragment of code:

DATAlv_data(30TYPE c.
FIELD-SYMBOLS  <> TYPE ANY.

lv_data 
'(RSAWBN_START)L_AWB_VIEW_MODE'.
ASSIGN (lv_dataTO <>.

IF <fs> EQ 'M'.
  "RSA1 was started 
ELSEIF <fs> EQ 'A'.
  "RSMON was started 
ELSEIF <fs> EQ ''.  
  "RSAWB was started 
ENDIF.  

Now if the program PROG (in this case = RSAWBN_START) is loaded during execution of the statement ASSIGN in the same internal mode as the current program, the data object (RSAWBN_START)L_AWB_VIEW_MODE is searched for in this program, and the field symbol points to this data object after the object has been successfully assigned.

This example would help us in imaginary extension of TA RSA1 of BW system. With help of this code we could possible enhanced RSA1 depending in which mode it was started. By this we would recognize in which mode RSA1 was started and we would put code into all 3 IF/ELSEIF statement.

Used sources:

Sunday, November 10, 2013

Dirty read in ABAP

SAP systems are based on Relational Database Management System (RMDB) systems or simply said database systems. That’s basically the place where all the data of the systems is stored in. There is an isolation property defined in databases. It is about definition when changes to the database are visible to other simultaneous or concurrent operations. Just side note isolation is one of ACID (Atomicity, Consistency, Isolation and Durability) properties of the databases.

From particular database systems point of view the isolation topic falls under one of phenomenas. Particular database recognizes phenomena during processing of concurrent transactions. If situation in the database is unclear we call it the phenomena. There are following phenomenas defined in e.g. SAP MaxDB as it follows ANSI/ISO standard SQL 92:

  • Dirty Read
  • Non-Repeatable Read
  • Phantom
With respect to Dirty Read: there is a situation when A row is modified in the course of a transaction T1, and a transaction T2 reads this row before T1 has been concluded with the COMMIT statement. T1 then executes the rollback statement, i.e. T2 has read a row that never actually existed. So it is dirty because we are not sure if we getting real data by that read statement.

Basically ABAP programmer should always try to avoid the phenomenas when designed locking behavior of custom tables.

Used sources:

SAP innovation mission control centre

SAP has a new offering to support SAP implementation projects. It is so called innovation mission control centre. They use a kind of NASA or control center approach to help the projects. SAP support services experts (part of SAP Active Global Support (AGS)) are using best practices to check, integrate, consolidate, leverage and run SAP solution you implementing to maximize its value.

The control centre comprises of three levels:

Innovation Control Center (ICC) - at customer’s/project location
Operations Control Center (OCC) – at customer’s/project location
Mission Control Center (MCC) – remotely located at SAP facility

Each is designed to complement the other and provide high-level support throughout the various stages of an SAP-centric solution’s lifecycle.

Current locations of mission control centers are: two in China, U.S. center in Pennsylvania, Germany, Brazil, Ireland and Mexico.

Unfortunately (usually within the SAP) more detail about the service itself is not available. I couldn’t find even one single SAP Note about it. The only one very brief presence of term “control centre” is in note 1170668 - The role of SAP Solution Manager in Remote Service Delivery. But note basically says about some of AGS services. So I’m not really sure if services described in the note are actually mission control centre services.

Used sources:

Thursday, October 24, 2013

Reporting security issues to SAP

Security in today’s interconnected digital world is very important. There are many hacks, threats, attacks, viruses reported on daily basis. Every year hackers are using more sophisticated methods. As many other software vendors SAP is very much into the security aspects within its software. Basis team of every customer running SAP should regularly monitor security SAP Notes (see service.sap.com/securitynotes). SAP have patch day - Tuesday. It is every second Tuesday of month (so called SAP Security Patch Day).

But purpose of this blog post is intended to provide basic guideline to someone who may find security issue within SAP software and wants to report it to SAP.

So how to report a Security Issue to SAP? Basic advice is provided by SAP at following page:

Basically there are two options depending who you are:

1 SAP Customer:  In case you find out possible security issue report it to SAP via SMP as customer message at service.sap.com/message

2 Independed:  If realize possible security issue, please report it to SAP Product Security Response Team via email mailto:secure@sap.com using PGP for e-mail encryption.



If you are curious how many issues were discovered by independed researchers and who are those people look at following page: http://scn.sap.com/docs/DOC-8218 Page provides that statistics – a kind of hall of fame or acknowledgments to security researchers.

Wednesday, October 23, 2013

SAP BusinessObjects BI platform reference architecture

Recently I found on SDN very interesting content related to BO. It is set of 2 documents describing in brief capability of every SAP BusinessObjects tools.

First document is clickable map of all the tools. You can see the purpose and changes done into the tool within major versions or feature packs. The document comes in Adobe Flash form and it I clickable. In current version all tools from SAP BO BI platform 4.0 Feature Pack 3 are depicted. There is a horizontally split for all the tools:

Client / web / management / storage / processing / data


Second document is related to architecture of client apps / web / processing servers of SAP BO BI platform 4.1. Basically what you can get here is how BO tool is supported by major product and databases. Also you see what database connection / access is supported:


SDN is providing gateway pages to those documents as well. You can find it here.

TA to maintain Variables Screen for Variable Selection of BEx reports run in TA RSRT

Recently I found TA RSLWSPVARSCREEN in SAP NetWeaver BW based systems. I was wondering what purpose it has. At first sight it deals with variable screen of BEx reports. However this is limited to only variants which are used in TA RSRT. So basically if you have some custom functionality build on top of TA RSRT plus you have stored variants of BEx query used in TA RSRT you may use TA RSLWSPVARSCREEN to maintain/adjust variant.

And here’s how you maintain variant:


Selection screen of TA RSLWSPVARSCREEN loos like following:

Off course you can still use TA RSRT to the same.

TA as itself is liked to ABAP report RSL_UTIL_CALL_VARSCREEN. Currently there is only one SAP Note which mentions this TA:

1642127 - Workspace: Variable scrn for variable maintenance (back end)

Tuesday, October 8, 2013

“Last data update” in Analysis Office (AO)

As BusinessObjects Analysis Office (AO) is about to replace Bex in near future there are a lot of features that are being added to AO. One of the features that BEx web reporting has is “Last data update” in web reporting. Basically it shows the latest date and time of loads in all InfoProvider involved in Multiprovider on which particular report is based on. Similar functionality is offered in Analysis Office for MS Excel.


In version 1.3.9.2462 of AO this functionality is accessible from menu Info Field -> Last Delta Update or you can drg&drop it from Information tab of right side toolbar. Basically functionality is built into AO’s Excel add-in as macro and there are 2 functions available:

=SAPGetSourceInfo("DS_1", "LastDataUpdate")
=SAPGetSourceInfo("DS_1", "LastDataUpdateMaximum")
1st function returns the oldest load and 2nd one the newest load. First parameter is always the name of report (AO calls it DataSource) inserted into Excel’s worksheet.

My other posts on AO topic:


Monday, October 7, 2013

How to get rid of GP* reports

So called GP or Generated Programs are behind some BW functionalities like transformations or BW queries. Existence of obsolete GP reports in SAP BW systems may cause problems. Here I’ providing a one example. Imagine a case of transformations when business logic is coded in ABAP includes. If for some reason name of ABAP include changes e.g. because of change in ABAP naming convention a new ABAP include is included in GP. As transformations get reactivated and as it changes it GP* report name we have in system also old GP* where still old ABAP include is included. If we want to delete old ABAP include it is not possible as there is still an old GP* report where old include is included. So we are in in stalemate situation.

What are possibilities to get rid of obsolete GP* report?

1. Run report SAP_DROP_TMPTABLES. However this report has also downside. It will delete all GP* reports in the system. This will cause that almost everything (see 1139396 - Temporary database objects in BW 7.X, 449891 - Temporary database objects in BW 3.x) w/o taking into account whether or not they are still in your system. So you will be in need of regeneration of a lot of objects. Therefor usage of this report is no-go.

2. You can write small ABAP report which will delete obsolete GP*. As template you can use code below. You can have similar program in all the systems in your landscape. But at least put GP* name on selection screen to make this small program re-usable.
DATA: lv_rep TYPE REPID.
lv_rep = 'GP4TV9WHSM6L4CTUFESVKHU9AN8'.
DELETE REPORT lv_rep.
IF sy-subrc = 0.
  WRITE: / 'GP* deletion OK'.
ELSE.
  WRITE: / ' GP* deletion NOK'.
ENDIF.


What would be other options? Hmm… good question. Actually I raised this topic to SAP via tool called Idea Place. So far no progress on this topic. Apparently it was not promoted by enovty people L

Wednesday, October 2, 2013

Max no of records to see in PSA maintenance screen

Recently I needed to check large data set in PSA. I wanted to list all data records that arrived to PSA from source system. Source was getting me over 3 millions of records. On PSA maintenance selection screen there is a possibility to specify no of records that is supposed to be displayed. Even I had approx. 3 millions of records I was not able to get them all into PSA’s output screen.



I tried to debug the functionality which displays the data. I found out that within the code there is limit on no of records to be displayed:
MODULE user_command_0500 INPUT.
...
  
if g_record_max >= 2147483647.
    g_record_max 
2147483646.
  
endif.
...
The limit is 2,147,483,647. Even if I would exceed the number on the screen by entering higher no I would be getting following error:


To be honest I’m not sure why I was not able to pull out all the records. Finally I managed it differently as I went directly to corresponding PSA transparent table via SE11. So at the end it was not an issue; but I’m curious to know why I cannot see more (all) the records.
PS: no 2,147,483,647 is prime number and is one of only four known double Mersenne primes. It has strong significance in computing because it is the maximum value for a 32-bit signed integer (int).

My other posts on PSA topic:


Monday, September 30, 2013

SAPUI5


Earlier this year SAP came with their new UI technology called SAP UI5. Wait a moment don't they have other UI technologies? Right they do have. Let's do some check and list some of them:

SAPGUI, NetWeaver Business Client (NWBC), browser-based classic dynpros (HTMLB), Business Server Pages (BSP), webDynpro for Java and ABAP, SAP CRM web client, SRM web client, Interactive Forms by Adobe,…

So why new UI? We can look at SAPUI5 as SAP’s HTML5 controls library. SAP is using it as the standard User Interface Control library in all their future applications that need a “consumer grade” User Experience. From technical perspective UI5 is based on HTML/CSS/Javascript and built on open libraries such as jQuery. SAP basically took what was available in open source standards like JQuery, HTML5, JavaScript, CSS and only enhanced it where there was lack of enterprise functions. UI5 is optimized to consume REST/OData services as exposed by e.g. SAP HANA, SAP Netweaver Gateway, SAP HANA Cloud Gateway etc.

SAPUI5 is bundled with SAP NetWeaver Cloud (code name Neo or Project River) which is OnDemand offering or Platform-as-a-Service (PaaS).


UI5 get to know

- 28/01/2014 update -
SAPUI5 has twin buddy called OpenUI5 which is basically same thing just open source based.

SAP Screen Personas

SAP came few times with initiatives how to simplify and even reduce number of SAP screens and fields on the screens. There are options within different SAP products e.g. in customizing where particular screens/fields can be hidden if not used for that customer or SAP implementation. These initiatives are really important. SAP software is covering a lot of industry solutions basically we would hardly found some major industry which is not covered by SAP. Therefore all the screens are really very advanced supporting needs of different industries. Downside is that such as screens/fields are heavy containing a lot of features tied to wide functionalities.

Other initiative was GuiXT. Provided by 3rd party company (Synactive) it is a way how to  customize SAP GUI user interface enabling to narrow down no of screens/fields without touching coding (e.g. ABAP or dynpros). More details about GuiXT see here.

In 2012 SAP came with another possibility. It is called SAP Screen Personas. Basically it is aiming same goal. In contrast of GuiXt it is browser based tool for personalizing SAP Dynpro screens. Notice that Personas works on most of dynpro screen. However it doesn’t work on webdynpros based apps (e.g. app like SAP CRM web client or SAP SRM). It can run as far as you accessing SAP backend system via web browser. It is compatible with SAP NetWeaver Business Client (NWBC) as well as with old ITS. Personas are supported by Microsoft Silverlight (app framework for writing and running rich Internet applications; similar Adobe Flash) and HTML. Personas are part of SAP’s User Experience strategy – they enable improving of SAP screens. In lights of other new SAP initiative like SAP Fiori (which aims to renew widely used SAP user scenario) and SAP UI5 (UI to create new SAP apps) Personas are complementary. Again no programming is involved in Personas deployment.

Screen Personas are delivered as SAP NetWeaver software Component called PERSOS; means it is add-on which needs to be installed into your NetWeaver backend system. NW kernel 7.21 is required. You can customize SAP Personas via TA SPRO -> SAP Customizing Implementation Guide -> Cross Application Components -> SAP Screen Personas.

SAP Screen Personas, version history:
2013 July: Personas 2.0 and Personas 1.0 SP2
2013 April: Personas 1.0 Service Pack 1 (SP1)
2012 December: SAP Screen Personas 1.0

Coming back to GuiXT: As per note 1825312 (Maintenance strategy of GuiXT) GuiXT is still supported and there are currently no plans to remove it from SAP GUI installation.

SAP Personas Resources:
1826286 - FAQ/How-To Guide for SAP Screen Personas
1884539 - Considerations when using SAP Screen Personas
1776739 - Release strategy for the ABAP add-on PERSOS