05-29-2006 8:48 AM
Hi Folks ,
i got a litle problem with creation of objects.
here's the story about .
iv'e created an interface intf1 with filter and also several different classes that each one of them is implement the interface intf1 .
let's say C1 ...Cn those are the classes .
now i want to create one of them dynamically and therefore i use static function :
CALL METHOD cl_exit_master=>create_obj_by_interface_filter
EXPORTING
inter_name = 'INTF1'
method_name = 'LIKE_CONTRUCTOR'
flt_val = filter_value
IMPORTING
exit_obj_tab = lt_exit_obj.
inside lt_exit_obj i got back from the function the name of interface and some data but the field "obj" which suppose to be the referance for newly created object is NULL .
does someone have any tips hints or tricks how can this issue can be solved ?
Thx ya all .
05-29-2006 10:12 AM
05-29-2006 10:27 AM
just use CREATE OBJECT intf1 TYPE (classname).
your object intf1 must be declared with TYPE REF TO intf1.
then call method of new object.
05-29-2006 10:53 AM
but what about the filter value ?
there's must be filter value consideration