Wednesday, 27 December 2017

Enhance SAP objects with great and testable code

The use case is an approval process for quotations. Requirement is to check the margin of a quotation and compare it with a customizable margin value, both total value and percentage value.

The check is based on item level (percentage check) and in accumulation (total value check) for the header.

If it fails a “blocking” order reason is set and a message is added to the application log (SD_MESSAGE_COLLECT).

Monday, 4 December 2017

SAP Certification Recommendation for Partner Solutions for SAP S/4HANA

With SAP S/4HANA, SAP has introduced a new product which is significantly different compared to the earlier ERP systems, and which brings many new features and simplifications with every new release.

Because of that, it’s highly recommended for SAP customers, to only use certified third party software, for integrating with SAP S/4HANA. This is mostly important, if the third party software runs in SAP S/4HANA as an ABAP Add-On.

Thursday, 2 November 2017

How To Use SAP HANA ABAP Source Search via PowerShell

Here a tiny example how to use SAP HANA ABAP Source Search via PowerShell. After my question here, in the ABAP in Eclipse forum, I see how easy it is to use the ABAP Source Search from outside an SAP system. After the activation of the business function SRIS_SOURCE_SEARCH is it also possible with only one http get request to use it.

Tuesday, 31 October 2017

ABAP Managed Database Procedure- Data Preview

What is AMDP ?


ABAP managed database procedure is a simple ABAP class method containing database-specific procedure coding. The code within the method is pushed to the database layer and executed within the database. Thus significant performance improvements of data-intensive processes can be achieved by code push-down from the application server to the database server. This reduces the number of data transfers and the amount of transferred data between both servers.

Tuesday, 24 October 2017

ABAP Test Cockpit Checks

The purpose of this blog is to describe ABAP Test Cockpit (ATC) checks. ATC is based on Code Inspector (SCI), it reuses Code Inspector checks and significantly improves the code quality by offering the uniform quality criteria for the whole development landscape and establishing new quality assurance processes (quality gates, exemptions, mass regression tests) to minimize errors in productive systems.

Monday, 16 October 2017

Under the HANA hood of an ABAP Managed Database Procedure

I’ve been looking into ABAP managed database procedures for HANA recently and decided to take a look at what’s actually created under the hood in the HANA database when an AMDP is created.

I created a small test class in our CRM on HANA system with a method to read a couple of columns from the crmd_orderadm_h table using sqlscript. The method takes one input parameter IV_OBJECT_ID and has one export parameter ET_ORDER.

Thursday, 12 October 2017

Send web push notifications using ABAP through OneSignal

Traditionally (in ABAP-land), in order to notify a user about something in SAP, it meant sending an e-mail to the user mailbox. It works most of the time until the user gets sick and tired of all the emails and sets up a rule to block all incoming e-mails from the SAP system or sets a rule to route it to the spam folder.

Then, came along mobile / Fiori applications where we’re now open to the world of real-time push notifications directly on your mobile device – ding! Obviously, this works great when you’re looking at your phone 24×7 and it’s always within reach.

Tuesday, 10 October 2017

Code Inspector Checks

The purpose of this blog is to describe SAP NetWeaver AS, Code Inspector checks. Code Inspector is a tool used to perform static analysis of ABAP programs and other SAP repository objects. It is a framework where all the categories and checks are based on ABAP classes. SAP continuously delivers new built-in checks for new tools and new objects.

Thursday, 21 September 2017

ABAP Development in Eclipse – Part 2

If you need to connect to any system, you have to create a Project.

Project can be created based on the type of implementation Eclipse will be used.

In our case, since we are connecting to SAP system , I am going to create an ABAP project.

Thursday, 14 September 2017

Wednesday, 13 September 2017

SAP AS ABAP – Authentication using X.509 Client Certificates

This document shows how to configure SAP AS ABAP for authentication with x.509 client certificates. It shows the procedure used to create a simple Certification Authority (CA) using OpenSSL and how to generate client certificates from this CA.

Enabling SSL


Install the SAP Cryptographic Library. The following are minimal parameters to enable SSL

Simplify your life: Searching text strings in SAP code - enhancements, SAPSCRIPT, SMARTFORMS or ADOBE forms

Introduction


A recurrent issue is to search all kinds of ABAP code for text strings. SAP standard program AFX_CODE_SCANNER does a great job, but lacks the search in code of enhancements, Sapscript, smartforms and Adobe forms and interfaces.

I will post the code for ZAFX_CODE_SCANNER, an adjusted copy, which does have those options, and can search the other areas. Please use at your advantage.

Saturday, 9 September 2017

Adding multiple transport requests to import queue

Introduction

A good habit is to clean up import queues (STMS), so the overview of all that remains to be done is best. You can always search the histroy for what has been done.

SAP provides the menu function to remove already imported requests, and maybe soms old and obsolete transports, that have not been imported, from before the acceptation environments new client copy, can be removed also.

Friday, 18 August 2017

ABAP custom code adaptation for SAP HANA – The efficient way

Introduction


Currently many SAP customers plan and evaluate the migration from their classic ERP system running on any DB to Business Suite on SAP HANA or S/4HANA. For both scenarios custom ABAP code needs to be adapted for SAP HANA. This paper shares best practices in order to minimize the adaptation effort. The recommended procedure has already been applied successfully in many different SAP Hana migration projects.

Saturday, 12 August 2017

Basics of Web Dynpro ABAP

Basics


Web Dynpro applications  can be created and edited in the web dynpro explorer in the ABAP development environment

It has been fully integrated into the ABAP Workbench so there is no separate transaction code. we use the object list selection to display  or create Web Dynpro component.

Thursday, 10 August 2017

An ABAP tool to get ABAP source codes line number

You can use this tool ( an ABAP report ) to get the line number of your ABAP source code.

How to use this tool


Just specify the criteria based on which the source code will be scanned and line number will be calculated.

Wednesday, 9 August 2017

ABAP Nested Loop Performance Test

During an ABAP performance discussion, we decided to run tests to decide on the best method for nested loops. The example was to have an outer loop of BKPF and an inner loop of BSEG.

Nesting two raw loops gives the worst performance in all cases; therefore I have left it out.

In our initial test using the source code shared below; here are the methods ordered by better performance:

Friday, 28 July 2017

CDS view test double framework Part-11

The CDS view test double framework works as a magic for me: how the mocked data I inserted into the view under test could be read again in unit test code? As a result in this blog I will try to explain how CDS view framework works under the hood.

The view I am developed is listed below, which is simply used to return material guid with description by joining table MAKT with MARA:

Thursday, 27 July 2017

How does CDS view key user extensibility work in S4 Part-10

One of supported feature is customer can easily add new fields to extensible CDS view without knowing technical detail.

For example, if a given CDS view is marked as “UI Reports” extensible in extensibility registration tcode SCFD_REGISTRY.

ABAP CDS, ABAP Development, SAP S/4HANA

Sunday, 9 July 2017

My summary of different approaches for annotation declaration and generation Part-8

During my recent CDS view explore I have experienced several ways of CDS view annotation declaration or generation. I list them in this blog for study purpose.

Approach 1: developer does not declaration explicitly, but backend generates automatically
Take this field for example:

SAP ABAP Tutorials and Certifications

Friday, 23 June 2017

How is view source in Eclipse converted to ABAP view in the backend Part 3

Continue What objects are automatically generated after you activate one CDS view Part 2.

Let’s review what we have learned so far. Through SQL trace and debugging, we have learned below:

1. When we click activate button in ABAP development tool ( I call it Eclipse now in this blog ), there are several corresponding ABAP objects generated and table entries inserted. Through debugging we know lots of related logic are implemented in package SDDL.

Tuesday, 20 June 2017

SAP Screen Personas for Web Dynpro ABAP – Cross Session Scripting

Introduction


With SAP Screen Personas there is now the option to add client-side scripting to existing Webdynpro for ABAP applications. For a first introduction to scripting please have a look at the Overview Blog of Matthias Heitmann.

With scripting it’s now possible to automate re-occurring or complex tasks. However there is a technical restriction: The script is always tied to the (technical) application. There is no possibility to define a script, which runs across different applications or even different browser windows. This heavily limits the applicability of scripting for automation.

Friday, 16 June 2017

Step by step process to upload and download document in webdynpro abap

This document will provide the step by step process from uploading a pdf document from presentation server to application server and save the document from application server to presentation server.

Thursday, 1 June 2017

The Prototype Design Pattern At Work

In this blog, see how the prototype design pattern is used for item cloning in an ABAP system.

Item Clone

In this example, we will work on an imaginary purchase requisition application where the user has to enter the vendor code (LIFNR), material number (MATNR), unit price (PREIS and WAERS), and quantity (MENGE and MEINS) into the GUI. We will want it to be possible to enter multiple line items.

Wednesday, 17 May 2017

Functional Programming – Try Reduce in JavaScript and in ABAP

In that blog I use the curry idea in the example below:

SAP ABAP Tutorials and Materials, SAP ABAP Certifications

output:

jerry-java

In this blog, as blog title, I will show another approach by leveraging built-in function reduce in JavaScript Array and Reduce keyword in ABAP to fulfill the same requirement.

Thursday, 11 May 2017

Merge table cells vertically in adobe table

One of the common requirements for complex table design in adobe forms.

Step 1: Create table.

SAP ABAP Tutorials and Materials, SAP ABAP Adoble

Tuesday, 2 May 2017

Add documentation in Custom Program (.docs)

Introduction:


I am going to show, how we can add documentation in Custom program.

I have searched in SCN network too many times, to achieve this functionality but not get any clue, so i have decided once i will achieve this functionality in my program. I will write regarding this functionality, I know this is very small thing however i have spoiled one day for this.

Saturday, 15 April 2017

General properties of ABAP Classes / Interfaces

Every day you create or change ABAP class in class builder. When you activate your change, have you noticed a series of objects with several “=” in the middle part of each?

SAP ABAP Tutorials and Materials, SAP ABAP Guide, SAP ABAP Certifictions

Technically speaking, an ABAP class consists of several parts. In order to figure them out, I just create a simple class with the following source code:

Wednesday, 8 March 2017

SAP Table Maintenance Tool

Whether it is a functional or technical transaction or a basis transaction, everything in SAP or for that matter in any technology, boils down to database, and as we know database means tables. Apart from the standard tables that SAP has, a business will usually have to create many ‘Z’ tables for its custom development. Many times a business ends up with hundreds of custom tables and always their maintenance is a real cause of concern as the usual maintenance tools in SAP have their own issues. Usually, a table in SAP can be maintained in three ways,

            1.Through ‘SM30’ (Table Maintenance)

            2.Through SE11 

            3.Via custom transaction.

Thursday, 2 March 2017

Code visualization using Moose

It is now possible to extract model information from a SAP system to analyze it using Moose in a Pharo virtual machine.

Pharo is a kind of Smalltalk and heavily used by specialists who develop techniques for code visualization especially for refactoring. The SAP model data is extracted using FAMIX, this allows a more detailed analysis as would be possible using UML. This is now possible due to a new open source extractor.

Thursday, 12 January 2017

zSQL: A tool to execute SQL statements directly in sap

Sometimes i need to write sql statements and get results immediately in abap. To handle this requirement, i create a test program, write my sql in it and debug to investigate results.  It’s difficult and time consuming work so I have developed an SQL tool for ABAP Programmers to allow them to run select statements directly in SAP, confirm or discover relationships and see data side by side.