Row seperator in the ALV grid display after the various highest level prod.

Hi,
  I have a requirement like user wants a row seperator against the various high level products (Each parent material)in ALV Grid display.We made this change but quantity and pricey fields  showing the zero's in the blank line.i know that if we use NO-ZERO
in the ALV field catalog , we can remove the zero's from blank line. But other  zerou2019s will remove from rest of the line items. User want's the zero's in other line items, but not in the blank line.
We can convert packed fileds into character format, but this will effect to the summing the quantity, price coumns.
If any body have idea on above mentioned.
Regards,
SK.

Hi Suresh,
There is no short cut for this requirement. You have to do following steps.
1. Change the data type of column to char.
2. Programatically  find the totals.
Reagards,
Anversha

Similar Messages

  • How to give a page break in alv grid display after 65 lines are displayed?

    hi all,
    I need to give a page break in alv grid display after 65 lines are displayed on each page...Please help me with this...

    hai
    give this command beging of the report name... u have to diclar the beging of the report ......
    <b>report</b> ( name of the report)  <b>standard page heading line-size 200 line-count 65.</b>
    ex1.:- report name is  rtpm_trl_show_flows 
    report <b>rtpm_trl_show_flows </b> no standard page heading line-size 200
                                                         line-count 65.
    ex:2
    report  <b>zlpur01</b> no standard page heading line-size 200
                                                         line-count 65.
    type-pools: slis.
    tables: bkpf.
    selection-screen begin of block sel with frame title text-001.
    select-options: s_comp for bkpf-bukrs, " Company
                    s_valut for bkpf-budat. " Invoice Date
                   S_MTART FOR MARA-MTART. " Material Type
    selection-screen end of block sel.
    parameters: p_vari like disvariant-variant. " ALV Variant
    constants: formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
    data:   i_bseg type bseg  occurs 0 with header line.
    data: vatval type p decimals 2 value '0.15'.
    data: xhkont type string value '154000'.
    data COM type c.
    data: begin of invt occurs 100,
            budat like bkpf-budat, " Inv Dat
            bukrs like bkpf-bukrs, " Material
            STCEG like bsak-STCEG, "name of the companycode
            belnr like bkpf-belnr,
            xblnr like bkpf-xblnr, " Inv Reference
            ebeln like rseg-ebeln, " PO number
            lifnr like bseg-lifnr, " Vendor No
            name1 like lfa1-name1, " Supplier Name
            matnr like bseg-matnr,
            maktx like makt-maktx,
            stcd1 like lfa1-stcd1, " Supplier VAT REG NO
            xamt like bseg-dmbtr, " TAX amt
            yamt like bseg-wrbtr,
            wrbtr like bseg-wrbtr, " Base amount
            mwskz like bseg-mwskz,
            dmbtr like bseg-dmbtr, " TAX amt
            gjahr like bkpf-gjahr,
            hkont like bseg-hkont,
            zamt like bseg-dmbtr, " TAX amt
            wamt like bseg-dmbtr,
            shkzg like bseg-shkzg,
            shkzg1 like bseg-shkzg,
          end of invt.
    regard
    nawa

  • How to change the selected row color in an alv grid display ?

    Hello ,
    I WANT TO CHANGE THE COLOR OF THE SELECTED RECORDS  IN AN ALV GRID DISPLAY ?
    ITS URGENT..
    WILL BE REWARDED...

    hai   Ssnagh Samala 
    EXicut This report >
    Hope It Will  Meet U r Requirement.
    If Found Helpfull Reward.
    REPORT zcuitest_alv_07.
    Use of colours in ALV grid (cell, line and column) *
    Table
    TABLES : mara.
    Type
    TYPES : BEGIN OF ty_mara,
    matnr LIKE mara-matnr,
    matkl LIKE mara-matkl,
    counter(4) TYPE n,
    free_text(15) TYPE c,
    color_line(4) TYPE c, " Line color
    color_cell TYPE lvc_t_scol, " Cell color
    END OF ty_mara.
    Structures
    DATA : wa_mara TYPE ty_mara,
    wa_fieldcat TYPE lvc_s_fcat,
    is_layout TYPE lvc_s_layo,
    wa_color TYPE lvc_s_scol.
    Internal table
    DATA : it_mara TYPE STANDARD TABLE OF ty_mara,
    it_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,
    it_color TYPE TABLE OF lvc_s_scol.
    Variables
    DATA : okcode LIKE sy-ucomm,
    w_alv_grid TYPE REF TO cl_gui_alv_grid,
    w_docking_container TYPE REF TO cl_gui_docking_container.
    PARAMETERS : p_column AS CHECKBOX,
    p_line AS CHECKBOX,
    p_cell AS CHECKBOX.
    START-OF-SELECTION.
    PERFORM get_data.
    END-OF-SELECTION.
    PERFORM fill_catalog.
    PERFORM fill_layout.
    CALL SCREEN 2000.
    *& Module status_2000 OUTPUT
    text
    MODULE status_2000 OUTPUT.
    SET PF-STATUS '2000'.
    ENDMODULE. " status_2000 OUTPUT
    *& Module user_command_2000 INPUT
    text
    MODULE user_command_2000 INPUT.
    DATA : w_okcode LIKE sy-ucomm.
    MOVE okcode TO w_okcode.
    CLEAR okcode.
    CASE w_okcode.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " user_command_2000 INPUT
    *& Module alv_grid OUTPUT
    text
    MODULE alv_grid OUTPUT.
    IF w_docking_container IS INITIAL.
    PERFORM create_objects.
    PERFORM display_alv_grid.
    ENDIF.
    ENDMODULE. " alv_grid OUTPUT
    *& Form create_objects
    text
    --> p1 text
    <-- p2 text
    FORM create_objects.
    Ratio must be included in http://5..95
    CREATE OBJECT w_docking_container
    EXPORTING
    ratio = 95
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    others = 6.
    CREATE OBJECT w_alv_grid
    EXPORTING
    i_parent = w_docking_container.
    ENDFORM. " create_objects
    *& Form display_alv_grid
    text
    --> p1 text
    <-- p2 text
    FORM display_alv_grid.
    CALL METHOD w_alv_grid->set_table_for_first_display
    EXPORTING
    is_layout = is_layout
    CHANGING
    it_outtab = it_mara
    it_fieldcatalog = it_fieldcat
    EXCEPTIONS
    invalid_parameter_combination = 1
    program_error = 2
    too_many_lines = 3
    OTHERS = 4.
    ENDFORM. " display_alv_grid
    *& Form get_data
    text
    --> p1 text
    <-- p2 text
    FORM get_data.
    SELECT * FROM mara UP TO 5 ROWS.
    CLEAR : wa_mara-color_line, wa_mara-color_cell.
    MOVE-CORRESPONDING mara TO wa_mara.
    ADD 1 TO wa_mara-counter.
    MOVE 'Blabla' TO wa_mara-free_text.
    IF wa_mara-counter = '0002'
    AND p_line = 'X'.
    Color line
    MOVE 'C410' TO wa_mara-color_line.
    ELSEIF wa_mara-counter = '0004'
    AND p_cell = 'X'.
    Color cell
    MOVE 'FREE_TEXT' TO wa_color-fname.
    MOVE '5' TO wa_color-color-col.
    MOVE '1' TO wa_color-color-int.
    MOVE '1' TO wa_color-color-inv.
    APPEND wa_color TO it_color.
    wa_mara-color_cell] = it_color[.
    ENDIF.
    APPEND wa_mara TO it_mara.
    ENDSELECT.
    ENDFORM. " get_data
    *& Form fill_catalog
    text
    --> p1 text
    <-- p2 text
    FORM fill_catalog.
    Colour code : *
    Colour is a 4-char field where : *
    - 1st char = C (color property) *
    - 2nd char = color code (from 0 to 7) *
    0 = background color *
    1 = blue *
    2 = gray *
    3 = yellow *
    4 = blue/gray *
    5 = green *
    6 = red *
    7 = orange *
    - 3rd char = intensified (0=off, 1=on) *
    - 4th char = inverse display (0=off, 1=on) *
    Colour overwriting priority : *
    1. Line *
    2. Cell *
    3. Column *
    DATA : w_position TYPE i VALUE '1'.
    CLEAR wa_fieldcat.
    MOVE w_position TO wa_fieldcat-col_pos.
    MOVE 'MATNR' TO wa_fieldcat-fieldname.
    MOVE 'MARA' TO wa_fieldcat-ref_table.
    MOVE 'MATNR' TO wa_fieldcat-ref_field.
    APPEND wa_fieldcat TO it_fieldcat.
    ADD 1 TO w_position.
    CLEAR wa_fieldcat.
    MOVE w_position TO wa_fieldcat-col_pos.
    MOVE 'MATKL' TO wa_fieldcat-fieldname.
    MOVE 'MARA' TO wa_fieldcat-ref_table.
    MOVE 'MATKL' TO wa_fieldcat-ref_field.
    Color column
    IF p_column = 'X'.
    MOVE 'C610' TO wa_fieldcat-emphasize.
    ENDIF.
    APPEND wa_fieldcat TO it_fieldcat.
    ADD 1 TO w_position.
    CLEAR wa_fieldcat.
    MOVE w_position TO wa_fieldcat-col_pos.
    MOVE 'COUNTER' TO wa_fieldcat-fieldname.
    MOVE 'N' TO wa_fieldcat-inttype.
    MOVE '4' TO wa_fieldcat-intlen.
    MOVE 'Counter' TO wa_fieldcat-coltext.
    APPEND wa_fieldcat TO it_fieldcat.
    ADD 1 TO w_position.
    CLEAR wa_fieldcat.
    MOVE w_position TO wa_fieldcat-col_pos.
    MOVE 'FREE_TEXT' TO wa_fieldcat-fieldname.
    MOVE 'C' TO wa_fieldcat-inttype.
    MOVE '20' TO wa_fieldcat-intlen.
    MOVE 'Text' TO wa_fieldcat-coltext.
    APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM. " fill_catalog
    *& Form fill_layout
    text
    --> p1 text
    <-- p2 text
    FORM fill_layout.
    Field that identify color line in internal table
    MOVE 'COLOR_LINE' TO is_layout-info_fname.
    Field that identify cell color in inetrnal table
    MOVE 'COLOR_CELL' TO is_layout-ctab_fname.
    ENDFORM. " fill_layout
    Regards.
    Eshwar.

  • Update values in AlV grid display after entering value

    Hi,
         I have an issue in ALV grid display.
        Let me explain.
        i have 8 fields to display in which one is editiable.
       Fields are: date
                       material,
                       material Description,
                       Opening Stock,
                       Closing stock-  (  this field is editiable)
                       Closing stock,
                       Received Stock,
                       Actual production.
    Actual production = Closing stock + removal stock
                                 - receipt stock - opening stock.
    when i change the value of closing stock and press enter, actual production should get update, the new values should display.
    Thany you in advance.

    Hi,
    Please refer the code below:
    REPORT z_demo_alv_jg.*******************************************************************
    * TYPE-POOLS                                                      *
    TYPE-POOLS: slis. *******************************************************************
    * INTERNAL TABLES/WORK AREAS/VARIABLES     *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.*******************************************************************
    * FIELD-SYMBOLS                                                   *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.*******************************************************************
    * SELECTION SCREEN                                                *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.*******************************************************************
    * START-OF-SELECTION                                              *
    START-OF-SELECTION.* Storing table name
      p_table = tabname.* Create internal table dynamically with the stucture of table name
    * entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.    LEAVE TO LIST-PROCESSING.
      ENDIF.
    * Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.* Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.  SORT i_fieldcat BY col_pos.* Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.  REFRESH <dyn_tab_temp>.* Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.  IF sy-subrc <> 0.  ENDIF.*&-----------------------------------------------------------------*
    *&      Form  SET_PF_STATUS
    *       Setting custom PF-Status
    *      -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.  SET PF-STATUS 'Z_STANDARD'.ENDFORM.                    "SET_PF_STATUS*&----------------------------------------------------------------*
    *&      Form  user_command
    *       Handling custom function codes
    *      -->R_UCOMM      Function code value
    *      -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.* Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.* Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.* Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.* Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.*   When a record is selected
        WHEN '&IC1'.*     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.*       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.*       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.*         Make all the fields input enabled except key fields
              w_field-input = 'X'.          MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.        ENDIF.*       Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.        IF sy-subrc = 0.*         Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.*         If the record is changed then track its index no.
    *         and populate it in an internal table for future
    *         action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.      ENDIF.*   When save button is pressed
        WHEN 'SAVE'.*     Sort the index table
          SORT i_index.*     Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.      LOOP AT i_index.*       Find out the changes in the internal table
    *       and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.      ENDLOOP.*     Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.      IF sy-subrc = 0.*       Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.        REFRESH <dyn_tab_temp>.*       Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.      ENDIF.
      ENDCASE.  rs_selfield-refresh = 'X'.ENDFORM.                    "user_command
    Thanks,
    Sriram Ponna.

  • ALV Grid display in the middle of window

    Hi all,
    When I m refering to the past queries in the forum I read that specifying these values
    I_SCREEN_START_COLUMN
    I_SCREEN_START_LINE
    I_SCREEN_END_COLUMN
    I_SCREEN_END_LINE in the FM reuse_alv_grid_display
    we can display the output of alv in the middle of the window. But when I specify these values a new window is popped up in which the o/p of ALV is displayed. Actually what is the significance of thses values ? If I want to display in the middle of the window but not in a new window, so what should I do for this.
    Regards,
    Vijay.

    Hi Neil,
    REPORT  Z_ALV_CHANGEHEADER.
    type-pools slis.
    data : begin of itab occurs 0 ,
           carrid like sflight-carrid,
           connid like sflight-connid,
           fldate like sflight-fldate,
           end of itab.
    select carrid connid fldate from sflight into corresponding fields
    of table itab.
    data : i_fieldcat type slis_t_fieldcat_alv.
    data : wa_fieldcat type slis_fieldcat_alv.
    wa_fieldcat-row_pos = 0.
    wa_fieldcat-col_pos = 1.
    wa_fieldcat-fieldname = 'CARRID'.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-SELTEXT_L = 'Carrier Id'.
    append wa_fieldcat to i_fieldcat.
    clear wa_fieldcat.
    wa_fieldcat-row_pos = 0.
    wa_fieldcat-col_pos = 2.
    wa_fieldcat-fieldname = 'CONNID'.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-SELTEXT_L = 'Connection Id'.
    append wa_fieldcat to i_fieldcat.
    clear wa_fieldcat.
    wa_fieldcat-row_pos = 0.
    wa_fieldcat-col_pos = 3.
    wa_fieldcat-fieldname = 'FLDATE'.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-SELTEXT_L = 'Flight Date'.
    append wa_fieldcat to i_fieldcat.
    clear wa_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = 'Z_ALV_CHANGEHEADER'
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = i_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             = 30
       I_SCREEN_START_LINE               = 10
       I_SCREEN_END_COLUMN               = 90
       I_SCREEN_END_LINE                 = 70
      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.
    I have posted my code . Please check and tell me where I have gone wrong.
    Regards,
    Vijay.

  • How to merge rows with similar values in alv grid display in webdynpro

    Hi experts,
                   i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
    kindly suggest.
    thanks ,
    Anita.

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • How to devide the top of page in alv grid display

    hi all
    in the alv grid display am getting the page number and total number of pages in the left hand side
    but what i need is i need in the right hand side
    how to get that

    Hi,
    PLease refer to the code below:
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    * Form  TOP-OF-PAGE                                                 *
    * ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    * Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    * Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
    *            i_logo             = 'Z_LOGO'.
    endform.
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
    *       Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
    *       Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Thanks,
    Sriram Ponna.

  • Update all alv (grid) displayed records to internal table

    Hi all,
    i want to update the records into the internal table which are changed by the user in the edit field.
    after he select save button.
    i  have to save the ALV grid displayed records in the internal table.
    hw can i do this ?

    ALV with EDIT and SAVE functionality
    Code:REPORT z_demo_alv_jg.*******************************************************************
    TYPE-POOLS                                                      *
    TYPE-POOLS: slis. *******************************************************************
    INTERNAL TABLES/WORK AREAS/VARIABLES     *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.*******************************************************************
    FIELD-SYMBOLS                                                   *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.*******************************************************************
    SELECTION SCREEN                                                *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.*******************************************************************
    START-OF-SELECTION                                              *
    START-OF-SELECTION.* Storing table name
      p_table = tabname.* Create internal table dynamically with the stucture of table name
    entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.    LEAVE TO LIST-PROCESSING.
      ENDIF.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.* Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.  SORT i_fieldcat BY col_pos.* Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.  REFRESH <dyn_tab_temp>.* Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.  IF sy-subrc <> 0.  ENDIF.&----
    *&      Form  SET_PF_STATUS
          Setting custom PF-Status
         -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.  SET PF-STATUS 'Z_STANDARD'.ENDFORM.                    "SET_PF_STATUS&----
    *&      Form  user_command
          Handling custom function codes
         -->R_UCOMM      Function code value
         -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.* Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.* Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.* Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.* Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.*   When a record is selected
        WHEN '&IC1'.*     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.*       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.*       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.*         Make all the fields input enabled except key fields
              w_field-input = 'X'.          MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.        ENDIF.*       Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.        IF sy-subrc = 0.*         Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.*         If the record is changed then track its index no.
            and populate it in an internal table for future
            action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.      ENDIF.*   When save button is pressed
        WHEN 'SAVE'.*     Sort the index table
          SORT i_index.*     Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.      LOOP AT i_index.*       Find out the changes in the internal table
          and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.      ENDLOOP.*     Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.      IF sy-subrc = 0.*       Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.        REFRESH <dyn_tab_temp>.*       Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.      ENDIF.
      ENDCASE.  rs_selfield-refresh = 'X'.ENDFORM.                    "user_command

  • Dump when summing up CURR field in ALV GRID display

    Hi All,
    I am getting dump when I try to sum the CURR field in my ALV Grid Display. The field is of CURR 23.  I am using classes and methods to display alv grid.
    I tried passing <fs_fieldcat>-do_sum = 'X'. When I did this, it is dumping without even displaying the alv grid.
    Here is the part it is throwing dump:
            ls_lvc_data-value = space.
            clear ls_lvc_data-style.
            loop at it_fcat_local assigning <ls_fcat>
                    where tech ne 'X' and no_out ne 'X'.
              if l_invisible eq 'X'.
                clear l_invisible.
                if <ls_fcat>-do_sum is initial.
                  continue.
                else.
                  clear ls_lvc_data-col_pos.
                endif.
              endif.
              add 1 to ls_lvc_data-col_pos.
              assign component <ls_fcat>-fieldname
                               of structure <ls_data> to <l_field_value>.
              _if sy-subrc ne 0.
                message x000(0k).
              endif._
    Regards,
    Guru

    Thomas,
    Here is the dump:
    Runtime Errors         MESSAGE_TYPE_X
    Date and Time          10/22/2010 23:30:53
    Short text
    The current application triggered a termination with a short dump.
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    Error analysis
    Short text of error message:
    Long text of error message:
    Technical information about the message:
    Message class....... "0K"
    Number.............. 000
    Variable 1.......... " "
    Variable 2.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MESSAGE_TYPE_X" " "
    "SAPLSLVC" or "LSLVCF36"
    "FILL_DATA_TABLE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    Source Code Extract
    Line
    SourceCde
    2708
    is_subtottxt_info = ls_subtot_info
    2709
    ip_subtot_line    = lr_data
    2710
    changing
    2711
    c_subtottxt       = l_subtottxt.
    2712
    ls_lvc_data-value = l_subtottxt.
    2713
    2714
    append ls_lvc_data to ct_lvc_data.
    2715
    endif.
    2716
    2717
    2718
    Column per Fieldcat Entry
    2719
    2720
    ls_lvc_data-value = space.
    2721
    clear ls_lvc_data-style.
    2722
    loop at it_fcat_local assigning <ls_fcat>
    2723
    where tech ne 'X' and no_out ne 'X'.
    2724
    if l_invisible eq 'X'.
    2725
    clear l_invisible.
    2726
    if <ls_fcat>-do_sum is initial.
    2727
    continue.
    2728
    else.
    2729
    clear ls_lvc_data-col_pos.
    2730
    endif.
    2731
    endif.
    2732
    2733
    add 1 to ls_lvc_data-col_pos.
    2734
    2735
    assign component <ls_fcat>-fieldname
    2736
    of structure <ls_data> to <l_field_value>.
    2737
    if sy-subrc ne 0.
    >>>>>
    message x000(0k).
    2739
    endif.
    2740
    2741
    *... work on average
    2742
    if <ls_fcat>-do_sum eq 'C'.
    2743
              Initialize average result and entries
    2744
    <l_field_value> = 0.
    2745
    clear l_entries.
    2746
    2747
              retrive unit from fieldcatalog
    2748
    assign space to <l_unit>.
    2749
    if not <ls_fcat>-cfieldname is initial.
    2750
    assign component <ls_fcat>-cfieldname
    2751
    of structure <ls_data> to <l_unit>.
    2752
    endif.
    2753
    if not <ls_fcat>-qfieldname is initial.
    2754
    assign component <ls_fcat>-qfieldname
    2755
    of structure <ls_data> to <l_unit>.
    2756
    endif.
    2757

  • Captuing the Line Item info from the ALV Grid

    Hi Abapper,
    Suppose I have an OO ALV Grid displayed on the Screen by using SET_TABLE_FOR_FIRST_DISPLAY.
    Now, suppose the grid contains 5 fields of the database table.
    I have to display the 6 th one of tht table by capturing the line item on which I click into the grid and select the 6th one and displayed.
    But how to capture the line item of the grid, when i click any rows in the grid.
    Please reply.
    Regards,
    Rahul

    Hi Rahul,
    Two methods are available,
    1) Define the double_click method, or
    2) Implement the HotSpot and User_command method.
    i_callback_user_command           = slis_ev_user_command
    form user_alv_command using r_ucomm like sy-ucomm
                                w_selfield type slis_selfield.
    *Routine called when user invokes a command not handled by the ALV
      case r_ucomm.
        when '&IC1'.  "Hot Spot Click
           read table itab index w_selfield-tabindex.
        when others.
      endcase.
    endform.                    " USER_ALV_COMMAND
    Kind Regards
    David Cooper

  • ALV Grid Display in Loop.

    Hello experts,
    I need your help to resolve the issue.
    I have made a report:
    On selection screen, Release group and release strategy is taken in select options:
    SELECT-OPTIONS : S_FRGGR FOR T16FS-FRGGR,
                                   S_FRGSX FOR T16FS-FRGSX.
    if s_frgsx is not initial.
    select frggr frgsx from t16fs into table i_t16fs where frggr in s_frggr and frgsx in s_frgsx.
    else.
    select frggr frgsx from t16fs into table i_t16fs where frggr in s_frggr.
    endif.
    loop at i_t16fs into wa_t16fs.
    Inside this all code is written.
    endloop.
    I have to display the output (from table CDHDR and CDPOS) same as the output of transaction CL24N but in ALV GRID DISPLAY.
    I have written all the code to fetch the values and passed final internal table to ALV GRID DISPLAY.
    The problem is :
    We can select a range of values for release group and release strategy as it is in select-options.
    For every release group, more than 10 strategies are present.
    For example :
    For release group 62, 710 release strategies are present.
    In output, I can see output of 1st strategy. When I press the back button, I can see the output of 1st strategy (but values from only CDPOS not from CDHDR) and second strategy (Both values from CDHDR and CDPOS). When I press the back button, I can see the output of 1st (but values from only CDPOS not from CDHDR), second strategy (but values from only CDPOS not from CDHDR)) and third strategy (Both values from CDHDR and CDPOS). Like this…. So on… upto 710th entry.
    I want the output of all 710 entries in single ALV GRID DISPLAY.
    What can be done?
    Regards,
    Titiksha

    Hello Manish,
    Following is some code for final internal table.
       LOOP AT I1_CDPOS ASSIGNING <FS_GT_OUTPUT_ITEM>.
        WA_FINAL-CHANGENO    = <FS_GT_OUTPUT_ITEM>-CHANGENR.
        WA_FINAL-FRGGR       = S_FRGGR.
        WA_FINAL-FRGSX       = S_FRGSX.
        WA_FINAL-CLASS       =  V_CLASS. "<FS_GT_OUTPUT_ITEM>-CLASS.  "    LIKE KLAH-CLASS,
        WA_FINAL-VALUE_OLD   = <FS_GT_OUTPUT_ITEM>-VALUE_OLD.      " LIKE AUSP-ATWRT,
        WA_FINAL-VALUE_NEW   = <FS_GT_OUTPUT_ITEM>-VALUE_NEW.
        IF WA_FINAL-VALUE_OLD IS NOT INITIAL.
          WA_FINAL-ACTION    =  'DELETED'.  "<FS_GT_OUTPUT_ITEM>-ACTION."    TYPE C,
        ELSE.
          WA_FINAL-ACTION    =  'CREATED'.
        ENDIF.
        IF WA_FINAL-VALUE_OLD IS NOT INITIAL.
          WA_FINAL-VALUE     = <FS_GT_OUTPUT_ITEM>-VALUE_OLD.
        ELSE.
          WA_FINAL-VALUE     = <FS_GT_OUTPUT_ITEM>-VALUE_NEW.
        ENDIF.
        READ TABLE I_GT_OUTPUT_HEADER ASSIGNING  <FS_GT_OUTPUT_HEADER> WITH KEY CHANGENO = <FS_GT_OUTPUT_ITEM>-CHANGENR.
        IF SY-SUBRC = 0.
          WA_FINAL-DATE  =  <FS_GT_OUTPUT_HEADER>-DATE."        LIKE CDHDR-UDATE,
          WA_FINAL-TIME  = <FS_GT_OUTPUT_HEADER>-TIME."          LIKE CDHDR-UTIME,
          WA_FINAL-USER  = <FS_GT_OUTPUT_HEADER>-USER."         LIKE CDHDR-USERNAME,
          WA_FINAL-TCODE = <FS_GT_OUTPUT_HEADER>-TCODE."          LIKE CDHDR-TCODE,
        ENDIF.
        APPEND WA_FINAL TO I_FINAL.
        UNASSIGN <FS_WA_FINAL>.
        READ TABLE I_FINAL ASSIGNING <FS_WA_FINAL> WITH KEY CHANGENO  = <FS_GT_OUTPUT_ITEM>-CHANGENR
                                                            VALUE_OLD = <FS_GT_OUTPUT_ITEM>-VALUE_OLD
                                                            VALUE_NEW = <FS_GT_OUTPUT_ITEM>-VALUE_NEW.
        IF SY-SUBRC EQ 0.
          UNASSIGN <FS_WA_CABNT>.
          READ TABLE I_CABNT ASSIGNING <FS_WA_CABNT> WITH KEY ATINN = <FS_GT_OUTPUT_ITEM>-TABKEY+18(10).
          IF SY-SUBRC EQ 0.
            <FS_WA_FINAL>-ATBEZ = <FS_WA_CABNT>-ATBEZ.
          ENDIF.
        ENDIF.
      ENDLOOP.
    And I_FINAL is passed to ALV.
    Here the line which is in BOLD and UNDERLINED, data after that is getting displayed only for the last value of Realese strategy and release group, not for others.
    Please help.
    Regards,
    Titiksha

  • ALV Grid Display Editable Field Disables Zebra Style

    Hi all,
    First of all, I want to say: "I did my research." I found a post with a very similar question but not identically my case, or at least I can't solve it the same way. [Here is the reference post.|Re: Check box impact on ALV grid (Using OOPS)]
    My Goal: I have an ALV Grid which I want to display using the ZEBRA style in the layout and also make one field in the field catalog editable.
    My Issue: As soon as you make one field editable in the field catalog using the EDIT option, the ZEBRA style in the layout does not works. I also have key fields in the ALV Grid which I want to keep as KEY and which get painted dark blue.
    I can't use the individual row coloring method used in the reference link above since this overrides the blue coloring of the key fields in the ALV. I haven't gone through all the effort of individually painting each cell on the grid, and honestly I don't think it is efficient.
    My Question: Is there a way to have editable fields in the ALV Grid and keep the ZEBRA setting working?
    Please, I will really appreciate if you can read and try to understand my issue before posting incoherent solutions or answers. I don't want to waste anybody's time nor mine.

    Shiva,
    Thanks for your reply; it someway addresses what I am looking for. Unfortunately, I've already went through that reference code; it has exactly the same problem that I am facing.
    If you take that code for example, and you throw it u201Cas-isu201D in your ABAP editor you'll see that even when the ZEBRA style is being used in the layout, since the EDIT option in the field catalog is being set for field NETPR, the ZEBRA style gets lost; only the whole editable column gets white. You can go ahead and play a little bit with that piece of code and you will see what I am saying.
    Regards

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • Push button in ALV Grid Display

    Hi all,
    I have a requirement wherin i need to place a button in the ALV Grid Display which should update all the records whatever are displayed in the specified infotype. This is to be done in a report.
    Can anybody give me any pointers or sample code for the above query.
    Regards,
    Amrita

    Simply add a button on your GUI status. Then when pushed, code your logic for update IT0008.
    AT USER-COMMAND event block will be triggered when you press your button.
    AT USER-COMMAND.
      if sy-ucomm = 'PUSHBUTTON'.    "here comes function code of your pushbutton
         "update your diplayed records
      endif.

  • ALV Grid display  IN BACKGROUND

    Hi,
        When I run the ALV grid display in foreground(32 fields) its running well. But when I run it in background many fields get truncated. I know we can only use 255 characters in background. Is there any way out?....let me put it in this way.....i have 32 fields in the foreground but I just want to display 20 of them in background.
    Please suggest.?

    hi
    good
    check with your length of the screen in the background ,though you have mentioned your some of the field length may be varying in the foreground and background.
    Check with the field length in the background and foreground.
    thanks
    mrutyun^

Maybe you are looking for

  • Distiller DC stürzt ständig ab

    Hallo! Heute habe ich, nach Hinweis durch den Adobe Updater, das neue „Acrobat DC" installiert (Update von vorheriger Acrobat-Version). Dabei wird auch der PDF-Druckertreiber (Distiller) erneuert. Seitdem stürzt er ständig ab (siehe Screenshot). Dami

  • Endless waiting for the windows support software to download

    absolutely uncomfortable speed when windows support software drivers downloading it seems to take a few days!!! ohhh, that expensive big data center... has anyone same problem?

  • Appleworks documents

    I would like to know if you can open old Appleworks spreadsheet documents with Numbers, and save the Appleworks documents in numbers format? Afterall, Iwork is supposed to be the replacement for Appleworks documents. Thanks, Greg

  • IPhoto: Retain modified date&time details when re-importing

    Instead of having all my photos in just one iPhoto library, I am now moving out photos into separate iPhoto libraries to better manage my photos: ... Export photos from existing/old library ... Re-import photos into newly-created library Some of my e

  • Unable to Open Public folders from Windows XP after the upgrade of CU4 to Cu7

    We still have few machines running windows Xp, who cannot access Public folders after the upgrade to the latest CU7. Is there any fix for it other than moving them to Windows 7?