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: 

get_text_as_r3table text value not coming in itab

Former Member
0 Kudos

Hi all

I have created text editor through custom control using the method get_text_as_r3table. But when i execute it, i am not getting the text value for the

internal table int_table without no reason, i have used the flush also, but still not able to get the text value.

call method text_editor->get_text_as_r3table

           importing

               table = int_table

           exceptions

               others = 1.



Can anyone suggest me why text value is not coming ?


Thanks in advance.


Regards

Raja



6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos

Did you execute this method in PAI (where it should peform well) or in an event thast may not be suitable, in some case a simple call (automation queue) of


CALL METHOD cl_gui_cfw=>flush.

may solve the problem.

Regards,

Raymond

PS: "without no reason"  so "with a reason" ?

0 Kudos

Hi Raymond

=>flush used in PAI only, but still its not working.

What could be the reason.

Former Member
0 Kudos

Hi Rajaram,

How did you declare the internal table int_table ?

Please check the one below  it must be a similar one you are facing

http://scn.sap.com/thread/1375480

Thanks,

Ramya

0 Kudos

Hi Ramya

I have changed the internal table declaration also, its not working.

Thanks.

0 Kudos

Hi Guys

Can anyone tell me why the text editor value is not coming in the method get_text_as_r3table.

Even subrc = 0 in this case but still value not coming to itab.

Can i use get_text_as_stream method to get the text editor value.

Please anyone help me on this.

Regards

Raja

0 Kudos

Hi Rajaram,

I have created a small test program in order to test the method. I was able to get the message from the custom control to the internal table.

Declarations:

data : g_cont_edit type ref to cl_gui_custom_container,

         g_edit type ref to cl_gui_textedit.

data: begin of w_ltext,

       ltext(255) type c,

     end of w_ltext,

i_ltext like standard table of w_ltext.



1. I have created a screen 100 and in the layout i have created a custom control and named it as

    'TEXTEDIT'

2. At Process before output

*--Create Containers and Controls

create object g_cont_edit

     exporting

       container_name       = 'TEXTEDIT'

       repid                       = sy-repid

       dynnr                      = '0100'

     exceptions

       cntl_error                  = 1

       cntl_system_error      = 2

       create_error               = 3

       lifetime_error              = 4

       lifetime_dynpro_dynpro_link = 5

       others                      = 6.

   if sy-subrc <> 0.

     message id sy-msgid type sy-msgty number sy-msgno

                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   endif.


*--Create Long-Text control

   create object g_edit

     exporting

       wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position

       wordwrap_to_linebreak_mode = cl_gui_textedit=>false

       parent                     = g_cont_edit

     exceptions

       error_cntl_create          = 1

       error_cntl_init            = 2

       error_cntl_link            = 3

       error_dp_create            = 4

       gui_type_not_supported     = 5

       others                     = 6.

   if sy-subrc <> 0.

     message id sy-msgid type sy-msgty number sy-msgno

                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

   endif.


3. At Process after input


call method g_edit->get_text_as_r3table

     importing

       table                  = i_ltext

     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.



4.at start of selection I have called screen 100.

it takes the input from the control to the internal table i_ltext.