<?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: ALV issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114183#M1186383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: g_fieldcat_tab TYPE slis_t_fieldcat_alv,
      w_fieldcat_tab TYPE LINE OF slis_t_fieldcat_alv.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = 'LT_VBAK'   " caps
      i_structure_name       = 'VBAP'   "caps
    CHANGING
      ct_fieldcat            = g_fieldcat_tab[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2009 18:12:19 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2009-02-03T18:12:19Z</dc:date>
    <item>
      <title>ALV issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114181#M1186381</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;I am working on developing a report in ALV and came across an issue with the FM 'REUSE_ALV_FIELDCATALOG_MERGE'. Here is the code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: alv_fc type table of slis_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;Data: Begin of error occurs 0,&lt;/P&gt;&lt;P&gt;            pernr(12),&lt;/P&gt;&lt;P&gt;            empname(40),&lt;/P&gt;&lt;P&gt;            paystartdate(15),&lt;/P&gt;&lt;P&gt;            payenddate(15),&lt;/P&gt;&lt;P&gt;             amount(15),&lt;/P&gt;&lt;P&gt;            warning(50),&lt;/P&gt;&lt;P&gt;        End of error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: error_alv like error occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE CODE...&lt;/P&gt;&lt;P&gt;error_alv has the data records that need to be displayed on ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear alv_fc[].&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;*i_program_name = sy-repid&lt;/P&gt;&lt;P&gt;i_internal_tabname = 'error_alv'&lt;/P&gt;&lt;P&gt;*i_inclname = sy-repid&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;ct_fieldcat = alv_fc[] ...........&amp;gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;inconsistent_interface = 1&lt;/P&gt;&lt;P&gt;program_error = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    message e007(hrben00listreports).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is throwing an runtime error that the filed type is not matching between alv_fc[] and error_alv. &lt;/P&gt;&lt;P&gt;what am I missing here?&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 17:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114181#M1186381</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T17:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: ALV issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114182#M1186382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all the structure u pass should be DDIC structure.you should not do type ,but make structure in se11..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and define the changing parameter alv_fc of type slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jus use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:   alv_fc TYPE slis_t_fieldcat_alv.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_program_name     = sy-repid&lt;/P&gt;&lt;P&gt;      i_internal_tabname = error_tab defined in se11&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      ct_fieldcat        = alv_fc.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       OTHERS             = 1.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it solves...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pratyush v on Feb 3, 2009 7:05 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pratyush v on Feb 3, 2009 7:07 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: pratyush v on Feb 3, 2009 7:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 18:05:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114182#M1186382</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T18:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALV issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114183#M1186383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: g_fieldcat_tab TYPE slis_t_fieldcat_alv,
      w_fieldcat_tab TYPE LINE OF slis_t_fieldcat_alv.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = 'LT_VBAK'   " caps
      i_structure_name       = 'VBAP'   "caps
    CHANGING
      ct_fieldcat            = g_fieldcat_tab[]
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 18:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114183#M1186383</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-02-03T18:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: ALV issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114184#M1186384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I knew that but I wanted to do it without creating the strucutre and directly reading the data from the internal table to the ALV field catalog. I understood that it does not work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 18:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-issue/m-p/5114184#M1186384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T18:19:44Z</dc:date>
    </item>
  </channel>
</rss>

