<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help, something wrong in this simple code. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862853#M671372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the analisis of SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;analisis.errores   &lt;/P&gt;&lt;P&gt;                                                        &lt;/P&gt;&lt;P&gt; An exception occurred. This exception is dealt with in more detail b&lt;/P&gt;&lt;P&gt; . The exception, which is assigned to the class 'CX_SY_ARITHMETIC_OV&lt;/P&gt;&lt;P&gt;  was neither                                                        &lt;/P&gt;&lt;P&gt; caught nor passed along using a RAISING clause, in the procedure    &lt;/P&gt;&lt;P&gt;  "KONDITION_LESEN" "(FORM)"                                         &lt;/P&gt;&lt;P&gt; .                                                                   &lt;/P&gt;&lt;P&gt; Since the caller of the procedure could not have expected this excep&lt;/P&gt;&lt;P&gt;  to occur, the running program was terminated.                      &lt;/P&gt;&lt;P&gt; The reason for the exception is:                                    &lt;/P&gt;&lt;P&gt; An overflow has been determined in the current arithmetical operatio&lt;/P&gt;&lt;P&gt; containing operands of type P. Possible causes include:             &lt;/P&gt;&lt;P&gt; 1.  The results field of type P is to small and the result does not &lt;/P&gt;&lt;P&gt;     into it.                                                        &lt;/P&gt;&lt;P&gt;     places.                                                         &lt;/P&gt;&lt;P&gt; 2.  The result or partial result has more than 31 decimal places.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never use the RISING CLAUSE....&lt;/P&gt;&lt;P&gt;maybe i have some definition on aritmethic functions?..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Sep 2007 21:59:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-20T21:59:27Z</dc:date>
    <item>
      <title>Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862850#M671369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, im not an ABAP developer, and  i dont have to who ask...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that the problem is when i multiply KONV-KWERT * 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i dont konw how to solve this... please..someone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_GESTION_CONDIC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF i_full,&lt;/P&gt;&lt;P&gt;          vbeln TYPE vbak-vbeln,&lt;/P&gt;&lt;P&gt;          posnr TYPE vbap-posnr,&lt;/P&gt;&lt;P&gt;          knumv TYPE vbak-knumv,&lt;/P&gt;&lt;P&gt;          name1 type kna1-name1,"nombre cLiente&lt;/P&gt;&lt;P&gt;          ernam type vbak-ernam,"nombre usuario creador&lt;/P&gt;&lt;P&gt;          erdat type vbak-erdat,"fechade creacion&lt;/P&gt;&lt;P&gt;          vdatu type vbak-vdatu,"fecha preferente entrega&lt;/P&gt;&lt;P&gt;          auart type vbak-auart,"clase de documento&lt;/P&gt;&lt;P&gt;          pstyv type vbap-pstyv,"tipo de posicion&lt;/P&gt;&lt;P&gt;          netwr type vbap-netwr,"valor neto de la posicion&lt;/P&gt;&lt;P&gt;          matnr type vbap-matnr,"codigo de material&lt;/P&gt;&lt;P&gt;          arktx type vbap-arktx,"descripcion del material&lt;/P&gt;&lt;P&gt;          kwmeng type vbap-kwmeng,"cantidad de pedido&lt;/P&gt;&lt;P&gt;          vrkme type vbap-vrkme,"unidad de medidad de venta&lt;/P&gt;&lt;P&gt;          kschl type konv-kschl,"clase de condicion&lt;/P&gt;&lt;P&gt;          kwert type konv-kwert,&lt;/P&gt;&lt;P&gt;          kposn type konv-kposn,"posicion del Doc. de ventas.&lt;/P&gt;&lt;P&gt;          kunnr type kna1-kunnr,"ni idea.&lt;/P&gt;&lt;P&gt;          vkorg type vbak-vkorg,&lt;/P&gt;&lt;P&gt;          vtweg type vbak-vtweg,&lt;/P&gt;&lt;P&gt;          spart type vbak-spart,&lt;/P&gt;&lt;P&gt;          waers   TYPE   konv-waers,&lt;/P&gt;&lt;P&gt;      END OF i_full.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_join LIKE TABLE OF i_full,&lt;/P&gt;&lt;P&gt;      LI_join LIKE LINE OF it_join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF i_kondition,&lt;/P&gt;&lt;P&gt;          vbeln TYPE vbap-vbeln,&lt;/P&gt;&lt;P&gt;          posnr TYPE vbap-posnr,&lt;/P&gt;&lt;P&gt;          knumv TYPE vbak-knumv,&lt;/P&gt;&lt;P&gt;          name1 type kna1-name1,"nombre cLiente&lt;/P&gt;&lt;P&gt;          ernam type vbak-ernam,"nombre usuario creador&lt;/P&gt;&lt;P&gt;          erdat type vbak-erdat,"fechade creacion&lt;/P&gt;&lt;P&gt;          vdatu type vbak-vdatu,"fecha preferente entrega&lt;/P&gt;&lt;P&gt;          auart type vbak-auart,"clase de documento&lt;/P&gt;&lt;P&gt;          pstyv type vbap-pstyv,"tipo de posicion&lt;/P&gt;&lt;P&gt;          netwr type vbap-netwr,"valor neto de la posicion&lt;/P&gt;&lt;P&gt;          matnr type vbap-matnr,"codigo de material&lt;/P&gt;&lt;P&gt;          arktx type vbap-arktx,"descripcion del material&lt;/P&gt;&lt;P&gt;          kwmeng type vbap-kwmeng,"cantidad de pedido&lt;/P&gt;&lt;P&gt;          vrkme type vbap-vrkme,"unidad de medidad de venta&lt;/P&gt;&lt;P&gt;          kschl type konv-kschl,"clase de condicion&lt;/P&gt;&lt;P&gt;          kwert type konv-kwert,&lt;/P&gt;&lt;P&gt;          kposn type konv-kposn,"posicion del Doc. de ventas.&lt;/P&gt;&lt;P&gt;          kunnr type kna1-kunnr,"ni idea.&lt;/P&gt;&lt;P&gt;          vkorg type vbak-vkorg,&lt;/P&gt;&lt;P&gt;          vtweg type vbak-vtweg,&lt;/P&gt;&lt;P&gt;          spart type vbak-spart,&lt;/P&gt;&lt;P&gt;          waers   TYPE   konv-waers,&lt;/P&gt;&lt;P&gt;     END OF i_kondition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_kondition LIKE TABLE OF i_kondition,&lt;/P&gt;&lt;P&gt;      it_konv LIKE TABLE OF i_kondition,&lt;/P&gt;&lt;P&gt;      it_final LIKE TABLE OF i_kondition,&lt;/P&gt;&lt;P&gt;      LI_konv LIKE LINE OF it_kondition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Heading of the report.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data: t_heading type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**=======================================================================&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;Selection screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;**=======================================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:s_vbeln for LI_join-vbeln,   "Documento de ventas&lt;/P&gt;&lt;P&gt;               s_posnr for LI_join-posnr,   "Posicion del doc de ventas&lt;/P&gt;&lt;P&gt;               s_auart for LI_join-auart,   "clase de doc.&lt;/P&gt;&lt;P&gt;               s_vkorg for LI_join-vkorg,   "org. de ventas&lt;/P&gt;&lt;P&gt;               s_vtweg for LI_join-vtweg,   "Canal&lt;/P&gt;&lt;P&gt;               s_spart for LI_join-spart,   "sector&lt;/P&gt;&lt;P&gt;               s_pstyv for LI_join-pstyv,   "tipo de posicion&lt;/P&gt;&lt;P&gt;               s_kschl for LI_join-kschl,   "clase de condicion&lt;/P&gt;&lt;P&gt;               S_kunnr for LI_join-kunnr.   "Nº de cliente 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM kondition_lesen.&lt;/P&gt;&lt;P&gt;  PERFORM build_alv using it_kondition t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      FORM kondition_lesen                                          *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM kondition_lesen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT vbak~vbeln vbak~ernam vbak~erdat vbak~vdatu vbak~auart vbak~knumv&lt;/P&gt;&lt;P&gt;  vbap~posnr vbap~pstyv vbap~netwr vbap~matnr vbap~arktx vbap~kwmeng vbap~vrkme&lt;/P&gt;&lt;P&gt;  kna1~name1 kna1~kunnr&lt;/P&gt;&lt;P&gt;  FROM vbak&lt;/P&gt;&lt;P&gt;    inner join vbap as vbap on vbak~vbeln = vbap~vbeln&lt;/P&gt;&lt;P&gt;    inner join kna1 as kna1 on kna1~kunnr = vbak~kunnr&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE it_join&lt;/P&gt;&lt;P&gt;    WHERE vbak~vbeln in s_vbeln&lt;/P&gt;&lt;P&gt;     AND vbak~auart in s_auart&lt;/P&gt;&lt;P&gt;     AND vbak~vkorg in s_vkorg&lt;/P&gt;&lt;P&gt;     AND vbak~vtweg in s_vtweg&lt;/P&gt;&lt;P&gt;     AND vbak~spart in s_spart&lt;/P&gt;&lt;P&gt;     AND vbap~posnr in s_posnr&lt;/P&gt;&lt;P&gt;     AND vbap~pstyv in s_pstyv&lt;/P&gt;&lt;P&gt;     AND kna1~kunnr in s_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_join INTO LI_join.&lt;/P&gt;&lt;P&gt;    SELECT knumv kposn kschl kbetr waers kwert&lt;/P&gt;&lt;P&gt;    FROM konv&lt;/P&gt;&lt;P&gt;      INTO CORRESPONDING FIELDS OF TABLE it_konv&lt;/P&gt;&lt;P&gt;      WHERE knumv EQ LI_join-knumv&lt;/P&gt;&lt;P&gt;      AND   kposn EQ LI_join-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT it_konv INTO LI_konv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if LI_konv-kwert &amp;lt;&amp;gt; '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LI_konv-vbeln = LI_join-vbeln.&lt;/P&gt;&lt;P&gt;      LI_konv-name1 = LI_join-name1.&lt;/P&gt;&lt;P&gt;      LI_konv-ernam = LI_join-ernam.&lt;/P&gt;&lt;P&gt;      LI_konv-erdat = LI_join-erdat.&lt;/P&gt;&lt;P&gt;      LI_konv-vdatu = LI_join-vdatu.&lt;/P&gt;&lt;P&gt;      LI_konv-auart = LI_join-auart.&lt;/P&gt;&lt;P&gt;      LI_konv-posnr = LI_join-posnr.&lt;/P&gt;&lt;P&gt;      LI_konv-pstyv = LI_join-pstyv.&lt;/P&gt;&lt;P&gt;      LI_konv-netwr = LI_join-netwr.&lt;/P&gt;&lt;P&gt;      LI_konv-matnr = LI_join-matnr.&lt;/P&gt;&lt;P&gt;      LI_konv-arktx = LI_join-arktx.&lt;/P&gt;&lt;P&gt;      LI_konv-kwmeng = LI_join-kwmeng.&lt;/P&gt;&lt;P&gt;      LI_konv-vrkme = LI_join-vrkme.&lt;/P&gt;&lt;P&gt;      LI_konv-kschl = LI_konv-kschl.&lt;/P&gt;&lt;P&gt;      LI_konv-kwert =  LI_konv-kwert * 100.                    "HERE IS THE PROBLEM!!&lt;/P&gt;&lt;P&gt;      APPEND LI_konv TO it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "kondition_lesen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  build_alv&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Builds and display the ALV Grid.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form build_alv using it_kondition&lt;/P&gt;&lt;P&gt;                     t_heading  type slis_t_listheader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;ALV required data objects.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data: w_title   type lvc_title,&lt;/P&gt;&lt;P&gt;        w_repid   type syrepid,&lt;/P&gt;&lt;P&gt;        w_comm    type slis_formname,&lt;/P&gt;&lt;P&gt;        w_status  type slis_formname,&lt;/P&gt;&lt;P&gt;        x_layout  type slis_layout_alv,&lt;/P&gt;&lt;P&gt;        t_event    type slis_t_event,&lt;/P&gt;&lt;P&gt;        t_fieldcat type slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;        t_sort     type slis_t_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh t_fieldcat.&lt;/P&gt;&lt;P&gt;  refresh t_event.&lt;/P&gt;&lt;P&gt;  refresh t_sort.&lt;/P&gt;&lt;P&gt;  clear x_layout.&lt;/P&gt;&lt;P&gt;  clear w_title.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Field Catalog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform set_fieldcat2 using:&lt;/P&gt;&lt;P&gt;1 'VBELN' 'VBELN' 'VBAK' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;2 'NAME1' 'NAME1' 'KNA1' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;3 'ERNAM' 'ERNAM' 'VBAK' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;4 'ERDAT' 'ERDAT' 'VBAK' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;5 'VDATU' 'VDATU' 'VBAK' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;6 'AUART' 'AUART' 'VBAK' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;7 'POSNR' 'POSNR' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;8 'PSTYV' 'PSTYV' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;9 'NETWR' 'NETWR' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;10 'MATNR' 'MATNR' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;11 'ARKT' 'ARKT' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;12 'KWMENG' 'KWMENG' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;13 'VRKME' 'VRKME' 'VBAP' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;14 'KSCHL' 'KSCHL' 'KONV' space space  space  space  space  space space space space space space space t_fieldcat ,&lt;/P&gt;&lt;P&gt;15 'KWERT' 'KWERT' 'KONV' space space  space  space  space  space space space space space space space t_fieldcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Top of page heading&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; perform set_top_page_heading using t_heading t_event.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  perform set_events using t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;GUI Status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  w_status = ''.&lt;/P&gt;&lt;P&gt;  w_repid = sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Title&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;w_title = &amp;lt;&amp;lt;If you want to set a title for&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            the ALV, please, uncomment and edit this line&amp;gt;&amp;gt;.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;User commands&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  w_comm   = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Order&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM set_order USING '&amp;lt;field&amp;gt;' 'IT_DATA' 'X' space space t_sort.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays the ALV grid&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_callback_program       = w_repid&lt;/P&gt;&lt;P&gt;      it_fieldcat              = t_fieldcat&lt;/P&gt;&lt;P&gt;      is_layout                = x_layout&lt;/P&gt;&lt;P&gt;      it_sort                  = t_sort&lt;/P&gt;&lt;P&gt;      i_callback_pf_status_set = w_status&lt;/P&gt;&lt;P&gt;      i_callback_user_command  = w_comm&lt;/P&gt;&lt;P&gt;      i_save                   = 'X'&lt;/P&gt;&lt;P&gt;      it_events                = t_event&lt;/P&gt;&lt;P&gt;      i_grid_title             = w_title&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab                 = it_final&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      program_error            = 1&lt;/P&gt;&lt;P&gt;      others                   = 2.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message id sy-msgid type sy-msgty number sy-msgno&lt;/P&gt;&lt;P&gt;            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " build_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  set_top_page_heading&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Creates the report headings.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form set_top_page_heading using t_heading type slis_t_listheader&lt;/P&gt;&lt;P&gt;                                t_events  type slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: x_heading type slis_listheader,&lt;/P&gt;&lt;P&gt;        x_event   type line of slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Report title&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear t_heading[].&lt;/P&gt;&lt;P&gt;  clear x_heading.&lt;/P&gt;&lt;P&gt;  x_heading-typ = 'H'.&lt;/P&gt;&lt;P&gt;  x_heading-info = ''(001).&lt;/P&gt;&lt;P&gt;  append x_heading to t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Program name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear x_heading.&lt;/P&gt;&lt;P&gt;  x_heading-typ = 'S'.&lt;/P&gt;&lt;P&gt;  x_heading-key = 'Program: '.&lt;/P&gt;&lt;P&gt;  x_heading-info = sy-repid.&lt;/P&gt;&lt;P&gt;  append x_heading to t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;User who is running the report&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear x_heading.&lt;/P&gt;&lt;P&gt;  x_heading-typ = 'S'.&lt;/P&gt;&lt;P&gt;  x_heading-key = 'User: '.&lt;/P&gt;&lt;P&gt;  x_heading-info = sy-uname.&lt;/P&gt;&lt;P&gt;  append x_heading to t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Date of execution&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear x_heading.&lt;/P&gt;&lt;P&gt;  x_heading-typ = 'S'.&lt;/P&gt;&lt;P&gt;  x_heading-key = 'Date: '.&lt;/P&gt;&lt;P&gt;  write sy-datum to x_heading-info.&lt;/P&gt;&lt;P&gt;  append x_heading to t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Time of execution&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  clear x_heading.&lt;/P&gt;&lt;P&gt;  x_heading-typ = 'S'.&lt;/P&gt;&lt;P&gt;  x_heading-key = 'Time: '.&lt;/P&gt;&lt;P&gt;  write sy-uzeit to x_heading-info.&lt;/P&gt;&lt;P&gt;  append x_heading to t_heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Top of page event&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  x_event-name = slis_ev_top_of_page.&lt;/P&gt;&lt;P&gt;  x_event-form = 'TOP_OF_PAGE'.&lt;/P&gt;&lt;P&gt;  append x_event to t_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    "set_top_page_heading&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  set_events&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Sets the events for ALV.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      The TOP_OF_PAGE event is alredy being registered in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      the set_top_page_heading subroutine.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form set_events using t_events type slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: x_event   type line of slis_t_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;-------&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; clear x_event.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; x_event-name = .&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; x_event-form = .&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; append x_event to t_event.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    "set_events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  set_order&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Adds an entry to the order table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot&lt;/P&gt;&lt;P&gt;                     t_sort TYPE slis_t_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: x_sort TYPE slis_sortinfo_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR x_sort.&lt;/P&gt;&lt;P&gt;  x_sort-fieldname = p_fieldname.&lt;/P&gt;&lt;P&gt;  x_sort-tabname   = p_tabname.&lt;/P&gt;&lt;P&gt;  x_sort-up = p_up.&lt;/P&gt;&lt;P&gt;  x_sort-down = p_down.&lt;/P&gt;&lt;P&gt;  x_sort-subtot = p_subtot.&lt;/P&gt;&lt;P&gt;  APPEND x_sort TO t_sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "set_order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  set_fieldcat2&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Adds an entry to the field catalog.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_colpos: Column position.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_fieldname: Field of internal table which is being described by&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*		  this record of the field catalog.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_ref_fieldname: (Optional) Table field / data element which&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*		      describes the properties of the field.&lt;/P&gt;&lt;P&gt;*		      If this field is not given, it is copied from&lt;/P&gt;&lt;P&gt;*		      the fieldname.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_ref_tabname: (Optional) Table which holds the field referenced&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*		    by &amp;lt;&amp;lt;p_ref_fieldname&amp;gt;&amp;gt;.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                  If this is not given, the parameter&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                  &amp;lt;&amp;lt;p_ref_fieldname&amp;gt;&amp;gt; references a data element.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_outputlen: (Optional) Column width.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_noout: (Optional) If set to 'X', states that the field is not&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*	      showed initially. If so, the field has to be&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            included in the report at runtime using the display&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            options.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_seltext_m: (Optional) Medium label to be used as column header.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_seltext_l: (Optional) Long label to be used as column header.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_seltext_s: (Optional) Small label to be used as column header.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_reptext_ddic: (Optional) Extra small (heading) label to be&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*		      used as column header.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_ddictxt: (Optional) Set to 'L', 'M', 'S' or 'R' to select&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              whether to use SELTEXT_L, SELTEXT_M, SELTEXT_S,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              or REPTEXT_DDIC as text for column header.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_hotspot: (Optional) If set to 'X', this field will be used&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*	        as a hotspot area for cursor, alolowing the user&lt;/P&gt;&lt;P&gt;*		to click on the field.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_showasicon: (Optional) If set to 'X', this field will be shown&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 as an icon and the contents of the field will set&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*		   which icon to show.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_checkbox: (Optional) If set to 'X', this field will be shown&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               as a checkbox.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_edit: (Optional) If set to 'X', this field will be editable.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   p_dosum: (Optional) If set to 'X', this field will be summed&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            (aggregation function) according to the grouping set&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            by the order functions.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   t_fieldcat: Table which contains the whole fieldcat.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FORM set_fieldcat2 USING&lt;/P&gt;&lt;P&gt;      p_colpos p_fieldname p_ref_fieldname p_ref_tabname&lt;/P&gt;&lt;P&gt;      p_outputlen p_noout&lt;/P&gt;&lt;P&gt;      p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt&lt;/P&gt;&lt;P&gt;      p_hotspot p_showasicon p_checkbox p_edit&lt;/P&gt;&lt;P&gt;      p_dosum&lt;/P&gt;&lt;P&gt;      t_fieldcat TYPE slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: wa_fieldcat TYPE slis_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR wa_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;General settings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  wa_fieldcat-fieldname = p_fieldname.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-col_pos = p_colpos.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-no_out = p_noout.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-hotspot = p_hotspot.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-checkbox = p_checkbox.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-icon = p_showasicon.&lt;/P&gt;&lt;P&gt;  wa_fieldcat-do_sum = p_dosum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set reference fieldname, tablenam and rollname.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If p_ref_tabname is not given, the ref_fieldname given&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   is a data element.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If p_ref_tabname is given, the ref_fieldname given is a&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   field of a table.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;In case ref_fieldname is not given,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   it is copied from the fieldname.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF p_ref_tabname IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-rollname =   p_ref_fieldname.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-ref_tabname = p_ref_tabname.&lt;/P&gt;&lt;P&gt;    IF p_ref_fieldname EQ space.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      wa_fieldcat-ref_fieldname =   p_ref_fieldname.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set output length.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT p_outputlen IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-outputlen = p_outputlen.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set text headers.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT p_seltext_m IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-seltext_m = p_seltext_m.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT p_seltext_l IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-seltext_l = p_seltext_l.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT p_seltext_s IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-seltext_s = p_seltext_s.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT p_reptext_ddic IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-reptext_ddic = p_reptext_ddic.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT p_ddictxt IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-ddictxt = p_ddictxt.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Set as editable or not.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF NOT p_edit IS INITIAL.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-input     = 'X'.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-edit     = 'X'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND wa_fieldcat TO t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                   "set_fieldcat2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;======================== Subroutines called by ALV ================&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  top_of_page&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Called on top_of_page ALV event.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Prints the heading.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form top_of_page.&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    i_logo             = &amp;lt;&amp;lt;If you want to set a logo, please,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                         uncomment and edit this line&amp;gt;&amp;gt; &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      it_list_commentary = t_heading.&lt;/P&gt;&lt;P&gt;endform.                    " alv_top_of_page&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  user_command&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Called on user_command ALV event.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Executes custom commands.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;form user_command using r_ucomm     like sy-ucomm&lt;/P&gt;&lt;P&gt;                        rs_selfield type slis_selfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Example Code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Executes a command considering the sy-ucomm.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CASE r_ucomm.&lt;/P&gt;&lt;P&gt;    WHEN '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     Set your "double click action" response here.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     Example code: Create and display a status message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      DATA: w_msg TYPE string,&lt;/P&gt;&lt;P&gt;            w_row(4) TYPE n.&lt;/P&gt;&lt;P&gt;      w_row = rs_selfield-tabindex.&lt;/P&gt;&lt;P&gt;      CONCATENATE 'Casilla seleccionada: ' w_row&lt;/P&gt;&lt;P&gt;                  'Campo:' rs_selfield-fieldname&lt;/P&gt;&lt;P&gt;                  'Valor:' rs_selfield-value&lt;/P&gt;&lt;P&gt;                  INTO w_msg SEPARATED BY space.&lt;/P&gt;&lt;P&gt;      MESSAGE w_msg TYPE 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; End of example code.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    "user_command&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 21:51:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862850#M671369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-20T21:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862851#M671370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what is the problem with  KONV-KWERT * 100&lt;/P&gt;&lt;P&gt;What is the desired result and what are you actually getting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 21:55:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862851#M671370</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-20T21:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862852#M671371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the error exactly u r getting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 21:56:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862852#M671371</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-20T21:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862853#M671372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the analisis of SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;analisis.errores   &lt;/P&gt;&lt;P&gt;                                                        &lt;/P&gt;&lt;P&gt; An exception occurred. This exception is dealt with in more detail b&lt;/P&gt;&lt;P&gt; . The exception, which is assigned to the class 'CX_SY_ARITHMETIC_OV&lt;/P&gt;&lt;P&gt;  was neither                                                        &lt;/P&gt;&lt;P&gt; caught nor passed along using a RAISING clause, in the procedure    &lt;/P&gt;&lt;P&gt;  "KONDITION_LESEN" "(FORM)"                                         &lt;/P&gt;&lt;P&gt; .                                                                   &lt;/P&gt;&lt;P&gt; Since the caller of the procedure could not have expected this excep&lt;/P&gt;&lt;P&gt;  to occur, the running program was terminated.                      &lt;/P&gt;&lt;P&gt; The reason for the exception is:                                    &lt;/P&gt;&lt;P&gt; An overflow has been determined in the current arithmetical operatio&lt;/P&gt;&lt;P&gt; containing operands of type P. Possible causes include:             &lt;/P&gt;&lt;P&gt; 1.  The results field of type P is to small and the result does not &lt;/P&gt;&lt;P&gt;     into it.                                                        &lt;/P&gt;&lt;P&gt;     places.                                                         &lt;/P&gt;&lt;P&gt; 2.  The result or partial result has more than 31 decimal places.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***********************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never use the RISING CLAUSE....&lt;/P&gt;&lt;P&gt;maybe i have some definition on aritmethic functions?..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 21:59:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862853#M671372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-20T21:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862854#M671373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Felipe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do small change in the code like this and check....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; kwert(40) type c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kwert(42) type p decimals 2,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chage these variables in the internal table declarations....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or I donno what type of values u r passing into this variable... and what u r expecting the out put&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kwert(n) type p decimals m,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pass n and m values based on the values ur passing and the decimals u r expecting ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the code once again....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 22:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862854#M671373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-20T22:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help, something wrong in this simple code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862855#M671374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the value of KWERT when you get this dump. Is it a very large value, you could be getting this error due to an overflow of the field, but it would have to be a very large value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Sep 2007 22:06:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-something-wrong-in-this-simple-code/m-p/2862855#M671374</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-20T22:06:18Z</dc:date>
    </item>
  </channel>
</rss>

