Hello!
Is there any FM or class which I can use to fill all buffer variables of a specified business object (perhaps by using the BOR-key as importing parameter)? The implementation of a BOR-method requires the values in the buffer variables in order to check generic conditions based on the buffer variables!
My idea was to access the attributes by swc_get(_table)_property to get the buffer variables filled:
DATA: lo_bor_info TYPE REF TO CL_SBMIG_BOR_TYPEINFO,
ls_typeinfo TYPE SBMIG_BOR_TYPEINFO,
ls_verb TYPE swotlv.
FIELD-SYMBOLS: <lfs_attribute> TYPE any,
<lfs_attr_tab> TYPE table.
CREATE OBJECT lo_bor_info
EXPORTING
p_objecttype = 'ZBUS2078'
EXCEPTIONS
objecttype_not_existing = 1
OTHERS = 2.
IF sy-subrc IS INITIAL.
CALL METHOD lo_bor_info->get_typeinfo
receiving
p_typeinfo = ls_typeinfo
EXCEPTIONS
typeinfo_error = 1
others = 2.
IF sy-subrc IS INITIAL.
LOOP AT ls_typeinfo-verbs INTO ls_verb WHERE verbtype = 'A'
AND attrtype <> 'S'.
IF ls_verb-tabelem IS INITIAL.
SWC_GET_PROPERTY self ls_verb-verb *<lfs_attribute>*.
ELSE.
SWC_GET_TABLE_PROPERTY self ls_verb-verb *<lfs_attr_tab>*.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
Unfortunately I don't know how to use field-symbols (how to assign them) or references in order to ensure a generic code.
Thanks for any hint!
Greetings
Wolfgang
Edited by: Mike Pokraka on Feb 17, 2009 2:47 PM - Added code tags, please use them as it makes code more readable