Tuesday, January 19, 2016

How to manually implement SAP Notes

A little while ago I wrote blog post about useful report that can be leveraged while implementing several SAP Notes. With help of the report it is possible to load multiple SAP Notes corrections into the system where the t-code SNOTE can pick them up from.

I had few inquiries from readers of my previous blog. They were interesting on topic how to actually download SAP Notes corrections from SAP Service Marketplace (SMP) before they can use the report mentioned. I’m going to elaborate it in more details in this blog post. Usually it all starts at SMP.

Once the SAP Note that has a correction that needs to be implemented is found it needs to be downloaded. Usually the Notes with correction have a Download button on the Note’s screen at the SMP – in Notes application: service.sap.com/notes.


Once someone clicks on the button a new pop-up windows is opened. It informs about adding the object into basket of SAP Download Manager application.


Normally the object can be downloaded via the Download Manager. However in case there are just few objects that are being download the download can be simply done over HTTP protocol. So someone has just click on “Download Basket” button and content of the basket is displayed. From here just a simple click is needed on the particular object and browser displays dialog to save the file locally on user’s machine.


Once all objects from SAP Notes are downloaded to local machine like one above then they need to be uncompressed (usually they are in form of ZIP files). Now the report mentioned in my previous post takes place. Simple run the ZSCWN_NOTES_UPLOAD report in e.g. t-code SE38. On its selection screen enter path where the files with the Notes corrections were stored. After report ran there is a message “Files loaded” appearing in status bar of SAP GUI.


Finally t-code SNOTE is used to implement the corrections of the SAP Notes.
 

Sunday, January 17, 2016

How to recognize between 3.x and 7.x BEx query?

SAP BW in its versions starting with 7.0 introduced many changes to BEx queries.  This resulted in a situation that there are two types of queries. First there are “old” or 3.x based queries. These were created with BEx Query Designer 3.x tool. On other hand we have “new” or 7.x based queries created in BEx Query Designer 7.x tool.

As a side note sometimes in SAP documentation they refer to 3.x BEx as “Business Explorer 3.5” or “BI BEx Suite 3” or “NW 2004” and to 7.x as “NW 2004s” or “BI BEx Suite 7” or “BEx 7”.

SAP advised to perform 3.x based queries migration to 7.x fashion right after the 7.x version popped up. However customers were neglecting it. The fact is that even in SAP BW 7.3 the 3.x based queries still run without problems. In version SAP BW 7.4 the BEx tools (Query Designer and Analyzer) of version 3.x are not available but Analytic Engine of BW 7.4 can still execute these queries.

Even we still can run the 3.x queries in BW 7.4 it is highly advisable to migrate it finally at this point of time. The BEx queries have gotten many new features in BEx 7.x. Also new BEx Query Designer of 7.x was redesigned so therefore it makes no sense to keep the query in old fashion.

Now how to recognize what queries are in the SAP BW system which the 3.x based? Version of the BEx tool that was used to edit particular BEx Query elements is captured in table RSZCOMPDIR. The table has column called VERSION which hold information about version of the reporting component. And exactly this is the field that tells us either it is query of 3.x or 7.x. As per value of the column; if it is higher than 100 it means that 7.x query if it is less than 100 means it is 3.x.

In case you want to perform the migration of old queries you might be interested to read further. The migration is quite easy in fact. All that needs to be done is to open the BEx 3.x query in BEx 7.0 Query Designer and save it. Once you hit SAVE button on the toolbar the query is migrated. It means you can open it only in 7.x BEx Query Designer and it can’t be opened in BEx 3.x Query Designer again. On such an attempt you will get a following message:

This component was edited with a more recent version of the Editor. You also have to use the more recent version to edit further. Further processing not possible. Update your front end'.

There is one more thing. If you open the old query in new BEx Query Designer the system performs automatic backup of the query. It stores the backup of the query and its component which was originally created in 3.x version of BW. The backup components can be recognized by value “B” of column OBJVER of table RSZCOMPDIR. Unless the query is saved in the BEx Query Designer 7.x it still can be opened in old BEx QD even it has backup version. There is an ABAP report (COMPONENT_RESTORE) provided which can be used to convert migrated query to 7.x back to 3.x version. Needless to say this is not foreseen to be used too much; of course. Also notice that once restore is done then all modifications done with QD 7.x are lost.

There is a possibility to prevent creation of the backup version of the query. It can be achieved by implementing following parameter in the table RSADMIN and setting its value to X: QDEF_NO_3X_BACKUP


Useful information:
1932461 - SAP BW 3.5 BEx tools / BW 3.5 frontend add-ons are incompatible with BW7.4
1807522 - BEx 3.5 Objects Migration to BEx 7.0
1097674 - NW2004s: Administration of backup object version
949330 - NW04s: Query backup and restore
1410878 - Maintenance for BW 3.5 front-end add-ons

Monday, January 11, 2016

How to prove your SAP certification?

SAP Consultants work hard to earn certification. Once it is secured they also want to make it visible that they have it. This is important to distinguish between those who really have it and “those” who just claim to have it. How to make prove that someone who claims to have it really has it?

SAP is providing dedicated tool where it is possible to do kind of “certification check” on person who claims having the SAP certification. Once someone earns the SAP certification he or she can manage the certification(s). Also it is possible to update personal information, review current certifications etc. The most important feature of the tool is that it allows publishing one’s credentials to so called “SAP Certified Consultant Registry”.

How does it work? It is very simple. After successful completion of the SAP certification a logon credentials to the tool are provided by SAP. After that the consultant can manage it by himself. You can prepare URL which points into your certification and include it in your CV.

The tool is available via link: www.sapconsultantregistry.com here you can lookup someone’s certification.

SAP Credential Manager: www.sapcredentialmanager.com here you can manage the certification.

Notice that it takes 10-14 days after you have passed an SAP certification exam to see it in the registry. If you earned the certification in the past and you do not have an account into the tool you can request it via SAP Education Department. Once you have it but facing logon issue you can request reset of password via: credential-manager@sap.com

Update 08JAN2022

Sites mentioned above do not work anymore. If you achieve SAP certification, you can prove it via site called credly.com which is endorsed by SAP via so called badges.

 

More information:

SAP certification homepage

Certification Credential Manager


Saturday, January 9, 2016

Simple SAP related flow in MuleSoft application – IDOC based

Similarly as in my previous post I’m sharing a little about my experience while working with MuleSoft Mule ESB platform.

In next text I depict simple flow in the mule which listens for incoming data coming into the mule’s app from an IDoc generated in SAP. Once the IDoc of certain type is created in the SAP it is displayed in the app’s console. Needless to say that the IDoc gets generated in the SAP when some business data gets modified (created/changed/deleted). There is quite extensive configuration to be done at SAP side with regards to ALE customizing in order to setup the IDoc generation. On the mule side there is just an SAP Connector configured which acts as the IDoc listener. The IDoc Basic Type needs to be specified in its Object Name field. All parameters for connection form the mule app to the SAP are taken via parameters form mule-app.properties file.


Here’s the mule app’s console output looks like:

Related post:


Simple SAP related flow in MuleSoft application – BAPI based

Recently I worked for one integration focused assignment. We used integration platform from MuleSoft called Mule ESB (Enterprise Service Bus). The Mule ESB is a lightweight integration platform based in Java used to integrate different systems. As my background is mostly SAP and in this space the SAP has its own integration platform called SAP PI it was whole new world to me to work with the mule.

In next paragraphs I depict simple flow in the mule which calls a BAPI at the SAP side and shows the data returning by the BAPI. The application is started by triggering URL (http://localhost:8081/) on which HTTP Listener element listens. After that a call of the BAPI in the SAP is executed and returned data is written by Logger into the app’s web page where it was triggered from.

From configuration point of view there must be whole setup of ALE customizing done at the SAP side. At the mule’s side there is SAP Connector used in the flow. It is acting as trigger of the BAPI call. The BAPI name is specified in Object Name of the SAP Connector element’s properties. Along the Object Name also XML Definition (see below) needs to be provided. 


Here’s how the XML definition for BAPI looks like:


Here’s the mule app output:

How to programmatically activate ABAP report

Recently I wrote blog post about topic of syntax checking from ABAP reports. Now as next logical step let’s talk about an activation of the ABAP report programmatically from the ABAP. Usually every dictionary object has to be activated before it can be used. The ABAP reports are not an exception.

By activation process a source code of the ABAP report is being checked for syntax errors and afterwards active version of the report is generated. As last step of the activation process a load version is generated.

There is also a process of the ABAP report generation. Unlike activation process this one only generates a new load version of the program. So no activation part takes place.

Below I’m providing to simple program for the ABAP report activation.


1. Activation leveraging FM REPS_OBJECT_ACTIVATE:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
REPORT zmm_abap_activate01.

PARAMETERS: p_prg  TYPE e071-obj_name,
            p_otyp TYPE sewor_working_area-object DEFAULT 'REPS'. "REPS=report, METH=method

CALL FUNCTION 'REPS_OBJECT_ACTIVATE'
  EXPORTING
    object_name = p_prg
    object_type = p_otyp
 EXCEPTIONS
   not_executed = 1
   others       = 2.

Source code available: here

2. Activation via statement “INSERT REPORT”:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
REPORT zmm_abap_activate02.

PARAMETERS: p_prgsrc TYPE sy-repid, "report where source code is read from
            p_prgtgt TYPE sy-repid. "target report that will be created

DATA: lt_source  TYPE TABLE OF string,
      ls_type(1) TYPE c VALUE '1'. "1=Executable program

READ REPORT p_prgsrc INTO lt_source.

INSERT REPORT p_prgtgt FROM lt_source PROGRAM TYPE '1' UNICODE ENABLING 'X'.

Source code available: here

Related posts:
How to programmatically check syntax of ABAP report

Friday, January 8, 2016

How to find out InfoArea for particular BW object type?

- update on 24DEC2021 - 

I run into this issue quite often. I need to find out where in BW object’s tree in modeling area of RSA1 the object is precisely located. I mean what is an InfoArea where particular object is located. Well I can search for it and once it is found the system gets me directly into its position. However it gets worse when I do not have an authorization to access the object. In such a case even search does not find it. Therefore I have to lookup particular InfoArea manually. Here I’m posting a kind of cheat list with all the tables which can help to lookup the InfoArea of different BW object types.

Kindly notice that list of BW object types is not comprehensive but it server with few basic and most used types.

BW obj type
Table
Input field
Field which has InfoArea’s name
InfoObject
RSDIOBCIOBJ
RSDCHABAS
IOBJNM
CHABASNM
INFOOBJCAT
INFOAREA
DSO
RSDODSO
ODSOBJECT
INFOAREA
SPO
RSLPO
LPO
INFOAREA
OpenHub
RSBOHDEST
OHDEST
INFOAREA
InfoCube
RSDCUBE
INFOCUBE
INFOAREA
Composite Provider
RSDDCOPR
COMPNAME
INFOAREA
Data Flow
RSDFDMOD
DATAFLOW
INFOAREA
HANA Analysis Processes
RSDHAMAP
HAAPNM
INFOAREA
HANA CompositeProvider
RSOHCPR
HCPRNM
INFOAREA
InfoSet
RSQISET
INFOSET
INFOAREA
Planning Sequence
RSPLS_SEQUENCE
SEQNM
INFOAREA


Guide: e.g. for InfoObject go to table RSDIOBCIOBJ and for given IO name in field IOBJNM value of field INFOOBJCAT gets InfoArea.

More information:

Tuesday, January 5, 2016

How to programmatically check syntax of ABAP report

Dynamic generation of ABAP reports is very useful feature. While generating ABAP reports on the fly from other ABAP report it is very useful to get syntax of the generated ABAP checked before it will run. Having the syntax check in place can prevent to undesirable dumps.

In this blog post I’m not going to deal with many ABAP tools that are available in the system (like tcode SAMT – ABAP program set processing, tcode SCI - Code Inspector, tcode UCCHECK – Check for syntax errors in Unicode environment, etc.). These tools are very useful when performing of mass check for many programs is needed, like during upgrade projects.  Here I’m just looking for a ways how to perform syntax check of one ABAP report from other one. In order to explore this I created two test programs that leverage different approaches of ABAP code syntax checks.


1. Syntax check via statement "SYNTAX-CHECK FOR":


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
REPORT ZMM_ABAP_REP_SYNTAX_CHECK01.
* ver 1 via statement "SYNTAX-CHECK FOR"
PARAMETERS: p_prg TYPE sy-repid.

DATA: lt_source TYPE STANDARD TABLE OF string,
      ls_msg   TYPE string,
      ls_line  TYPE i,
      ls_wrd   TYPE string,
      ls_dir   TYPE trdir.

READ REPORT p_prg INTO lt_source.

SELECT SINGLE * FROM trdir INTO ls_dir WHERE name = sy-repid.

ls_dir-uccheck = ' '.
SYNTAX-CHECK FOR lt_source MESSAGE ls_msg LINE ls_line WORD ls_wrd
             DIRECTORY ENTRY ls_dir.
IF sy-subrc = 4.
  MESSAGE ls_msg TYPE 'I'.
ENDIF.

ls_dir-uccheck = 'X'.
SYNTAX-CHECK FOR lt_source MESSAGE ls_msg LINE ls_line WORD ls_wrd
             DIRECTORY ENTRY ls_dir.
IF sy-subrc = 4.
  MESSAGE ls_msg TYPE 'I'.
ENDIF.


Source code available: here

Example of output:


2. Syntax check via FM EXTENDED_PROGRAM_CHECK interactive version:


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
REPORT ZMM_ABAP_REP_SYNTAX_CHECK02.
* ver 2 interactive version via FM EXTENDED_PROGRAM_CHECK, 
* output comes in SAP screen nicely formatted 
PARAMETERS: p_prg TYPE sy-repid.
DATA: lt_result     TYPE slin_result,
      lt_resultstat TYPE slin_result_stat.

CALL FUNCTION 'EXTENDED_PROGRAM_CHECK'
  EXPORTING
    program     = p_prg
  IMPORTING
    result      = lt_result
    result_stat = lt_resultstat.

CALL FUNCTION 'EXTENDED_PROGRAM_CHECK_SHOW'
  EXPORTING
    result      = lt_result
    result_stat = lt_resultstat
    repid       = p_prg.

Source code available: here

Example of output:

As an example of second method you can take a look into SAP BW program RSAN_WB_VERI on how this is used in more sophisticated way.

Related posts:
How to programmatically activate ABAP report

Sunday, January 3, 2016

What was (is) SAP Box and what is SAP Mobile Documents?

Few years back I wrote a blog post about platform used by SAP to manage document management. That time it was called as SAPMats. In 2012 the SAPMats was replaced SAP Box. The SAP Box was in use first by SAP sales team and later deployed to larger amount of employees. Initially it was leveraging SAP Afaria technology which is a mobile device management software product. It is used to connect mobile devices (smartphones/tablets) to computers to the company network. The Afaria was originally independed company which got under SAP’s wings after many acquisitions which ended while SAP acquired Sybase. After some years of usage the SAP Box was decommissioned and its successor is SAP Mobile Documents (mDocs).

The mDocs is basically a solution for files sharing regardless of what OS platformand device user is using. It is designed for users who need to collaborate between each other’s.  A security and control of business content are taken in consideration in this solution at very large extend. Users are enabled to access from anywhere and anytime any documents that they need on any device. As just brief overview here are supported platform which user can access the documents from: Microsoft Windows, Apple Mac OS, Apple iPad and Apple iPhone, Android powered device, HTML5-enabled browsers, Windows Phone and tablet.

SAP Mobile Documents is available as on premise and also as SaaS solution in the SAP HANA Cloud Platform. The product is currently available in its version 1.0 SP05.

More information:


PS: as this is my very first post in this New Year, I wish all my readers successful and wonderful New Year of 2016!