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 instances to same instance class within report

Former Member
0 Kudos

Hello experts,

i'm just facing a big problem. I must call directly by button a big editor as instance class created in SE24 depending on attributes that is located in ALV table in source report. The problem is when i created instances, the instances looks like there aren't separeted in memory, because the containers and editors (cl_gui_textedit) contains data from first called instance, here is sample code with creation of references

data gt_editor_inst type table of ref to zcl_zom_editor.
data gs_editor_inst type ref to zcl_zom_editor.

loop at gt_zomt_texts assigning field-symbol(<tex>).

gs_editor_inst = new zcl_zom_editor( iv_id_text_html = <tex>-text_name
iv_id_css_html = <tex>-text_css
iv_css_type = <tex>-default_css ).

append gs_editor_inst to gt_editor_inst.

endloop.

All table attributes are affected by previous instances when creating new, so for example:

dropdownlist with 2 rows were appended by 2 new rows when i create another instance...

I simply tried CLEAR, FREE and "homemade" free method within class, but nothing work or working worse...

Thanks for reply!

2 REPLIES 2

pokrakam
Active Contributor
0 Kudos

Are you using static attributes in your class?

Former Member
0 Kudos

Hello Mike,

only one static attribute, other are instance attributes..