2010 Dec 06 10:39 PM
Hi Friends,
I have created a module pool program, which has a custom container and I have set up NOTES in this container.
Now, everytime I Press the back button after saving the transaction, I have the destructor code written.
the code is
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
ENDIF.
IF editor_container IS NOT INITIAL.
CALL METHOD editor_container->free( ).
FREE editor_container.
ENDIF.
* finally flush
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
But, in the same session , when i enter a different transaction number and come on the Notes screen, I see the
data of the previous transaction in notes. I have checked everything. It seems he issue is with the destructor.
Please advice.
Thanks,
sapper
Edited by: Neil Gardiner on Dec 8, 2010 9:17 AM
2010 Dec 07 3:51 AM
Hi,
Along with below code
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
ENDIF.Use one extra statement which i used in the below code.
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
CALL METHOD text_editor->delete_text( ).
ENDIF.Regards,
Venkat.O
Hi Friends,
I have created a module pool program, which has a custom container and I have set up NOTES in this container.
Now, everytime I Press the back button after saving the transaction, I have the destructor code written.
the code is
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
ENDIF.
IF editor_container IS NOT INITIAL.
CALL METHOD editor_container->free( ).
FREE editor_container.
ENDIF.
* finally flush
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
But, in the same session , when i enter a different transaction number and come on the Notes screen, I see the
data of the previous transaction in notes. I have checked everything. It seems he issue is with the destructor.
Please advice.
Thanks,
sapper
Edited by: Neil Gardiner on Dec 8, 2010 9:17 AM
2010 Dec 07 3:51 AM
Hi,
Along with below code
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
ENDIF.Use one extra statement which i used in the below code.
IF text_editor IS NOT INITIAL.
CALL METHOD text_editor->free( ).
FREE text_editor.
CALL METHOD text_editor->delete_text( ).
ENDIF.Regards,
Venkat.O
2010 Dec 07 3:23 PM
2010 Dec 07 10:39 PM
If all you want to do is simply clear the text then all you need to do is call the delete_text method. There is no need to call the desctrutor or flush methods.
2010 Dec 12 4:24 PM
Hi d sappanese,
just make sure hat you do not fill it inadvertently with the same text as before: Make sure the old text is cleared in your program.
Regards,
Clemens
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |