<?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: ALVS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200649#M762806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1)what is fieldcatloq in alv ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field catalog is like a output layout... in which our data goes ans fits into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)what are the fields in the structure of fieldcatlog?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are many .. of which moslty we use field name_l /m /s&lt;/P&gt;&lt;P&gt;output length&lt;/P&gt;&lt;P&gt;field name&lt;/P&gt;&lt;P&gt;ref tabname&lt;/P&gt;&lt;P&gt;ref field name&lt;/P&gt;&lt;P&gt;key &lt;/P&gt;&lt;P&gt;sort etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)what is layout in alv? why do we use it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layout is the place when we can adjust the order of the fields... sort some fields etc... and we can save kind of our user settings for that report output...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)what are the fields in the structure of layout in alv?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)we declare the type-groups in alvs by using the statement TYPE-POOLS : SLIS&lt;/P&gt;&lt;P&gt;what does this type pools mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the alv field catalog is defined in types and there many of such soo type-pools of which we pick SLIS.. there are others aswell..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6)what is the use of REUSE_FLDCATLOG_MERGE function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we need not create field catalog for every field, think if its a standard structure with 100 field,, u cant create the for all the 100 fields,, in that scenario we use alv field catlog merge.. to autmatically create a field catalog for the std structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7)Is it mandatory to pass the structure name in reuse_fldcatlog_merge function module. if we dnt gv want will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes its mandt.. if we dont pass and nothing else... we dont get the field catalog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8)what actually event does in alvs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9)what are the ffiields of the structure SLIS_T_EVENT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10)what is the header in alv program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11)hw to set hotspot in alv report for a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in field catalog u have a field hot-spot u set it to X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12)in alvs hw to get the default values in the selection screen?&lt;/P&gt;&lt;P&gt;in field catalog we can assign default..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;13)what is the difference between list,grid , block display?&lt;/P&gt;&lt;P&gt;the output type .. like windoes XP , windows Vista..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14)what is bloc display? why is it differnt from other displays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15)i have created one program in alvs, in that internal table contains 2fields.while in my structure contains 5 fields.&lt;/P&gt;&lt;P&gt;when output is displayed it showing all the fields of structure instead of internal table fields. hw to get only those two fields of intenal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;play with field catalog.. some thing realted to field catalog stuff..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;award points if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Dec 2007 07:10:24 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2007-12-20T07:10:24Z</dc:date>
    <item>
      <title>ALVS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200648#M762805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends below are sm questions which i faced in intervw.....plz answer it if u knw....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)what is fieldcatloq in alv ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)what are the fields in the structure of fieldcatlog?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)what is layout in alv? why do we use it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)what are the fields in the structure of layout in alv?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)we declare the type-groups in alvs by using the statement TYPE-POOLS : SLIS&lt;/P&gt;&lt;P&gt;   what does this type pools mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6)what is the use of REUSE_FLDCATLOG_MERGE function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7)Is it mandatory to pass the structure name in reuse_fldcatlog_merge function    module. if we dnt gv want will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8)what actually event does in alvs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9)what are the ffiields of the structure SLIS_T_EVENT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10)what is the header in alv program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11)hw to set hotspot in alv report for a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12)in alvs hw to get the default values in the selection screen?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;13)what is the difference between list,grid , block display?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14)what is bloc display? why is it differnt from other displays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15)i have created one program in alvs, in that internal table contains 2fields.while in my structure contains 5 fields.&lt;/P&gt;&lt;P&gt;when output is displayed it showing all the fields of structure instead of internal table fields. hw to get only those two fields of intenal table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2007 06:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200648#M762805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-20T06:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: ALVS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200649#M762806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1)what is fieldcatloq in alv ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field catalog is like a output layout... in which our data goes ans fits into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2)what are the fields in the structure of fieldcatlog?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are many .. of which moslty we use field name_l /m /s&lt;/P&gt;&lt;P&gt;output length&lt;/P&gt;&lt;P&gt;field name&lt;/P&gt;&lt;P&gt;ref tabname&lt;/P&gt;&lt;P&gt;ref field name&lt;/P&gt;&lt;P&gt;key &lt;/P&gt;&lt;P&gt;sort etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)what is layout in alv? why do we use it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layout is the place when we can adjust the order of the fields... sort some fields etc... and we can save kind of our user settings for that report output...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)what are the fields in the structure of layout in alv?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5)we declare the type-groups in alvs by using the statement TYPE-POOLS : SLIS&lt;/P&gt;&lt;P&gt;what does this type pools mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the alv field catalog is defined in types and there many of such soo type-pools of which we pick SLIS.. there are others aswell..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6)what is the use of REUSE_FLDCATLOG_MERGE function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we need not create field catalog for every field, think if its a standard structure with 100 field,, u cant create the for all the 100 fields,, in that scenario we use alv field catlog merge.. to autmatically create a field catalog for the std structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7)Is it mandatory to pass the structure name in reuse_fldcatlog_merge function module. if we dnt gv want will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes its mandt.. if we dont pass and nothing else... we dont get the field catalog..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8)what actually event does in alvs?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9)what are the ffiields of the structure SLIS_T_EVENT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10)what is the header in alv program?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11)hw to set hotspot in alv report for a field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in field catalog u have a field hot-spot u set it to X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12)in alvs hw to get the default values in the selection screen?&lt;/P&gt;&lt;P&gt;in field catalog we can assign default..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;13)what is the difference between list,grid , block display?&lt;/P&gt;&lt;P&gt;the output type .. like windoes XP , windows Vista..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14)what is bloc display? why is it differnt from other displays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;15)i have created one program in alvs, in that internal table contains 2fields.while in my structure contains 5 fields.&lt;/P&gt;&lt;P&gt;when output is displayed it showing all the fields of structure instead of internal table fields. hw to get only those two fields of intenal table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;play with field catalog.. some thing realted to field catalog stuff..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;award points if useful....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2007 07:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200649#M762806</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-20T07:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: ALVS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200650#M762807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*************************************************************&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;What is fieldcatalog in ALV?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field catalog containing descriptions of the list output fields. You can use fields of the catalog to determine the number format and column properties of the list to be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field catalog contains more than 60 fields, some of which are only used internally. The field catalog is defined in the Data Dictionary through table type LVC_T_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can get field description by calling function module REUSE_ALV_FIELDCATALOG_MERGE. You can see the sample in my post about Simple ALV Report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general case, we only use few field to describe output field.&lt;/P&gt;&lt;P&gt;To make it easier I use this form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_alv_fieldcatg USING&lt;/P&gt;&lt;P&gt;fu_types "internal table name&lt;/P&gt;&lt;P&gt;fu_fname "Field name of internal table field&lt;/P&gt;&lt;P&gt;fu_reftb "reference table name&lt;/P&gt;&lt;P&gt;fu_refld "reference table field&lt;/P&gt;&lt;P&gt;fu_noout "X= No out&lt;/P&gt;&lt;P&gt;fu_outln "out&lt;/P&gt;&lt;P&gt;fu_fltxt "output length&lt;/P&gt;&lt;P&gt;fu_dosum "X=Do sum (total)&lt;/P&gt;&lt;P&gt;fu_hotsp "X=hotspot on&lt;/P&gt;&lt;P&gt;fu_just. "Justification:L,R,C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;P&gt;t_fieldcat-just = fu_just.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;ENDFORM. " f_alv_fieldcatg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use it in two way:&lt;/P&gt;&lt;P&gt;1. refer to data dictionary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM f_alv_fieldcatg USING 'T_REPORT' :&lt;/P&gt;&lt;P&gt;'EQUNR' 'EQUI' 'EQUNR' '' '' '' '' 'X' '',&lt;/P&gt;&lt;P&gt;'SPART' 'VBAK' 'SPART' '' '' '' '' '' ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. or define yourself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM f_alv_fieldcatg USING 'T_REPORT' :&lt;/P&gt;&lt;P&gt;'FIELD1' '' '' '' '20' 'Text Field1' '' '' ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for field with type number, I use this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form f_alv_fieldcatg_number&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_alv_fieldcatg_number USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_no_sign&lt;/P&gt;&lt;P&gt;fu_no_zero&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_exponent&lt;/P&gt;&lt;P&gt;fu_decimals_out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = fu_no_zero.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_sign = fu_no_sign.&lt;/P&gt;&lt;P&gt;t_fieldcat-exponent = fu_exponent.&lt;/P&gt;&lt;P&gt;t_fieldcat-decimals_out = fu_decimals_out.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-datatype = 'FLTP'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " f_alv_fieldcatg_number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For field currency, there are two options, fixed currency or variable currency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form f_alv_fieldcatg_curr&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_alv_fieldcatg_curr USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_reftb&lt;/P&gt;&lt;P&gt;fu_refld&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_hotsp&lt;/P&gt;&lt;P&gt;fu_cfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;P&gt;t_fieldcat-cfieldname = fu_cfield.&lt;/P&gt;&lt;P&gt;t_fieldcat-ctabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " F_FIELDCATG_CURR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;amp; Form f_alv_fieldcatg_curr&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&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;text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f_alv_fieldcatg_curr_fixed USING fu_types&lt;/P&gt;&lt;P&gt;fu_fname&lt;/P&gt;&lt;P&gt;fu_reftb&lt;/P&gt;&lt;P&gt;fu_refld&lt;/P&gt;&lt;P&gt;fu_noout&lt;/P&gt;&lt;P&gt;fu_outln&lt;/P&gt;&lt;P&gt;fu_fltxt&lt;/P&gt;&lt;P&gt;fu_dosum&lt;/P&gt;&lt;P&gt;fu_hotsp&lt;/P&gt;&lt;P&gt;fu_curr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: t_fieldcat.&lt;/P&gt;&lt;P&gt;t_fieldcat-tabname = fu_types.&lt;/P&gt;&lt;P&gt;t_fieldcat-fieldname = fu_fname.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_tabname = fu_reftb.&lt;/P&gt;&lt;P&gt;t_fieldcat-ref_fieldname = fu_refld.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_out = fu_noout.&lt;/P&gt;&lt;P&gt;t_fieldcat-outputlen = fu_outln.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_l = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_m = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-seltext_s = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-reptext_ddic = fu_fltxt.&lt;/P&gt;&lt;P&gt;t_fieldcat-do_sum = fu_dosum.&lt;/P&gt;&lt;P&gt;t_fieldcat-hotspot = fu_hotsp.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;t_fieldcat-cfieldname = fu_cfield.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;t_fieldcat-ctabname = fu_types.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;t_fieldcat-datatype = 'CURR'.&lt;/P&gt;&lt;P&gt;t_fieldcat-currency = fu_curr.&lt;/P&gt;&lt;P&gt;t_fieldcat-no_zero = 'X'.&lt;/P&gt;&lt;P&gt;APPEND t_fieldcat.&lt;/P&gt;&lt;P&gt;CLEAR t_fieldcat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " F_FIELDCATG_CURR&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------------" /&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt; Building a fieldcatalog based on a dictionary structure/table&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This Method requires you to create a dictionary structure via&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SE11 and pass that in the 'I_STRUCTURE_NAME' parameter.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The below example will be for all of EKKO but you could create a new&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;structure containing only the fields you require.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;With the help of layout in ALV you can set the overall options for the ALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like:&lt;/P&gt;&lt;P&gt;ZEBRA - for zebra coloring&lt;/P&gt;&lt;P&gt;COLUMN_WIDTH_OPTIMAZTION - to optimize the columns&lt;/P&gt;&lt;P&gt;COLOR&lt;/P&gt;&lt;P&gt;BOX_FIELD - for checkbox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layout controls the look Displaye parameters of your ALV..Check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM alv_layo.&lt;/P&gt;&lt;P&gt;g_r_layo-grid_title = text-019 . ( eg " Title of Grid )&lt;/P&gt;&lt;P&gt;g_r_layo-cwidth_opt = g_c_mark.&lt;/P&gt;&lt;P&gt;g_r_layo-zebra = g_c_mark.&lt;/P&gt;&lt;P&gt;g_r_layo-no_rowmark = space.&lt;/P&gt;&lt;P&gt;g_r_layo-sel_mode = g_c_selmode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " alv_layo&lt;/P&gt;&lt;P&gt;**************************************************************************&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZEBRA - for zebra coloring&lt;/P&gt;&lt;P&gt;COLUMN_WIDTH_OPTIMAZTION - to optimize the columns&lt;/P&gt;&lt;P&gt;COLOR&lt;/P&gt;&lt;P&gt;BOX_FIELD - for checkbox&lt;/P&gt;&lt;P&gt;*****************************************************************************&lt;/P&gt;&lt;P&gt;5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Type pool is a collection of pre defined data types..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frequently used data types in programming are clubbed into a type pool so that if u write in ur code:&lt;/P&gt;&lt;P&gt;TYPE-POOLS: slis.&lt;/P&gt;&lt;P&gt;the declarations in SLIS will apply to ur code also..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SLIS contains data definitions for ALV structures &amp;amp; internal tables. so that u dont need to declare alv data everytime in ur program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out type pools: ICON, etc.. In SE11, type groups.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can use ABAP ALV LIST and GRID function modules to display Normal LIST and Hiearchical LISTS .&lt;/P&gt;&lt;P&gt;All the definitions TYPES and STRUCTURES and CONSTANTS are defined&lt;/P&gt;&lt;P&gt;in the TYPE-POOL 'SLIS' ,so it should be declared first.&lt;/P&gt;&lt;P&gt;TYPE-POOLS : 'SLIS' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using type pools you can create global data declarations of an ABAP program.&lt;/P&gt;&lt;P&gt;TYPE Pools can be thought of as an include having TYPE declarations.&lt;/P&gt;&lt;P&gt;The use of this in your program gives your program access to these TYPE declarations which can then be used directly in your program when declaring new data declaration&lt;/P&gt;&lt;P&gt;*********************************************************************************&lt;/P&gt;&lt;P&gt;6.The function REUSE_ALV_FIELDCATALOG_MERGE is used for retrieve a catalog from a table defined in DDIC.&lt;/P&gt;&lt;P&gt;*********************************************************************************&lt;/P&gt;&lt;P&gt;7.&lt;/P&gt;&lt;P&gt;yes,&lt;/P&gt;&lt;P&gt;otherwise dump occurs..&lt;/P&gt;&lt;P&gt;******************************************************************************&lt;/P&gt;&lt;P&gt;8.&lt;/P&gt;&lt;P&gt;The main events in alv and their FM and why we use these: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SLIS_PRINT_ALV. &lt;/P&gt;&lt;P&gt;2. SLIS_T_LISTHEADER. &lt;/P&gt;&lt;P&gt;3. SLIS_T_EVENT. &lt;/P&gt;&lt;P&gt;4. SLIS_T_SORTINFO_ALV. &lt;/P&gt;&lt;P&gt;5. SLIS_T_LAYOUT_ALV. &lt;/P&gt;&lt;P&gt;6. SLIS_T_FIELDCAT_ALV. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more information check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap-img.com/abap/what-are-the-events-in-alv.htm" target="test_blank"&gt;http://sap-img.com/abap/what-are-the-events-in-alv.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;*************************************************************************&lt;/P&gt;&lt;P&gt;9.&lt;/P&gt;&lt;P&gt;SLIS_T_EVENT: Internal table for storing all the possible events of the ALV. This can be populated by the function module Reuse_alv_events_get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The columns are : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;name : name of the event&lt;/P&gt;&lt;P&gt;form : name of the routine&lt;/P&gt;&lt;P&gt;*****************************************************************************&lt;/P&gt;&lt;P&gt;10.&lt;/P&gt;&lt;P&gt;we are having a FM to display header information....... on top of alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REUSE_ALV_COMMENTARY_WRITE is the FM used to display the header info for ALV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List header information is output according to its type. The output information is put in an internal table. Output attributes are assigned to each line via the TYP field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This module outputs formatted simple header information at TOP-OF-PAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List &amp;lt;-- Type 'H'&lt;/P&gt;&lt;P&gt;Currency DEM Controlling area currency &amp;lt;-- Type 'S'&lt;/P&gt;&lt;P&gt;Material FGS_TEST Test material &amp;lt;-- Type 'S'&lt;/P&gt;&lt;P&gt;Action info &amp;lt;-- Type 'A'&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;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;Column headers&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;List&lt;/P&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;11&lt;/P&gt;&lt;P&gt;do this way&lt;/P&gt;&lt;P&gt;codefieldlayout-no_vline = ' '. &lt;/P&gt;&lt;P&gt;*fieldlayout-no_input = 'X'. &lt;/P&gt;&lt;P&gt;fieldlayout-confirmation_prompt = ''. &lt;/P&gt;&lt;P&gt;fieldlayout-key_hotspot = 'X'.[/code] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this sample program&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm" target="test_blank"&gt;http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;12.&lt;/P&gt;&lt;P&gt;In INITIALIZATION event you can set like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;s_date -low = sy-datum -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that it will take that date always&lt;/P&gt;&lt;P&gt;**************************************************************&lt;/P&gt;&lt;P&gt;13.&lt;/P&gt;&lt;P&gt;For all practical purposes, they are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Some differences:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) from abap coding point of view,&lt;/P&gt;&lt;P&gt;alv list is done with Function modules,&lt;/P&gt;&lt;P&gt;alv gris can also be done with FM,&lt;/P&gt;&lt;P&gt;but can also be done using OO concepts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) Alv grid (using oo concept) requires&lt;/P&gt;&lt;P&gt;designing the screen layout .&lt;/P&gt;&lt;P&gt;Hence, in one screen, we can show more&lt;/P&gt;&lt;P&gt;then one alv grid &lt;/P&gt;&lt;P&gt;(we cannot show more than&lt;/P&gt;&lt;P&gt;one alv list on one screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) ALV grid uses ActiveX controls&lt;/P&gt;&lt;P&gt;present on the Presentation Server.&lt;/P&gt;&lt;P&gt;Hence, it consumes More Memory&lt;/P&gt;&lt;P&gt;on the presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d) ALV LIST is Display Only.&lt;/P&gt;&lt;P&gt;Whereas&lt;/P&gt;&lt;P&gt;ALV Grid Can Be made EDITABLE for entry purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e) In alv grid, these options are possible,&lt;/P&gt;&lt;P&gt;but not in alv list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without horizontal lines&lt;/P&gt;&lt;P&gt;without vertical lines&lt;/P&gt;&lt;P&gt;without cell merging during sorts&lt;/P&gt;&lt;P&gt;display total lines above the entries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV LIST Can be coded using only FMs &lt;/P&gt;&lt;P&gt;ALV GRID Can be coded using FMs and object oriented concepts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALV LIST Can be displayed hieraicharlly &lt;/P&gt;&lt;P&gt;ALV GRID cannot be displayed hierarichally&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************&lt;/P&gt;&lt;P&gt;14.&lt;/P&gt;&lt;P&gt;you need to call three FM's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_INIT "initialization&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_APPEND "append&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_DISPLAY "display &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;Blocked report means displaying multiple outputs one by one .&lt;/P&gt;&lt;P&gt;3 function module are used to display ALV blocked report.&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_INIT.&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_APPEND&lt;/P&gt;&lt;P&gt;pass the table which u want to display .&lt;/P&gt;&lt;P&gt;If u want to display another table call again .Like that u can call for more outputs on single list screen.&lt;/P&gt;&lt;P&gt;REUSE_ALV_BLOCK_LIST_DISPLAY&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;Have a look at this sample program.&lt;/P&gt;&lt;P&gt;REPORT zvenkat_head1.&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF i_mard OCCURS 0,&lt;/P&gt;&lt;P&gt;werks TYPE mard-werks,&lt;/P&gt;&lt;P&gt;lgort TYPE mard-lgort,&lt;/P&gt;&lt;P&gt;matnr TYPE mard-matnr,&lt;/P&gt;&lt;P&gt;insme TYPE mard-insme,&lt;/P&gt;&lt;P&gt;einme TYPE mard-einme,&lt;/P&gt;&lt;P&gt;speme TYPE mard-speme,&lt;/P&gt;&lt;P&gt;END OF i_mard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF i_makt OCCURS 0,&lt;/P&gt;&lt;P&gt;matnr TYPE makt-matnr,&lt;/P&gt;&lt;P&gt;maktx TYPE makt-maktx,&lt;/P&gt;&lt;P&gt;maktg TYPE makt-maktg,&lt;/P&gt;&lt;P&gt;END OF i_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; ALV Variables&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;TYPE-POOLS :slis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :i_field TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;w_field LIKE LINE OF i_field,&lt;/P&gt;&lt;P&gt;w_layout TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;i_events TYPE slis_t_event,&lt;/P&gt;&lt;P&gt;w_events LIKE LINE OF i_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA :i_field1 TYPE slis_t_fieldcat_alv,&lt;/P&gt;&lt;P&gt;w_field1 LIKE LINE OF i_field1,&lt;/P&gt;&lt;P&gt;w_layout1 TYPE slis_layout_alv,&lt;/P&gt;&lt;P&gt;i_events1 TYPE slis_t_event,&lt;/P&gt;&lt;P&gt;w_events1 LIKE LINE OF i_events1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; START-OF-SELECTION&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM get_data_from_database .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; END-OF-SELECTION&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM build_fieldcatalog.&lt;/P&gt;&lt;P&gt;PERFORM build_events.&lt;/P&gt;&lt;P&gt;PERFORM display_data.&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form build_fieldcatalog&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM build_fieldcatalog .&lt;/P&gt;&lt;P&gt;CLEAR :&lt;/P&gt;&lt;P&gt;w_field,&lt;/P&gt;&lt;P&gt;i_field[].&lt;/P&gt;&lt;P&gt;CLEAR :&lt;/P&gt;&lt;P&gt;w_field1,&lt;/P&gt;&lt;P&gt;i_field1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;Fieldcatalog 1&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'WERKS' .&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'Plant'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'LGORT' .&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'S.Location'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'Mat No'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'INSME' .&lt;/P&gt;&lt;P&gt;w_field-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'quality Stock'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'EINME'.&lt;/P&gt;&lt;P&gt;w_field-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'Total Stock'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'SPEME'.&lt;/P&gt;&lt;P&gt;w_field-do_sum = 'X'.&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARD'.&lt;/P&gt;&lt;P&gt;w_field-seltext_m = 'Blocked stock'.&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;Fieldcatalog 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field1-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;w_field1-tabname = 'I_MAKT'.&lt;/P&gt;&lt;P&gt;w_field1-seltext_m = 'MATNR'.&lt;/P&gt;&lt;P&gt;APPEND w_field1 TO i_field1.&lt;/P&gt;&lt;P&gt;CLEAR w_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field1-fieldname = 'MAKTX'.&lt;/P&gt;&lt;P&gt;w_field1-tabname = 'I_MAKT'.&lt;/P&gt;&lt;P&gt;w_field1-seltext_m = 'MAKTX'.&lt;/P&gt;&lt;P&gt;APPEND w_field1 TO i_field1.&lt;/P&gt;&lt;P&gt;CLEAR w_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field1-fieldname = 'MAKTG'.&lt;/P&gt;&lt;P&gt;w_field1-tabname = 'I_MAKT'.&lt;/P&gt;&lt;P&gt;w_field1-seltext_m = 'MAKTG'.&lt;/P&gt;&lt;P&gt;APPEND w_field1 TO i_field1.&lt;/P&gt;&lt;P&gt;CLEAR w_field1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " build_fieldcatalog&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form build_events&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM build_events .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR:&lt;/P&gt;&lt;P&gt;w_events,&lt;/P&gt;&lt;P&gt;i_events[],&lt;/P&gt;&lt;P&gt;w_events1,&lt;/P&gt;&lt;P&gt;i_events1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_events-name = 'TOP_OF_PAGE' .&lt;/P&gt;&lt;P&gt;w_events-form = 'TOP_OF_PAGE' .&lt;/P&gt;&lt;P&gt;APPEND w_events TO i_events.&lt;/P&gt;&lt;P&gt;CLEAR w_events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_events1-name = 'TOP_OF_PAGE' .&lt;/P&gt;&lt;P&gt;w_events1-form = 'TOP_OF_PAGE' .&lt;/P&gt;&lt;P&gt;APPEND w_events1 TO i_events1.&lt;/P&gt;&lt;P&gt;CLEAR w_events1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " build_events&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form display_data&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM display_data .&lt;/P&gt;&lt;P&gt;DATA :program LIKE sy-repid VALUE sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_callback_program = program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_CALLBACK_PF_STATUS_SET = ' ' &lt;/P&gt;&lt;P&gt;I_CALLBACK_USER_COMMAND = ' ' &lt;/P&gt;&lt;P&gt;IT_EXCLUDING = &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;is_layout = w_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = i_field&lt;/P&gt;&lt;P&gt;i_tabname = 'I_MARD'&lt;/P&gt;&lt;P&gt;it_events = i_events&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_SORT = &lt;/P&gt;&lt;P&gt;I_TEXT = ' ' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = i_mard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;PROGRAM_ERROR = 1 &lt;/P&gt;&lt;P&gt;MAXIMUM_OF_APPENDS_REACHED = 2 &lt;/P&gt;&lt;P&gt;OTHERS = 3 &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&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;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;is_layout = w_layout&lt;/P&gt;&lt;P&gt;it_fieldcat = i_field1&lt;/P&gt;&lt;P&gt;i_tabname = 'I_MAKT'&lt;/P&gt;&lt;P&gt;it_events = i_events1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_SORT = &lt;/P&gt;&lt;P&gt;I_TEXT = ' ' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;t_outtab = i_makt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS &lt;/P&gt;&lt;P&gt;PROGRAM_ERROR = 1 &lt;/P&gt;&lt;P&gt;MAXIMUM_OF_APPENDS_REACHED = 2 &lt;/P&gt;&lt;P&gt;OTHERS = 3 &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING &lt;/P&gt;&lt;P&gt;I_INTERFACE_CHECK = ' ' &lt;/P&gt;&lt;P&gt;IS_PRINT = &lt;/P&gt;&lt;P&gt;I_SCREEN_START_COLUMN = 0 &lt;/P&gt;&lt;P&gt;I_SCREEN_START_LINE = 0 &lt;/P&gt;&lt;P&gt;I_SCREEN_END_COLUMN = 0 &lt;/P&gt;&lt;P&gt;I_SCREEN_END_LINE = 0 &lt;/P&gt;&lt;P&gt;IMPORTING &lt;/P&gt;&lt;P&gt;E_EXIT_CAUSED_BY_CALLER = &lt;/P&gt;&lt;P&gt;ES_EXIT_CAUSED_BY_USER = &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;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;&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. " display_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&amp;amp; Form get_data_from_database&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM get_data_from_database .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT werks lgort matnr insme einme speme&lt;/P&gt;&lt;P&gt;FROM mard&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE i_mard&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS&lt;/P&gt;&lt;P&gt;WHERE werks = 'WF01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr&lt;/P&gt;&lt;P&gt;maktx&lt;/P&gt;&lt;P&gt;maktg&lt;/P&gt;&lt;P&gt;FROM makt&lt;/P&gt;&lt;P&gt;INTO TABLE i_makt&lt;/P&gt;&lt;P&gt;UP TO 20 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " get_data_from_database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&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;P&gt;&lt;/P&gt;&lt;P&gt;text &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------------" /&gt;&lt;P&gt;FORM top_of_page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: inc_colnum TYPE i.&lt;/P&gt;&lt;P&gt;ULINE .&lt;/P&gt;&lt;P&gt;inc_colnum = sy-linsz - 60.&lt;/P&gt;&lt;P&gt;WRITE: / 'Report: ', sy-repid(18).&lt;/P&gt;&lt;P&gt;WRITE AT 30(inc_colnum) sy-title CENTERED.&lt;/P&gt;&lt;P&gt;inc_colnum = sy-linsz - 20.&lt;/P&gt;&lt;P&gt;WRITE: AT inc_colnum 'Page: ', (11) sy-pagno RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;WRITE: / 'Client: ', sy-mandt.&lt;/P&gt;&lt;P&gt;inc_colnum = sy-linsz - 20.&lt;/P&gt;&lt;P&gt;WRITE: AT inc_colnum 'Date: ', sy-datum.&lt;/P&gt;&lt;P&gt;WRITE: / 'User : ', sy-uname.&lt;/P&gt;&lt;P&gt;inc_colnum = sy-linsz - 60.&lt;/P&gt;&lt;P&gt;WRITE AT 30(inc_colnum) 'Blocked ALV' CENTERED.&lt;/P&gt;&lt;P&gt;inc_colnum = sy-linsz - 20.&lt;/P&gt;&lt;P&gt;WRITE: AT inc_colnum 'Time: ', (10) sy-uzeit RIGHT-JUSTIFIED.&lt;/P&gt;&lt;P&gt;ULINE .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "top_of_page&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;15.&lt;/P&gt;&lt;P&gt;Define ur Fieldcatalog table like this .&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;i_field TYPE lvc_t_fcat,&lt;/P&gt;&lt;P&gt;w_field TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;Build like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM build_fieldcatalog_tab .&lt;/P&gt;&lt;P&gt;DATA :pos TYPE i VALUE 1.&lt;/P&gt;&lt;P&gt;CLEAR: w_field,i_field[],pos.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-col_pos = pos + 1.&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'MATNR' .&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARC' .&lt;/P&gt;&lt;P&gt;w_field-scrtext_m = 'Material' .&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;w_field-col_pos = pos + 1.&lt;/P&gt;&lt;P&gt;w_field-fieldname = 'WERKS' .&lt;/P&gt;&lt;P&gt;w_field-tabname = 'I_MARC' .&lt;/P&gt;&lt;P&gt;w_field-scrtext_m = 'Plant' .&lt;/P&gt;&lt;P&gt;APPEND w_field TO i_field.&lt;/P&gt;&lt;P&gt;CLEAR w_field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;Pass through this method &lt;/P&gt;&lt;P&gt;CALL METHOD alv_grid-&amp;gt;set_table_for_first_display&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I_BUFFER_ACTIVE = &lt;/P&gt;&lt;P&gt;I_BYPASSING_BUFFER = &lt;/P&gt;&lt;P&gt;I_CONSISTENCY_CHECK = &lt;/P&gt;&lt;P&gt;i_structure_name = 'MARA' &lt;/P&gt;&lt;P&gt;IS_VARIANT = &lt;/P&gt;&lt;P&gt;I_SAVE = &lt;/P&gt;&lt;P&gt;I_DEFAULT = 'X' &lt;/P&gt;&lt;P&gt;is_layout = w_layout&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IS_PRINT = w_print &lt;/P&gt;&lt;P&gt;IT_SPECIAL_GROUPS = &lt;/P&gt;&lt;P&gt;IT_TOOLBAR_EXCLUDING = &lt;/P&gt;&lt;P&gt;IT_HYPERLINK = &lt;/P&gt;&lt;P&gt;IT_ALV_GRAPHICS = &lt;/P&gt;&lt;P&gt;IT_EXCEPT_QINFO = &lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;it_outtab = i_marc&lt;/P&gt;&lt;P&gt;it_fieldcatalog = i_field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_SORT = &lt;/P&gt;&lt;P&gt;IT_FILTER = &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;4.&lt;/P&gt;&lt;P&gt;You should remove &lt;/P&gt;&lt;P&gt;i_structure_name = 'JOINTAB'&lt;/P&gt;&lt;P&gt;y should use this when u pass single table data display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HOPE THIS HELPFUL TO YOU&lt;/P&gt;&lt;P&gt;*************************************************&lt;/P&gt;&lt;P&gt;THANX AND REGARDS......................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2007 08:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alvs/m-p/3200650#M762807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-20T08:11:56Z</dc:date>
    </item>
  </channel>
</rss>

