REUSE_ALV_LIST_DISPLAY - I_BUFFER_ACTIVE

Hi,
Im modifying an standard program (RLINV020) to add fields to alv result, but I see that there's a property in REUSE_ALV_LIST_DISPLAY (I_BUFFER_ACTIVE) wich I don't know how it's works and what is the difference between activate and desactivate it.
Thanks in advance
Oscar

Hi Oscar,
   Whatever is being displayed currently(Before you make that i_buffer_active as space) is the content of the buffer.
It is like this.
for the first time, whatever is the fieldcatalog you pass, will be considered.
Every time from then, the same that which has beed displayed wiill be in the buffer.
If you don't want to change the code , but to clear the buffer, you have to run the program: BCALV_BUFFER_DELETE once.
then whatever changes you did will be affected in the output. From this point onwards, your field catalog will be stored in the buffer(Until you run the BCALV_BUFFER_DELETE program again).
Regards,
ravi

Similar Messages

  • How we can use class and methods for the FM of reuse_alv_list_display

    Hi Abapers,
    Please provide the sample code of class and method of REUSE_ALV_LIST_DISPLAY.
    Which Class i can use for this Function module.
    I need to write a code using OOPS concept.
    I was done the GRID display  using this class cl_gui_alv_grid.
    But i want only List Display using the class & methods.
    Plz provide sample code.
    Thanks
    Nani.

    Hi Nani,
    This is the sample code..
    *& Report Z_OO_ALV
    *& We can Use Two containers in OOALV
    REPORT z_oo_alv LINE-COUNT 50.
    *types gt_struct type sflight.
    DATA BEGIN OF gt_struct.
    INCLUDE STRUCTURE sflight.
    DATA rcol(4) TYPE c.
    DATA colors TYPE lvc_t_scol.
    DATA END OF gt_struct.
    *ALV GRIDs
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid.
    DATA gr_alvgrid1 TYPE REF TO cl_gui_alv_grid.
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV'.
    DATA gc_custom_control_name1 TYPE scrfname VALUE 'CC_ALV1'.
    *CONTAINERs
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container.
    DATA gr_ccontainer1 TYPE REF TO cl_gui_custom_container.
    *FIELDCATALOGs
    DATA gt_fieldcat TYPE lvc_t_fcat WITH HEADER LINE.
    DATA gt_fieldcat1 TYPE lvc_t_fcat WITH HEADER LINE.
    *LAYOUTs
    DATA gs_layout TYPE lvc_s_layo.
    DATA gs_layout1 TYPE lvc_s_layo.
    DATA pt_exclude TYPE ui_functions. "internal table declaration to be passed.
    *DATA pt_cell TYPE lvc_t_cell with header line.
    DATA : gt_list LIKE gt_struct OCCURS 50 WITH HEADER LINE,
    gt_list1 LIKE gt_struct OCCURS 50 WITH HEADER LINE.
    *DATA v_ucomm TYPE sy-ucomm.
    CALL SCREEN 100.
    *& Module display_alv OUTPUT
    text
    MODULE display_alv OUTPUT.
    PERFORM display_alv.
    ENDMODULE. " display_alv OUTPUT
    *& Module PAI INPUT
    text
    MODULE pai INPUT.
    CASE sy-ucomm.
    WHEN 'EXIT'.
    PERFORM exit_program.
    WHEN 'PICK'.
    PERFORM cell_info.
    ENDCASE.
    ENDMODULE. " PAI INPUT
    *& Form display_alv
    text
    FORM display_alv.
    PERFORM prepare_field_catalog CHANGING gt_fieldcat[].
    PERFORM prepare_layout CHANGING gs_layout.
    PERFORM data_retrival.
    IF gr_alvgrid IS INITIAL.
    CREATE OBJECT gr_ccontainer
    EXPORTING
    container_name = gc_custom_control_name
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    ENDIF.
    CREATE OBJECT gr_alvgrid
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM exclude_tb_functions CHANGING pt_exclude.
    PERFORM set_col.
    CALL METHOD gr_alvgrid->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    it_toolbar_excluding = pt_exclude "excluding toolbar functions
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list[]
    it_fieldcatalog = gt_fieldcat[]
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ELSE.
    CALL METHOD gr_alvgrid->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    EXCEPTIONS
    finished = 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.
    PERFORM prepare_field_catalog1 CHANGING gt_fieldcat1[].
    PERFORM prepare_layout1 CHANGING gs_layout1.
    PERFORM data_retrival1.
    IF gr_alvgrid1 IS INITIAL.
    CREATE OBJECT gr_ccontainer1
    EXPORTING
    container_name = gc_custom_control_name1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    ENDIF.
    CREATE OBJECT gr_alvgrid1
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    i_parent = gr_ccontainer1
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    PERFORM set_col1.
    CALL METHOD gr_alvgrid1->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = gs_layout1
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    it_outtab = gt_list1[]
    it_fieldcatalog = gt_fieldcat1[]
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ELSE.
    CALL METHOD gr_alvgrid1->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    EXCEPTIONS
    finished = 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.
    ENDFORM. "display_alv
    *& Form prepare_field_catalog
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog CHANGING pgt_fieldcat TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'CARRID'.
    ls_fieldcat-scrtext_m = 'Air line code'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = 'X'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'CONNID'.
    ls_fieldcat-scrtext_m = 'Connection code'.
    ls_fieldcat-emphasize = 'C900'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ls_fieldcat-tabname = 'gt_list'.
    ls_fieldcat-fieldname = 'PRICE'.
    ls_fieldcat-scrtext_m = 'PRICE'.
    APPEND ls_fieldcat TO pgt_fieldcat.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout
    text
    -->GS_LAYOUT text
    FORM prepare_layout CHANGING gs_layout TYPE lvc_s_layo.
    gs_layout-stylefname = 'FIELD_STYLE'.
    gs_layout-zebra = 'X'.
    gs_layout-grid_title = 'FLIGHT'.
    gs_layout-sel_mode = 'A'.
    gs_layout-ctab_fname = 'COLORS'.
    ENDFORM. "prepare_layout
    *& Form data_retrival
    text
    FORM data_retrival.
    SELECT carrid
    connid
    price
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    FORM EXIT_PROGRAM *
    FORM exit_program.
    CALL METHOD gr_ccontainer->free.
    CALL METHOD gr_ccontainer1->free.
    LEAVE TO SCREEN 0.
    ENDFORM. "exit_program
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STAT'.
    SET TITLEBAR 'xxx'.
    IF W_CUSTOM_CONTAINER IS INITIAL.
    **sets TITLEBAR
    PERFORM TITLEBAR.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form prepare_field_catalog1
    text
    -->GT_FIELDCAT text
    FORM prepare_field_catalog1 CHANGING pgt_fieldcat1 TYPE lvc_t_fcat.
    DATA ls_fieldcat TYPE lvc_s_fcat.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-fieldname = 'SEATSMAX'.
    ls_fieldcat-scrtext_m = 'MAX. SEATS'.
    ls_fieldcat-col_pos = 0.
    ls_fieldcat-outputlen = 10.
    ls_fieldcat-emphasize = 'C400'.
    ls_fieldcat-key = ' '.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ls_fieldcat-tabname = 'gt_list1'.
    ls_fieldcat-col_pos = 1.
    ls_fieldcat-fieldname = 'SEATSOCC'.
    ls_fieldcat-scrtext_m = 'SEATS OCCUPIED'.
    APPEND ls_fieldcat TO pgt_fieldcat1.
    ENDFORM. "prepare_field_catalog
    *& Form prepare_layout1
    text
    -->GS_LAYOUT text
    FORM prepare_layout1 CHANGING gs_layout1 TYPE lvc_s_layo.
    gs_layout1-stylefname = 'FIELD_STYLE'.
    gs_layout1-zebra = 'X'.
    gs_layout1-grid_title = 'DETAILS'.
    gs_layout-sel_mode = 'C'.
    gs_layout1-info_fname = 'RCOL'.
    gs_layout-no_toolbar = 'X'.
    ENDFORM. "prepare_layout
    *& Form data_retrival1
    text
    FORM data_retrival1.
    SELECT seatsmax
    seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE gt_list1
    UP TO 50 ROWS.
    ENDFORM. "data_retrival
    *& Form exclude_tb_functions
    &---- subroutine to exclude toolbar options -
    text
    -->PT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_maximum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_minimum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sort.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_fc_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_subtot.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_sum.
    APPEND ls_exclude TO pt_exclude.
    ls_exclude = cl_gui_alv_grid=>mc_mb_filter.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. "data_retrival1
    *& Form cell_info
    text
    FORM cell_info. "CHANGING pt_cell TYPE lvc_t_cell.
    DATA lt_cell TYPE lvc_t_cell WITH HEADER LINE.
    CALL METHOD gr_alvgrid->get_selected_cells
    IMPORTING
    et_cell = lt_cell[].
    LOOP AT lt_cell.
    WRITE : lt_cell-col_id , lt_cell-row_id.
    ENDLOOP.
    MODIFY pt_cell[] from lt_cell[].
    ENDFORM. "cell_info
    *& Form set_col
    text
    FORM set_col .
    DATA ls_cellcolor TYPE lvc_s_scol.
    LOOP AT gt_list.
    IF gt_list-price GT 500.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 5.
    ls_cellcolor-color-int = 1.
    ls_cellcolor-color-inv = 0.
    APPEND ls_cellcolor TO gt_list-colors.
    else.
    ls_cellcolor-fname = 'PRICE'.
    ls_cellcolor-color-col = 3.
    ls_cellcolor-color-int = 1.
    APPEND ls_cellcolor TO gt_list-colors.
    ENDIF.
    MODIFY gt_list.
    ENDLOOP.
    ENDFORM. "set_col
    *& Form set_col1
    text
    FORM set_col1.
    data : ind type sy-tabix,
    indx type sy-tabix.
    loop at gt_list1.
    ind = sy-tabix / 2.
    indx = sy-tabix - ind.
    if indx eq ind.
    gt_list1-rcol = 'C500'.
    endif.
    MODIFY gt_list1.
    endloop.
    ENDFORM. "set_col
    *FORM TITLEBAR.
    *SET TITLEBAR 'TITLE'.
    *ENDFORM.
    *double click on TITLE and write ur title
    Thanks,
    Samantak.
    Rewards points for useful answers.

  • Reuse_alv_list_display

    I have displayed fields using "reuse_alv_list_display".
    before that list display i want to display date and time but this must be displayed in the same screen where i get output from reuse_alv_list_display. how to do that

    Hi,
              This can be achieved using Top of page event. while building the event for the FM pass the form name (say TOP_OF_PAGE) to the event top_of_page.
    Now create a form TOP_OF_PAGE and do the required thing.
    See sample code.
    type-pools: slis.
    types:
          begin of ty_output,
          chk type c,
          number type i,
          name(20) type c,
          end of ty_output.
    data: gt_output type standard table of ty_output,
          gs_output type ty_output.
    data: wa_layout           type slis_layout_alv.
    data: it_fieldcatalog type slis_t_fieldcat_alv,
          wa_fieldcatalog type slis_fieldcat_alv,
          lt_event type slis_t_event, "for capturing top-of-page event
          ls_event type slis_alv_event.
    *Title displayed when the alv list is displayed
    data:  i_title type lvc_title value 'HEADER FOR THE TABLE'.
    start-of-selection.
      perform get_data.
      perform field_catlog.
      perform build_events.
      perform grid_display.
    *&      Form  field_catlog
          text
    -->  p1        text
    <--  p2        text
    form field_catlog .
      wa_fieldcatalog-fieldname = 'NUMBER'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m   = 'NUMBER'.
      append  wa_fieldcatalog to it_fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'NAME'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '3'.
      wa_fieldcatalog-seltext_m   = 'NAME'.
      append  wa_fieldcatalog to it_fieldcatalog.
      clear  wa_fieldcatalog.
      wa_layout-box_fieldname     = 'CHK' .
      wa_layout-box_tabname       = 'GT_OUTPUT' .
      wa_layout-colwidth_optimize = 'X'.
    endform.                    " field_catlog
    *&      Form  TOP_OF_PAGE
    To display at name and address at the top of the page
    -->  p1        text
    <--  p2        text
    form top_of_page .
    To display  top of the page
      WRITE:/ sy-vline.
      WRITE:/40 'TOP OF PAGE' CENTERED.
      WRITE:/ sy-vline.
    endform.                    " TOP_OF_PAGE
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events .
    *Get all possible events
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = lt_event
        exceptions
          list_type_wrong = 1
          others          = 2.
      if sy-subrc <> 0.
      endif.
    Specify events used in selection screen
      read table lt_event with key name = slis_ev_top_of_page
                         into ls_event.
      if sy-subrc = 0.
        ls_event-form = 'TOP_OF_PAGE'.
        modify lt_event from ls_event index sy-tabix.
        clear ls_event.
      endif.
      read table lt_event with key name = slis_ev_end_of_list
                         into ls_event.
      if sy-subrc = 0.
        ls_event-form = 'END_OF_LIST'.
        modify lt_event from ls_event index sy-tabix.
        clear ls_event.
      endif.
    endform.                    " build_events
    *&      Form  grid_display
          text
    -->  p1        text
    <--  p2        text
    form grid_display .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
        I_CALLBACK_PROGRAM             = sy-repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
        IS_LAYOUT                      = wa_layout
        IT_FIELDCAT                    = it_fieldcatalog
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
        IT_EVENTS                      = lt_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
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = gt_output
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    endform.                    " grid_display

  • How to add two list in one frame using REUSE_ALV_LIST_DISPLAY

    Hi,
    I want to display two list in single output by calling FM 'REUSE_ALV_LIST_DISPLAY' twice.
    I saw one topic posted by Arunava Das as 'ALV Problem' but didn't get the steps to do that.
    Here is his way of doing that "What I have done is gone for the append ALV approach wher I have added the END_OF_LIST Event for the Fisrt reprt and in the Corresponding FORM Routine I have added another made another cALL to the REUSE_ALV_LIST DISPLAY FM with the other table."
    I would be grateful if someone can help me out.

    Hi Ashish,
    The way you have tried i.e. calling the second list in the END_OF_LIST event of first list and like wise that is the correct way of doing it.
    Using this way you can display multiple lists. In the event END_OF_LIST by using a global variable G_COUNTER. the value of which you increment for each list and based on that counter you call different lists in the END_OF_LIST event.
    case G_COUNTER.
      when 1. perform call_first_list.
      when 2. perform call_second_list.
      when 3. perform call_third_list.
    endcase.
    Hope this answers your query
    regards,
    Satyadev Dutta

  • How to print text in two lines using REUSE_ALV_LIST_DISPLAY

    hai gurus,
    i want to print the heading of the column in two lines using the REUSE_ALV_LIST_DISPLAY fucntion module
    fro example if column is for DOCUMENT TYPE
                DOCUMENT TYPE
              shoudl be printed as
            DOCUMENT
              TYPE
    regards
    afzal

    Let me know if this helps...I don't know why the formatting is not working...
    <MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
    Edited by: Sourav Bhaduri on Jan 15, 2010 2:37 AM
    Edited by: Sourav Bhaduri on Jan 15, 2010 2:42 AM
    Edited by: Alvaro Tejada Galindo on Jan 14, 2010 5:58 PM

  • Runtime error in reuse_alv_list_display

    hi all,
    i am trying to display output by using FM reuse_alv_list_display but i am getting runtime error
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
       I_CALLBACK_PROGRAM             = sy-repid
         it_fieldcat                    = lt_fieldcat
        TABLES
          t_outtab                       = it_final
    EXCEPTIONS
       PROGRAM_ERROR                  = 1
       OTHERS                         = 2
      IF sy-subrc <> 0.
      ENDIF.
    can u please tell me where are the errors and y error is coming and how to remove it??

    error in RUNTIME is
      You attempted to access an unassigned field symbol
      (data segment 92).
      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.

  • In REUSE_ALV_GRID_DISPLAY, significance of I_BUFFER_ACTIVE !

    Hi All,
    We have a Report prog, which is shceduled as Batch Job.
    Now what happens is this batch  job gets cancelled due to lack of memory
    Below is the FM used in the prog.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
                  I_BUFFER_ACTIVE    = 'X'
                  I_CALLBACK_PROGRAM = G_REPID
                  IS_LAYOUT          = GS_LAYOUT
                  IT_FIELDCAT        = GT_FIELDCAT[]
                  IT_EVENTS          = GT_EVENTS[]
             TABLES
                  T_OUTTAB           = P_GT_OUTTAB
             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.
    Now what i noticed is I_BUFFER_ACTIVE is 'X' in the FM REUSE_ALV_GRID_DISPLAY
    What is the significance of this parameter ?
    Will my problem solve if i set I_BUFFER_ACTIVE to ''.
    Any suggestions are invited.
    Thanks!

    Hi,
    Essentially, the ALV uses a two-step buffer concept for performance reasons.
    Buffer A:
    Complete variants including field catalog, sorting, filter
    static field catalog (shared buffer)
    Buffer B:
    DDIC information for each field of the field catalog (Shared Buffer + Memory)
    Optimized access to field catalog (Shared Buffer + Memory)
    With parameter I_BUFFER_ACTIVE = 'X', buffer A is activated.If I_BUFFER_ACTIVE remains initial, the contents are nevertheless buffered in buffer B. For dynamic reasons, you have to forgo buffering completely (for example, a constant dynamic creation of structures) so that you have the following options as a developer:
    1. Set SET/GET parameters ALVBUFFER to the current date.All report, variant or field catalog buffers are reset until the current date exceeds the date of the SET/GET parameter.
    2. Set I_BYPASSING_BUFFER = 'X' on the call interface for the function modules and class methods.
    Which type of buffering can I use for which scenario? (=developer view)
    1. Activate the statically constant field catalog of buffer A with I_BUFFER_ACTIVE = 'X'
    2. Semi-statically constant field catalog, for example different columns are displayed and hidden for each call.Call ALV normally, optimization is carried out implicitly by using buffer B.
    3. Dynamically generated structures with field enhancements or text element changes for data elements.
    How can I influence or refresh the buffers?
    1. Refresh once after the structure change in a system by, for example, importing the transport request:
    Set the SET/GET parameter ALVBUFFER to the current date
    Execute the affected transaction/report
    Delete the SET/GET parameter ALVBUFFER
    Restart in a new session ( !)
    2. If refreshing over a longer time of development, static scenario should be implemented in production operation
    Set the SET/GET parameter ALVBUFFER to a date in the future
    3. If buffer A causes problems, it can be deactivated centrally by setting the static class attribute CL_GUI_ALV_GRID=>M_BUFFER_INACTIVE='X'.
    4. If you want to reset all buffers (A and B) once and centrally for all ALV applications, then execute report BALVBUFDEL.With the option "Only delete EUINFO(%F)/LTDX", all ALV buffers are reset on the current application.Then execute your report/transaction in a new session.After you have imported note 378021 or the appropriate Support Package, the entries are deleted from the selection screen and the report automatically deletes the ALV area of all active application servers.
    Hope, this helps....
    Regards,
    Vinod

  • Total option in REUSE_ALV_LIST_DISPLAY

    Hi,
    If we CHECK total option in REUSE_ALV_LIST_DISPLAY we get a total of numeric value with yellow color at the bottom.
    Requirement:
    Let say I have 3 line item records in the display, with 20 fields and one amount field. So I get the total of the amount field. Apart from that I want the Total number of LINE ITEMS to get displayed on that line. Is that possible . How?
    Thanks in Advance.

    Hi Mohan Kumar,
              I think this is not possible using the total option in REUSE_ALV_LIST_DISPLAY. A small shortcut is to provide another field called line item number (Populate with number 1) and use the sort parameter for the FM.Populate the sort table with the key fields of header and pass it to the FM 'REUSE_ALV_LIST_DISPLAY'.
    If U dont want to see the item number also then U need to use the FM 'REUSE_ALV_FIELDCATALOG_MERGE'. Fill the first table with the Header data 2nd table with the item details and the 3rd table with the totals.

  • Read modified ALV Cell Data - REUSE_ALV_LIST_DISPLAY

    Hi,
    I am using REUSE_ALV_LIST_DISPLAY to display my ALV List. There is one editable field in this ALV output.
    When user changes any value, In the ALV User Command, the updated value is not reflected.
    I know, we use 'GET_GLOBALS_FROM_SLVC_FULLSCR' Function Module to get the updated data.
    However its not working for me, as I am not using ALV Grid , but ALV List.
    Please let me know, how to read the modified data while using ALV List.

    This is old post but i put this info just in case some people have the same issue:
    In user command routine i pass two parameters: the command what the user intro and the info of the row was selected. In the info of the row you must update the field refresh with 'X' value and you must update your internal table was referenced in your alv function. this work just if you was set the hotspot and input field setting in the catalog of the ALV (in this example the field "marca")
    FORM user_command USING p_ucomm     LIKE sy-ucomm
                                                 lw_selfield TYPE slis_selfield.
    CASE p_ucomm .
         WHEN '&M_ALL'.
    *       mark field "marca" with 'X' value in all rows in it_totales_wf table
           LOOP AT it_totales_wf.
             lw_selfield-refresh = 'X'.
             it_totales_wf-marca = 'X'.
             MODIFY it_totales_wf INDEX sy-tabix.
           ENDLOOP.
         WHEN '&D_ALL'.
           LOOP AT it_totales_wf.
    *       unmark field "marca" in all rows in it_totales_wf table        
             lw_selfield-refresh = 'X'.
             CLEAR it_totales_wf-marca.
             MODIFY it_totales_wf INDEX sy-tabix.
           ENDLOOP.
         WHEN '&IC1'.
           lw_selfield-refresh = 'X'.
    *       mark field "marca" with in the row selected by the user in it_totales_wf table
           IF lw_selfield-tabindex NE 0 AND lw_selfield-fieldname = 'MARCA'.
             READ TABLE it_totales_wf INDEX lw_selfield-tabindex.
             IF it_totales_wf-marca = 'X'.
               CLEAR it_totales_wf-marca.
             ELSE.
               it_totales_wf-marca = 'X'.
             ENDIF.
             MODIFY it_totales_wf INDEX lw_selfield-tabindex.
           ELSE.
             LOOP AT it_totales_wf.
               it_totales_wf-marca = 'X'.
               MODIFY it_totales_wf.
             ENDLOOP.
           ENDIF.
    ENDCASE.

  • How many records can be displayed with fm REUSE_ALV_LIST_DISPLAY?

    Hi guys!!!
    Now here's is my problem. I've been trying to display in a program wih fm REUSE_ALV_LIST_DISPLAY, aproximately 450,000 records. But the fact is that after 10 or 15 minutes the system stops the process.
    This case is not the same when I display with the same function a very low number of lines.
    What can I do?
    Maybe one possibility is using the method for ALV List (ALV List Objects)
    h2Please ur answers now!
    Thanks in advance!!!
    Raul Romero

    Hi,
    If you are not expecting to do any additional functionality that the ALV has, like, summing, sorting, filter...etc,
    better display the result in a normal LIST.
    or try to filter your results and in the selection screen, give an option to enter the number records you want to display in the report.
    Regards,
    Subramanian

  • Problem with fm REUSE_ALV_LIST_DISPLAY with more than 450K records!!!

    Hi guys!!!
    Now here's is my problem. I've been trying to display in a program wih fm REUSE_ALV_LIST_DISPLAY, aproximately 450,000 records. But the fact is that after 10 or 15 minutes the system stops the process.
    This case is not the same when I display with the same function a very low number of lines.
    What can I do?
    Maybe one possibility is using the method for ALV List (ALV List Objects)
    Please ur answers now!
    Thanks in advance!!!
    Raul Romero

    Hi Paul,
    you can run the program in background by pressing F9 instead of F8. In background you have unlimited runtime and you can download the spool that has your 10000 pages.
    And the object will not resolve the problem because all ALVs use the same object internally. Because it is a complex task to build the list formatted correctly it just takes its time.
    When you run in background, you should set a useful layout and use the matching print format so that you get all data required. The best is to try with small lists and check the spool created.
    Regards,
    Clemens
    Edited by: Clemens Li on Oct 29, 2009 9:32 PM

  • Standard buttons not appearing for REUSE_ALV_LIST_DISPLAY

    Dear All,
    I have written down an ALV report with 'REUSE_ALV_LIST_DISPLAY'. I have added a PF-STATUS with some custom buttons. When executed, the cusom buttons are visible but standard ALV buttons are not appearing. Can you please suggest why this is happening and how to avert this?
    Thanks for your understanding.
    Best wishes,
    Atanu

    Hi
    Before adding your buttons, you have to copy the standard ALV status (STANDARD of program SAPLKKBL) in your status:
    So in menu painter while creating your status you need to go:
    Extras->Adjust Template: here set the status of ALV standard
    Max

  • REUSE_ALV_LIST_DISPLAY give short dump beyond 100 columns

    Hi,
    I have more than 170 columns in my internal table and this gives short dump when it reached 100the column because the structure RS_HEADER which displays column header can only hold 99 columns.
    Is there anyway I still use REUSE_ALV_LIST_DISPLAY  and overcome the short dump issue.
    Regards
    Kasi

    Although I have not encountered such a case, I would suggest the following: After 99 field, modify the field catalog by setting the excess fields as no_out = abap_true (provided TYPE-POOLS: abap is declared) Then, the user should be limited to a certain number of fields and if he/she wants more fields to be displayed, then he/she should change the layout. I hope that works.

  • Dump in  REUSE_ALV_LIST_DISPLAY after Upgrade

    Hi All
    We have gone for upgrade from 4.7 to ECC 6.0
    An ALV list report works fine in 4.7 , but its going for Dump in ECC 6.0.
    Runtime Errors         DYN_TABLE_ILL_COMP_VAL
    Except.                CX_SY_DYN_TABLE_ILL_COMP_VAL
    Date and Time          17.08.2010 08:12:54
    Short text
         Incorrect value in the dynamic table.
    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.
    When I debug it , REUSE_ALV_LIST_DISPLAY is going for dump.
    Is there any OSS Notes for this ? or any other solution>
    Thanks
    Karthik

    Since the FM is going for a dump & the error points to something being wrong in the fieldcatalog. Best bet would be to perform a consistency check on the ALV.
    For this pass: I_INTERFACE_CHECK = 'X' in the call of REUSE_ALV_LIST_DISPLAY & see if there are any error messages.
    Try to correct those errors if you face any problems you can post here.
    BR,
    Suhas

  • Problem with REUSE_ALV_LIST_DISPLAY when report is run in background

    Hi All,
    I had a problem with my report I am using the REUSE_ALV_LIST_DISPLAY when I run the report in foreground the report shows the output correctly but when I run it in background the report output is broken I mean some text are cut and place under each other. Please advise solution.
    Regards,
    Ekit

    Hello Ekit
    Please, check notes below to correct it:
    - 1174095 ALV print: Collective correction PRI_PARAMS_SET4
    - 1039655 ALV total: Subtotals disappear from printout II
    Only apply if they are relevant for your release. And always test thoroughly.
    regards
    Ray

Maybe you are looking for

  • Java proxy client logical port transport to Q and prod issue in target addr

    Hi All, I have a java proxy client having a logical port (configured using NWDS) to consume a web service in the provider system. In the logical port, I have given target address, and logical port name. While moving this client proxy NWDI dev track t

  • Which laptop should I buy?

    I am going to a boarding high school... I have a couple old macs and need a new one for school. Ideally about $1500 or less, a little over is okay. I should only use mail, safari, calendar, firstclass, a little photoshop, watch movies, skype, word, i

  • HEader Line Issue

    Hi All, Previously i have declared a data as DATA: BEGIN OF t_temp OCCURS 10,       vbeln TYPE char10,       END OF t_temp. <code continues> LOOP AT t_data INTO fs_data.     IF NOT fs_data-del_no IS INITIAL.       CALL FUNCTION 'CONVERSION_EXIT_ALPHA

  • File Vault problem!! Help!!

    Ok I'm not entirely sure how file vault works or even what it's exact purpose is! All I know is that is seems to free up some space on my hard drive! My problem is that my file vault doesn't seem to be working anymore. I've checked to make sure that

  • Running Servlet in J2EE server

    hello friends i am very new to servlet technology, i create the servlet java file and complied it and using j2ee application server (1.4) i deploy it and put the war file at autodeploy file but i cant run it ,how i can use j2ee server for running the