<?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 reports using class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499965#M231722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Preet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have the structure for you ALV list already defined in the DDIC then use the name of structure to receive the fieldcatalog from LVC_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you haven't defined a DDIC structure but use a type defined within your program you can still use function module LVC_FIELDCATALOG_MERGE. Simply call the function module with your 3 different tables and collect the fieldcatalog into the same itab (e.g. gt_fcat). Then remove all unnecessary fields and duplicates and, if necessary, re-order the remaining fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* First sort the fields in the catalog in the required order
* Then renumber them.
  LOOP AT gt_fcat INTO ls_fcat.
    ls_fcat-col_pos = syst-tabix.
    MODIFY gt_fcat FROM ls_fcat.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&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>Mon, 28 Aug 2006 05:47:32 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2006-08-28T05:47:32Z</dc:date>
    <item>
      <title>alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499961#M231718</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 waana develop an alv report(OOPS) using 3 different tables. I waana know since i have to output fields from 3 different tables depending upon selection criteria. So can any body  tell me how to use field catalog or field catalog merge using class.... not function REUSE alv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499961#M231718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499962#M231719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;T Code - DWDM for various examples in OOPS.&lt;/P&gt;&lt;P&gt;Plz reward if useful.&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499962#M231719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499963#M231720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Preet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For creating the Field catalog&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for Field Catalog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: G_T_FIELDCAT_C TYPE LVC_T_FCAT,&lt;/P&gt;&lt;P&gt;      G_R_FIELDCAT   TYPE LVC_S_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM BUILD_FIELD_CATALOG .&lt;/P&gt;&lt;P&gt;  DATA: L_F_COUNT TYPE I VALUE '0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/ Add properties values to ALV Catalog&lt;/P&gt;&lt;P&gt;  ADD 1 TO L_F_COUNT.&lt;/P&gt;&lt;P&gt;  PERFORM ADD_CATALOG USING 'MTART' 'C'  SPACE  L_F_COUNT    "Sales Org&lt;/P&gt;&lt;P&gt;                            TEXT-005 4   SPACE SPACE SPACE.&lt;/P&gt;&lt;P&gt;  ADD 1 TO L_F_COUNT.&lt;/P&gt;&lt;P&gt;  PERFORM ADD_CATALOG USING 'VKORG' 'C'  SPACE  L_F_COUNT    "Sales Org&lt;/P&gt;&lt;P&gt;                            TEXT-001 4   SPACE SPACE SPACE.&lt;/P&gt;&lt;P&gt;  ADD 1 TO L_F_COUNT.&lt;/P&gt;&lt;P&gt;  PERFORM ADD_CATALOG USING 'MATNR' 'C'  SPACE  L_F_COUNT&lt;/P&gt;&lt;P&gt;                            TEXT-002 18  'MATN1' SPACE SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ADD 1 TO L_F_COUNT.&lt;/P&gt;&lt;P&gt;  PERFORM ADD_CATALOG USING 'STAWN' 'C'  SPACE  L_F_COUNT&lt;/P&gt;&lt;P&gt;                            TEXT-004 13  SPACE SPACE SPACE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " build_field_catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM ADD_CATALOG USING   P_FNAME&lt;/P&gt;&lt;P&gt;                         P_INTTYPE&lt;/P&gt;&lt;P&gt;                         P_KEY&lt;/P&gt;&lt;P&gt;                         P_COL_POS&lt;/P&gt;&lt;P&gt;                         P_COL_TEXT&lt;/P&gt;&lt;P&gt;                         P_INTLEN&lt;/P&gt;&lt;P&gt;                         P_CONV&lt;/P&gt;&lt;P&gt;                         P_EDIT&lt;/P&gt;&lt;P&gt;                         P_HOTSPOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR G_R_FIELDCAT.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-FIELDNAME  = P_FNAME.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-INTTYPE    = P_INTTYPE.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-KEY        = P_KEY.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-COL_POS    = P_COL_POS.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-COLTEXT    = P_COL_TEXT.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-OUTPUTLEN  = P_INTLEN.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-CONVEXIT   = P_CONV.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-EDIT       =  P_EDIT.&lt;/P&gt;&lt;P&gt;  G_R_FIELDCAT-HOTSPOT    = P_HOTSPOT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND G_R_FIELDCAT TO G_T_FIELDCAT_C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " add_catalog&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 04:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499963#M231720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T04:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499964#M231721</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;You can do in two ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one is &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
      X_FIELDCAT TYPE LVC_S_FCAT.
DATA: L_POS TYPE I.
  L_POS = L_POS + 1.


  X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
  X_FIELDCAT-FIELDNAME = 'VBELN'.
  X_FIELDCAT-TABNAME = 'IT_FINAL'.
  X_FIELDCAT-COL_POS    = L_POS.
  X_FIELDCAT-NO_ZERO    = 'X'.
  X_FIELDCAT-OUTPUTLEN = '10'.
  X_FIELDCAT-HOTSPOT = 'X'.

  APPEND X_FIELDCAT TO IT_FIELDCAT.
  CLEAR X_FIELDCAT.
  L_POS = L_POS + 1.

  X_FIELDCAT-SCRTEXT_M = 'Item'(025).
  X_FIELDCAT-FIELDNAME = 'POSNR'.
  X_FIELDCAT-TABNAME = 'IT_FINAL'.
  X_FIELDCAT-COL_POS    = L_POS.
  X_FIELDCAT-OUTPUTLEN = '5'.
  APPEND X_FIELDCAT TO IT_FIELDCAT.
  CLEAR X_FIELDCAT.
  L_POS = L_POS + 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another is &lt;/P&gt;&lt;P&gt;create the structure in SE11 with all the fields from 3 tables and then pass it to the FM.&lt;/P&gt;&lt;P&gt;using the function, &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  call function 'LVC_FIELDCATALOG_MERGE'
       exporting
            i_structure_name = 'ZSTRUC'
       changing
            ct_fieldcat      = pt_fieldcat.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 05:17:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499964#M231721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T05:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499965#M231722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Preet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have the structure for you ALV list already defined in the DDIC then use the name of structure to receive the fieldcatalog from LVC_FIELDCATALOG_MERGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you haven't defined a DDIC structure but use a type defined within your program you can still use function module LVC_FIELDCATALOG_MERGE. Simply call the function module with your 3 different tables and collect the fieldcatalog into the same itab (e.g. gt_fcat). Then remove all unnecessary fields and duplicates and, if necessary, re-order the remaining fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;* First sort the fields in the catalog in the required order
* Then renumber them.
  LOOP AT gt_fcat INTO ls_fcat.
    ls_fcat-col_pos = syst-tabix.
    MODIFY gt_fcat FROM ls_fcat.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&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>Mon, 28 Aug 2006 05:47:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499965#M231722</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-08-28T05:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499966#M231723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through these links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649a6f17411d2b486006094192fe3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649a6f17411d2b486006094192fe3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/43/8d75856536267fe10000000a1553f7/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/43/8d75856536267fe10000000a1553f7/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5fed2fe11d2b467006094192fe3/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5fed2fe11d2b467006094192fe3/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 05:48:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499966#M231723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-28T05:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: alv reports using class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499967#M231724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi can u provide me some example code oh this how to use LVC_fieldcatalog_merge.. Since i have to use fields from 3 different tables&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2006 02:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-reports-using-class/m-p/1499967#M231724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-29T02:36:25Z</dc:date>
    </item>
  </channel>
</rss>

