Skip to Content
0
Former Member
Oct 11, 2006 at 07:34 PM

urgent clearing data in container for free text

83 Views

I HAVE A CONTAINER FOR FREE TEXT.

I HAVE A CREATE BUTTON IN MY SCREEN EWHEN I PRESS CREATE IT ASKD FOR ID AND FREE TEXT THEN I SAVE AND IT GETS SAVED IN A ZTALE TABLE.

WHEN AFTER SAVING IT I GO TO INITIAL SCREEN AND PRESS CREATE AGAIN THEN IT ASKS FOR ID AND IN THE CONTAINER I SEE THE FPREVIOUS TEXT.

CAN YOU GUYS LET ME KNOW AS TO WHAT I NEED TO DO.

I TREID CLEARING AND REFRESHING MYTABLE WHICH I HAVE USED IN THE FOLLOWING CODE.

pbo

if editor is initial.

CREATE OBJECT TEXTEDIT_CUSTOM_CONTAINER

EXPORTING

CONTAINER_NAME = 'TEXTEDITOR1'

EXCEPTIONS

CNTL_ERROR = 1

CNTL_SYSTEM_ERROR = 2

CREATE_ERROR = 3

LIFETIME_ERROR = 4

LIFETIME_DYNPRO_DYNPRO_LINK = 5.

IF SY-SUBRC NE 0.

  • add your handling

ENDIF.

CREATE OBJECT EDITOR

EXPORTING

PARENT = TEXTEDIT_CUSTOM_CONTAINER

WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION

WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>FALSE

EXCEPTIONS

OTHERS = 1.

refresh mytable.

call METHOD editor->SET_TOOLBAR_MODE

EXPORTING TOOLBAR_MODE = 0.

*call METHOD editor->SET_ENABLE

*EXPORTING ENABLE = ' '.

CALL METHOD editor->set_readonly_mode

EXPORTING

readonly_mode = 1.

ENDIF.

CLEAR MYTABLE.

FREE MYTABLE.

endif.

IF SY-SUBRC NE 0.

CALL FUNCTION 'POPUP_TO_INFORM'

EXPORTING

TITEL = V_REPID "--> program name

TXT2 = SPACE

TXT1 = 'Error in flush'.

ENDIF.

tHANKS

let me know

swathi