<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748150#M324445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sam,&lt;/P&gt;&lt;P&gt;            u want the code or what kind of help ? pls be littile more specific so that i can try my best.&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;P&gt;with regards,&lt;/P&gt;&lt;P&gt;S.Barane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2007 09:13:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-02T09:13:59Z</dc:date>
    <item>
      <title>alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748148#M324443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI THIS IS THE LOGIC........need to create prog in ALV .&lt;/P&gt;&lt;P&gt;Need help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pre-requisite&lt;/P&gt;&lt;P&gt;Document Number should exist in the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program Logic/Pseudo Code: &lt;/P&gt;&lt;P&gt;Logic would be as under:&lt;/P&gt;&lt;P&gt;1. A new screen is to be prepared. Input would be the followings:&lt;/P&gt;&lt;P&gt;a. Company code&lt;/P&gt;&lt;P&gt;b. Posting Date (From &amp;#150; To)&lt;/P&gt;&lt;P&gt;2. Select all BELNR (Accounting Document Numbers) from table BSAK where BLART is either KR or RE.&lt;/P&gt;&lt;P&gt;3. For all selected BELNR get only those BELNR which are available in the table BSIS where HKONT is 27611002.&lt;/P&gt;&lt;P&gt;4. For these BELNR get all the line items from the table BSIS where BSCHL is equal to 40. Get the report in the following format.&lt;/P&gt;&lt;P&gt;5. All the above mentioned searches to be made for company code 1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report Layout (For Reports):-----&lt;/P&gt;&lt;P&gt;BSIS-BLDAT, BSIS-BUDAT, BSIS-BELNR, BSIS-HKONT, BSIS-WRBTR, BSAK-AUGDT, BSAK-LIFNR, BSAK-AUGBL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 08:29:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748148#M324443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T08:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748149#M324444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam , &lt;/P&gt;&lt;P&gt;What is the help you want , if you can be specific it would help us answer the question better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your requirement , it does not seem to tough , i have just one query regaridng the specification given , your program takes as input company code , but at step 5 it is given 'All the above mentioned searches to be made for company code 1000' .&lt;/P&gt;&lt;P&gt;So what is the use of having the company code as input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please revert back , with your queries.&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>Tue, 02 Jan 2007 08:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748149#M324444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T08:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748150#M324445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sam,&lt;/P&gt;&lt;P&gt;            u want the code or what kind of help ? pls be littile more specific so that i can try my best.&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;P&gt;with regards,&lt;/P&gt;&lt;P&gt;S.Barane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 09:13:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748150#M324445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748151#M324446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you want this to be in alv grid ?&lt;/P&gt;&lt;P&gt;i have already posted the code for the same in previuos thread,but in report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in alv your internal table declaration will be same select query will be same the only difference will be you have to call some function modules like &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reuse_alv_fieldcatalog_merge ; and&lt;/P&gt;&lt;P&gt;reuse_alv_grid_display.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  YTESTPS2.

tables: bsak,bsis.
type-pools slis.
 
data: begin of itab occurs 0,
      bukrs like bsak-bukrs,
      augbl like bsak-augbl,
      augdt like bsak-augdt,
      hkont like bsak-hkont,
      zuonr like bsak-zuonr,
      gjahr like bsak-gjahr,
      lifnr like bsak-lifnr,
      bldat like bsis-bldat,
      belnr like bsis-belnr,
      wrbtr like bsis-wrbtr,
      budat like bsak-budat,
      end of itab.
 
data i_fcat type slis_t_fieldcat_alv.
 
selection-screen begin of block b with frame title text-001. " give the text in that
selection-screen begin of line.
selection-screen comment 1(15) text-002." give text as company code
parameters x like bsak-bukrs.
selection-screen end of line.
 
selection-screen begin of line.
selection-screen comment 1(15) text-003. " give text as date
select-options y for bsak-budat.
selection-screen end of line.
selection-screen end of block b.
 
*to give text double click on text-001...like that..save and activate
 
start-of-selection.
 
select k~augdt k~lifnr k~augbl s~bldat s~budat s~belnr s~hkont s~wrbtr
into corresponding fields of table itab
from bsak as k inner join bsis as s on k~bukrs = s~bukrs AND
k~augbl = s~augbl AND
k~augdt = s~augdt AND
k~hkont = s~hkont AND
k~zuonr = s~zuonr AND
k~gjahr = s~gjahr
where k~bukrs = x and s~budat in y and k~bukrs = '1000' and s~hkont = '27611002' and s~bschl = '40'.
 
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
 EXPORTING
   I_PROGRAM_NAME               = 'ytestps2'  " your program name
   I_INTERNAL_TABNAME           = itab
*   I_STRUCTURE_NAME             =
*   I_CLIENT_NEVER_DISPLAY       = 'X'
*   I_INCLNAME                   =
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
  CHANGING
    CT_FIELDCAT                  = i_fcat
* EXCEPTIONS
*   INCONSISTENT_INTERFACE       = 1
*   PROGRAM_ERROR                = 2
*   OTHERS                       = 3
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.



CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
   I_CALLBACK_PROGRAM                = 'ytestps2'
*   I_CALLBACK_PF_STATUS_SET          = ' '
*   I_CALLBACK_USER_COMMAND           = ' '
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
*   IS_LAYOUT                         = 
   IT_FIELDCAT                       = i_fcat
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
   I_SAVE                            = 'A'
*   IS_VARIANT                        =
*   IT_EVENTS                         =
*   IT_EVENT_EXIT                     =
*   IS_PRINT                          =
*   IS_REPREP_ID                      =
*   I_SCREEN_START_COLUMN             = 0
*   I_SCREEN_START_LINE               = 0
*   I_SCREEN_END_COLUMN               = 0
*   I_SCREEN_END_LINE                 = 0
*   I_HTML_HEIGHT_TOP                 = 0
*   I_HTML_HEIGHT_END                 = 0
*   IT_ALV_GRAPHICS                   =
*   IT_HYPERLINK                      =
*   IT_ADD_FIELDCAT                   =
*   IT_EXCEPT_QINFO                   =
*   IR_SALV_FULLSCREEN_ADAPTER        =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
  TABLES
    T_OUTTAB                          = itab
* EXCEPTIONS
*   PROGRAM_ERROR                     = 1
*   OTHERS                            = 2
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is a simple grid display.. i have just givenm you the idea as how you have to carry out your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;pankaj singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 09:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748151#M324446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: alv</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748152#M324447</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;Use this logic just change the field names and select statement according to your requirement.&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; Report  ZDEMO_ALVGRID                                               *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&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;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp; Example of a simple ALV Grid Report with grand total                *&lt;/P&gt;&lt;P&gt;*&amp;amp; ...................................                                 *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp; The basic requirement for this demo is to display a number of       *&lt;/P&gt;&lt;P&gt;*&amp;amp; fields from the EKKO table.                                         *&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;REPORT  zdemo_alvgrid                 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES:     ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: slis.                                 "ALV Declarations&lt;/P&gt;&lt;P&gt;*Data Declaration&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;&lt;P&gt;TYPES: BEGIN OF t_ekko,&lt;/P&gt;&lt;P&gt;  ebeln TYPE ekpo-ebeln,&lt;/P&gt;&lt;P&gt;  ebelp TYPE ekpo-ebelp,&lt;/P&gt;&lt;P&gt;  statu TYPE ekpo-statu,&lt;/P&gt;&lt;P&gt;  aedat TYPE ekpo-aedat,&lt;/P&gt;&lt;P&gt;  matnr TYPE ekpo-matnr,&lt;/P&gt;&lt;P&gt;  menge TYPE ekpo-menge,&lt;/P&gt;&lt;P&gt;  meins TYPE ekpo-meins,&lt;/P&gt;&lt;P&gt;  netpr TYPE ekpo-netpr,&lt;/P&gt;&lt;P&gt;  peinh TYPE ekpo-peinh,&lt;/P&gt;&lt;P&gt; END OF t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,&lt;/P&gt;&lt;P&gt;      wa_ekko TYPE t_ekko.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ALV data declarations&lt;/P&gt;&lt;P&gt;data: fieldcatalog type slis_t_fieldcat_alv with header line,&lt;/P&gt;&lt;P&gt;      gd_tab_group type slis_t_sp_group_alv,&lt;/P&gt;&lt;P&gt;      gd_layout    type slis_layout_alv,&lt;/P&gt;&lt;P&gt;      gd_repid     like sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*Start-of-selection.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform data_retrieval.&lt;/P&gt;&lt;P&gt;perform build_fieldcatalog.&lt;/P&gt;&lt;P&gt;perform build_layout.&lt;/P&gt;&lt;P&gt;perform display_alv_report.&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  BUILD_FIELDCATALOG&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;      Build Fieldcatalog for ALV Report&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 build_fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'EBELN'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Purchase Order'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 0.&lt;/P&gt;&lt;P&gt;  fieldcatalog-outputlen   = 10.&lt;/P&gt;&lt;P&gt;  fieldcatalog-emphasize   = 'X'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-key         = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fieldcatalog-do_sum      = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fieldcatalog-no_zero     = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'EBELP'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'PO Item'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 1.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'STATU'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Status'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 2.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'AEDAT'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Item change date'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 3.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MATNR'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Material Number'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 4.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MENGE'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'PO quantity'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 5.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'MEINS'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Order Unit'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 6.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'NETPR'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Net Price'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 7.&lt;/P&gt;&lt;P&gt;  fieldcatalog-outputlen   = 15.&lt;/P&gt;&lt;P&gt;  fieldcatalog-do_sum      = 'X'.        "Display column total&lt;/P&gt;&lt;P&gt;  fieldcatalog-datatype     = 'CURR'.&lt;/P&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  fieldcatalog-fieldname   = 'PEINH'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-seltext_m   = 'Price Unit'.&lt;/P&gt;&lt;P&gt;  fieldcatalog-col_pos     = 8.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to make editable field&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; fieldcatalog-edit = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  append fieldcatalog to fieldcatalog.&lt;/P&gt;&lt;P&gt;  clear  fieldcatalog.&lt;/P&gt;&lt;P&gt;endform.                    " BUILD_FIELDCATALOG&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  BUILD_LAYOUT&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;      Build layout for ALV grid report&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 build_layout.&lt;/P&gt;&lt;P&gt;  gd_layout-no_input          = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-colwidth_optimize = 'X'.&lt;/P&gt;&lt;P&gt;  gd_layout-totals_text       = 'Totals'(201).&lt;/P&gt;&lt;P&gt;endform.                    " BUILD_LAYOUT&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  DISPLAY_ALV_REPORT&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;      Display report using ALV grid&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 display_alv_report.&lt;/P&gt;&lt;P&gt;  gd_repid = sy-repid.&lt;/P&gt;&lt;P&gt;  call function 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            i_callback_program      = gd_repid&lt;/P&gt;&lt;P&gt;            is_layout               = gd_layout&lt;/P&gt;&lt;P&gt;            it_fieldcat             = fieldcatalog[]&lt;/P&gt;&lt;P&gt;            i_save                  = 'X'&lt;/P&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;            t_outtab                = it_ekko&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;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endform.                    " DISPLAY_ALV_REPORT&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  DATA_RETRIEVAL&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;      Retrieve data form EKPO table and populate itab it_ekko&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 data_retrieval.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select ebeln ebelp statu aedat matnr menge meins netpr peinh&lt;/P&gt;&lt;P&gt; up to 10 rows&lt;/P&gt;&lt;P&gt;  from ekpo&lt;/P&gt;&lt;P&gt;  into table it_ekko.&lt;/P&gt;&lt;P&gt;endform.                    " DATA_RETRIEVAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajneesh Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1748152#M324447</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:37:41Z</dc:date>
    </item>
  </channel>
</rss>

