Alv output issue

Hi everyone,
                  i m posting one of my ALV Program which i m having error as well as i m having few doubts , frnds plz clarify.
<code>
*ztest_alv_sri.
*& Report  ZSrialv                                                 *
REPORT  ZSrialv
        MESSAGE-ID Z00.
TABLE DECLARATIONS
TABLES : EKKO.        "Purchasing Document Header
CONSTANTS DECLARATIONS
CONSTANTS : C_EBELN(5) VALUE 'EBELN'.
DATA DECLARATIONS
DATA : V_FLAG,        "For Select Status
       V_DATA(50).    "To Store Data
TYPE DECLARATIONS FOR ALV                                            *
TYPE-POOLS : SLIS.
*Type Declarations for Field Catalog for Basic List
DATA : I_FLDCAT_HEAD  TYPE SLIS_T_FIELDCAT_ALV,
       WA_FLDCAT_HEAD TYPE SLIS_FIELDCAT_ALV.
*Type Declarations for Field Catalog for Secondary List
DATA : I_FLDCAT_ITEM  TYPE SLIS_T_FIELDCAT_ALV,
       WA_FLDCAT_ITEM TYPE SLIS_FIELDCAT_ALV.
*Type Declarations for Displaying Images on Basic Grid
DATA : I_COMMENT  TYPE SLIS_T_LISTHEADER,
       WA_COMMENT TYPE SLIS_LISTHEADER.
*Type Declarations for Displaying Images on Secondary Grid
DATA : I_COMMENT_SEC  TYPE SLIS_T_LISTHEADER,
       WA_COMMENT_SEC TYPE SLIS_LISTHEADER.
*Type Declarations for ALV Events for Basic Grid
DATA : I_EVENTS TYPE SLIS_T_EVENT,
       WA_EVENT LIKE LINE OF I_EVENTS.
*Type Declarations for ALV Events for Secondary Grid
DATA : I_EVENTS_SEC TYPE SLIS_T_EVENT,
       WA_EVENT_SEC LIKE LINE OF I_EVENTS.
*Type Declarations for Layout Design
DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
*Type Declarations for Linking the fields
DATA : WA_KEYINFO TYPE SLIS_KEYINFO_ALV.
INTERNAL TABLE DECLARATIONS
*--Internal Table for Basic List
DATA : BEGIN OF IT_FINAL_BAS OCCURS 0,
         EBELN LIKE EKKO-EBELN,        "Purchasing Document Number
         BUKRS LIKE EKKO-BUKRS,        "Company Code
         AEDAT LIKE EKKO-AEDAT,        "Date on which the record was created
         EKORG LIKE EKKO-EKORG,        "Purchasing Organization
         EKGRP LIKE EKKO-EKGRP,        "Purchasing group
         COLOR(3),                     "For applying color
       END OF IT_FINAL_BAS.
*--Internal Table for Secondary List
DATA : BEGIN OF IT_FINAL_SEC OCCURS 0,
         EBELN LIKE EKPO-EBELN,        "Purchasing Document Number
         MATNR LIKE EKPO-MATNR,        "Material Number
         TXZ01 LIKE EKPO-TXZ01,        "Material Desc
         WERKS LIKE EKPO-WERKS,        "Plant
         LGORT LIKE EKPO-LGORT,        "Location
         MATKL LIKE EKPO-MATKL,        "Material Group
         MENGE LIKE EKPO-MENGE,        "Purchase order quantity
         MEINS LIKE EKPO-MEINS,        "Order unit
         NETPR LIKE EKPO-NETPR,        "Net price in purchasing document (in document currency)
         NETWR LIKE EKPO-NETWR,        "Net order value in PO currency
         DUMMY LIKE ICON-ID,           "For placing Icon
         COLOR(3),                     "For applying color
       END OF IT_FINAL_SEC.
*--Internal Table for Secondary List with selected records
DATA : BEGIN OF I_ITEM_DISPLAY OCCURS 0,
         EBELN LIKE EKPO-EBELN,        "Purchasing Document Number
         MATNR LIKE EKPO-MATNR,        "Material Number
         TXZ01 LIKE EKPO-TXZ01,        "Material Desc
         WERKS LIKE EKPO-WERKS,        "Plant
         LGORT LIKE EKPO-LGORT,        "Location
         MATKL LIKE EKPO-MATKL,        "Material Group
         MENGE LIKE EKPO-MENGE,        "Purchase order quantity
         MEINS LIKE EKPO-MEINS,        "Order unit
         NETPR LIKE EKPO-NETPR,        "Net price in purchasing document (in document currency)
         NETWR LIKE EKPO-NETWR,        "Net order value in PO currency
         DUMMY LIKE ICON-ID,           "For placing Icon
         COLOR(3),                     "For applying color
       END OF I_ITEM_DISPLAY.
SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-H01.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN.
SELECTION-SCREEN END OF BLOCK B1.
Event : INITIALIZATION
INITIALIZATION.
  MOVE 'Developed by'(001) TO V_DATA.
Event : AT SELECTION SCREEN
AT SELECTION-SCREEN.
  PERFORM VALIDATE_EBELN.
Event : START-OF-SELECTION
START-OF-SELECTION.
*--Getting the Data
  PERFORM GET_DATA.
*--Generating the Field catalog for basic and secondary grid
  PERFORM GET_FLDCAT.
*--Generating the Layout for basic and secondary grid
  PERFORM GET_LAYOUT.
*--Generating the key infor to link Basic grid to Secondary grid
  PERFORM GET_KEYINFO.
*--Generating the Events for Basic and Secondary Grid
  PERFORM GET_EVENTS.
Event : END-OF-SELECTION
END-OF-SELECTION.
  IF V_FLAG EQ 'X'.
*--Generating Basic List
    PERFORM DISP_BASIC_LIST.
  ELSE.
    MESSAGE I010 WITH 'No Data Found To Display'(002).
  ENDIF.
     SUB-ROUTINES
*&      Form  VALIDATE_EBELN
      Validating the PO No
FORM VALIDATE_EBELN .
  SELECT EBELN
  UP TO 1 ROWS
  INTO (EKKO-EBELN)
  FROM EKKO
  WHERE EBELN IN S_EBELN.
  ENDSELECT.
  IF SY-SUBRC NE 0.
    MESSAGE I010 WITH 'Invalid PO No'(003) S_EBELN-LOW 'To'(004) S_EBELN-HIGH.
  ENDIF.
ENDFORM.                    " VALIDATE_EBELN
*&      Form  GET_DATA
      Getting Basic List and Secondary List Data
FORM GET_DATA .
*--Getting Basic List Data
  SELECT EBELN                  "PO No
         BUKRS                  "Company Code
         AEDAT                  "Creation Date
         EKORG                  "Purch Org
         EKGRP                  "Purch Group
   INTO TABLE IT_FINAL_BAS
   FROM EKKO
   WHERE EBELN IN S_EBELN.
*--Getting Secondary List Data
  IF SY-SUBRC EQ 0.
    SELECT EBELN                "PO No
           MATNR                "Material No
           TXZ01                "Material Desc
           WERKS                "Plant
           LGORT                "Location
           MATKL                "Material Group
           MENGE                "PO Qty
           MEINS                "Unit
           NETPR                "Net Price
           NETWR                "Net Value
      INTO TABLE IT_FINAL_SEC
      FROM EKPO
      WHERE EBELN IN S_EBELN.
  ENDIF.
  IF SY-SUBRC EQ 0.
    V_FLAG = 'X'.
  ELSE.
    V_FLAG = SPACE.
  ENDIF.
ENDFORM.                    " GET_DATA
*&      Form  GET_FLDCAT
      Generating the Field Catalog
FORM GET_FLDCAT .
*--Generating the Field Catalog for Basic List
  WA_FLDCAT_HEAD-FIELDNAME = 'EBELN'(005).
  WA_FLDCAT_HEAD-COL_POS = '1'.
  WA_FLDCAT_HEAD-JUST = 'C'.
  WA_FLDCAT_HEAD-OUTPUTLEN = '12'.
  WA_FLDCAT_HEAD-SELTEXT_M  = 'PO Number'(006).
  WA_FLDCAT_HEAD-DDICTXT = 'M'.
WA_FLDCAT_HEAD-REF_TABNAME = ' '.
  WA_FLDCAT_HEAD-HOTSPOT = 'X'.
  APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
  CLEAR WA_FLDCAT_HEAD .
  WA_FLDCAT_HEAD-FIELDNAME = 'BUKRS'(007).
  WA_FLDCAT_HEAD-COL_POS = '2'.
  WA_FLDCAT_HEAD-OUTPUTLEN = '12'.
  WA_FLDCAT_HEAD-SELTEXT_M = 'Company Code'(008).
  WA_FLDCAT_HEAD-DDICTXT = 'M'.
  APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
  WA_FLDCAT_HEAD-FIELDNAME = 'AEDAT'(009).
  WA_FLDCAT_HEAD-COL_POS = '3'.
  WA_FLDCAT_HEAD-OUTPUTLEN = '10'.
  WA_FLDCAT_HEAD-SELTEXT_M = 'PO Date'(010).
  WA_FLDCAT_HEAD-DDICTXT = 'M'.
  APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
  WA_FLDCAT_HEAD-FIELDNAME = 'EKORG'(011).
  WA_FLDCAT_HEAD-COL_POS = '4'.
  WA_FLDCAT_HEAD-OUTPUTLEN = '6'.
  WA_FLDCAT_HEAD-SELTEXT_M = 'PO Org'(012).
  WA_FLDCAT_HEAD-DDICTXT = 'M'.
  APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
  WA_FLDCAT_HEAD-FIELDNAME = 'EKGRP'(013).
  WA_FLDCAT_HEAD-COL_POS = '5'.
  WA_FLDCAT_HEAD-OUTPUTLEN = '8'.
  WA_FLDCAT_HEAD-SELTEXT_M = 'PO Group'(014).
  WA_FLDCAT_HEAD-DDICTXT = 'M'.
  WA_FLDCAT_HEAD-DO_SUM = 'X'.
  APPEND WA_FLDCAT_HEAD TO I_FLDCAT_HEAD.
*--Generating the Field Catalog for secondary List
  WA_FLDCAT_ITEM-FIELDNAME = 'EBELN'(005).
  WA_FLDCAT_ITEM-COL_POS = '1'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '12'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'PO Number'(006).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
WA_FLDCAT_ITEM-REF_TABNAME = ' '.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'MATNR'(015).
  WA_FLDCAT_ITEM-COL_POS = '2'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '18'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Item Number'(016).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
WA_FLDCAT_ITEM-REF_TABNAME = ' '.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'TXZ01'(017).
  WA_FLDCAT_ITEM-COL_POS = '3'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '40'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Item Desc'(018).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'WERKS'(019).
  WA_FLDCAT_ITEM-COL_POS = '4'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '6'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Plant'(020).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'LGORT'(021).
  WA_FLDCAT_ITEM-COL_POS = '5'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '9'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Location'(022).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'MATKL'(023).
  WA_FLDCAT_ITEM-COL_POS = '6'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '10'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Mat Group'(024).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'MENGE'(025).
  WA_FLDCAT_ITEM-COL_POS = '7'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '17'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'PO Qty'(026).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'MEINS'(027).
  WA_FLDCAT_ITEM-COL_POS = '8'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '3'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Unit'(028).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'NETPR'(029).
  WA_FLDCAT_ITEM-COL_POS = '9'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '14'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Net Price'(037).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'NETWR'(030).
  WA_FLDCAT_ITEM-COL_POS = '10'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '16'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Net Value'(031).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
  WA_FLDCAT_ITEM-FIELDNAME = 'DUMMY'(038).
  WA_FLDCAT_ITEM-COL_POS = '11'.
  WA_FLDCAT_ITEM-JUST = 'C'.
  WA_FLDCAT_ITEM-OUTPUTLEN = '3'.
  WA_FLDCAT_ITEM-SELTEXT_M  = 'Status'(039).
  WA_FLDCAT_ITEM-DDICTXT = 'M'.
  WA_FLDCAT_ITEM-ICON = 'X'.
  APPEND WA_FLDCAT_ITEM TO I_FLDCAT_ITEM.
ENDFORM.                    " GET_FLDCAT
*&      Form  DISP_BASIC_LIST
      Generating the Basic List
FORM DISP_BASIC_LIST .
*--Applying the color to record in Basic List
     LOOP AT IT_FINAL_BAS.
        IF IT_FINAL_BAS-BUKRS LE 1000.
          IT_FINAL_BAS-COLOR = 'C21'.
        ELSEIF IT_FINAL_BAS-BUKRS GT 1000 AND IT_FINAL_BAS-BUKRS LE 2000.
          IT_FINAL_BAS-COLOR = 'C41'.
        ELSEIF IT_FINAL_BAS-BUKRS GT 2000 AND IT_FINAL_BAS-BUKRS LE 3000.
          IT_FINAL_BAS-COLOR = 'C71'.
        ELSEIF IT_FINAL_BAS-BUKRS GT 3000.
          IT_FINAL_BAS-COLOR = 'C51'.
        ENDIF.
          MODIFY IT_FINAL_BAS INDEX SY-TABIX.
       ENDLOOP.
*--Generating the Grid output
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK                 = ' '
    I_BYPASSING_BUFFER                = ' '
    I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = 'Zsrialv'
    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                   = 'PLAIN_BACKGROUND'
    I_GRID_TITLE                      =
    I_GRID_SETTINGS                   =
      IS_LAYOUT                         = WA_LAYOUT
      IT_FIELDCAT                       = I_FLDCAT_HEAD
    IT_EXCLUDING                      =
    IT_SPECIAL_GROUPS                 =
    IT_SORT                           =
    IT_FILTER                         =
    IS_SEL_HIDE                       =
    I_DEFAULT                         = 'X'
    I_SAVE                            = ' '
    IS_VARIANT                        =
      IT_EVENTS                         = I_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
    IT_ALV_GRAPHICS                   =
    IT_HYPERLINK                      =
    IT_ADD_FIELDCAT                   =
    IT_EXCEPT_QINFO                   =
    I_HTML_HEIGHT_TOP                 =
    I_HTML_HEIGHT_END                 =
  IMPORTING
    E_EXIT_CAUSED_BY_CALLER           =
    ES_EXIT_CAUSED_BY_USER            =
    TABLES
      T_OUTTAB                          = IT_FINAL_BAS
   EXCEPTIONS
     PROGRAM_ERROR                     = 1
     OTHERS                            = 2
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " DISP_BASIC_LIST
*&      Form  GET_EVENTS
      Getting the ALV Events
FORM GET_EVENTS .
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
   EXPORTING
     I_LIST_TYPE           = 0
   IMPORTING
     ET_EVENTS             = I_EVENTS
   EXCEPTIONS
     LIST_TYPE_WRONG       = 1
     OTHERS                = 2
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
*--Calling the User Defined sub-routines for ALV Events
  IF NOT I_EVENTS[] IS INITIAL.
    READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
    WA_EVENT-FORM = 'GENERATE_USERCOMMAND_HEADER'.
    MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
    READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'END_OF_LIST'.
    WA_EVENT-FORM = 'GENERATE_USERCOMMAND_FOOTER'.
    MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
    READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
    WA_EVENT-FORM = 'GENERATE_USERCOMMAND3'.
    MODIFY I_EVENTS FROM WA_EVENT INDEX SY-TABIX.
  ENDIF.
ENDFORM.                    " GET_EVENTS
*&      Form  GENERATE_USERCOMMAND_HEADER
      Displaying Header-Text and Logo on Grid
FORM GENERATE_USERCOMMAND_HEADER.
  CLEAR I_COMMENT[].
  WA_COMMENT-TYP = 'H'.
  WA_COMMENT-INFO = 'General Purchase Order Info'(032).
  APPEND WA_COMMENT TO I_COMMENT.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = I_COMMENT
      I_LOGO             = 'ENJOYSAP_LOGO'.
    I_END_OF_LIST_GRID       = 'X'.
ENDFORM.                    " GENERATE_USERCOMMAND
*&      Form  GENERATE_USERCOMMAND_FOOTER
      Displaying Footer-Text
FORM GENERATE_USERCOMMAND_FOOTER .
  CLEAR I_COMMENT[].
  WA_COMMENT-TYP = 'S'.
  WA_COMMENT-KEY = V_DATA.
  WA_COMMENT-INFO = 'satish'(033).
  APPEND WA_COMMENT TO I_COMMENT.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY       = I_COMMENT
     I_LOGO                   = ''
      I_END_OF_LIST_GRID       = 'X'.
ENDFORM.                    " GENERATE_USERCOMMAND_FOOTER
*&      Form  GENERATE_USERCOMMAND3
      Getting the F-Code and Calling Secondary List
-->  P_UCOMM        LIKE SY-UCOMM
-->  P_SELFIELD     TYPE SLIS_SELFIELD
FORM GENERATE_USERCOMMAND3 USING P_UCOMM LIKE SY-UCOMM
                                 P_SELFIELD TYPE SLIS_SELFIELD.
   CASE P_UCOMM.
    WHEN '&IC1'.   "DOUBLE CLICK Func-Code
      READ TABLE IT_FINAL_BAS INDEX P_SELFIELD-TABINDEX.
      REFRESH I_ITEM_DISPLAY.
*--Applying the color to record in Secondary List
      LOOP AT IT_FINAL_SEC WHERE EBELN = IT_FINAL_BAS-EBELN.
        IF IT_FINAL_SEC-NETPR EQ 0.
          IT_FINAL_SEC-DUMMY = '@0A@'.
          IT_FINAL_SEC-COLOR = 'C61'.
        ELSEIF IT_FINAL_SEC-NETPR GT 0 AND IT_FINAL_SEC-NETPR LE 200.
          IT_FINAL_SEC-DUMMY = '@09@'.
          IT_FINAL_SEC-COLOR = 'C41'.
        ELSEIF IT_FINAL_SEC-NETPR GT 200 AND IT_FINAL_SEC-NETPR LE 1000.
          IT_FINAL_SEC-DUMMY = '@08@'.
          IT_FINAL_SEC-COLOR = 'C71'.
        ELSEIF IT_FINAL_SEC-NETPR GT 1000.
          IT_FINAL_SEC-DUMMY = '@6P@'.
          IT_FINAL_SEC-COLOR = 'C51'.
        ENDIF.
          MODIFY IT_FINAL_SEC INDEX SY-TABIX.
        MOVE-CORRESPONDING IT_FINAL_SEC TO I_ITEM_DISPLAY.
        APPEND I_ITEM_DISPLAY.
        CLEAR I_ITEM_DISPLAY.
      ENDLOOP.
*--Getting the ALV Events of Secondary List
      PERFORM GET_EVENTS_SEC.
*--Generating the ALV Secondary Grid output
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             =
        I_BUFFER_ACTIVE                = ' '
          I_CALLBACK_PROGRAM             = 'Zsrialv'
        I_CALLBACK_PF_STATUS_SET       = ' '
        I_CALLBACK_USER_COMMAND        = ' '
        I_STRUCTURE_NAME               =
          I_BACKGROUND_ID                = 'PLAIN_BACKGROUND'
          IS_LAYOUT                      = WA_LAYOUT
          IT_FIELDCAT                    = I_FLDCAT_ITEM
        IT_EXCLUDING                   =
        IT_SPECIAL_GROUPS              =
        IT_SORT                        =
        IT_FILTER                      =
        IS_SEL_HIDE                    =
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     =
          IT_EVENTS                      = I_EVENTS_SEC
        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
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        =
        ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = I_ITEM_DISPLAY
        EXCEPTIONS
          PROGRAM_ERROR                  = 1
          OTHERS                         = 2
      IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
  ENDCASE.
ENDFORM.                    " GENERATE_USERCOMMAND3
*&      Form  GET_LAYOUT
      Generating the Layout
FORM GET_LAYOUT .
  WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.           "OPTIMIZING FIELD WIDTH
  WA_LAYOUT-ZEBRA = 'X'.                       "PUTTING ZEBRA COLORS
  WA_LAYOUT-INFO_FIELDNAME = 'COLOR'(034).     "APPLYING COLORS TO ROWS
ENDFORM.                    " GET_LAYOUT
*&      Form  GET_KEYINFO
      Getting Key info
FORM GET_KEYINFO .
*--Linking the Basic List to Secondary List
  WA_KEYINFO-HEADER01 = C_EBELN.
  WA_KEYINFO-ITEM01 = C_EBELN.
ENDFORM.                    " GET_KEYINFO
*&      Form  GET_EVENTS_SEC
      Getting Secondary List Events
FORM GET_EVENTS_SEC .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
  EXPORTING
    I_LIST_TYPE           = 0
   IMPORTING
     ET_EVENTS             = I_EVENTS_SEC
   EXCEPTIONS
     LIST_TYPE_WRONG       = 1
     OTHERS                = 2
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
*--Calling user-defined sub-routines for Secondary List
  IF NOT I_EVENTS_SEC[] IS INITIAL.
    READ TABLE I_EVENTS_SEC INTO WA_EVENT_SEC WITH KEY NAME = 'TOP_OF_PAGE'.
    WA_EVENT_SEC-FORM = 'GENERATE_USERCOMMAND_H_SEC'.
    MODIFY I_EVENTS_SEC FROM WA_EVENT_SEC INDEX SY-TABIX.
    READ TABLE I_EVENTS_SEC INTO WA_EVENT_SEC WITH KEY NAME = 'END_OF_LIST'.
    WA_EVENT_SEC-FORM = 'GENERATE_USERCOMMAND_F_SEC'.
    MODIFY I_EVENTS_SEC FROM WA_EVENT_SEC INDEX SY-TABIX.
  ENDIF.
ENDFORM.                    " GET_EVENTS_SEC
*&      Form  GENERATE_USERCOMMAND_H_SEC
   Displaying Header-Text and Logo on Grid For Secondary List
FORM GENERATE_USERCOMMAND_H_SEC.
  CLEAR I_COMMENT_SEC[].
  WA_COMMENT_SEC-TYP = 'H'.
  WA_COMMENT_SEC-INFO = 'Purchase Order Info'(035).
  APPEND WA_COMMENT_SEC TO I_COMMENT_SEC.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY = I_COMMENT_SEC
      I_LOGO             = 'ENJOYSAP_LOGO'.
    I_END_OF_LIST_GRID       = 'X'.
ENDFORM.                    " GENERATE_USERCOMMAND_H_SEC
*&      Form  GENERATE_USERCOMMAND_F_SEC
      Displaying Footer-Text for Secondary List
FORM GENERATE_USERCOMMAND_F_SEC.
  CLEAR I_COMMENT_SEC[].
  WA_COMMENT_SEC-TYP = 'S'.
  WA_COMMENT_SEC-KEY = V_DATA.
  WA_COMMENT_SEC-INFO = 'satish'(036).
  APPEND WA_COMMENT_SEC TO I_COMMENT_SEC.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
      IT_LIST_COMMENTARY       = I_COMMENT_SEC
     I_LOGO                   = ''
      I_END_OF_LIST_GRID       = 'X'.
ENDFORM.                    " GENERATE_USERCOMMAND_F_SEC </code>

The OO ALV does not invoke the TOP-OF-PAGE event. Do you want a picture above your ALV Grid? If so you can use a splitter container and put a picture control at the top and your ALV grid on the bottom.
This posting has an example of using a splitter container:
Changing width of a custom container dynamically
This posting has a discussion about using TOP-OF-PAGE:
Display Page numbers in ALV
This posting has an example of using picture control:
Insert picture in selection screen.
This posting has an example of putting a picture on top of an ALV grid:
Logo in OO ALV Grid
Regards,
Pavan

Similar Messages

  • Issue with ALV output in production

    Hi ,
    Iam using REUSE_ALV_GRID_DISPLAY function module to display the alv output.
    But the ALV is not displaying the data in production, where as it is working fine in Development and Quality.
    I have checked the version there is no change.
    Please advice how to fix this issue?

    I have checked all the Transport request for this particular report,
    Even i did the Version management .
    I didnt find any change in the versiopn management.
    We didnt miss any Transport related to this Report.
    Please see my coding for the same.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_CALLBACK_PROGRAM                = V_REPID
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         IS_LAYOUT                         = V_ALV_LAYOUT
         IT_FIELDCAT                       = V_ALV_FIELDCAT
         I_DEFAULT                         = C_X
       I_SAVE                            = 'A'
       IT_EVENTS                         = V_ALV_EVENTS
        TABLES
          T_OUTTAB                          = IT_FINAL[]
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2 .
      IF SY-SUBRC <> 0.
    Edited by: vinay raj on Nov 23, 2010 11:34 AM

  • Issue in Excel download from ALV output

    Dear Experts,
    I have generated an ALV Output using FM "REUSE_ALV_GRID_DISPLAY". When i try to download the ALV Output in Excel spreadsheet, I am not getting the data in Excel sheet. Kindly help me in this regard.
    Thanks in advance,
    Regards,
    Ramesh Manoharan

    hi ramesh,
    Please try below options.
    after getting the ALV disply , Go to Menu  LIST->Export->Spreadsheet.or microsoft excel view (Cntrl + Shift + F7)
    It will give some options to see the data in spread sheet format, hope you can save this to local desktop also.
    or
    please check the extension, it should be .XLS not .XLSX  .some times .XLSX format wont be supported
    regards,
    pradeep
    Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM
    Edited by: Pradeep Kandgal on Aug 4, 2010 6:54 PM

  • Total is not getting displayed in the ALV output.

    Hi,
    Total is not getting displayed in the ALV output.
    I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
    Are  there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
    source code:
    DATA: layout TYPE slis_layout_alv,
          IT_eventS  TYPE slis_t_event,
          fcat   TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    TYPES: BEGIN OF ty_tab,
          belnr TYPE dberchz-belnr,
          belzart TYPE dberchz-belzart,
          net TYPE dberchz-nettobtr,
          END OF ty_tab.
    DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
    SELECT belnr belzart nettobtr
      FROM dberchz
      INTO TABLE lt_tab[]
    WHERE belnr eq '000000000001'.
      if sy-subrc ne 0.
      ENDIF.
    *  defining layout
    layout-colwidth_optimize = 'X'.
    layout-def_status = 'X'.
    *defning event
    *event
    *defining field catalog
    fcat-col_pos = 1.
    fcat-fieldname = 'BELNR'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 2.
    fcat-fieldname = 'BELZART'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 3.
    fcat-fieldname = 'NET'.
    fcat-tabname  = 'LT_TAB'.
    fcat-do_sum = 'X'.
    APPEND fcat.
    *calling alv
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'YZ_PLR'
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = layout
        it_fieldcat                      = fcat[]
        i_tabname                        = 'LT_TAB'
        it_events                        = IT_EVENTS[]
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      tables
        t_outtab                         = lt_tab[]
    * EXCEPTIONS
    *   PROGRAM_ERROR                    = 1
    *   MAXIMUM_OF_APPENDS_REACHED       = 2
    *   OTHERS                           = 3
    IF sy-subrc <> 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_BLOCK_LIST_DISPLAY'
    Thanks,
    Gaurav

    Hi
    No I don't think, this is my code (based on your code) and it works fine:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF LT_TAB OCCURS 0,
           BELNR LIKE BSEG-BELNR,
           GJAHR LIKE BSEG-GJAHR,
           WRBTR LIKE BSEG-WRBTR,
           WAERS LIKE BKPF-WAERS,
          END OF LT_TAB.
    DATA: LAYOUT     TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS  TYPE SLIS_T_EVENT,
          FCAT       TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REC_FCAT   TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    START-OF-SELECTION.
      FCAT-COL_POS       = 1.
      FCAT-FIELDNAME     = 'BELNR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'BELNR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 2.
      FCAT-FIELDNAME     = 'GJAHR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'GJAHR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 3.
      FCAT-FIELDNAME     = 'WRBTR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-CFIELDNAME    = 'WAERS'.
      FCAT-REF_FIELDNAME = 'WRBTR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
      FCAT-COL_POS       = 4.
      FCAT-FIELDNAME     = 'WAERS'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'WAERS'.
      FCAT-REF_TABNAME   = 'BKPF'.
      FCAT-DO_SUM        = SPACE.
      APPEND FCAT.
      SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
        WHERE BUKRS = 'MAAB'
          AND BELNR = '0000000001'.
      LT_TAB-WAERS = 'EUR'.
      MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
    *CALLING ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FCAT[]
          I_TABNAME   = 'LT_TAB'
          IT_EVENTS   = IT_EVENTS[]
        TABLES
          T_OUTTAB    = LT_TAB[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    I've also inserted a currency field
    Max

  • Newly added field not getting displayed in ALV output

    Hi All,
       I'm adding one more field/column to be displayed in an old existing program that uses REUSE_ALV_FIELDCATALOG_MERGE to generate the ALV fieldcat.
    DATA: BEGIN OF it_salary OCCURS 0,
            pernr LIKE pa0000-pernr,
            ename LIKE pa0001-ename,
            rtext like lv_rtext, -
    added field
            waers LIKE pa0008-waers
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = driver
          i_internal_tabname     = 'IT_SALARY'
          i_client_never_display = 'X'
          i_inclname             = driver
        CHANGING
          ct_fieldcat            = lv_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program      = driver
          it_fieldcat             = lv_fieldcat[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = lv_tmplt
          is_layout               = lv_ls_layout
         i_callback_user_command = 'USER_COMMAND'
        TABLES
          t_outtab                = it_salary
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
    The newly added field is not getting populated in the lv_fieldcat table. Tried running programs BALVBUFDEL,
    BCALV_BUFFER_DEL_SHARED then logging off and logging in but of no help.
    Please provide suggestion for this issue.
    Regards,
    Sridevi S

    Hi,
    Fieldcat is buffered - so use
    I_BYPASSING_BUFFER = 'X'
    Since a while CL_GUI_ALV_GRID is available which does NOT need any fieldcat (is determined internally using RTTI). It is worth playing around whith this class if you have some time. This class is recommended for ALV Output by SAP (but no edit is possible - was never supported officially).
    A simple use would be:
    data: gt_output type standard table of (adjust!).
    *simple ALV output
    data go_alv type ref to cl_salv_table.
    data go_functions type ref to cl_salv_functions_list.
    data go_columns type ref to cl_salv_columns_table.
    data go_column type ref to cl_salv_column_table.
    *Exceprion handlig
    data: go_exception  type ref to cx_root,
          gv_errortext   type string.
    ** fill table gt_output ...
    ** ALV output
    if not gt_output is initial.
        try.
            call method cl_salv_table=>factory
              importing
                r_salv_table = go_alv
              changing
                t_table      = gt_output.
          catch cx_salv_msg into go_exception.
            gv_errortext = go_exception->get_text( ).
            message gv_errortext type 'A'.
        endtry.
    * enable all standard ALV functions
        go_functions =  go_alv->get_functions( ).
        go_functions->set_all( ).
    * hide MANDT
        go_columns = go_alv->get_columns( ).
        go_column ?=  go_columns->get_column( columnname = 'MANDT' ).
        go_column->set_technical( ).
        go_alv->display( ).
    Kind regards,
    Holger

  • Runtime Error while summing a column in ALV output

    Dear All,
    I have developed an ALV Report and the report is giving output without any flaws.
    I have defined proper field catalog and displaying the results using REUSE_ALV_GRID function module.
    Now the report is generating Runtime Error while the user selects a column and click the SUM icon.
    The fields like Qty, or amounts are also theowing runtime error while summing up their column in the ALV output.
    What might be the reason and how to resolve this issu?
    Regards
    Pavan

    Hi ,
    I don't know how you have write  down the code but follow the below coding example:
    FOR TOTAL:
    there is a property of fieldcatalog, that is do_sum.
    USE COED LIKE:
    PERFORM fieldcat USING:
    '1' 'MATNR' 'I_MARD' 'MATERIAL NO' 'MARD' 'MATNR ' ' ',
    '2' 'NETWR' 'I_MARD' 'PLANT' 'MARD' 'WERKS' ' ',
    FORM fieldcat USING value(p_0029)
    value(p_0030)
    value(p_0031)
    value(p_0032)
    wa_fieldcat-col_pos = p_0029.
    wa_fieldcat-fieldname = p_0030.
    wa_fieldcat-tabname = p_0031.
    wa_fieldcat-reptext = p_0032.
    wa_fieldcat-do_sum = 'X'.
    APPEND wa_fieldcat TO i_fieldcat.
    ENDFORM. " FIELDCAT
    in final output you will get the total of currency field.
    FOR SUB TOTAL:
    decleare: i_sort type standard table of slis_sortinfo_alv,
              wa_sort type slis_t_sortinfo_alv.
    wa_sort-spos = '1'.
    wa_sort-fieldname = 'field1'.
    wa_sort-subtot = 'X'.
    append wa_tab to i_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    it_fieldcat = it_fieldcat
    it_sort = i_sort
    Hope this can solve your pbs.
    If you need more inputs let me know.
    Regards,
    Tutun

  • Some fields are missing in the ALV output

    Hi ,
    I have created a normal ALV report using REUSE_ALV_GRID_DISPLAY . It shows the output correctly. But when I take the prin out or download to an excel sheet some fields are not there. Can I know how to solve this issue ?
    Regards,
    Beena

    hi Beena,
    If you are downloading the ALV output to excel, please make sure that the DDIC structure is passed as a parameter to the REUSE_ALV. I doubt you are creating field catalog from the program and that DDIC structure is not used.
    Hope this helps,
    Sajan Joseph.

  • To download alv output to two excel sheets because of large data

    Hi all,
    I want to download alv output to excel sheet,I know how to do,but the no of record is very large and can not be accomodated in one sheet.
    can anyone please tell how to download it into two sheets or some other way.
    I want excel format only.
    Regards,
    sudha

    hi sudha yadav,
    right now i am working on the same issue.
    what right i am doing is that,
    i want to download an internal table it is containing more than 2 lakhs records but excel can accomidate 60000 records, so
    before call gui download i am sending first 60000 records into another internal table with same time, by using append statemen and indexs,
    that new internal table i am downloading
    again i am repeating the same thing by using sy-tabix,
    finally i am creating more than one excel file
    by using oops concepts we can also create in one excel file no of work sheets
    but its lengthy process so i am right now creating no of excel files only
    if it is useful , pls rewards points to this answer

  • Problem in Download ALV Output to Excel

    Hi All,
    When iam going to Download the ALV ( Grid ) Output to Excel, all columns are not coming in Output.
    But the ALV Output Contains 140 Columns.
    How to solve this issue.
    Points Rewarded.
    Thanks & Regards,
    Kiran . I

    Hi,
    You can download the report by going to menu option
    List->export->local file.. in this select spreadsheet and give the name for this to download.
    You can view all the columns here in xls sheet.
    Regards,
    Ram Mohan
    Pls reward poins if useful...

  • ALV: Send ALV output as mail - background processing

    Hi all,
    I'm a newbie in SDC and try to implement the following functionality (Version 4.0B):
    A ABAP report (to be scheduled as e.g. a daily job run) with ALV output should send an automated email containing the ALV informations to a receiver specified in the selection criterias.
    I already have the following pieces:
    1) The report with ALV output (running online and clicking on List/send/office works perfectly, the alv-output is attached to the mail). The report runs also in background and generates a spool.
    2) A subroutine wich sends a email (input has to be in an itab)
    Now I try to put them together.
    Question: How can I automate the send process?
    I did a little bit of debugging, but got lost in the SAP Office functions.
    Any help appreciated!
    Thomas

    Hi Michael,
    thank you again a helpfull reply. To solve the issue I ended up writing a second little report.
    Here is a short description of my solution just in case anybody else is also interested in.
    I set up a Job with two steps.
    Step 1 is the ABAP that creates e.g. a ALV output (anything that goes to spool).
    Step 2 is a little ABAP that does nothing else than reading the output of step 1 (Spool) and send it as SAP Office Document. (To be a little more flexible I added some selection criterias for step 2 like Jobstep number, receiver, sendmode, ...).
    It works fine online (by keying in the spool number manually) and in batch mode (by determining the spool  number based on the job number). I think this solution is flexible and lightwight.
    Kind regards,
    Thomas
    Message was edited by: Thomas Hager
    Message was edited by: Thomas Hager

  • ALV output to spool

    hi,
    i am having a issue when running ALV output to background. If user gives his email address i am able to send output as attachment to email.but incase he doesnt give then i have to send it to SPOOL.
    I am able to send the output to spool but when i execute the report in background i get a POPUP where i have to input device and then a other dialog box which gives formatting information I.E. X_65_132' and when i click OK then spool is getting generated.
    i tried ways to suppress this popup but couldnt find the way..can anyone suggest me a way to suppress this popup?
    i used get_print_parameters function module but the program doesn't go till that place and immediately before executing start-of-selection i am getting this popup.
    regards

    REPORT  ytest.
    INCLUDE yest_top.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM selectionscreen_modify.
      PERFORM validate_selscreen .
    START-OF-SELECTION.
    PERFORM fetch_data.
        PERFORM build_dyntable.
    Inside the build_dyntable perform i am calling alv_list_display to dislay output.
    when i debug the code after executing report from seleciton screen in background execution immediately after AT SLECTION SCREEN OUTPUT i get the popup.
    let me know incase anything to be done to suppress the popup.
    thanks

  • Problem in download ALV output

    Hi experts,
         When I try to download my ALV report output, its giving dump  'Field symbol has not yet been assigned.
         In my ALV output, I have 46 fields/columns. When I have 18 fields/columns or less, I able to download, but if it is more than 18. Its giving the above dump.
    *Error details:*
    Runtime Errors         GETWA_NOT_ASSIGNED
    Date and Time          05.09.2009 17:56:13
    Short text
         Field symbol has not yet been assigned.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLKKBL" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         You attempted to access an unassigned field symbol
         (data segment 110).
         This error may occur if
         - You address a typed field symbol before it has been set with
           ASSIGN
         - You address a field symbol that pointed to the line of an
           internal table that was deleted
         - You address a field symbol that was previously reset using
           UNASSIGN or that pointed to a local field that no
           longer exists
         - You address a global function interface, although the
           respective function module is not active - that is, is
           not in the list of active calls. The list of active calls
           can be taken from this short dump.
    Please provid the solution for this.
    Thanks and regards,
    Subbu

    Hi Sandra,
    As you told, There is a problem  in populating field catalog.
    Actually, I had passed the same field name 2 times while populating field catalog table. Thats why, the issue has been raised. Now I changed it accordingly.
    Thanks and regards
    Subbu
    Edited by: subbu_1983 on Sep 6, 2009 11:10 AM

  • Search help problem in ALV output for field TD24A-DISMM

    Hi Abap-Experts,
          I have one issue regarding simple ALV report.
          I need to display search-help for field DISMM.  I have used below code in ALV fieldcatalog.
          ts_fieldcat - tabname = 'TD24A'.
          ts_fieldcat - tabname = 'DISMM'.
          I have attached search-help for fields such as MATNR and WERKS too.
          The search-helps are getting displayed for MATNR as well as WERKS.
          But, the search-help is not gettting displayed for field DISMM(RP-TYPE) .
             The output displayed is done using Simple ALV.     
            Could anyone please help me and correct my code or logic i have used.

    Hi,
      I have changed code a bit...and used T438A table.
      CLEAR ts_fieldcat.
      ts_fieldcat-col_pos = '5'.
      ts_fieldcat-fieldname = 'DISMM'.
      ts_fieldcat-seltext_l = text-014.
      ts_fieldcat-outputlen =  2.
      ts_fieldcat-reptext_ddic  = ''.
      ts_fieldcat-ref_tabname   = 'T438A'.
      ts_fieldcat-ref_fieldname = 'DISMM'.
    ts_fieldcat-ddic_outputlen = '2'.
      ts_fieldcat-input         = 'X'.
      APPEND ts_fieldcat TO gt_fieldcat.
    still it is not showing me the F4 help in simplae ALV output..
    kindly help me

  • Initial ALV output display

    Hello,
    I have one query witl regards to ALV output. After entering data in the selection screnn my ALV output gets displayed and there is no issue with it. The ALV is in display mode and if i click on the change button the ALV becomes editable. So fat it is fine.
    The area  of concern is the initial ALV output even though it is  in display mode  looks as if it is editable ALV.  On click of the change button, then the ALV is shown in display mode and it is easily identifiable.
    The user feels the initial ALV output is confusing and that he is not able to recognize whether it is display/editbale ALV. How can we fix it so that client can identify it?
    Also, how do we get all the standard ALV buttons that we get in SE38 output in webdynpro? Please help.
    Regards,
    Vaishnavi

    Hi,
    init your ALV settings with:
    DATA lr_alv_cfg TYPE ref to cl_salv_wd_config_table.
    lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv_table( ).
    lr_alv_cfg = lo_interfacecontroller->get_model( ).
    lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
    If you click change button do this:
    is_read_only = lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~GET_READ_ONLY( ).
    if lv_is_read_only = abap_true.
        lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
    else.
        lr_alv_cfg->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_true ).
    endif.

  • I am not getting the headings of the fields in ALV output.

    I am not getting ALV out put but  the headings of the fields in ALV output.
    Please see my below code .
    TYPES : BEGIN OF ty_zgxmit.
              INCLUDE STRUCTURE zgxmit.
    TYPES : END OF ty_zgxmit.
    DATA : gt_zgxmit TYPE TABLE OF ty_zgxmit.
    *&      Form  alv_display                                              *
    This subroutine is to display the out put in ALV.                    *
    FORM alv_display .
    Local data
      DATA: y_x          LIKE boole  VALUE 'X'.
    DATA: lt_fieldcat  TYPE slis_t_fieldcat_alv.
      DATA: lf_fieldcat  TYPE slis_fieldcat_alv.
      DATA: lh_index     LIKE lf_fieldcat-col_pos.
    For variant
    DATA: ws_repid LIKE sy-repid,
          g_save TYPE c VALUE 'A',
          g_exit TYPE c,
          g_variant LIKE disvariant,
          gx_variant LIKE disvariant.
      For 1st field.( RPT_LOC )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'RPT_LOC'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'RPT_LOC'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 2nd field.( BAL_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'BAL_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'BAL_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 3rd field.( INC_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'INC_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'INC_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
    For 4th field.( Z500_XMIT )
        CLEAR lf_fieldcat.
        lf_fieldcat-fieldname = 'Z500_XMIT'.
        lf_fieldcat-tabname = 'GT_ZGXMIT'.
        lf_fieldcat-ref_tabname = 'Z500_XMIT'.
        lf_fieldcat-ref_fieldname = 'ZGXMIT'.
        lh_index = lh_index + 1.
        lf_fieldcat-col_pos = lh_index.
        lf_fieldcat-key = y_x.
        lf_fieldcat-no_sum = y_x.
        APPEND lf_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = 'ZJV_2245'
                it_fieldcat              = lt_fieldcat
           TABLES
                t_outtab                 = gt_zgxmit
           EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display

    You can force the headings like so.
    CLEAR lf_fieldcat.
    lf_fieldcat-fieldname = 'RPT_LOC'.
    lf_fieldcat-tabname = 'GT_ZGXMIT'.
    lf_fieldcat-ref_tabname = 'RPT_LOC'.
    lf_fieldcat-ref_fieldname = 'ZGXMIT'.
    lf_fieldcat-reptext_ddic  = 'Whatever Heading'.    "<-  Right here
    lh_index = lh_index + 1.
    lf_fieldcat-col_pos = lh_index.
    lf_fieldcat-key = y_x.
    lf_fieldcat-no_sum = y_x.
    APPEND lf_fieldcat TO lt_fieldcat.
    Regards,
    Rich Heilman

Maybe you are looking for