Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to read long text from container?

Former Member
0 Kudos

Hi all,

When I'm entering long text on a container in module pool ( used toenter comments/messages )

I need to save into custom table. I'm unable to read the longtext on screen which is used to save after entering. I can get the data in to the internal table. But cannot be processed to read store in the internal table. Can you one please provide a function module to read the data?

Thanks in advance.

Venkata

1 ACCEPTED SOLUTION

former_member555112
Active Contributor
0 Kudos

Hi,

If you are using cl_gui_custom_container then use the following method to get the text into an internal table.

CALL METHOD y_obj_currtxt->get_text_as_r3table
        IMPORTING
          table                  = y_i_new_txt_tbl
        EXCEPTIONS
          error_dp               = 1
          error_cntl_call_method = 2
          error_dp_create        = 3
          potential_data_loss    = 4
          OTHERS                 = 5.

Here y_obj_currtxt is the instance of object cl_gui_custom_container

The internal table y_i_new_txt_tbl should be of the following type

Types: BEGIN OF y_t_txt_tbl,

txt_line TYPE char50,

END OF y_t_txt_tbl,

Regards,

Ankur Parab

Edited by: Ankur Parab on Jun 15, 2009 9:55 PM

2 REPLIES 2

former_member555112
Active Contributor
0 Kudos

Hi,

If you are using cl_gui_custom_container then use the following method to get the text into an internal table.

CALL METHOD y_obj_currtxt->get_text_as_r3table
        IMPORTING
          table                  = y_i_new_txt_tbl
        EXCEPTIONS
          error_dp               = 1
          error_cntl_call_method = 2
          error_dp_create        = 3
          potential_data_loss    = 4
          OTHERS                 = 5.

Here y_obj_currtxt is the instance of object cl_gui_custom_container

The internal table y_i_new_txt_tbl should be of the following type

Types: BEGIN OF y_t_txt_tbl,

txt_line TYPE char50,

END OF y_t_txt_tbl,

Regards,

Ankur Parab

Edited by: Ankur Parab on Jun 15, 2009 9:55 PM

0 Kudos

Answered