<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242399#M483562</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;is the fieldcatalog field compulsory in alv's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;siri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2007 09:02:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-25T09:02:54Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242399#M483562</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;is the fieldcatalog field compulsory in alv's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;siri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:02:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242399#M483562</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242400#M483563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes the fieldcatalog is a Mandatory criteria for ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT z_alv_simple_example_with_itab .
************************************************************************
*Simple example to use ALV and to define the ALV data in an internal
*table
************************************************************************
* Martin Schlegel, BearingPoint, December 2004
*
* Thanks to Madhusudhan Sonee and Rama Krishna Kommineni for testing
* and feedback
*
************************************************************************
************************************************************************
*For a very long time, people gave me the feeling that ALV is a
*complicated tool that is difficult to understand and to use.
*Lately I had to use it and I discovered that ALV is easy to use and
*saves a lot of work:
*ALV will generate the column headings on its own, so one does not need
*to work on headlines and transalation.
*ALV allows the user to select the columns he wants to see, so the user
*does not need to contact a developer for every change he likes to have.
*ALV allows the user to create his own sums, so &amp;#133;
*ALV has a simple way to work with internal tables.
*If you really want to save time, use ALV instead of write!
************************************************************************
*
*Please take 30 minutes to explore the following example and see how
*easy it is to use ALV!
*
************************************************************************
 
*data definition
INCLUDE &amp;lt;icon&amp;gt;.
TABLES:
marav. "Table MARA and table MAKT
 
*---------------------------------------------------------------------*
* Data to be displayed in ALV
* Using the following syntax, REUSE_ALV_FIELDCATALOG_MERGE can auto-
* matically determine the fieldstructure from this source program
DATA:
BEGIN OF imat OCCURS 100,
ios(4) TYPE c,
matnr LIKE marav-matnr, "Material number
maktx LIKE marav-maktx, "Material short text
matkl LIKE marav-matkl, "Material group (so you can test to make
" intermediate sums)
ntgew LIKE marav-ntgew, "Net weight, numeric field (so you can test to
"make sums)
gewei LIKE marav-gewei, "weight unit (just to be complete)
END OF imat.
 
*---------------------------------------------------------------------*
* Other data needed
* field to store report name
DATA i_repid LIKE sy-repid.
* field to check table length
DATA i_lines LIKE sy-tabix.
 
*---------------------------------------------------------------------*
* Data for ALV display
TYPE-POOLS: slis.
DATA int_fcat TYPE slis_t_fieldcat_alv.
 
*---------------------------------------------------------------------*
SELECT-OPTIONS:
s_matnr FOR marav-matnr MATCHCODE OBJECT mat1.
 
*---------------------------------------------------------------------*
START-OF-SELECTION.
 
* read data into table imat
SELECT * FROM marav
INTO CORRESPONDING FIELDS OF TABLE imat
WHERE matnr IN s_matnr.
LOOP AT imat.
IF imat-matnr+0(1) = 'M'.
MOVE icon_green_light TO imat-ios.
MODIFY imat.
ENDIF.
IF imat-matnr+0(1) = 'Z'.
MOVE icon_red_light TO imat-ios.
MODIFY imat.
ENDIF.
 
ENDLOOP.
 
* Check if material was found
CLEAR i_lines.
DESCRIBE TABLE imat LINES i_lines.
IF i_lines LT 1.
* Using hardcoded write here for easy upload
WRITE: / 'No materials found.'.
EXIT.
ENDIF.
 
END-OF-SELECTION.
*---------------------------------------------------------------------*
* Now, we start with ALV
*---------------------------------------------------------------------*
* To use ALV, we need a DDIC-structure or a thing called Fieldcatalogue.
* The fieldcatalouge can be generated by FUNCTION
* 'REUSE_ALV_FIELDCATALOG_MERGE' from an internal table from any
* report source, including this report.
* The only problem one might have is that the report and table names
* need to be in capital letters. (I had it :-( )
*---------------------------------------------------------------------*
 
* Store report name
i_repid = sy-repid.
 
* Create Fieldcatalogue from internal table
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = i_repid
i_internal_tabname = 'IMAT' "capital letters!
i_inclname = i_repid
CHANGING
ct_fieldcat = int_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*explanations:
* I_PROGRAM_NAME is the program which calls this function
*
* I_INTERNAL_TABNAME is the name of the internal table which you want
* to display in ALV
*
* I_INCLNAME is the ABAP-source where the internal table is defined
* (DATA....)
* CT_FIELDCAT contains the Fieldcatalouge that we need later for
* ALV display
 
IF sy-subrc &amp;lt;&amp;gt; 0.
WRITE: / 
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
ENDIF.
 
*This was the fieldcatlogue
*---------------------------------------------------------------------*
* And now, we are ready to display our list
*----------------------------------------------------------------------
 
* Call for ALV list display
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'
i_callback_program = i_repid
it_fieldcat = int_fcat
i_save = 'A'
TABLES
t_outtab = imat
EXCEPTIONS
program_error = 1
OTHERS = 2.
*
*explanations:
* I_CALLBACK_PROGRAM is the program which calls this function
*
* IT_FIELDCAT (just made by REUSE_ALV_FIELDCATALOG_MERGE) contains
* now the data definition needed for display
*
* I_SAVE allows the user to save his own layouts
*
* T_OUTTAB contains the data to be displayed in ALV
 
 
IF sy-subrc &amp;lt;&amp;gt; 0.
WRITE: / 
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;VAsanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242400#M483563</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242401#M483564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Yes, it is compulsory&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:04:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242401#M483564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242402#M483565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;you need a field catalogue to b able to display your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sooness&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:04:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242402#M483565</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2007-05-25T09:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242403#M483566</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 think it is necessary&lt;/P&gt;&lt;P&gt;Because it define the format in which the list needs to be generated .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;mohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242403#M483566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242404#M483567</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;Check this below link. U can find the use of fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=2800976&amp;amp;messageID=3052375" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=2800976&amp;amp;messageID=3052375&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sankar M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242404#M483567</guid>
      <dc:creator>p291102</dc:creator>
      <dc:date>2007-05-25T09:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242405#M483568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;  It is not mandatory for an ALV to have a catalog , in case you are not passing feild catalog , you need to specify the structure name of te internal table to be displayed to the parameter I_STRUCTURE_NAME , ,but do keep in mind that the sturcture must be  in the  Data Dictionary ( DDIC) and not a structure defined in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242405#M483568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242406#M483569</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;it is necessary.Since we will define field properties using fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward with points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 09:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/2242406#M483569</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-25T09:08:57Z</dc:date>
    </item>
  </channel>
</rss>

