I am new to OO programing and need your help
in some aspects .I was going through this blog
<a href="/people/thomas.jung3/blog/2005/10/26/alv-om-template-program Thomas Jung</a>
AS per the blog I created a Global class in se24,
and using it in reports to create the instance.
My question is :
<b>Will it be ok to call a subroutine from the global class - method implementation section, this subroutine is placed in the report where the global class is instanciated.</b>
This method is part of the global class -created through
PERFORM ON_LINK_CLICK IN PROGRAM (me->repid) using !COLUMN !ROW.
--se38 program where the above class is used to create object
FOR LINKS *** SUBROUTINE
FORM ON_LINK_CLICK USING COLUMN TYPE SALV_DE_COLUMN ROW TYPE SALV_DE_ROW.
DATA: wa_it_bseg like line of it_bseg.
IF COLUMN EQ 'BELNR' .
read table it_bseg index row into wa_it_bseg.
set parameter id 'BLN' field wa_it_bseg-belnr.
set parameter id 'BUK' field wa_it_bseg-bukrs .
set parameter id 'GJR' field wa_it_bseg-GJAHR.
CALL TRANSACTION 'FB03' and SKIP FIRST SCREEN.
The web log says, to inherit and redefine the mothods
Like ON_DOUBLE_CLICK , or ON_LINK_CLICK etc to
suit your requirements.
if we use the above approch of calling a suroutine ,
we can code the custom requirements differently in different programs with out worring about inheritance and redefenition ,in the same way we did when using the function module approch in ALV ,(Reuse_alv_list_display etc)
<b>Please suggest whether this approch is OK ?
I am using the globel class in many reports , so
any suggestion is appriciated and rewarded .</b>
Thanks for your help.