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

Thursday, September 12, 2013

Retraction of data from BW to ECC CO-PA part II

Retraction of data from BW is not that easy topic. I found out that while working with it for some time. BW developer who develops the query which does the retraction needs also to customize the ECC part. And that the tricky part of that. As I mentioned already in my previous post Retraction of data from BW to ECC CO-PA customizing is done in TA KELC. You may face an issue in the test or production system later on. While everything seems to be okay from customizing point of view but query (or retraction) cannot be found in TA KELR – where you attempt to run retraction.

Issue is that you need to change RFC entries that are still pointing into BW system which was used in development of ECC system. By standard functionality ECC doesn’t convert RFC connections. But there is a note (540278 - Retractor: Changes to BW system after Customizing transport) which provide ABAP repot which can do the change of RFC connection name for you.

However there might be other issues. E.g. in TA KELR; even when you have proper RFC in all tables there is an error. You may want to check following views/tables:

V_TKEBWLT               BW-CO-PA Field Assignment: Initial Screen
          TKEBWLTN
          TKEBWLTNT
V_TKEBWLT2              BW-CO-PA Field Assignment: BW Query Operating Concern
          TKEBWLRTR3
V_TKEBWLE
          TKEBWLRTRE  BW-CO-PA Transfer: Assignment On BW System OpConc. Level

 But it doesn’t run. Instead of that following is the error:



No date set Message no. KE321
Diagnosis
No date has been set in the transferred field. date fields transferred:
PERIO (period/year):
BUDAT (posting date): 00.00.0000
GJAHR (fiscal year):
PERDE (period):
System Response
Record was stored in the error file.
Procedure
Enter either "PERIO" or "BUDAT" or a combination of "GJAHR/PERDE".
SYST: Period 000 not defined Message no. AF003
Diagnosis
No provision is made for period 000. It is outside of the period interval as specified by the number of the ordinary and special periods in fiscal year version K4.
Procedure
Check your entries. It is possible that there is a program error, if you have not entered the period yourself. In this case, inform your system administrator.

The issue is most likely caused running of your query with different operating concern as it was supposed to. You may use other op.concern before and once you didn't log out from ECC it still remembers last op.concern used. Therefore clear and set proper operating concern in TA KEBC. Then re-run KELR.


Happy retraction! J


Tuesday, August 27, 2013

What is SAP HANA Live?

SAP HANA Live (formerly SAP HANA Analytics Foundation or SHAF or SAP HANA ANALY) is solution for operational real-time reporting on HANA. HANA Live tries to bridge the gap of having operational reporting on top of OLTP system. Kind of to replace operational DWH as we know it. What you get once you install HANA LINE on top of SAP ECC/RRP is a suite of SQL views which spans across majority of ECC modules (FI, CO, MM, PP, SD, PS, CRM, GTS, AM and GRC). They are SAP delivered SAP HANA calculation views for real-time operational of following categories: different categories:

1. Query Views - for end users for their reporting needs
2. Re-use Views - for customers to have a kind of templates on which they can base their own query views
3. Private Views - cannot be changed, forms a kind of abstraction layer for the DB tables and help SAP to keep the re-use views valid even if a database table might change. For using the query views, customers have a variety of options as they can chose from actually any BI client that offers an SQL interface. Obviously, we recommend using SAP's own BI clients like Analysis for Office, Crystal Reports or the brand new Visual Intelligence.

Currently there are 2000+ HANA virtual data model views. So technically deployment of HANA Live involves:
1. Deployment of above mentioned SQL views into your HANA system
2. Setting up SAP Landscape Transformation Replication Server to replicate data from ECC to HANA
3. Using BI client (SAP BO (e.g. SAP BO Dashboards, SAP BO Explorer, SAP BO Analysis edition for Microsoft Office, SAP Crystal Reports Enterprise), or SAP Lumira).


In addition there are apps on top of HANA Live. Basically they are HANA apps with its own UI. E.g. “SAP Invoice and Goods Receipt Reconciliation”, “SAP Supply Chain Info Center”, “SAP Working Capital Analytics”.
Product was for 1st time released on December 2012. As of August 13th 2013 SAP HANA Live is in Generally Availability (GA).

HANA live has currently following components:
SAP HANA Live Tools
          SAP HANA Live Browser
          SAP HANA Live Authorization Assistant
SAP HANA Live for SAP CRM
SAP HANA Live for EHP4 for SAP ERP
SAP HANA Live for SAP solutions for GRC
SAP HANA Live for SAP GTS
SAP HANA Live for SAP SCM
SAP HANA Live for Policy Management

With now having HANA Live, is it another step (after HANA as itself) to get rid of BW? According SAP it is not. They advise to you both solutions for different purpose:

SAP HANA Live:
- Operational Reporting - can eliminate Operational Data Stores thus redundancy and latency
- Untransformed data (no business rules applied) – no persistence of transformations, original transaction data are used: no aggregates, no replication
- Possible replacement for SE16/SE16N, Report Designer ABAP reports, SAP query (SQVI – QuickViewer) and other native ERP Legacy reporting tools.

BW on HANA:
- Analytical Reporting
- Enterprise Data Warehousing capability (time dependent master data, hierarchies, etc.)
- Information Lifecyle Management - Retention of Data, archiving, near line storage
- Business Rules applied to the data before persisting them
- Enterprise Information (Data) Management - Harmonization and consolidation of data from multiple sources

For further information refer to following sources:
1778607 - SAP HANA Live for SAP Business Suite
1846294 - Rapid deployment of analytics with SAP HANA Live
help.sap.com/hba - SAP HANA Live for SAP Business Suite 1.0
saphana.com/docs/DOC-2923 - comprehensive source of resources on HANA Live

Saturday, July 20, 2013

ABAP: select count on an internal table?

I recently came across interesting fragment of ABAP code. Actually it was causing a problem means ABAP dump.

DATAit_tab    TYPE TABLE OF usr02,
      lt_tab2   
TYPE TABLE OF usr02,
      lv_count  
TYPE i,
      lv_tabnm  
TYPE string.

SELECT *
  
FROM usr02
  
INTO  TABLE it_tab.

lv_tabnm 
'it_tab'.

IF sy-dbcnt NE 0.
  
SELECT COUNT(*FROM (lv_tabnm)
    
INTO lv_count
    
WHERE bname 'DDIC'.
ENDIF.

Apparently developer never tested this piece of code. He or she just simply assumed that it is possible to supply internal table name into SELECT statement. In this case SELECT COUNT which was supposed to return no of lines in that internal table.

However SELECT COUNT on internal tables doesn't work. There are other possibilities how to count no of rows in internal table. You can only supply name of DDIC table into the text variable and SELECT COUNT will count no of rows in the database table.

If you do need to count no of rows in itab as whole w/o any WHERE condition there are following possibilities as far as I know:
  1. Very old fashioned way via LOOP statement. It is not very efficient since iterating over every row of table:

    LOOP AT it_tab TRANSPORTING NO FIELDS WHERE bname 'DDIC'.
      lv_count 
    lv_count + 1.
    ENDLOOP.

  1. Via DESCCRIBE TABLE statement, just you cannot specify any conditions:
DESCRIBE TABLE it_tab LINES lv_count.

  1. Via LINES function, again it is not possible to specify any conditions:
lv_count LINESit_tab ).

  1. Usage of system variable SY-TFILL which with ABAP statements DESCRIBE TABLE, LOOP AT, and READ TABLE is filled with the row number of the internal table.
DESCRIBE TABLE result_package.
IF sy-tfill > 0.

  1. One option to build efficient way how to count the rows with respect to some condition is following. By using DELETE statement we delete records that do not fulfill condition and then we use LINES function to count rows of table.
it_tab2 it_tab.
DELETE it_tab2 WHERE NOT bname 'DDIC'.
lv_count 
LINESit_tab2 ).

Conclusion is that you cannot use SELECT COUNT on internal tables. The statement like:

SELECT COUNT(*FROM (lv_tabnm)

Would only work has if lv_tabnm is text variable and contains the name of a database (DDIC) table. By this way SELECT COUNT is executed on this database table.

- update 09/11/2013 –
Usage no.4 was added. I just want to stress out the reason why to know no of the internal tables is important. To determine number of rows of internal tables is very often used in ABAP programs. Due to the ABAP serves to process business data of high volumes there is always counting of rows in internal tables.

Tuesday, July 9, 2013

Useful class for coding of BW routines in Transformations



Recently I came across a coding in ABAP rule in transformation where simple method from class CL_RSAR_FUNCTION was used. It was method fiscper_calmonth. This simple method derives calendar month (0CALMONTH) as per given fiscal period (0FISCPER).

I had a look into other methods in same class and I found it very interesting. Method contains 55 methods in total in release BW 7.3 SP08. Some of them are very useful. Basic calendar and string function are there. For overview I’m providing full list of methods below. I’m sure I’ll use this class in my next BW developments.

ABORT_PACKAGE Function: Abort Package
ADD_TO_DATE Function: Add Days to Date
CALMONTH_FISCPER Function: Calendar Month ->Fiscal Period
CONDENSE Function: Condense
CONDENSE_NO_GAPS Function: Condense No Gaps
DATECONV Function: Date Conversion
DATE_DIFF Function: Date Difference
DATE_FISCPER Function: Date -> Fiscal Period
DATE_FISCPER3 Function: Date -> Fiscal Period 3
DATE_FISCYEAR Function: Date -> Fiscal Year
DATE_HALFYEAR Function: Date -> Half-Year
DATE_MONTH Function: Date -> Month
DATE_MONTH2 Function: Date -> Month 2
DATE_QUARTER Function: Date -> Quarter
DATE_QUARTER1 Function: Date -> Quarter1
DATE_WEEK Date Conversion in Calendar Week
DATE_WEEKDAY Function: Date -> Weekday (Textual)
DATE_WEEKDAY1 Function: Date -> Weekday (Technical)
DATE_YEAR Function: Date -> Calendar Year
FIRST_WORKINGDAY_MONTH Calculation of First Working Day in Month
FIRST_WORKINGDAY_YEAR Calculation of First Working Day in Month
FISCPER_CALMONTH Function: Fiscal Period -> Calendar Month
FISCPER_FISCYEAR Function: Fiscal Period -> Fiscal Year
IF Function: IF Statement
IS_INITIAL Function: Is Initial
LAST_WORKINGDAY_MONTH Calculation of Last Working Day in Month
LAST_WORKINGDAY_YEAR Calculation of Last Working Day in Year
LEFT Function: Left
L_TRIM Function: Left Trim
MAPPING Function: Field Mapping Transfer Structure
MONTH2_HALFYEAR Function: Month 2 -> Half-Year
MONTH2_QUARTER1 Function: Month 2-> Quarter1
MONTH_HALFYEAR Function: Month -> Half-Year
MONTH_QUARTER Function: Month -> Quarter
MONTH_QUARTER1 Function: Month -> Quarter1
MONTH_YEAR Function: Month -> Calendar Year
NEGATIVE Function: Reverse +/- Sign
QUARTER1_HALFYEAR Function: Quarter 1-> Half-Year
QUARTER_HALFYEAR Function: Quarter -> Half-Year
QUARTER_YEAR Function: Quarter -> Calendar Year
REPLACE_ALL Function: Replace All
REPLACE_FIRST Function: Replace First
RIGHT Function: Right
R_TRIM Function: Right Trim
SHIFT_LEFT Function: Shift Left
SHIFT_RIGHT Function: Shift Right
SKIP_RECORD Function: Skip Record
SKIP_RECORD_AS_ERROR Function: Skip Record (With Error Message in Monitor)
STR_LEN Function: strlen
UNIT_CONVERSION Function: Unit Conversion
WEEK_FIRST_DAY Calendar Week Conversion in First Day of Week Date
WORKINGDAY_MONTH Function: Date -> Working Day of Corresponding Month
WORKINGDAY_YEAR Function: Date -> Working Day of Corresponding Year
AMOUNT_DAYS_OF_MONTH Number of Days in Month
GREATER_OF_TWO_MONTH Which of 2 Months Has More Days Within Period

Monday, June 24, 2013

SAP Fiori

It is been approximately more than a month ago when on SAPphirenow (14-16 May 2013) also SAP Fiori was announced. SAP Fiori is a collection of apps with a simple and easy to use experience for broadly and frequently used SAP software functions that work seamlessly across different devices (desktop, tablet, or mobile). The Fiori is considered as “Consumer grade UI”. Meaning a new, modern and design thinking driven user interface (UI). Fiori currently has 25 apps which cover frequently used functionality with SAP software, e.g. create sales orders, entering time to timesheets, approve requests, etc.

Fiori targets to cover 80 percent of SAP users and 45 percent of SAP system functionalities usage. From technical perspective Fiori is based on SAP UI5 (also introduced quite recently). SAPUI5 is then based on HTML5 based standards. Fiori is optimized for the Google Chrome web browser. Fiori’s back end connectivity is provided by SAP’s oData (Open Data Protocol). Backend functionality is exposed by Gateway (NetWeaver Gateway (formerly called "Project Gateway)) services. Most likely Fiori apps can be ported to any version of ECC 6. Notice that Fiori doesn’t require Sybase Mobile platform called Sybase Unwired Platform (toolkit formally known as SUP).

The pricing of the Fiori? Seems only $150 per user for those above mentioned 25 apps.

To see demos of the Fiori check out: https://experience.sap.com/fiori

See documentation check out: http://help.sap.com/fiori

SCN resources of Fiori: http://scn.sap.com/docs/DOC-41598

PS: Curios about the name? Actually Fiori means "flowers" in Italian.