Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8065

Re: Round off problem with field-symbol

$
0
0

hi sagar,

 

declared as  verwmerkm  type char8

 

following is my structure declaration

 

FORM dynamic_alv .

 

   REFRESH lt_tot_comp.

 

   lo_struct ?= cl_abap_typedescr=>describe_by_name( 'TY_FINAL' ).

   lt_comp  = lo_struct->get_components( ).

   APPEND LINES OF lt_comp TO lt_tot_comp.

 

   LOOP AT it_qamv1 INTO wa_qamv1. " WHERE prueflos = wa_final-prueflos .

 

     la_comp-name = wa_qamv1-verwmerkm.

 

     lo_element ?= cl_abap_elemdescr=>describe_by_data( new_type ).

 

     la_comp-type = cl_abap_elemdescr=>get_p( p_length   = lo_element->length

                       p_decimals = lo_element->decimals ).

 

     APPEND la_comp TO lt_tot_comp.

     CLEAR: la_comp, wa_qamv1.

   ENDLOOP.

 

   lo_new_type = cl_abap_structdescr=>create( lt_tot_comp ).

 

   lo_new_tab = cl_abap_tabledescr=>create(

                   p_line_type  = lo_new_type

                   p_table_kind = cl_abap_tabledescr=>tablekind_std

                   p_unique     = abap_false ).

 

   CREATE DATA lo_data TYPE HANDLE lo_new_tab.

 

   ASSIGN lo_data->* TO <table>.

 

ENDFORM.                    " DYNAMIC_ALV


Viewing all articles
Browse latest Browse all 8065

Trending Articles