Thursday, March 26, 2009

Rebranding of SAP BI products names


As of January 2009 SAP AG has rebranded portfolio of its BI products. SAP BW which was meanwhile called NetWeaver BI (the eldest name it had was BIW) is now officially called SAP NetWeaver BW (SAP NW BW). Some other products are affected by this change as well. BI Accelerator (BIA) has now new name BWA - Business Warehouse Accelerator. By this change SAP is returning back to one of earliest name - see Short history of BW. A Term NetWeaver BI was used less then three years approximately.

Now SAP NW BW mostly comprises of classical Data warehousing functionalities like: DW management, ETL, modeling, Business planning, reporting & analyses (query, web apps), Meta data management, monitoring, Hub and spoke services, Information broadcasting, BW Accelerator. It is not very clear but based on this recent name change we can assume that term BI is going to be used more in terms of former Business Objects products portfolio. See more information on official SAP pages.

Wednesday, March 25, 2009

SAP system crashes


Core dump – when SAP’s system work process crashes with error SYSTEM_CORE_DUMPED a text (core) file is always written to the subdirectory /usr/sap/SID//work. Such a file is used to facilitate troubleshooting afterwards. Content of file is a “snapshot” of program status, memory dump, C Stack, etc. in time when error occurred. Name of file is simply “core” if it wasn’t customized in different way. Usually only one or more work processes die and kernel restarts them automatically. System is able to recover from this faulty situation by it self. Core dump is sometimes called by term “mode termination”.

Signal and core dump – this SAP’s system work process crashes after signal (e.g. $$$) received from operating system. Entry is created in SysLog (TA SM21). It is same as core dump just invoked by operation system.

System (kernel) panic w/o data page fault – this is unrecoverable error causing operating system to crash. This situation is caused by operational system issue in most cases, like memory protection, addressing, etc. System is then trap and panic with a data page fault.
Here’s an example of system panic message which user gets while working in system going to crash. It was taken from SAP system based on Basis 4.6D.



Pseudo Comments and Pragmas in ABAP


In very often case you might meet with pseudo comments in ABAP. It is used when you want to switch off "Extended Program Check" functionality for some lines in your custom ABAP code. Extended Program Check (TA SLIN) does check ABAP source code for statically recognizable errors. ABAP with such an error is executable by system but normally result in runtime exception. It is very common practice within customers that before transport of any custom code to production systems ABAP Quality Assurance guys are running SLIN (apart of other checker tools) and in case of any errors indicated by SLIN transport is denied. In this matter it should be mandatory for ABAP programmers to check them code by this tool up-front. Following see list of pseudo codes ("#EC ... ##....) which are available to be used in ABAP reports:

1. ("#EC *) - excludes error messages regarding the current ABAP command
2. ("#EC NOTEXT) - indicates that a string does not have to be stored as a text element
3. ("#EC CALLED) - indicates that a FORM has a PERFORM call
4. ("#EC NEEDED) - no messages are output about a field that is only read
5. ("#EC NOBREAK) - no messages are sent at BREAK-POINTs
6. ("#EC TRANSLANG) - specifies that the use of TOUPPER or TOLOWER is also safe in multilingual systems
7. ("#EC SYNTCHAR) - specifies that the data TOUPPER or TOLOWER is used on contains only characters from the syntactical character set
8. ("#EC ARGCHECKED) - no number of arguments is checked while calling of function module

Since introduction of NetWeaver Release 7.1, EhP1 (Enhancement Package (EHP)) pseudo comments became obsolete and pragmas should be used instead of the pseudo comments. Pragmas have same purpose as pseudo codes plus they are used to hide warning from other checks tools like: ABAP Compiler, SLIN, Code Inspector (TA SCI). For more details see online documentation.

- 04/13/2014 update -
Corrected link to pragmas documentation.


- 10/01/2020 update -
Corrected link to pragmas of 752 version.

Tuesday, March 24, 2009

ABAP search source code functionality

-->
It would be helpful sometimes to look up in e.g. standard SAP codes how some functionality is programmed or how particular Function Module is called etc. This is not an easy in SAP system but there are few possibilities how to achieve it. First of all there is a old report called RSRSCAN1 (ABAP/4 Find String in Program Source Code) provided by SAP since 1995. Since SAP Basis Component was replaced by WAS (around year 2001) this report is obsolete due to its performance problems. Report is not compatible with Unicode enabled version of SAP systems as well. 


 
-->
SAP suggests to use functionality of “Find in source code” available in TA SE38 – ABAP Workbench. Here you can specify range of objects which you want to search in – same as in old report RSRSCAN1. This functionality is quite nice; the only disadvantage is that you cannot run it on background as RSRSCAN1. Therefore consider amount of objects you want to search since runtime can be very long and your SAP session can easily dump by exceeding timeout.


 
-->
The 3rd option that you have is Repository Info System – TA SE83. This is not useful in case you want to search in source code; you can only search for report name, report creator, time/date of creation, program type, status, application etc.

 
-->
So here it is another opportunity for ABAP open source initiatives. SDN people where are you? :-)

- update 01/09/2014 -
2nd part of this blog can be found here.

Tuesday, March 17, 2009

Sending emails out of SAP in ABAP

This is a very common task for ABAP programmer to send some report output to user’s email address. There is a lot of stuff for sending emails all around the web, not all of them are really useful, and some of them are just fragments out of other functionality that was carved out. Especially while you need to send email with attachments there are several possibilities how to program it – e.g. with different functions modules etc. Let see what SAP is advising to programmers officially. Within SAP note 190669 - Sending lists using SAPconnect. Most important finding out of this note is: Only FM shall be used: SO_DOCUMENT_SEND_API1 (not SO_NEW_DOCUMENT_ATT_SEND_API1) even for sending email with attachments. For example email sending program which is very easily adjustable to implement your needs see note 609696. A report ZSSO_DOCUMENT_SEND_API1 is available there in 2 versions. For version SAP Basis 4.6 and WAS 6.10.

SE30: Reliability of time values


You might notice a red light icon on selection screen of TA SE30 – ABAP Runtime Analyses, indicating time values present by SE30 are not correct and measures out of this tool are wrong. This is caused by few conditions like: your SAP machine is running on multiprocessor computer (this is most common case), clocks of those processors are not synchronized each other, etc.
 
In case you facing this situation you need to set carrying out of measurement based on low level of accuracy. This can be set up via menu Settings -> Measurement accuracy -> "Low" in SE30. After you set this out and restart TA you should get green traffic lights like that: