To recap from the preceding blog, we took a program having classes with multiple responsibilities and transformed it so that each class has only a single responsibility. However, we’ve noticed after making classes flight_report, carrier_report and booking_report compliant with the Single Responsibility Principle that our changes have rendered these three classes exact duplicates of each other except for their names. Here is the source code as we left it in the previous blog:
Monday, 30 July 2018
Saturday, 28 July 2018
Getting comfortable using the Object-Oriented design model with ABAP – Part 4
To recap from the preceding blog, we took a program having duplication of code amongst three report classes and consolidated that duplicated code, making it available to the three classes through the use of Inheritance. Here is the source code as we left it in the previous blog:
Wednesday, 25 July 2018
Testing REST APIs in XSA Applications Without UI Layer
REST APIs are extremely useful for accessing and modifying data within XSA Multi-Target Applications. When it comes to checking whether the API you’ve designed is working properly or not, things becomes a little difficult if you are not familiar with web security protocols. In this blog, I am going to briefly describe OAuth 2.0, the security protocol used by XSA for user authentication and authorization (UAA), and cover details on how you can make HTTP requests to different modules within an XSA application.
Monday, 23 July 2018
Getting comfortable using the Object-Oriented design model with ABAP – Part 3
To recap from the preceding blog, we took a program having only static classes and changed it so that some of those classes could be instantiated. Here is the source code as we left it in the previous blog:
Saturday, 21 July 2018
Getting comfortable using the Object-Oriented design model with ABAP – Part 2
This blog represents part 1 Getting comfortable using the Object-Oriented design model with ABAP – Part 1
To recap from the preceding blog, we took a procedural program and transformed it into one that uses local static classes and a local interface. Here is the source code as we left it in the previous blog:
To recap from the preceding blog, we took a procedural program and transformed it into one that uses local static classes and a local interface. Here is the source code as we left it in the previous blog:
Thursday, 19 July 2018
SAP List Viewer with Integrated Data Access (ALV with IDA)
Overview
ALV with IDA (SAP List Viewer with Integrated Data Access) helps tables that contain very large quantities of data to be displayed on the UI. The results of operations such as sorting, grouping, or filtering are also delivered with a very fast response time. It uses the in-memory database, such as SAP HANA, without having to switch to a new programming environment. There is no change in the User interface and standard functions (also ALV services). ALV functions are adjusted to the use of in-memory databases. The new general programming model (Coding Pushdown) is also optimally supported when using in-memory databases.
Monday, 16 July 2018
Getting comfortable using the Object-Oriented design model with ABAP –Part 1
I Describing my experience using ABAP2XLSX to facilitate building an Excel spreadsheet from the content used to present multiple ALV reports and then send that spreadsheet to an internet email recipient. The example program I presented was written using the procedural programming model – that is, despite its use of classes from both ABAP2XLSX and the Business Communication Service, it did not require the creation of any new local or global object-oriented components. I thought this program might make a good candidate to illustrate how to change an ABAP program to transition it from a procedural design to an object-oriented design using local classes, transforming the code in a series of steps rather than all of it in one big gulp, with explanations to accompany the concepts associated with each change. Those who do not have ABAP2XLSX available at their site will still be able to follow along since I have adapted the example program to account for its absence.
Friday, 13 July 2018
Getting the currently selected line in a TableCtrl (before PAI) dynamically
I have two table controls on my dynpro screen and in one of them there is a field which, upon F4, should check the value of another field and then execute one of two possible search helps, depending on the value of the other field.
I decided to create a fully generic code which returns the selected line in any given TableCtrl object before the PAI event. I checked class CL_TABLECONTROL but couldn’t find any similar method to do so.
I decided to create a fully generic code which returns the selected line in any given TableCtrl object before the PAI event. I checked class CL_TABLECONTROL but couldn’t find any similar method to do so.
Monday, 9 July 2018
Unexpected ABAP pass-by-val method call
Prologue
I work a lot with pointers/references in ABAP, as I refuse to use CHANGING and EXPORTING method parameters. When using pointers you have to care about which data lies in which memory area. So, the first rule for working with pointers is: Don’t get pointers of stack variables. Or, if you do, make sure your pointers don’t find their way into the heap or to underlying stack layers.
Friday, 6 July 2018
Introducing: GLADIUS – A Test Unit Framework
Why GLADIUS?
Gladius is the name of the famous roman sword. Coding and fighting has a lot of similiarities: you have to work hard to become a good programmer, you have to practice, you need good tools. That’s why we thought that GLADIUS might be a good and appreciable name for a learning tool.
Thursday, 5 July 2018
Monday, 2 July 2018
BOPF: Custom Lock/Unlock Action for Legacy DAC
1. Objective
Objective of this document is to explain how to create custom lock/unlock action in case you are using legacy DAC. In my previous blog I have explain how to configure BOPF using Legacy tables. Refer to below link for more details on BOPF: Using Non-UUIDs (DB_KEY) keys DB tables
Subscribe to:
Posts (Atom)