‎2015 Aug 10 5:09 PM
Dear ABAP Gurus,
I am new to OOP Programming and need your valuable help in implementing the BADI (BADI Definition WCB_HEADER_PBO_BADI, Method: IF_WCB_HEADER_PBO_BADI~PBO .
My issue is in fetching the value from the interface IF_WCB_HEADER_PBO_BADI,by using the method GET_DATA.
My issue is class CL_WCB_CC requires mandatory paramenters to create object (constructor method). Syntax error on statement ("create object OBJ.") And these parameters are then referred to another class(Type Ref To). So i'm not sure how to declare these mandatory parameters. As per my understanding, i dont think its possible to call method in interface, without creating object.My objective is to access the structure E_KOMWCOCOH which is accessible from method GET_DATA in interface IF_WCB_HEADER_PBO_BADI.
Below is my code, let me know if you need further details.
METHOD if_wcb_header_pbo_badi~pbo.
data: l_getdata Type komwcocoh,
REF1 TYPE WCB_TEXT_DESCRIPTION.
data: OBJ REF TO CL_WCB_CC.
create object OBJ.
call METHOD obj->if_wcb_header_ro~get_data
IMPORTING
e_komwcocoh = l_getdata " Communication Structure for Condition Contract Header
e_description = REF1 " Text Fields
.
ENDMETHOD.
'
Thanks in advance,
George
‎2015 Aug 15 10:11 PM
‎2015 Aug 15 10:11 PM