Skip to Content

Create instances to same instance class within report

Oct 20, 2017 at 03:32 PM


avatar image
Former Member

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.


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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mike Pokraka Oct 20, 2017 at 03:54 PM

Are you using static attributes in your class?

10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 23, 2017 at 05:52 AM

Hello Mike,

only one static attribute, other are instance attributes..

10 |10000 characters needed characters left characters exceeded