ok.
it is long text, it is a comment, I have provided it like Demo of text edit.
kind regards
Hi Elina,
Are you using custom screen?
if yes it will be helpful to you. create a button in screen having fctcode-'P1'(lets assume)
if you click on the button it will trigger the PBI Event.. write the below code in PAI Event.
IF sy-ucomm = 'P1'.
CALL FUNCTION 'TERM_CONTROL_EDIT'
EXPORTING
titel = 'Comments'
LANGU = sy-langu
TABLES
textlines = it_note1
EXCEPTIONS
user_cancelled = 1
OTHERS = 2
.
ENDIF.
it_note1 TYPE TABLE OF TXW_NOTE WITH HEADER LINE.
and before saving the data
LOOP AT it_not1.
CONCATENATE <wa-fieldnam> it_not1-line INTO <wa-fieldnam> SEPARATED BY ' '.
ENDLOOP.
if it helps give me a feedback i will help you whole code..
Thanks
Pedda Raju Jogi
Hi,
Have you consider using the standard sap function to read and save your text ?
function 'READ_TEXT'
Using cl_gui_textedit or function EDIT_TEXT
function 'SAVE_TEXT'
You can create your own user texts.
Try SO10 .
Regards.
Did you use CL_GUI_TEXTEDIT or did you use FM EDIT_TEXT or EDIT_TEXT_INLINE ?
If you use class, in PAI of program, you can use method get_text_as_r3table to get the text in an internal table. In every case; you can then save it to database with FM SAVE_TEXT.
NB: First create Text object and Id in transaction SE75, then read BC SAPscript: Printing with Forms, SAPscript Function Modules.
Regards,
Raymond
code of creating and call textedit is above:
repid = sy-repid.
* create control container
CREATE OBJECT container
EXPORTING
container_name = 'TXT_COMENT'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
* add your handling
ENDIF.
* create calls constructor, which initializes, creats and links
* TextEdit Control
CREATE OBJECT editor
EXPORTING
parent = container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = g_line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
* register editor for event dblclick
CALL METHOD editor->register_event_dblclick
EXPORTING
appl_event = 'X'.
* Create the event_receiver object and set the handlers for the events
* of the control
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->event_handler_dblclick
FOR editor.
* set status text of control
CALL METHOD editor->set_status_text
EXPORTING
status_text = text-011.
* set new pf-status
* SET PF-STATUS 'MAIN100'.
* to manage back
nothing_displayed = 1.
wish that will clarify my doubt
Hi experts,
hope this email finds you well,
I have called the method editor->get_text_as_r3table, in my PAI module when save buttom, but i can't get the text i have wrote in the note box.
I think something is missing.
note box is there but i want to save it's content in the table.
kind regards.
Add a comment