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, 7 July 2017

Unveil the secret of @ObjectModel.readOnly Part-7

In my application with edit function enabled, I have set posting date as read only by using the annotation below according to sap help.

SAP ABAP Tutorials and Materials, SAP ABAP Certifications, SAP ABAP Guide

Thursday, 6 July 2017

Consume table function in CDS view Part- 6

Let’s try to resolve one real issue now. What we want to achieve is: in CRM we need a CDS view which returns the service order guid together with its Sold-to Party information, “Title” ( Mr. ) and “Name” ( blGMOUTH ).

ABAP Development, SAP ABAP Certifications, SAP ABAP Guide

Wednesday, 5 July 2017

Weak reference in ABAP and Java

Recently I have some recruitment interview on the topic Weak reference and I think it is necessary for me to refresh my knowledge on this topic.

According to ABAP help, we can wrap an object reference to the so called weak reference, for example see the following code:

lo_person = NEW lcl_person( 'Jerry' ).
lo_weak = NEW cl_abap_weak_reference( lo_person ).

Tuesday, 4 July 2017

Functional programming – Simulate Curry in ABAP

As I mentioned in What should an ABAPer continue to learn as an application developer, function programming language is a mind -blower to ABAPers who have got used to ABAP as an imperative programming language.

One of important concept in functional programming is Currying.

Currying intensively manipulates functions.

Lazy Loading, Singleton and Bridge design pattern in JavaScript and in ABAP

According to Wikipedia Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program’s operation if properly and appropriately used.

In this blog, I will use an example of SCN log on to illustrate its usage in JavaScript and how to simulate the implementation in ABAP.

Sunday, 2 July 2017

Singleton bypass Trap – ABAP and Java

Recently I meet with an issue using Spring which finally turns out that my bean is initialized multiple times although it is expected to be a singleton. As a result I look into the possible scenario that might bypass the expected singleton behavior.

This blog introduces two possible scenarios which will cause your singleton design fail to work as expected.

Saturday, 1 July 2017

Gate Way Service Creation Using The CDS Views With Parameters

How to create the Gate Way service using CDS Views with Parameters and Without Parameters:

Pre-requisite is to learn basics about the Core Data Services , Basic understanding about SADL Frame work.

Step 1: Create the CDS view in Eclipse or Hana Studio.

Here I am creating two CDS views in Hana Studio

Creating CDS View for the House Bank Details