Saturday, 6 March 2021

Handy CL_GUI_ALV_GRID wrapper

CL_SALV_TABLE or CL_GUI_ALV_GRID which class is better to use in 2021 ?

Probably old abapers remember that more than decades ago that there was shift from the “old-fashioned” CL_GUI_ALV_GRID class & ‘REUSE*’ function modules towards new up-to-date & OOP style class CL_SALV_TABLE. At 2020 I decided to move backwards to CL_GUI_ALV_GRID. At the small article below I try to explain why I made that decision. And it is not related to nostalgia.

One of the reasons to use CL_SALV_TABLE was small amount of code compared to CL_GUI_ALV_GRID. Also, there was no need to create new screen & containers to display a grid. But then new syntax 7.40 was introduced and passing parameters to any method via structures & tables simplified drastically. I decided to fill a gap and just add nested screens functionality for CL_GUI_ALV_GRID.

Friday, 22 January 2021

Explained – Hard Code vs Constants vs Parameter entry

Premise:

I have been asked below questions by several programmers constantly.

Is It ok to Hard code?

Should I use a Constants in my program?

Or Do I need to maintain a parameter for a scalable solution?

Let’s take a deep dive onto this topic. At the end of this blog you will be able to decide when to use a constant when to hard code and choose from different options for maintaining global parameters.

Thursday, 7 January 2021

Success Factors API Integration with SAP on Premise

I’ve decided to create this blog post for two main reasons. First is, like many other posts out there, I’ve struggled a lot to find a solution to a problem I was facing, and I could not find anything out there that helped me in any way, so I want to make sure that if anyone else has the same problem, there is something online that hopefully will help them. Second reason is, I am really not sure of what I am doing, and I am hoping that someone will read this post and will stop me from doing a crazy thing

I have an UI5 portal connected to an SAP Box (on Premise) and a Success Factors system. Users can navigate from UI5 portal to Success Factors using SSO, but they only get to the landing page. If an user has a TODO item in Success Factors, the only way for them to know is to log in to the UI5 portal, and then navigate to Success Factors (I’m going to say SFSF from now on). In the UI5 portal the users have an Inbox, where they can see if they have pending TODOs, but this inbox is only being fed from SAP right now.

Thursday, 12 November 2020

Custom E-tag for optimistic lock in SAP Gateway Odata for Deep Update

This blog is about the locking concept in SAP Gateway odata for update deep method. As there are already many blogs on optimistic and pessimistic locking mechanism. And in Gateway Odata there are different ways to implement optimistic lock for concurrency control. below are the ways which I am trying to categorizing 

1.) Using Timestamp for E-tag

2.) Using Hash for E-tag

Monday, 19 October 2020

ABAP Exception Class ZCX_RETURN2 – Raise code templates

This blog post contains code templates for adding ZCX_RETURN2 exception raising code.

Template overview

◉ CREATE_BY_SYSTEM_MESSAGE (without MESSAGE statement)

◉ CREATE_BY_SYSTEM_MESSAGE (with MESSAGE statement for custom message)

◉ CREATE_BY_BAPIRETURN_STRUC

◉ CREATE_BY_BAPIRETURN_TABLE

◉ CREATE_BY_BAPIRET1_TABLE

◉ CREATE_BY_BAPIRET2_STRUC

◉ CREATE_BY_BAPIRET2_TABLE

◉ CREATE_BY_BDC_MESSAGE_TABLE

◉ CREATE_BY_EXCEPTION_OBJECT – catch for example CX_ROOT

Wednesday, 24 June 2020

The ABAP Data Dictionary

Here is a guide to using tables, we use this within our internal courses, I haven’t run one for some time with the lockdown in the UK, but I share it here for the benefit of others in this wider SAP community.

Tables can be defined independent of the database in ABAP Dictionary. When a table is activated in ABAP Dictionary, a similar copy of its fields is created in the database as well. The tables defined in ABAP Dictionary are then translated automatically into the format that is compatible with the database, because the definition of the table depends on the database used by the SAP system.

Monday, 16 March 2020

Call a Remote Function Module (RFC) From SAP Cloud Platform ABAP Environment

First some important prerequisites (because I noticed these myself just late somewhere in the fine print after spending [wasting] some time trying things in my own trial accounts)

◉ You need a Global Enterprise Cloud Account – i.e. not just a trial account
◉ You need this for both, the SAP Cloud Foundry and the SAP Cloud Neo environment
◉ SAP Cloud Foundry and the SAP Cloud Neo need to be in the same region

Wednesday, 1 January 2020

SAP Coverage Analyzer

Introduction


What is Coverage Analyzer?

SAP Coverage Analyzer is a very powerful system-wide runtime analysis tool provided by SAP for collecting, monitoring and analyzing the code coverage of test suites such as Self tests, Unit tests, integration tests and Quality tests.