Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

Unable to create TEXTEDIT UI element dynamically in ROOTUIELEMENT container having GRID layout

$
0
0

Dear Experts,

 

Pls help me to resolve the issue.Issue is : "Unable to create TEXTEDIT UI element dynamically in ROOTUIELEMENT container having GRID layout".

 

Following is the code in WDMODIFY( )  of corresponding  view.

 

DATA: lr_container    TYPE REF TO cl_wd_uielement_container,
        lr_group        TYPE REF TO cl_wd_group,
        lr_caption_group TYPE REF TO cl_wd_caption,
        lr_textedit      TYPE REF TO cl_wd_text_edit.

 

lr_container ?= view->get_root_element( ).  "  Get reference of ROOTUIELEMENTCONTAINER
      cl_wd_grid_layout=>new_grid_layout( container = lr_container ).

      lr_group = cl_wd_group=>new_group( id = 'GROUP' ).  " Create the GROUP element
      lr_group->set_width( value = '100%' ).

 

      CALL METHOD cl_wd_grid_layout=>new_grid_layout
        EXPORTING
          container              = lr_group
          stretched_horizontally = 'X'.


      lr_caption_group = cl_wd_caption=>new_caption( text = 'Ticket Details' ).
      lr_group->set_header( the_header = lr_caption_group ).

 

      lr_textedit = cl_wd_text_edit=>new_text_edit( id    = 'TVIEW'  " Provide a unique id to your textedit element
                                                    cols  = 200        " Specify the number of columns
                                                    rows  = 10        " Specify the number of rows
*                                                    width = '90%'    " Specify the width
                                                    bind_value = 'TEXT' ). " Here

 

      DATA lr_grid_data  TYPE REF TO cl_wd_grid_data.

      lr_grid_data = cl_wd_grid_data=>new_grid_data( element = lr_textedit ).

      lr_textedit->set_layout_data( the_layout_data = lr_grid_data ).

      lr_container->add_child( the_child = lr_group ).
      lr_group->add_child( the_child = lr_textedit ).

 

I'm getting dump. PFA of ST22 .


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>