Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

create object by filter

herzelhaimharel_gilor
Participant
0 Kudos

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 .

3 REPLIES 3

franois_henrotte
Active Contributor
0 Kudos

just use CREATE OBJECT intf1 TYPE (classname).

your object intf1 must be declared with TYPE REF TO intf1.

then call method of new object.

0 Kudos

but what about the filter value ?

there's must be filter value consideration