IT_ALV_GRAPHICS on REUSE_ALV_GRID_DISPLAY

Hi there,
has anyone used the table parameter IT_ALV_GRAPHICS in the function module REUSE_ALV_GRID_DISPLAY yet?
I am trying to set a title in the popup graphic.
According to help pages I should append an entry in IT_ALV_GRAPHICS as follows:
IT_ALV_GRAPHICS-PROP_ID = cl_alv_graphics_cu=>co_propid_title.  "Which is: 1
IT_ALV_GRAPHICS-PROP_VAL = 'My title'.
APPEND IT_ALV_GRAPHICS.
But this only works using the following method in ABAP OBJECTS:
CL_GUI_ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY.
It does NOT work using the "old" REUSE_ALV_GRID_DISPLAY.
So has anyone succeeded modifying the graphics popup with this function module?
And second:
IF I use the mentioned ABAP OBJECTS solution, how can I put line feeds in the title?
It works manually, if I change the title after the popup has appeared by rightclicking
in it, but how can I set a title with more than one line already on popup of the graphic?
Thanks a lot for your answers.
Regards,
Hartmut

If anyone else is interested:
SAP resolved an error in the coding,
now the IT_ALV_GRAPHICS can also be used
in REUSE_ALV_GRID_DISPLAY.
As for the line feed:
Use the constant
cl_abap_char_utilities=>cr_lf
in the CONCATENATE command.

Similar Messages

  • About filter in alv grid display

    Hi,
       I am practicing on REUSE_ALV_GRID_DISPLAY in that i want to know about how to use some fields like
       *ITFILTER*_
       IT_ALV_GRAPHICS
       IT_HYPERLINK
       IT_ADD_FIELDCAT
       IT_EXCEPT_QINFO

    Hi Rock.
    I would like to suggest you a couple of references which quite relate to your case,
    REUSE_ALV_GRID_DISPLAY -  Output of a simple list (single-line)
    [SDN - Reference for Using REUSE_ALV_GRID_DISPLAY - Basic Program|alv prog;
    [SDN - Reference for Use of IT_FILTER in REUSE_ALV_GRID_DISPLAY |Doubts in ALV?;
    [SDN - Reference for use of IT_FILTER with CODE in REUSE_ALV_GRID_DISPLAY|ALV Report;
    [SDN - Refernce for Using IT_ALV_GRAPHICS in REUSE_ALV_GRID_DISPLAY|OOPs :  SAVE and ALV Display Variant;
    [SDN - Reference for Editing a graph in ALV (IT_ALV_GRAPHICS) using REUSE_ALV_GRID_DISPLAY|Edit Graph display ALV list display;
    [SDN - Reference for use of IT_HYPERLINK in REUSE_ALV_GRID_DISPLAY|editable fields on ALV grid;
    [SDN - Reference including example of IT_ADD_FIELDCAT in REUSE_ALV_GRID_DISPLAY|building top of page in ALV list;
    [SDN - Reference for scenario for use of IT_EXCEPT_QINFO in REUSE_ALV_GRID_DISPLAY|Background ID in ALV Grid;
    [SDN - Reference for application example of IT_EXCEPT_QINFO in REUSE_ALV_GRID_DISPLAY|PF Status in ALV list.;
    Hope That's Usefull.
    Good Luck & Regards.
    Harsh Dave

  • Button in ALV toolbar with REUSE_ALV_GRID_DISPLAY

    Hello friends,
    I am Displaying ALV using REUSE_ALV_GRID_IDSPLAY. i need to add a button in grid toolbar.
    i am doing it by adding a new ZSTATUS in  SET PF_STATUS. but the problem is that it is removing the standard buttons.
    i want to add button without removing the standard butttons.
    Please help.
    thanx in advance.
    Krishan Kumar

    hai friends.......
                       i had tried to add custom button to the reuse_alv_grid_display.please send  the coding...
    REPORT  ZHAJI_SAMPLE.
    tables:lfa1.
    TYPE-POOLS : slis.
    SELECT-OPTIONS: lifnr FOR lfa1-lifnr.
    types:begin of fs,
          flag type c,
          lifnr type lfa1-lifnr,
          land1 type lfa1-land1,
          name1 type lfa1-name1,
          end of fs.
    data: itab type table of fs,
          wa type fs.
    data: fcat type slis_t_fieldcat_alv,
          fcat1 type slis_fieldcat_alv.
    data: rt_extab type slis_t_extab.
    *CONSTANTS : c_check(1) VALUE 'X'.
    select lifnr land1 name1 from lfa1 into corresponding FIELDS OF table
    itab where lifnr IN
    lifnr.
    perform sub.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = 'sy-repid'
       I_CALLBACK_PF_STATUS_SET           = 'PF'
      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                      = 'vendor details'
      I_GRID_SETTINGS                   =
    IS_LAYOUT                         = LAYOUT
       IT_FIELDCAT                       = fcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
    IT_EVENTS                         = I_EVENT
      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                          = itab
    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.
    form sub.
    fcat1-fieldname = 'FLAG'.
    fcat1-tabname = 'TAB'.
    *fcat1-COL_POS = 1.
    fcat1-checkbox = 'X'.
    fcat1-edit         = 'X'.
    append fcat1 to fcat.
    CLEAR FCAT1.
    fcat1-fieldname = 'LIFNR'.
    fcat1-ref_tabname = 'LFA1'.
    fcat1-ref_fieldname = 'LIFNR'.
    FCAT1-outputlen = 10.
    append fcat1 to fcat.
    CLEAR FCAT1.
    fcat1-fieldname = 'NAME1'.
    fcat1-ref_tabname = 'LFA1'.
    fcat1-ref_fieldname = 'NAME1'.
    append fcat1 to fcat.
    CLEAR FCAT1.
    fcat1-fieldname = 'LAND1'.
    fcat1-ref_tabname = 'LFA1'.
    fcat1-ref_fieldname = 'LAND1'.
    append fcat1 to fcat.
    CLEAR FCAT1.
    endform.
    form PF USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZHAJI_P1' .
    ENDFORM.
    just give the fine coding

  • FM REUSE_ALV_GRID_DISPLAY - runtime error

    I get the following error when I use FM REUSE_ALV_GRID_DISPLAY:
    "Field catalog not found".
    I realize that it is looking for the parameter it_fieldcat but I don't remember ever passing that parameter before; it also says that it is optional.  Below is my call to the FM.  Does the addition of it_sort mean that I must pass it_fieldcat?
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
    *     I_CALLBACK_PROGRAM                = ' '
    *     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                       = it_fieldcat
    *     IT_EXCLUDING                      =
    *     IT_SPECIAL_GROUPS                 =
             it_sort                           = it_sort
    *     IT_FILTER                         =
    *     IS_SEL_HIDE                       =
    *     I_DEFAULT                         = 'X'
    *     I_SAVE                            = ' '
    *     IS_VARIANT                        =
    *     IT_EVENTS                         =
    *     IT_EVENT_EXIT                     =
    *       is_print                          = 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                          = it_out
    *   EXCEPTIONS
    *     PROGRAM_ERROR                     = 1
    *     OTHERS                            = 2
    Davis

    Davis,
    I dont know how much it will be of help to you. But this is how I used in one of my programs.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_BACKGROUND_ID         = 'ALV_BACKGROUND'
                I_CALLBACK_PROGRAM      = G_REPID
    *            I_STRUCTURE_NAME        = 'SFLIGHT'
                IS_LAYOUT               = GS_LAYOUT
                IT_FIELDCAT             = f_cat[]
    *           IT_EXCLUDING            =
    *            IT_SPECIAL_GROUPS       = GT_SP_GROUP[]
    *            IT_SORT                 = GT_SORT[]
    *           IT_FILTER               =
    *           IS_SEL_HIDE             =
    *           i_default               = g_default
                I_SAVE                  = G_SAVE
                IS_VARIANT              = G_VARIANT
                IT_EVENTS               = GT_xEVENTS
    *           IT_EVENT_EXIT           =
    *            IS_PRINT                = GS_PRINT
    *           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 =
           TABLES
                T_OUTTAB                = bestand.
    Regards
    Aneesh.

  • How to SUM in REUSE_ALV_GRID_DISPLAY ?

    Hi,
    I have below the code that I use to sort 1 column and sum 3 columns;
    PERFORM sort_item USING 'ARBPL' 'X' 'X'.
    PERFORM sum_item USING 'NO_OPR' 'X' 'X'.
    PERFORM sum_item USING 'LMNGA' 'X' 'X'.
    PERFORM sum_item USING 'QTY_MTRS' 'X' 'X'.
    FORM sort_item USING fieldname up subtot.
      DATA: ls_sort TYPE slis_sortinfo_alv .
      CLEAR ls_sort.
      ls_sort-fieldname = fieldname.
      ls_sort-up        = up.
      ls_sort-subtot    = subtot.
      APPEND ls_sort TO g_sort.
    ENDFORM.
    FORM sum_item USING fieldname group subtot.
      DATA: ls_sum TYPE slis_sortinfo_alv .
      CLEAR ls_sum.
      ls_sum-fieldname = fieldname.
      ls_sum-group     = group.
      ls_sum-subtot    = subtot.
      APPEND ls_sum TO g_sort.
    ENDFORM.
    The g_sort is attached to the REUSE_ALV_GRID_DISPLAY as follows;
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
        I_CALLBACK_PROGRAM                = ' '
        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                         = g_layout
          IT_FIELDCAT                       = g_fieldcat
        IT_EXCLUDING                      =
        IT_SPECIAL_GROUPS                 =
          IT_SORT                           = g_sort
        IT_FILTER                         =
        IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
          I_SAVE                            = 'U'
          IS_VARIANT                        = ls_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                          = ittab
        EXCEPTIONS
          PROGRAM_ERROR                     = 1
          OTHERS                            = 2.
    The 1st column get sorted but sum does not work at all, why?
    Thanks,
    Kishan

    For that particular field in the field catalog, please try adding this line when building the catalog.
    i_fieldcat-datatype   = 'QUAN'.
    or try this
    *& Form DEFINE_LAYOUT
    text
    FORM DEFINE_LAYOUT.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL SUM'.
    LAYOUT-WINDOW_TITLEBAR = 'EXERCISE 2'.
    LAYOUT-TOTALS_TEXT = 'TOTAL'.
    ENDFORM. "DEFINE_LAYOUT
    *& Form SORT_LIST
    text
    FORM SORT_LIST.
    WA_SORT-FIELDNAME = 'VBELN'.
    WA_SORT-TABNAME = 'IT_VBAK'.
    WA_SORT-SPOS = 1.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    CLEAR WA_SORT.
    WA_SORT-FIELDNAME = 'NETWR'.
    WA_SORT-TABNAME = 'IT_VBAK'.
    WA_SORT-UP = 'X'.
    WA_SORT-SPOS = 2.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO IT_SORT.
    CLEAR WA_SORT.
    ENDFORM. "SORT_LIST&----
    *& Form LIST_DISP
    text
    FORM LIST_DISP.
    PERFORM DEFINE_LAYOUT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IT_FIELDCAT = IT_FIELDCAT
    IS_LAYOUT = LAYOUT
    IT_SORT = IT_SORT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    IT_EXCLUDING = I_FCODE_EXTAB
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_EVENTS = IT_EVENTS[]
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBAK
    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. "LIST_DISP
    *& Form GRID_DISP
    text
    FORM GRID_DISP.
    PERFORM DEFINE_LAYOUT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    IT_SORT = IT_SORT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    IT_EXCLUDING = I_FCODE_EXTAB
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_EVENTS = IT_EVENTS[]
    TABLES
    T_OUTTAB = IT_VBAK.
    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. "GRID_DISP

  • How to use 'I_CALLBACK_PF_STATUS_SET' in REUSE_ALV_GRID_DISPLAY FM

    I am using REUSE_ALV_GRID_DISPLAY function module
    I want to use I_CALLBACK_PF_STATUS_SET' that field & show menu bar which I create but it's not showing that menu bar?
    I am using following coding :
    Please guide me..............
    DOWNLOAD = 'MM'.
       SET PF-STATUS 'MM'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = 'ZVR_INEX'
         I_CALLBACK_PF_STATUS_SET          = DOWNLOAD
         I_CALLBACK_USER_COMMAND           = 'HANDLE_USER_COMMAND'(005)
      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                       = FIELDCAT_T
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      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                          = I_VBPA
    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.

    HI,
    see this example.
    REPORT ZBHALV_LIST1.
    TABLES:MARA.
    SELECT-OPTIONS: MATNR FOR MARA-MATNR.
    DATA:BEGIN OF ITAB OCCURS 0,
         MATNR LIKE MARA-MATNR,
         ERSDA LIKE MARA-ERSDA,
         MTART LIKE MARA-MTART,
         MBRSH LIKE MARA-MBRSH,
    END OF ITAB.
    SELECT * FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE MATNR
    IN MATNR.
    TYPE-POOLS SLIS.
    DATA:FCAT TYPE slis_t_fieldcat_alv.
    DATA:LAYOUT TYPE slis_layout_alv.
    DATA:EVE TYPE slis_t_event WITH HEADER LINE.
    DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SORT-UP = 'X'.
    SORT-SPOS = 1.
    SORT-FIELDNAME = 'ERSDA'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    SORT-SPOS = 2.
    SORT-FIELDNAME = 'MTART'.
    SORT-tabname = 'MARA'.
    APPEND SORT.
    EVE-NAME = 'TOP_OF_PAGE'.
    EVE-FORM = 'TOPOFPAGE'.
    APPEND EVE.
    EVE-NAME = 'TOP_OF_LIST'.
    EVE-FORM = 'TOPOFLIST'.
    APPEND EVE.
    EVE-NAME = 'END_OF_LIST'.
    EVE-FORM = 'ENDOFLIST'.
    APPEND EVE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-no_hline = 'X'.
    LAYOUT-NO_VLINE = 'X'.
    LAYOUT-window_titlebar = 'MATERIAL DETAILS'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_INTERNAL_TABNAME           = 'ITAB'
      I_STRUCTURE_NAME             =
      I_CLIENT_NEVER_DISPLAY       = 'X'
       I_INCLNAME                   = SY-REPID
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = FCAT
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_ERROR                = 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_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = SY-REPID
    <b>   I_CALLBACK_PF_STATUS_SET       = 'STATUS'</b>
       I_CALLBACK_USER_COMMAND        = 'UCOMM'
      I_STRUCTURE_NAME               =
       IS_LAYOUT                      = LAYOUT
       IT_FIELDCAT                    = FCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       IT_SORT                        = SORT[]
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = EVE[]
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 5
      I_SCREEN_START_LINE            = 5
      I_SCREEN_END_COLUMN            = 120
      I_SCREEN_END_LINE              = 25
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = ITAB
    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.
    FORM TOPOFPAGE.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM TOPOFLIST.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS-LISTTOP'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    FORM ENDOFLIST.
    REFRESH HEAD.
        HEAD-TYP = 'H'.
        HEAD-INFO = 'MATERIALS-LISTEND'.
        APPEND HEAD.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = HEAD[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
    ENDFORM.
    <b>FORM STATUS USING MYMENU.
    *here MYMENU is the excluding buttons list
        SET PF-STATUS 'MENU' excluding MYMENU.
    ENDFORM.</b>
    FORM UCOMM USING CODE STEXT.
        CASE CODE.
            WHEN 'ABC'.
            WRITE:/ 'YOU HAVE CLICKED ON ABC'.
            WHEN 'XYZ'.
            WRITE:/ 'YOU HAVE CLICKED ON XYZ'.
        ENDCASE.
    ENDFORM.
    rgds,
    bharat.

  • Drop down in REUSE_ALV_GRID_DISPLAY

    Hi,
    I am using REUSE_ALV_GRID_DISPLAY function module,
    I am facing a problem with drop down list used for the fields that are displayed in ALV.
    To get the search help or drop down for the field I am using the below code in field catalogue.
      wa_p_i_fieldcat_alv-fieldname = 'VBTYP'.
      wa_p_i_fieldcat_alv-ddictxt = 'M'.
      wa_p_i_fieldcat_alv-seltext_m = 'VBTYP' .
      wa_p_i_fieldcat_alv-seltext_l = wa_p_i_fieldcat_alv-seltext_s  =  wa_p_i_fieldcat_alv-seltext_m.
      wa_p_i_fieldcat_alv-reptext_ddic = wa_p_i_fieldcat_alv-seltext_s.
      wa_p_i_fieldcat_alv-ddic_outputlen = 1 .
      wa_p_i_fieldcat_alv-col_pos    = 4.
      wa_p_i_fieldcat_alv-edit = 'X'.
    wa_p_i_fieldcat_alv-ref_fieldname  = 'VBTYP' .
      wa_p_i_fieldcat_alv-ref_tabname = 'ZVBOOKING'.
      APPEND wa_p_i_fieldcat_alv TO p_i_fieldcat_alv.
    But for the field VBTYP the values are maintained in domain level  value range.
    So when I enter any value in the field 'VBTYP' and save the value, and try to deleted that value, FM is poping me an error message 'Enter an valid value', which should not happen, since its not a mandatory field in ZVBOOKING table.
    Please any one guide me how to over come it.
    Correct answer, points will be rewarded.
    Regards,
    Nithya

    check this sample program this will help you
    *& Report  Z_PRA_16                                                     *
    *&                classical & alv with  header line                                                     *
    REPORT  z_pra_16   NO STANDARD PAGE HEADING
          LINE-COUNT 20 " no of records in a single page
          LINE-SIZE 100."no of colons in a page.
    DECLARING STRUCTURE.
    TYPES:
          BEGIN OF type_wa,
            carrid LIKE sflight-carrid,
            connid LIKE sflight-connid,
            fldate LIKE sflight-fldate,
            price LIKE sflight-price,
            currancy LIKE sflight-currency,
            seatsmax LIKE sflight-seatsmax,
            seatsocc LIKE sflight-seatsocc,
            carrname LIKE scarr-carrname,
          END OF type_wa.
    FOR TYPE DECLARING INTERNAL TABLE
    DATA :
            wa TYPE type_wa,
            itab TYPE STANDARD TABLE OF type_wa.
    *For selection option
    DATA:    pp TYPE sflight-carrid,
              pp1 TYPE sflight-connid,
              pp2 TYPE sflight-price.
    DECLARING SELECTION BLOCK.
    SELECTION-SCREEN BEGIN OF BLOCK pra WITH FRAME TITLE text-001.
    Declaring selection options IN SELECTION.
    SELECT-OPTIONS :
                    s_carrid FOR pp,                    " declaring variables from table pp.
                    s_connid FOR pp1,                   " declaring variables from table pp1.
                    s_fldate FOR sy-datum,              " declaring variables from table .
                    s_price FOR pp2.                    " declaring variables from table pp2.
    SELECTION-SCREEN END OF BLOCK pra.
    PARAMETERS:
                alv   TYPE c RADIOBUTTON GROUP g1,        " option for selecting ALV REPORT
                class TYPE c RADIOBUTTON GROUP g1.        " option for selecting CLASSICL REPORT
    **FOR CARRID MESSAGE GIVING CONDITION FOR A FIELD
    AT SELECTION-SCREEN ON s_carrid.
      SELECT SINGLE
              carrid INTO s_carrid
      FROM sflight
      WHERE carrid IN s_carrid.
      IF sy-subrc <> 0 .
        MESSAGE i000(zp).                        " message for information
        MESSAGE w000(zp).                        " message for warringing
      ENDIF.
    for connid MESSAGE
    AT SELECTION-SCREEN ON s_connid.
      SELECT SINGLE
              carrid INTO s_connid
      FROM sflight
      WHERE connid IN s_connid.
      IF sy-subrc <> 0 .
        MESSAGE i001(zp).
        MESSAGE w001(zp).
      ENDIF.
    FOR DATE MESSAGE
    AT SELECTION-SCREEN ON s_fldate.
      SELECT SINGLE
              carrid INTO s_fldate
      FROM sflight
      WHERE fldate IN s_fldate.
      IF sy-subrc <> 0 .
        MESSAGE i002(zp).
        MESSAGE w002(zp).
      ENDIF.
    START-OF-SELECTION.
      IF class = 'X'.                          " FOR CLASSICAL REPORT OPTION.
        PERFORM kumar.                        " SUBROUTINE for select statement fetching data.
    Getting output.
        LOOP AT itab INTO wa.
          WRITE: /
                      wa-carrid,
                      10 wa-carrname,
                      30 wa-connid,
                      40 wa-fldate,
                      55 wa-price LEFT-JUSTIFIED,
                      70 wa-currancy,
                      75 wa-seatsmax,
                      90 wa-seatsocc.
        ENDLOOP.
        FORMAT COLOR OFF.  "SCREEN COLOR
        CLEAR itab.
      ENDIF.
    TOP-OF-PAGE. "
      FORMAT COLOR 1.
      WRITE: / 'Page ', syst-pagno,'REPORT NAME', sy-repid,'Date / time',
                syst-datum, syst-uzeit.
      SKIP.
      WRITE: /
                   text-010,                        " FOR CARRID
                 15 text-008,                       " FOR CARRNAME
                 30 text-002,                        "CONNID
                 40 text-003,                       "FLDATE
                 55 text-004,                         "PRICE
                 70 text-005,                       "CURRENCY
                 80 text-006,                       "SEATSMAX
                 90 text-007.                       "SEATSCONN
      FORMAT COLOR OFF.
      ULINE.
    FOR ALV OPTION
    START-OF-SELECTION.
      IF alv = 'X'.                       "FOR ALV REPORT OPTION.
        TYPE-POOLS: slis.                  " declaring slis.
    DATA:
          gt_fieldcat      TYPE slis_t_fieldcat_alv.
                                          " declaring  field catalog with internal table
        PERFORM kumar.                  "for select statement fetching data
        PERFORM praveen.                " subroutine
    DATA :     prahead TYPE slis_t_listheader,
                              " DECLARING INTERNAL TABLE FOR HEADER FROM SLIS
               praevent TYPE slis_t_event.
                               " DECLARING INTERNAL TABLE FOR EVENT FROM SLIS
    CONSTANTS: praconst(30) TYPE c VALUE 'TOP_OF_PAGE'.
        PERFORM pra. "  DECLARING SUBROUTIN FOR HEADER
    *CALLING FUNCTIONAL MODULE
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
           i_callback_program                = sy-repid       " FOR PROGRAM NAME
      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                       =  gt_fieldcat   "FOR FIELD CATAGORI
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
       it_events                         = praevent         " FOR 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                          = itab       " declaring slfight,scarr in itab
         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.
      ENDIF.
    *&      Form  praveen
          text
    -->  p1        text
    <--  p2        text
    FORM praveen .                             " subroutine
      DATA: pra TYPE slis_fieldcat_alv.         " declaring structure from slis table.
      CLEAR pra.                                " cleaing structure
      pra-fieldname   =   'CARRID'.                " declaring field name for carrid
      pra-tabname     =   'ITAB'.
      pra-seltext_m   =   'CARRID'.                " declaring field heading
      APPEND pra TO gt_fieldcat.
      CLEAR pra.
      pra-fieldname   =   'CONNID'.
      pra-tabname     =   'ITAB'.
      pra-seltext_m   =   'CONNID'.
      APPEND pra TO gt_fieldcat.
      CLEAR pra.
      pra-fieldname   = 'FLDATE'.
      pra-tabname     = 'ITAB'.
      pra-seltext_m   = 'FLDATE'.
      APPEND pra TO gt_fieldcat.
      CLEAR pra.
      pra-fieldname   = 'PRICE'.
      pra-tabname     = 'ITAB'.
      pra-seltext_m   = 'PRICE'.
      APPEND pra TO gt_fieldcat.
      CLEAR pra.
      pra-fieldname   = 'CURRANCY'.
      pra-tabname     = 'ITAB'.
      pra-seltext_m   = 'CURRENCY'.
      APPEND pra TO gt_fieldcat.
    ENDFORM.                    " praveen
    *&      Form  kumar
          text
    -->  p1        text
    <--  p2        text
    FOR FETCHING DATA TO RE-USE.'SUBROUTINE'
    FORM kumar .
      SELECT
                         a~carrid
                         a~connid
                         a~fldate
                         a~price
                         a~currency
                         a~seatsmax
                         a~seatsocc
                         b~carrname
                              INTO TABLE itab
                              FROM
                                  sflight AS a
                              INNER JOIN
                                  scarr AS b
                               ON
                                  acarrid = bcarrid
                      WHERE
                             a~fldate IN s_fldate
                      AND
                             a~carrid IN s_carrid
                      AND
                             a~price IN s_price.
      FORMAT COLOR 5. "adding color
    ENDFORM.                    " kumar
    *&      Form  pra
          text
    -->  p1        text
    <--  p2        text
    FOR HEADER
    FORM pra .
      DATA : praeventstr TYPE slis_alv_event,         "DECLARING EVENT STRCTURE
             praheadstr TYPE slis_listheader.         " DECLARING HEADER STRUCRTUE
      praheadstr-typ = 'H'(009).                           " TYP ='H' THIS IS FOR HEADING SAP-DEFAULT
      praheadstr-info = text-025.                     " INFORMATATION
      APPEND praheadstr TO prahead.                   " STRUCTUCTURE TO INTERNAL TABLE
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'           " CALLING EVENTS
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = praevent            " DECLARING 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.
      " EVENTS TO STRUCTURE
      READ TABLE praevent WITH KEY
                              name = slis_ev_top_of_page
                              INTO praeventstr.
      MOVE praconst TO praeventstr-form. " MOVING CONSTRANT TO STRYCTUE
      APPEND praeventstr TO praevent.    " STRUCTURE TO EVENTS
    ENDFORM.                    " pra
    *CALLING FUNCTIONAL MODUL FOR HEADER
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = prahead.
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE

  • EDIT_MODE in REUSE_ALV_GRID_DISPLAY

    Hi everybody.
    I am calling FM REUSE_ALV_GRID_DISPLAY to display certain data in an ALV grid. Some of the fields are supposed to be editable, so I modify the field catalogue accordingly (fieldcat-edit = 'X'). Since I want to edit some of the grid data I set the LAYOUT structure fields EDIT to 'X' and EDIT_MODE to ' ', respectively.
    Now I have two problems:
    The first problem is that all fields are editable, not just the ones I set fieldcat-edit = 'X' for. Even those with fieldcat-edit = ' ' are editable.
    The second problem is that the internal table isn't always updated when I change the data in the ALV grid. I enter new text in one of the fields, but the internal table is changed only when I press the enter key or do some other stuff that causes a PAI (at least that's what I think). When I press 'SAVE' whithout hitting enter before, the data isn't updatet at all!!!
    Is there a solution to this problem? Do I have to set the parameters EDIT or EDIT_MODE of the LAYOUT structure to any magic values before alling REUSE... ?
    Any comments?
    Regards, Joerg

    Hi, 
    See the following line in the below code,
    line_fieldcat-edit      = 'X'.  This is the way how u shld make the field editable.
    REPORT zsomalv3 NO STANDARD PAGE HEADING.
    TYPE-POOLS: slis.
    DATA: BEGIN OF i_data OCCURS 0,
            qmnum      LIKE qmel-qmnum,
            qmart      LIKE qmel-qmart,
            qmtxt      LIKE qmel-qmtxt,
            ws_row     TYPE i,
            ws_char(5) TYPE c,
            chk,
          END OF i_data.
    DATA: report_id  LIKE sy-repid.
    DATA: ws_title   TYPE lvc_title VALUE 'An ALV Report'.
    DATA: i_layout   TYPE slis_layout_alv.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    SELECT qmnum
           qmart
           qmtxt
           INTO TABLE i_data
           FROM qmel
           WHERE qmnum <= '00030000010'.
    LOOP AT i_data.
      i_data-ws_row = sy-tabix.
      i_data-ws_char = 'AAAAA'.
      MODIFY i_data.
    ENDLOOP.
    report_id = sy-repid.
    PERFORM f1000_layout_init CHANGING i_layout.
    PERFORM f2000_fieldcat_init CHANGING i_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                =
    *   I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = report_id
    *   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                      = ws_title
    *   I_GRID_SETTINGS                   =
       is_layout                         = i_layout
       it_fieldcat                       = i_fieldcat
    *   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
    *   IT_ALV_GRAPHICS                   =
    *   IT_ADD_FIELDCAT                   =
    *   IT_HYPERLINK                      =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = i_data
    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.
    *&      Form  F1000_Layout_Init
    FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.
      CLEAR i_layout.
      i_layout-colwidth_optimize = 'X'.
      i_layout-edit = 'X'.
    ENDFORM.                    " F1000_Layout_Init
    *&      Form  f2000_fieldcat_init
    FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: line_fieldcat TYPE slis_fieldcat_alv.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'QMNUM'.    
      line_fieldcat-tabname   = 'I_DATA'.   
      line_fieldcat-key       = 'X'. 
      line_fieldcat-seltext_m = 'Notification No.'.
      APPEND line_fieldcat TO i_fieldcat.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'QMART'.
      line_fieldcat-ref_tabname = 'I_DATA'.
      line_fieldcat-hotspot = 'X'.          
      line_fieldcat-seltext_m = 'Notif Type'.
      APPEND line_fieldcat TO i_fieldcat.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'QMTXT'.
      line_fieldcat-tabname   = 'I_DATA'.
      line_fieldcat-seltext_m = 'Description'.
      APPEND line_fieldcat TO i_fieldcat.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'WS_ROW'.
      line_fieldcat-tabname   = 'I_DATA'.
      line_fieldcat-seltext_m = 'Row Number'.
      APPEND line_fieldcat TO i_fieldcat.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'WS_CHAR'.
      line_fieldcat-tabname   = 'I_DATA'.
      line_fieldcat-seltext_l = 'Test Character Field'.
      line_fieldcat-datatype  = 'CHAR'.
      line_fieldcat-outputlen = '15'.
      APPEND line_fieldcat TO i_fieldcat.
      CLEAR line_fieldcat.
      line_fieldcat-fieldname = 'CHK'.
      line_fieldcat-tabname   = 'I_DATA'.
      line_fieldcat-seltext_l = 'Checkbox'.
      line_fieldcat-checkbox  = 'X'.    
      line_fieldcat-edit      = 'X'.    
      APPEND line_fieldcat TO i_fieldcat.
    ENDFORM.                    " f2000_fieldcat_init
    Regs,
    Venkat

  • Problems displaying itab with 'REUSE_ALV_GRID_DISPLAY'

    Hi experts!
    I have a problem displaying the internal table itab_test. Itab_uload is a TYPE TABLE of a complex and nested structure I defined in the DDIC. I am able to pass the entries, which are not conform with the specifications, to itab_test, but when I execute the program I get a short dump.
    Error message is:" It was tried to pass the internal table IT_FIELDCAT to the formal parameter IT_FIELDCAT. In doing so, a ^type conflict occured between the formal and the actual parameter."
    Can anybody please advise on the code-sample below. What did I wrong and what can I do to correct it?
    Thanks a lot for your help!
    Johann
    P.S.:Points will be rewarded for helpful answers!
    *&          DECLARATIONS
    TYPES: BEGIN OF error_test,
           oz TYPE c,
           bez TYPE c,
           END OF error_test.
    DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
          itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
    DATA: wa_upload TYPE zstr_gaeb,
          wa_lvbereich TYPE zstr_lvbereich,
          wa_bereichdeslv TYPE zstr_bereichdeslv,
          wa_beschreibung TYPE zstr_lvbeschreibung,
          wa_position TYPE zstr_position.
    DATA :      it_fieldcat TYPE lvc_t_fcat,
              wa_fieldcat LIKE LINE OF it_fieldcat,
              wrk_pos TYPE i.      
    *&           START OF SELECTION
    START-OF-SELECTION.
    LOOP AT itab_upload INTO wa_upload.
        LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
          oz_len = STRLEN( wa_lvbereich-oz ).
          IF oz_len <> 3.
            MOVE wa_lvbereich-oz TO itab_test-oz.
            MOVE wa_lvbereich-bez TO itab_test-bez.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'oz'.
      wa_fieldcat-seltext = 'Ordnungszahl'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'bez'.
      wa_fieldcat-seltext = 'Bezeichnung'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = ''.
      APPEND wa_fieldcat TO it_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      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                       = it_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      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_test
    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.

    Hello,
    Make the change like this
      DATA: L_R_REPID LIKE SY-REPID.
      L_R_REPID = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = L_R_REPID " CHeck here
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    * I_CALLBACK_PROGRAM = ' '
    * 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 = it_fieldcat
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    * IT_SORT =
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    * I_SAVE = ' '
    * 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_test
    * 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.
    VAsanth

  • Problem displaying itab with reuse_alv_grid_display

    Hi experts!
    I passed non-conform entries from itab_upload to itab_test. I do not find any syntax error and I do not get a short dump, but the table which appears on the screen does not contain any data, but empty columns ( with the right title ). I also tried it with reuse_alv_list_display, but the in the fields of the list is written: no data.
    I checked with the debugger and itab_test contains the data when it is passed to the Function...
    Can you please advise me where I did wrong?
    Below you will find the code.
    Thanks a lot for your help!
    Johann
    P.S.:Points will be rewarded for helpful answers!
    *& DECLARATIONS
    TYPE-POOLS: slis.
    TYPES: BEGIN OF error_test,
    oz(255) TYPE c,
    bez(255) TYPE c,
    END OF error_test.
    DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
    itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
    DATA: wa_upload TYPE zstr_gaeb,
    wa_lvbereich TYPE zstr_lvbereich,
    wa_bereichdeslv TYPE zstr_bereichdeslv,
    wa_beschreibung TYPE zstr_lvbeschreibung,
    wa_position TYPE zstr_position.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fieldcat LIKE LINE OF it_fieldcat,
    wrk_pos TYPE i.
    *& START OF SELECTION
    START-OF-SELECTION.
    LOOP AT itab_upload INTO wa_upload.
    LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
    oz_len = STRLEN( wa_lvbereich-oz ).
    IF oz_len <> 3.
    MOVE wa_lvbereich-oz TO itab_test-oz.
    MOVE wa_lvbereich-bez TO itab_test-bez.
    ENDIF.
    ENDLOOP.
    ENDLOOP.
    CLEAR wa_fieldcat.
    wrk_pos = wrk_pos + 1.
    wa_fieldcat-col_pos = wrk_pos.
    wa_fieldcat-tabname = 'ITAB_TEST'.
    wa_fieldcat-fieldname = 'oz'.
    wa_fieldcat-seltext = 'Ordnungszahl'.
    wa_fieldcat-emphasize = ''.
    wa_fieldcat-hotspot = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wrk_pos = wrk_pos + 1.
    wa_fieldcat-col_pos = wrk_pos.
    wa_fieldcat-tabname = 'ITAB_TEST'.
    wa_fieldcat-fieldname = 'bez'.
    wa_fieldcat-seltext = 'Bezeichnung'.
    wa_fieldcat-emphasize = ''.
    wa_fieldcat-hotspot = ''.
    APPEND wa_fieldcat TO it_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = l_r_repid
    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 = it_fieldcat
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    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_test
    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.

    Hello,
    The problem is here.
    Firsdt
    " First check her.
    LOOP AT itab_upload INTO wa_upload.
    LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
    oz_len = STRLEN( wa_lvbereich-oz ).
    IF oz_len <> 3.
    MOVE wa_lvbereich-oz TO itab_test-oz.
    MOVE wa_lvbereich-bez TO itab_test-bez.
    APPEND ITAB_TEST.  " The table is not appended
    ENDIF.
    ENDLOOP.
    ENDLOOP.
    "Give the fieldname in UPPER CASE
    CLEAR wa_fieldcat.
    wrk_pos = wrk_pos + 1.
    wa_fieldcat-col_pos = wrk_pos.
    wa_fieldcat-tabname = 'ITAB_TEST'.
    wa_fieldcat-fieldname = 'OZ'.  " Check here
    wa_fieldcat-seltext = 'Ordnungszahl'.
    wa_fieldcat-emphasize = ''.
    wa_fieldcat-hotspot = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
    CLEAR wa_fieldcat.
    wrk_pos = wrk_pos + 1.
    wa_fieldcat-col_pos = wrk_pos.
    wa_fieldcat-tabname = 'ITAB_TEST'.
    wa_fieldcat-fieldname = 'BEZ'.  " Check here
    wa_fieldcat-seltext = 'Bezeichnung'.
    wa_fieldcat-emphasize = ''.
    wa_fieldcat-hotspot = ''.
    APPEND wa_fieldcat TO it_fieldcat.
    If useful reward.
    Vasanth

  • GETWA_NOT_ASSIGNED  error occured when using FM  REUSE_ALV_GRID_DISPLAY

    Hi All,
    I am using the Fm REUSE_ALV_GRID_DISPLAY to display output in the ALV grid.
    I am getting the following error
    "Field symbol has not yet been assigned."
    Error analysis                                                                  
        You attempted to access an unassigned field symbol                          
        (data segment 32820).                                                                               
    This error may occur for any of the following reasons:                      
        - You address a typed field symbol before it is set using ASSIGN            
        - You address a field symbol that points to a line in an internal table     
          that has been deleted                                                     
        - You address a field symbol that had previously been reset using           
          UNASSIGN, or that pointed to a local field that no longer exists          
        - You address a global function interface parameter, even                   
          though the relevant function module is not active,                        
          that is it is not in the list of active calls. You can get the list       
          of active calls from the this short dump.                                                                               
    I used the Fm as :
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
         I_BYPASSING_BUFFER                = 'X'
         I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = sy-repid
        I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = '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                         = t_layout
         IT_FIELDCAT                       = ls_slis_fieldcat
        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                          = gt_output
       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.
    Any help on this would be appreciated,
    Thanks in advance.
    Sharat.

    This is the error i get when i try to read the input data entered on the ALV grid. The code shown is from the class cl_gui_alv_grid.
    183           translate ls_cells_temp-value to upper case.   "#EC TRANSLANG
    184           assign ls_cells_temp-value to <l_currency>.
    185         else.
    186           assign ls_cells_temp-value to <l_currency>.
    187           clear <l_currency>.
    188         endif.
    189         if <l_currency> is initial.
    190           assign component ls_fieldcat-qfieldname
    191                            of structure <ls_wa> to <l_currency>.
    192         endif.
    193         if <l_currency> is initial.
    194           assign ls_fieldcat-QUANTITY to <l_currency>.
    195           if sy-subrc ne 0.
    196             assign space to <l_currency>.
    197           endif.
    198         endif.
    199       endif.
    200     else.
    201       if not ls_fieldcat-currency is initial.
    202         assign ls_fieldcat-currency to <l_currency>.
    203       elseif not ls_fieldcat-quantity is initial.
    204         assign ls_fieldcat-quantity to <l_currency>.
    205       else.
    206         assign space to <l_currency>.
    207       endif.
    208     endif.
    209
    210 *   If field has not DDIC referencen
    211     if ls_fieldcat-ref_table is initial.
    212 *--   Formal field check without DDIC reference
    >>>>       call method me->formal_field_check_no_ddic
    214         exporting
    215           i_currency    = <l_currency>
    216           i_value       = ls_cells-value
    217           i_row_id      = ls_cells-row_id
    218           i_tabix       = l_tabix
    219           is_fieldcat   = ls_fieldcat
    220         importing
    221           eflg_invalid  = eflg_invalid
    222         changing
    223           c_field       = <l_field>
    224           ct_good_cells = et_good_cells
    225           ct_mod_cells  = et_mod_cells.
    226     else.
    227 *--   Formal field check with DDIC reference
    228       call method me->formal_field_check_ddic
    229         exporting
    230           i_currency    = <l_currency>
    231           i_value       = ls_cells-value
    232           i_row_id      = ls_cells-row_id

  • REUSE_ALV_GRID_DISPLAY - It doesn't work!!! ;(

    I have this part of code. Someone knows why is it doesn't work? I want to double click on the matnr.
    thanks a lot! ;(
    PD: When I double click, the break-point doesnt STOP.
    START-OF-SELECTION.
      select MATNR ERSDA
      from MARA
      into corresponding FIELDS of itab
      where ERSDA EQ p_date.
        append itab.
      endselect.
      PERFORM build_fcat USING it_fcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = 'STATUS'
          I_CALLBACK_USER_COMMAND         = '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                       = it_fcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
          IT_SORT                           = it_sort
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         = 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
      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                          = itab
    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.
      FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
                                                            SLIS_SELFIELD.
      break-point.
      case UCOMM.
        when '&IC1'.  "this is for double click.
          "do some thing.
    break-point.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

    You must pass the program name as the callback program.
    data: repid type sy-repid.
    repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
      I_CALLBACK_PROGRAM = REPID       "<--Right Here
    * I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    * I_CALLBACK_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_TOP_OF_PAGE = '
    Regards,
    Rich Heilman

  • REUSE_ALV_GRID_DISPLAY --- on - APO  /SCM 4.10

    Hi ,
    Though my requirement is simple, but not getting the desired output from 'REUSE_ALV_GRID_DISPLAY'  Function.
    I'm using this function for data display in Grid layout. but the default menu bar is get disturbed, though i have not set any PF-STATUS it is diplaying 'question marks''?' & EDIT button & then Question marks '?'.
    Has anyone faced this kind of display issue ( on SCM 4.10).
    Note : its working fine in R/3.
    snapshot of my code below.
    LS_LAYOUT-ZEBRA = 'X'.
      LS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = 'X'
          I_CALLBACK_PROGRAM                = 'YSNP_PDS'
         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                  = 'WA_PDS'
        I_BACKGROUND_ID                   = ' '
        I_GRID_TITLE                      =
        I_GRID_SETTINGS                   =
         IS_LAYOUT                         = LS_LAYOUT
          IT_FIELDCAT                       = IT_FIELDCAT
        IT_EXCLUDING                      =
        IT_SPECIAL_GROUPS                 =
        IT_SORT                           =
        IT_FILTER                         =
        IS_SEL_HIDE                       =
          I_DEFAULT                         = 'X'
          I_SAVE                            = 'X'
        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                          = IT_PDS
      EXCEPTIONS
        PROGRAM_ERROR                     = 1
        OTHERS                            = 2

    Hi kannan,
    it is the General Problem with the Grid.
    you need to do little manual work...
    Go to SE41 and Give the Program name <b>SAPLKKBL</b>
                            Status      <b>STANDARD</b>
    then click on Copy Status(CTRL+F6).
    then in the popup give your Program name and status .
    and copy the status and save & activate it .
    then go to your Program
    mention the Bold one for status
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        IS_LAYOUT                = L_LAYOUT
       <b> I_CALLBACK_PF_STATUS_SET = 'STATUS'</b>
        I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
        IT_FIELDCAT              = IT_FIELDCAT
        it_events                = it_events
    *    I_SCREEN_START_COLUMN    = 10
    *    I_SCREEN_START_LINE      = 1
    *    I_SCREEN_END_COLUMN      = 50
    *    I_SCREEN_END_LINE        = 20
      TABLES
        T_OUTTAB                 = ITAB
      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.
    then
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    *- Pf status which i copied from Standard Program
      SET PF-STATUS <b>'STATUS'</b> EXCLUDING P_EXTAB.
    ENDFORM.                 " STATUS
    then check your Program .....
    now they will come.../
    Regards
    vijay

  • Purpose of using parameters defined below in FM 'REUSE_ALV_GRID_DISPLAY'

    Hi,
    Iwant to know the purpose of using parameters defined below in FM   ''REUSE_ALV_GRID_DISPLAY'   :---
    EXPORTING.
      I_INTERFACE_CHECK                   =
      I_BYPASSING_BUFFER                =
      I_BUFFER_ACTIVE                        =
      IS_SEL_HIDE                                =
      IS_PRINT                                      =
      IS_REPREP_ID                             =
      I_SCREEN_START_COLUMN        =
      I_SCREEN_START_LINE               =
      I_SCREEN_END_COLUMN            =
      I_SCREEN_END_LINE                   =
      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       =
    small example codes are most welcome.
    Regards,
    Rahul

    <b>Go To SE37 AND Give the function module name and press Button 'FUnction Moudule Documentation' There you will get the documentation for each parameter</b>
    <b>* I_INTERFACE_CHECK =</b>
    Interface consistency check log output
    Description
    So that the performance of the list output is not reduced due to interface consistency checks, these checks are performed in a special call mode.
    If this parameter is set to 'X', interface consistency is checked when the function module is called and an error log is displayed.
    You should only set this parameter for testing purposes during the development process (for example, for debugging).
    You can also perform the interface check on the result list by entering function code &SOS.
    THIS PARAMETER IS CURRENTLY NOT SUPPORTED IN FULLSCREEN MODE! As a workaround, go to the print preview from within the list and enter function code &SOS there.
    Default
    SPACE
    <b>*IS_SEL_HIDE = </b>
    Description
    This parameter is currently not supported!
    Only relevant if layout parameter
    LAYOUT-GET_SELINFOS of IMPORTING structure IS_LAYOUT is set.
    Complex type for modifying information displayed on the selection dialog box:
    mode:              'R' = Only entries passed in internal table
                              IS_SEL_HIDE-T_ENTRIES are output on
                              the dialog box. Selection information
                              obtained by the list tool by reading the
                              selection screen again (only if the report
                              is called with selection screen) are
                              replaced by the entries passed.
                       'S' = The selection information obtained by the
                              list tool by reading the selection screen
                              of the calling report again, are modified
                              by the entries of table
                              IS_SEL_HIDE-T_ENTRIES.
    t_entries:         Table with selection information
    t_entries-mode:   'A' = Display selection information of the current
                             table row on the information dialog box.
                      'D' = Do not display selection information of the
                             the Select option or of parameter SELNAME
                             on the dialog box.
    t_entries-selname: (required only if t_entries-mode = 'D')
                       name of Select option or parameter
    The following table fields are only required if t_entries-mode = 'A'. They contain the selection information to be added.
    t_entries-field:  DDIC field name of the field for which selection
                       information is to be displayed
    t_entries-table:  DDIC table name of t_entries-field.
    t_entries-stext:  Field description on the information dialog box.
                      If t_entries-field and t_entries-table were
                      filled, this text is taken from the DDIC.
    t_entries-valuf:  Selection condition from-value (external format)
    t_entries-valut:  Selection condition to-value (external format)
    t_entries-sign0:  (I)nclusive (E)xclusive
    t_entries-optio:  All values of the option field of the Select
                      option are allowed.
    The remaining fields are used internally and are irrelevant to the caller.
    <b>* IS_PRINT =</b>
    Print information
    Description
    Control parameters relevant for printing
    PRINT
    Value range: SPACE, 'X'
    'X' = Print list and do not display it on the screen. Further settings can be made on the print parameter screen.
    NO_PRINT_SELINFOS
    Value range: SPACE, 'X'
    'X' = Do not print existing selection information (see also LAYOUT-GET_SELINFOS)
    NO_COVERPAGE
    Value range: SPACE, 'X'
    'X' = Print selection information and list status, if available, on a separate page.
    NO_NEW_PAGE
    Value range: SPACE, 'X'
    Internal use only
    RESERVE_LINES
    Value range: 0, n
    n = Number of lines output in the footer by the user during printout at END_OF_PAGE in the corresponding callback event.
    NO_PRINT_LISTINFOS
    Value range: SPACE, 'X'
    'X' = Do not print list status (sort information, subtotals information and filter information).
    NO_CHANGE_PRINT_PARAMS
    Value range: SPACE, 'X'
    SPACE = (default) The output format (number of columns) is dynamically adjusted depending on the list width (255 at most).
    'X' = The current print parameters are always used. If the list is wider, the output width is not adjusted dynamically.

  • IT_EVENT_EXIT in FM REUSE_ALV_GRID_DISPLAY

    I want to use IT_EVENT_EXIT in my program ... can i get sample code using this
    .. and also wat is the use of IT_EVENT_EXIT

    TYPE-POOLS :slis.
    DATA: BEGIN OF i_pa0000 OCCURS 0,
    select TYPE c,
    pernr TYPE pa0000-pernr,
    endda TYPE pa0000-endda,
    begda TYPE pa0000-begda,
    massn TYPE pa0000-massn,
    stat1 TYPE pa0000-stat1,
    stat2 TYPE pa0000-stat2,
    END OF i_pa0000.
    DATA:i_fieldcat TYPE slis_t_fieldcat_alv,
    w_fieldcat LIKE LINE OF i_fieldcat,
    w_layout TYPE slis_layout_alv.
    START-OF-SELECTION.
    PERFORM get_data_from_db.
    END-OF-SELECTION.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_data.
    *& Form get_data_from_db
    FORM get_data_from_db .
    SELECT pernr endda begda massn stat1 stat2
    INTO CORRESPONDING FIELDS OF TABLE i_pa0000
    FROM pa0000
    UP TO 20 ROWS.
    ENDFORM. " get_data_from_db
    *& Form build_fieldcatalog
    FORM build_fieldcatalog .
    CLEAR :w_fieldcat,
    i_fieldcat.
    w_fieldcat-fieldname = 'PERNR'.
    w_fieldcat-seltext_m = 'PERNR'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-fieldname = 'ENDDA'.
    w_fieldcat-seltext_m = 'ENDDA'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-fieldname = 'BEGDA'.
    w_fieldcat-seltext_m = 'BEGDA'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-fieldname = 'MASSN'.
    w_fieldcat-seltext_m = 'MASSN'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-fieldname = 'STAT1'.
    w_fieldcat-seltext_m = 'STAT1'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    w_fieldcat-fieldname = 'STAT2'.
    w_fieldcat-seltext_m = 'STAT2'.
    APPEND w_fieldcat TO i_fieldcat.
    CLEAR w_fieldcat.
    ENDFORM. " build_fieldcatalog
    *& Form display_data
    FORM display_data .
    DATA :program LIKE sy-repid VALUE sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    i_callback_program = program
    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 = w_layout
    it_fieldcat = i_fieldcat
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    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
    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 = i_pa0000
    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. " display_data
    *& Form build_layout
    FORM build_layout .
    w_layout-box_fieldname = 'SELECT'.
    w_layout-box_tabname = 'I_PA0000'.
    ENDFORM. " build_layout
    I am sure it solves ur problem
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://www.sap-img.com/abap/display-secondary-list-using-alv-grid.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/0a/b5530cd30911d2b467006094192fe3/frameset.htm
    Please give me reward point If it is useful
    Thanks
    Murali Poli

Maybe you are looking for

  • REP-1401 : 'CF_Real_VendorFormula': Fatal PL/SQL error occured.

    Hi, I have a cf_formula wich return a varchar. when i run the report, the REP-1401 : 'CF_Real_VendorFormula': Fatal PL/SQL error occured. can someone help me. Best regards. function CF_Real_VendorFormula return Char is att10 varchar2(20); real_vendor

  • Macbook Air (2014) Built-in Keyboard and Trackpad Freeze!

    My girlfriend's Macbook Air's keyboard and trackpad got freeze suddenly when she was using Safari. Tried to reboot and they work completely fine in login, but freeze again after login. Then I tried to reset SMC and PRAM, but still didn't fix it. Then

  • Itunes wont work now i've upgraded to 7.6

    hi i recently upgraded to v7.6 and now my itunes doesnt work, when installing it, or rather when the installation programme tries to uninstall my old version of itunes it says it cannot find the file "itunes.msi", it prompts me to enter an alternate

  • ReadOnlyAttrException: JBO-27008 occurs when it shouldn't

    Hi, I am receiving the ReadOnlyAttrException: JBO-27008 error on attributes that are always updateable. The situation occurs in the following circumstances: * I have a view object that works fine - no errors * I add a String transient attribute to th

  • Problems awaking from sleep

    I have it set that when I put my laptop to sleep it asks for my password when it awakes. I have always done this. The last two times I put it to sleep a blank screen comes up and the spinning beach ball of death just keeps spinning and nothing happen