ABAP OO - OBJECT NOT INSTANTIATED
Simon, Tom
Simon.Tom at aoins.com
Wed Jan 14 09:56:46 EST 2009
I am using a method in a class(z_cl_liv_assets) that I created for a
workflow task. The object does not get instantiated by the workflow. I
have read all the blogs by Jocelyn Dart and wondered if anyone could
look over my structures and provide insight into why it does not work.
When I test the instant constructor and pass in the doc num and company
code it works. If I pass the import parameters directly to the method it
works. But if I try to use the instant attributes it does not work
created by the constructor it does not work.
When I test the task in swus it does not instantiate the object?
Any help is apprecitated?
Thank you,
Tom Simon
Bindings in the task to class z_cl_liv_assets~retrieve_anek:
wf container task container
docnum -> im_belnr
company code -> im_bukrs
ex_anek <- ex_anek
z_cl_liv_assets <- wi_object_id
bindings from task to method retrieve_anek.
im_belnr to im_belnr
im_bukrs to im_bukrs
Class: z_cl_liv_assets;
Attributes:
BELNR InstanPubl Type ANEK-BELNR
BUKRS InstanPubl Type ANEK-BUKRS
T_ANEK InstanPubl Type FAA_T_ANEK
M_POR InstanProt Type SIBFLPOR
GJAHR InstanPubl Type ANEK-GJAHR
Methods:
Parameters:
LPOR Importing Type SIBFLPOR
RESULT Returning Type Ref To BI_PERSISTENT
METHOD bi_persistent~find_by_lpor.
DATA: lv_liv_doc TYPE anek-belnr,
lv_liv_co TYPE anek-bukrs.
MOVE lpor-instid(10) TO lv_liv_doc.
MOVE lpor-instid+10(4) TO lv_liv_co.
CREATE OBJECT result
TYPE
z_cl_liv_assets
EXPORTING
im_belnr = lv_liv_doc
im_bukrs = lv_liv_co.
ENDMETHOD.
Parameters:RESULT Returning Type SIBFLPOR
METHOD bi_persistent~lpor.
DATA: lpor TYPE sibflpor.
lpor-catid = 'CL'.
lpor-typeid = 'Z_CL_LIV_ASSETS'.
CONCATENATE me->belnr me->bukrs INTO lpor-instid.
result = lpor.
ENDMETHOD.
parameters:
IM_BELNR Type ANEK-BELNR
IM_BUKRS Type ANEK-BUKRS
METHOD constructor.
me->belnr = im_belnr.
me->bukrs = im_bukrs.
me->M_por-catid = 'CL'.
me->M_por-typeid = 'z_cl_liv_assets'.
CONCATENATE me->belnr me->bukrs INTO me->M_por-instid.
* me->m_por-instid = me->belnr.
ENDMETHOD.
Parameters:
EX_ANEK Exporting Type FAA_T_ANEK
METHOD retrieve_anek.
CALL FUNCTION 'ANEK_READ_MULITPLE'
EXPORTING
i_belnr = me->belnr
i_bukrs = me->bukrs
TABLES
t_anek = ex_anek.
IF sy-subrc = 0.
me->t_anek = ex_anek.
ENDIF.
ENDMETHOD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20090114/225086f0/attachment.htm
More information about the SAP-WUG
mailing list