I haven’t been on here in awhile. But today I was looking out my window in April in Michigan at the snow. For those of you reading it not thinking that is a big deal. It’s been since the 1800s since we’ve gotten snow this late in April. And yes, I’m inside looking at that snow. Take a look at the ground – yes lovely green grass and my pine tree looks happy. It’s a bit of a hybrid out there spring and winter on the ground.
Showing posts with label ABAP OOP. Show all posts
Showing posts with label ABAP OOP. Show all posts
Monday, 29 April 2019
Wednesday, 2 August 2017
Converting Function Module Exceptions to Exception Classes
Although function modules belong to the era of procedural programming, we all need to use them from time to time. While most BAPI’s usually return error messages in a clean internal table format, many other function modules return classical exceptions.
If you are calling a function within a class method, you might have a hard time converting those classical exceptions to class based exceptions – meaning exception classes.
If you are calling a function within a class method, you might have a hard time converting those classical exceptions to class based exceptions – meaning exception classes.
Friday, 2 June 2017
ABAP OO Event handling (register/unregister)
OO Events is very imported and handling them is very easy in ABAP.
We need handler method to register event
METHODS : handle_event_raised FOR EVENT event_raised OF lcl_event_raiser.
then we need to set this method as handler
SET HANDLER me->handle_event_raised FOR i_raiser.
We need handler method to register event
METHODS : handle_event_raised FOR EVENT event_raised OF lcl_event_raiser.
then we need to set this method as handler
SET HANDLER me->handle_event_raised FOR i_raiser.
Tuesday, 25 April 2017
OOP Updates in ABAP 7.4 and ABAP 7.5
SAP introduced the concept of OO programming in ABAP in the year 2000. Since then, it’s been the recommended method of programming. Let’s describe the new features of ABAP that relate to OO programming.
In OO programming, a downcast is a process in which you turn a generic object, like a monster, into a more specific object, like a green monster. An upcast is the reverse. This functionality has been available in ABAP for a long time, but it gets a lot easier in 7.4.
1 Upcasting/Downcasting with CAST
In OO programming, a downcast is a process in which you turn a generic object, like a monster, into a more specific object, like a green monster. An upcast is the reverse. This functionality has been available in ABAP for a long time, but it gets a lot easier in 7.4.
Monday, 17 October 2016
Smartforms OOPS (object oriented)
I have not had that much opportunity to work with SmartForms till very recently. I had already switched to Eclipse & ADT as my primary programming tool and thought I could get away this, not having to go back to SAPGui based development – and then I encounter SmartForms! I can’t even use normal day-to-day ABAP Editor tools, can’t use normal breakpoints, can’t do a where-used, several drill-throughs don’t work – what did I just get myself into!
After the first one that I volunteered making changes to, we realized I had to do one from scratch. Here is an opportunity – I moved all the code out to a class and called the class from within the SmartForm. This way I have all the tools that SAP & ABAP provide to work with code, I can use the ADT environment, test the data output independent of the SmartForm, use editor-based breakpoints, etc, etc…
After the first one that I volunteered making changes to, we realized I had to do one from scratch. Here is an opportunity – I moved all the code out to a class and called the class from within the SmartForm. This way I have all the tools that SAP & ABAP provide to work with code, I can use the ADT environment, test the data output independent of the SmartForm, use editor-based breakpoints, etc, etc…
Thursday, 29 September 2016
Simple event handling in ABAP OOPS
Introduction:
This document is to show how to make a simple interactive report in OOPS by using event 'HOTSPOT_CLICK' present in standard sap class 'CL_GUI_ALV_GRID'.
I have taken a scenario of displaying the PO (Header and Item) data for a vendor by creating event driven interactive report. The program is created in ALV+OOPS. The interaction will be done on vendor number and PO document number.
The flow will be: - Vendor Details -> PO (Header) -> PO (Item)
Subscribe to:
Posts (Atom)