‎2009 Apr 15 4:25 AM
Hi,
I would like to know if there is any function module that can be used to call a text/note editor and can be displayed in a subscreen of a main screen (dialog programming)? This text/note editor should not be able to edit, but for display only.
Please help. Thanks...
‎2009 Apr 15 7:37 AM
check this fm TERM_CONTROL_EDIT & TXW_TEXTNOTE_EDIT
Edited by: Kartik Tarla on Apr 15, 2009 12:07 PM
‎2009 Apr 15 4:31 AM
‎2009 Apr 15 6:01 AM
Hi,
Simplest would be:
DATA: objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
*
Just populate your data in objtxt & use:
EDITOR-CALL FOR objtxt DISPLAY-MODE.
I hope this helps,
Regards
Raju Chitale
‎2009 Apr 15 7:55 AM
Hi Raju,
I tried using the codes, but is it possible not to have it in full screen?
Many thanks,
Chuak Fen
Edited by: Chuak Fen Soo on Apr 15, 2009 3:07 PM
‎2009 Apr 15 9:57 AM
Hi,
Then its better to use TXW_TEXTNOTE_EDIT with EDIT_MODE = ' '.
Regards
Raju Chitale
‎2009 Apr 15 7:37 AM
check this fm TERM_CONTROL_EDIT & TXW_TEXTNOTE_EDIT
Edited by: Kartik Tarla on Apr 15, 2009 12:07 PM
‎2009 Apr 15 12:44 PM
hi,
try this...
hope this helps
Regards
Ritesh J
‎2009 Apr 17 2:50 AM
Hi all,
Thanks for all your replies.
I have tried using the FM TERM_CONTROL_EDIT, FM TXW_TEXTNOTE_EDIT and FM CATSXT_SIMPLE_TEXT_EDITOR, but these will pop up the text/note editor window, right?
‎2009 Apr 15 3:00 PM
Hi,
have a look at function group MR1M dynpro 6160.
Here you´ll find an example.
It is the "Notes" tab in header of MIRO transaction
within the above code, for "display only" have a look at:
CALL METHOD editor->set_readonly_mode
EXPORTING readonly_mode = 1.
Best regards
Edited by: Pablo Casamayor on Apr 15, 2009 4:07 PM
‎2009 Apr 17 4:12 AM
> Hi,
>
> have a look at function group MR1M dynpro 6160.
> Here you´ll find an example.
> It is the "Notes" tab in header of MIRO transaction
>
> within the above code, for "display only" have a look at:
>
> CALL METHOD editor->set_readonly_mode > EXPORTING readonly_mode = 1. >>
> Best regards
>
> Edited by: Pablo Casamayor on Apr 15, 2009 4:07 PM
Hi Pablo,
The class used here is C_TEXTEDIT_CONTROL and i find it almost suits my requirements. Same as the class for CL_GUI_TEXTEDIT, they both have the same methods.
So, for now, by using either the C_TEXTEDIT_CONTROL class or CL_GUI_TEXTEDIT class, i would like to highlight certain words with certain string pattern in the text editor. i tried using the methods FIND_AND_SELECT_TEXT and HIGHLIGHT_SELECTION but to no luck. Maybe I am not coding it correctly.
DATA: v_string_found TYPE I.
EDITOR3->FIND_AND_SELECT_TEXT(
EXPORTING
CASE_SENSITIVE_MODE = 1
SEARCH_STRING = '<H>'
* WHOLE_WORD_MODE = FALSE
CHANGING
STRING_FOUND = v_string_found
* EXCEPTIONS
* ERROR_CNTL_CALL_METHOD = 1
* INVALID_PARAMETER = 2
).
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
EDITOR3->HIGHLIGHT_SELECTION(
EXPORTING
HIGHLIGHT_MODE = 1
* EXCEPTIONS
* HAS_NO_EFFECT = 1
* ERROR_CNTL_CALL_METHOD = 2
* INVALID_PARAMETER = 3
).
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Any guides for using these 2 methods?
Thanks...
‎2009 Apr 17 7:25 AM
Hi,
maybe this can help:
check program SAPTEXTEDIT_TEST_1
in this program pay attention to:
MODULE pai INPUT.
CASE ok_code.
....
WHEN 'FIND'.
PERFORM find_text.
....
WHEN 'HIGHLIGHT'.
highlight = 1.
PERFORM highlight_lines USING highlight.
*&---------------------------------------------------------------------*
*& Form FIND_TEXT
*&---------------------------------------------------------------------*
FORM find_text.
found = 0.
IF case_sensitive = 'X'. " button on Dynpro
case_sensitive_mode = editor->true.
ELSE.
case_sensitive_mode = editor->false.
ENDIF.
IF whole_word = 'X'. " button on Dynpro
whole_word_mode = editor->true.
ELSE.
whole_word_mode = editor->false.
ENDIF.
CALL METHOD editor->find_and_select_text
EXPORTING search_string = search_string
case_sensitive_mode = case_sensitive_mode
whole_word_mode = whole_word_mode
CHANGING string_found = found.
* Flush for proper work of the following if statement
CALL METHOD cl_gui_cfw=>flush.
IF NOT search_string IS INITIAL.
IF found NE 0.
MESSAGE s000 WITH text-013.
ELSE.
MESSAGE s000 WITH text-014.
ENDIF.
ENDIF.
ENDFORM. " FIND_TEXT
*&---------------------------------------------------------------------*
*& Form HIGHLIGHT_LINES
*&---------------------------------------------------------------------*
* -->P_HIGHLIGHT text *
*----------------------------------------------------------------------*
FORM highlight_lines USING p_highlight.
IF selection EQ 'X'.
CALL METHOD editor->highlight_selection
EXPORTING highlight_mode = p_highlight
EXCEPTIONS has_no_effect = 1.
IF sy-subrc NE 0.
* add your handling
ENDIF.
ELSE.
CALL METHOD editor->highlight_lines
EXPORTING
from_line = from_line
to_line = to_line
highlight_mode = p_highlight
EXCEPTIONS has_no_effect = 1.
IF sy-subrc NE 0.
* add your handling
ENDIF.
ENDIF.
ENDFORM. " HIGHLIGHT_LINES
and this link:
http://help.sap.com/saphelp_45b/helpdata/EN/0e/514035634d761fe10000009b38f889/frameset.htm
Best regards.
Edited by: Pablo Casamayor on Apr 17, 2009 9:19 AM
‎2009 Apr 17 9:55 AM
>
> Hi,
>
> maybe this can help:
>
> check program SAPTEXTEDIT_TEST_1
> in this program pay attention to:
>
>
> MODULE pai INPUT. > > CASE ok_code. > .... > WHEN 'FIND'. > PERFORM find_text. > .... > WHEN 'HIGHLIGHT'. > highlight = 1. > PERFORM highlight_lines USING highlight. > > > > *&---------------------------------------------------------------------* > *& Form FIND_TEXT > *&---------------------------------------------------------------------* > FORM find_text. > found = 0. > IF case_sensitive = 'X'. " button on Dynpro > case_sensitive_mode = editor->true. > ELSE. > case_sensitive_mode = editor->false. > ENDIF. > IF whole_word = 'X'. " button on Dynpro > whole_word_mode = editor->true. > ELSE. > whole_word_mode = editor->false. > ENDIF. > > CALL METHOD editor->find_and_select_text > EXPORTING search_string = search_string > case_sensitive_mode = case_sensitive_mode > whole_word_mode = whole_word_mode > CHANGING string_found = found. > * Flush for proper work of the following if statement > CALL METHOD cl_gui_cfw=>flush. > IF NOT search_string IS INITIAL. > IF found NE 0. > MESSAGE s000 WITH text-013. > ELSE. > MESSAGE s000 WITH text-014. > ENDIF. > ENDIF. > ENDFORM. " FIND_TEXT > > *&---------------------------------------------------------------------* > *& Form HIGHLIGHT_LINES > *&---------------------------------------------------------------------* > * -->P_HIGHLIGHT text * > *----------------------------------------------------------------------* > FORM highlight_lines USING p_highlight. > IF selection EQ 'X'. > CALL METHOD editor->highlight_selection > EXPORTING highlight_mode = p_highlight > EXCEPTIONS has_no_effect = 1. > IF sy-subrc NE 0. > * add your handling > ENDIF. > ELSE. > CALL METHOD editor->highlight_lines > EXPORTING > from_line = from_line > to_line = to_line > highlight_mode = p_highlight > EXCEPTIONS has_no_effect = 1. > IF sy-subrc NE 0. > * add your handling > ENDIF. > ENDIF. > > ENDFORM. " HIGHLIGHT_LINES >> and this link:
> http://help.sap.com/saphelp_45b/helpdata/EN/0e/514035634d761fe10000009b38f889/frameset.htm
>
> Best regards.
>
> Edited by: Pablo Casamayor on Apr 17, 2009 9:19 AM
Hi Pablo,
I have look through the program SAPTEXTEDIT_TEST_1. This program does the Text Selection and Highlighting the Text only after the buttons of each of the function is clicked.
My requirements will be, having all the selected text (with a string pattern) to be highlighted when this text editor is displayed. Is this possible?
Really thanks for your replies...
Regards,
Chuak Fen
‎2009 Apr 17 10:18 AM
Hi,
1.- execute program SAPTEXTEDIT_TEST_1
2.- write some text
3.- tick the following checkboxes:
Case-sensitive
Whole-word
Use for selection
4.- in Find input field put the text you want to highlight
5.- Click button "Find and select"
6.- click button "Highlight text area"
7.- click on button "Display<->Change"
Now if you click on the text editor although you are on display mode you can see that the text is hilighted.
Best regards.
Edited by: Pablo Casamayor on Apr 17, 2009 12:04 PM
‎2009 Apr 20 7:59 AM
>
> Hi,
>
> 1.- execute program SAPTEXTEDIT_TEST_1
> 2.- write some text
> 3.- tick the following checkboxes:
> Case-sensitive
> Whole-word
> Use for selection
> 4.- in Find input field put the text you want to highlight
> 5.- Click button "Find and select"
> 6.- click button "Highlight text area"
> 7.- click on button "Display<->Change"
>
> Now if you click on the text editor although you are on display mode you can see that the text is hilighted.
>
> Best regards.
>
> Edited by: Pablo Casamayor on Apr 17, 2009 12:04 PM
Hi Pablo,
Thanks a lot for all your replies. I finally have what I required to do by using this program SAPTEXTEDIT_TEST_1 as the reference.
Thanks to others as well... =D
‎2009 Apr 15 3:10 PM
‎2009 Apr 17 6:07 AM
Hi,
Try using Function Module:
CATSXT_SIMPLE_TEXT_EDITOR
Hope it helps
Regards
Mansi
‎2009 Apr 17 6:22 AM
‎2009 Apr 17 7:00 AM
Hi,
Check this FM 'CATSXT_SIMPLE_TEXT_EDITOR'
Regards,
Jyothi CH.
‎2009 Apr 17 7:49 AM
‎2009 Apr 17 7:56 AM
‎2009 Apr 17 9:50 AM
>
> Check this program SAPBC460D_09_TEXT1
Hi Gayathri,
I couldn't find program SAPBC460D_09_TEXT1. Thank you..