<?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 ALV Display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869011#M673134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i find difficulties in tracing an error in my program, everytime i click the a certain column of an alv table for me to know the totals and when i click the summation button it will dump and the runtime error that appears on screen is from the ABAP program. So i trace it and compare it to my program. The structures used in ABAP and in my program are the same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the error:&lt;/P&gt;&lt;P&gt;      assign component&lt;/P&gt;&lt;P&gt;            &amp;lt;ls_fieldcat&amp;gt;-fieldname of structure rt_data of &amp;lt;g_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;           message x000(ok).        " the error points in this message&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;  BEGIN OF t_output,&lt;/P&gt;&lt;P&gt;    ovkorg TYPE vbak-vkorg,      "sales organization&lt;/P&gt;&lt;P&gt;    ovtweg TYPE vbak-vtweg,      "distribution channel&lt;/P&gt;&lt;P&gt;    oauart TYPE vbak-auart,      "order type&lt;/P&gt;&lt;P&gt;    ovbeln TYPE vbak-vbeln,      "sales order&lt;/P&gt;&lt;P&gt;    okunnr TYPE vbak-kunnr,      "sold-to party&lt;/P&gt;&lt;P&gt;    oname1 TYPE kna1-name1,      "sold-to name&lt;/P&gt;&lt;P&gt;    obstnk TYPE vbak-bstnk,      "cust. purch. order&lt;/P&gt;&lt;P&gt;    oposnr TYPE vbap-posnr,      "order item&lt;/P&gt;&lt;P&gt;    omatnr TYPE vbap-matnr,      "material&lt;/P&gt;&lt;P&gt;    oarktx TYPE vbap-arktx,      "material description&lt;/P&gt;&lt;P&gt;    ospart TYPE vbap-spart,      "division&lt;/P&gt;&lt;P&gt;    oprodh TYPE vbap-prodh,      "prod. hierarchy&lt;/P&gt;&lt;P&gt;    ovtext TYPE t179t-vtext,     "prod. hierarchy description&lt;/P&gt;&lt;P&gt;    okwmeng TYPE vbap-kwmeng,    "order qty.&lt;/P&gt;&lt;P&gt;    oedatu TYPE vbep-edatu,      "1st promised CSD&lt;/P&gt;&lt;P&gt;    ovbeln2 TYPE likp-vbeln,     "delivery note&lt;/P&gt;&lt;P&gt;    okunnr2 TYPE likp-kunnr,     "ship-to party&lt;/P&gt;&lt;P&gt;    okunnr3 TYPE kna1-kunnr,     "ship-to name&lt;/P&gt;&lt;P&gt;    oposnr2 TYPE lips-posnr,     "delivery item&lt;/P&gt;&lt;P&gt;    olfimg TYPE lips-lfimg,      "delivery qty.&lt;/P&gt;&lt;P&gt;    owadat_ist TYPE likp-wadat_ist,  "PGI date&lt;/P&gt;&lt;P&gt;    ohit?(10) TYPE c,                "hit?&lt;/P&gt;&lt;P&gt;  END OF t_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  i_output TYPE STANDARD TABLE OF t_output,&lt;/P&gt;&lt;P&gt;              wa_layout TYPE lvc_s_layo,&lt;/P&gt;&lt;P&gt;              wa_fcat   TYPE lvc_s_fcat,&lt;/P&gt;&lt;P&gt;              wa_print   LIKE lvc_s_prnt,&lt;/P&gt;&lt;P&gt;               wa_fieldcat   TYPE lvc_t_fcat.&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;  FORM f_catalog USING  p_fname&lt;/P&gt;&lt;P&gt;                                        p_fieldtext.&lt;/P&gt;&lt;P&gt;        CLEAR wa_fcat.&lt;/P&gt;&lt;P&gt;        wa_fcat-fieldname = p_fname.&lt;/P&gt;&lt;P&gt;        wa_fcat-scrtext_l = p_fieldtext.&lt;/P&gt;&lt;P&gt;        APPEND wa_fcat TO wa_fieldcat.&lt;/P&gt;&lt;P&gt;    ENDFORM.                    "F_CATALOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FORM f_alv_grid_display.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF g_container IS INITIAL.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name = text-036.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    create an instance of the ALV control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_grid&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_parent = g_container.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display alv grid in screen 0100&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      is_variant                    = wa_variant&lt;/P&gt;&lt;P&gt;      i_save                        = c_x&lt;/P&gt;&lt;P&gt;      is_layout                     = wa_layout&lt;/P&gt;&lt;P&gt;      is_print                      = wa_print&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab                     = i_output&lt;/P&gt;&lt;P&gt;      it_fieldcatalog               = wa_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;      program_error                 = 2&lt;/P&gt;&lt;P&gt;      too_many_lines                = 3&lt;/P&gt;&lt;P&gt;      OTHERS                        = 4.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do nothing.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "f_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope u understand my declaration....&lt;/P&gt;&lt;P&gt;( as what I've understand in ALV is that, there is no need for me to code for a computation since it is already in the ALV  and my co worker told me that if i click thatt button it will automatically compute and display the totals at the buttom of the table )&lt;/P&gt;&lt;P&gt;thnks,&lt;/P&gt;&lt;P&gt;BRYAN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2007 02:43:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-02T02:43:23Z</dc:date>
    <item>
      <title>ALV Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869011#M673134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i find difficulties in tracing an error in my program, everytime i click the a certain column of an alv table for me to know the totals and when i click the summation button it will dump and the runtime error that appears on screen is from the ABAP program. So i trace it and compare it to my program. The structures used in ABAP and in my program are the same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is the error:&lt;/P&gt;&lt;P&gt;      assign component&lt;/P&gt;&lt;P&gt;            &amp;lt;ls_fieldcat&amp;gt;-fieldname of structure rt_data of &amp;lt;g_field&amp;gt;.&lt;/P&gt;&lt;P&gt;      if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;           message x000(ok).        " the error points in this message&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;  BEGIN OF t_output,&lt;/P&gt;&lt;P&gt;    ovkorg TYPE vbak-vkorg,      "sales organization&lt;/P&gt;&lt;P&gt;    ovtweg TYPE vbak-vtweg,      "distribution channel&lt;/P&gt;&lt;P&gt;    oauart TYPE vbak-auart,      "order type&lt;/P&gt;&lt;P&gt;    ovbeln TYPE vbak-vbeln,      "sales order&lt;/P&gt;&lt;P&gt;    okunnr TYPE vbak-kunnr,      "sold-to party&lt;/P&gt;&lt;P&gt;    oname1 TYPE kna1-name1,      "sold-to name&lt;/P&gt;&lt;P&gt;    obstnk TYPE vbak-bstnk,      "cust. purch. order&lt;/P&gt;&lt;P&gt;    oposnr TYPE vbap-posnr,      "order item&lt;/P&gt;&lt;P&gt;    omatnr TYPE vbap-matnr,      "material&lt;/P&gt;&lt;P&gt;    oarktx TYPE vbap-arktx,      "material description&lt;/P&gt;&lt;P&gt;    ospart TYPE vbap-spart,      "division&lt;/P&gt;&lt;P&gt;    oprodh TYPE vbap-prodh,      "prod. hierarchy&lt;/P&gt;&lt;P&gt;    ovtext TYPE t179t-vtext,     "prod. hierarchy description&lt;/P&gt;&lt;P&gt;    okwmeng TYPE vbap-kwmeng,    "order qty.&lt;/P&gt;&lt;P&gt;    oedatu TYPE vbep-edatu,      "1st promised CSD&lt;/P&gt;&lt;P&gt;    ovbeln2 TYPE likp-vbeln,     "delivery note&lt;/P&gt;&lt;P&gt;    okunnr2 TYPE likp-kunnr,     "ship-to party&lt;/P&gt;&lt;P&gt;    okunnr3 TYPE kna1-kunnr,     "ship-to name&lt;/P&gt;&lt;P&gt;    oposnr2 TYPE lips-posnr,     "delivery item&lt;/P&gt;&lt;P&gt;    olfimg TYPE lips-lfimg,      "delivery qty.&lt;/P&gt;&lt;P&gt;    owadat_ist TYPE likp-wadat_ist,  "PGI date&lt;/P&gt;&lt;P&gt;    ohit?(10) TYPE c,                "hit?&lt;/P&gt;&lt;P&gt;  END OF t_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA:  i_output TYPE STANDARD TABLE OF t_output,&lt;/P&gt;&lt;P&gt;              wa_layout TYPE lvc_s_layo,&lt;/P&gt;&lt;P&gt;              wa_fcat   TYPE lvc_s_fcat,&lt;/P&gt;&lt;P&gt;              wa_print   LIKE lvc_s_prnt,&lt;/P&gt;&lt;P&gt;               wa_fieldcat   TYPE lvc_t_fcat.&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;  FORM f_catalog USING  p_fname&lt;/P&gt;&lt;P&gt;                                        p_fieldtext.&lt;/P&gt;&lt;P&gt;        CLEAR wa_fcat.&lt;/P&gt;&lt;P&gt;        wa_fcat-fieldname = p_fname.&lt;/P&gt;&lt;P&gt;        wa_fcat-scrtext_l = p_fieldtext.&lt;/P&gt;&lt;P&gt;        APPEND wa_fcat TO wa_fieldcat.&lt;/P&gt;&lt;P&gt;    ENDFORM.                    "F_CATALOG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    FORM f_alv_grid_display.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF g_container IS INITIAL.&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name = text-036.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    create an instance of the ALV control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT g_grid&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          i_parent = g_container.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;display alv grid in screen 0100&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL METHOD g_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      is_variant                    = wa_variant&lt;/P&gt;&lt;P&gt;      i_save                        = c_x&lt;/P&gt;&lt;P&gt;      is_layout                     = wa_layout&lt;/P&gt;&lt;P&gt;      is_print                      = wa_print&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      it_outtab                     = i_output&lt;/P&gt;&lt;P&gt;      it_fieldcatalog               = wa_fieldcat&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      invalid_parameter_combination = 1&lt;/P&gt;&lt;P&gt;      program_error                 = 2&lt;/P&gt;&lt;P&gt;      too_many_lines                = 3&lt;/P&gt;&lt;P&gt;      OTHERS                        = 4.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do nothing.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "f_alv_grid_display&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope u understand my declaration....&lt;/P&gt;&lt;P&gt;( as what I've understand in ALV is that, there is no need for me to code for a computation since it is already in the ALV  and my co worker told me that if i click thatt button it will automatically compute and display the totals at the buttom of the table )&lt;/P&gt;&lt;P&gt;thnks,&lt;/P&gt;&lt;P&gt;BRYAN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 02:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869011#M673134</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T02:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869012#M673135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bryan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is important that all CHANGING parameter of method go_grid-&amp;gt;set_table_for_first_display ( ) are &amp;lt;b&amp;gt;global &amp;lt;/b&amp;gt;(and not local) variables of your report. Otherwise the report will dump as soon as you change the list (e.g. sorting).&lt;/P&gt;&lt;P&gt;For details please refer to my answers in threads&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="377085"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this requirement is met by your report. However, I guess that the ALV control may be unhappy with the naming of the last column (&amp;lt;b&amp;gt;OHIT?&amp;lt;/b&amp;gt;). Try to replace or drop the special character (?) and see what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 03:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869012#M673135</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-10-02T03:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869013#M673136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try passing the appropriate dataelement also for the corresponding quantity or the amount column in the field catalog internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  wa_fcat-fieldname = p_fname.
wa_fcat-scrtext_l = p_fieldtext.
wa_fcat-rollname  = 'LFIMG'.    " For delivery quantity..Similarly give for all columns
APPEND wa_fcat TO wa_fieldcat.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 03:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-display/m-p/2869013#M673136</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T03:10:46Z</dc:date>
    </item>
  </channel>
</rss>

