Skip to Content

textedit(notebox)

Hi experts.

I need your help.

how can I catch value in textedit(notebox) and save it in my ztable.

I'm looking forward to hearing from you.

kind regards.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2014 at 07:48 AM

    Hi,

    Can you provide some more details of your issue. is it long text?

    Thanks,

    Sree

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2014 at 09:58 AM

    ok.

    it is long text, it is a comment, I have provided it like Demo of text edit.

    kind regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2014 at 10:13 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2014 at 10:25 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2014 at 10:30 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2014 at 10:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      We have method in CL_GUI_TEXTEDIT class, by using below methos you can capture the text information.

      types : begin of ty_text,

      text(50) type c,

      end of ty_text.

      data : it_text type standard table of ty_text,

      wa_text type ty_text.


      call method editor->get_text_as_r3table

      * EXPORTING

      * ONLY_WHEN_MODIFIED = FALSE

      importing

      table = it_text

      * IS_MODIFIED =

      * EXCEPTIONS

      * ERROR_DP = 1

      * ERROR_CNTL_CALL_METHOD = 2

      * ERROR_DP_CREATE = 3

      * POTENTIAL_DATA_LOSS = 4

      * others = 5

      .

      if sy-subrc <> 0.

      * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

      * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      endif.


      After capturing this value you can save this information in your custom table.


      Hopes it helps you.


      Thanks,

      Ashok.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2014 at 01:54 PM

    you can use GET_TEXT_AS_R3TABLE method of cl_gui_textedit c lass

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 09, 2014 at 08:11 AM

    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
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.