COLORING LINE IN ALV REPORT

Hi Experts,
I want to make color to parrticular line when it satisfies the condition in ALV report.
I am not using SLIS.
so is there any alternavite to clolor row on specific condition like...NETWR > 10000,
that row shold be in RED color.
Please give me Example of code.
Poins will be awarded soon.
Thanks,
Rohan

Hi,
You have to expand your internal table with a field named eg. LINE_COLOR wich has 4 char's.
Then in building your internal table you can set that field with the appropriate value.
eg.       wa_itab-line_color = C600.   "( red )
Then when calling your first display of your ALV you do this
alv_grid_layout-info_fname = 'LINE_COLOR'.
Then
call method alv_grid->set_table_for_first_display
That should do the trick.
Best regards,
Dirk.

Similar Messages

  • How to insert horizontal lines in alv report?

    hi,
        i have to insert horizontal lines in alv report.( RM07MLBB )
            actually my requirement is:
                               basis list = RM07MLBB.
    first secondary list = another report is called here ( RM07DOCS )
                      i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
    functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
        here in this program,
                        is_layout = alv_layout.
    hence i tried to give     
                  alv_layout-no_hline = ' '. 
    but not effecting.
              can some one please tell me , how to insert lines in the alv report.
    thanks in advance,
    Dastagir.

    hello,
         so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
           if same delivery challan number is repeating they should come in the same block,
    for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
                       in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED.

  • How to color row in ALV report?

    hi
    I am creating an ALV report using factory method.
    my report is based on itab which contain 3 coulms, 1 column is ERROR_TYPE . how can i color all the rows which contain E in error_type ???
    thanks
    Ami

    TABLES:LFA1.
    SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    REGIO LIKE LFA1-REGIO,
    SORTL LIKE LFA1-SORTL,
    CFIELD(4) TYPE C,
    END OF ITAB.
    data:col(4).
    data:num value '1'.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
    IN LIFNR.
    LOOP AT ITAB.
    concatenate 'C' num '10' into col .
    ITAB-CFIELD = col.
    num = num + 1.
    if num = '8'.
    num = '1'.
    endif.
    MODIFY ITAB.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA:EVE TYPE SLIS_T_EVENT WITH HEADER LINE.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
    LAYOUT-EDIT = 'X'.
    LAYOUT-info_fieldname = 'CFIELD'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    this is for coloring cols
    REPORT ZBHCOLOR_COLS.
    TABLES:LFA1.
    SELECT-OPTIONS:C_LIFNR FOR LFA1-LIFNR. " FOR GRID ONLY
    PARAMETERS:LIST RADIOBUTTON GROUP ALV DEFAULT 'X',
    GRID RADIOBUTTON GROUP ALV.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    SORTL LIKE LFA1-SORTL,
    REGIO LIKE LFA1-REGIO,
    COL TYPE LVC_T_SCOL,
    END OF ITAB.
    DATA:COLR TYPE LVC_S_SCOL.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
    LOOP AT ITAB.
    IF ITAB-LIFNR IN C_LIFNR.
    COLR-FNAME = 'NAME1'.
    COLR-COLOR-COL = '5'.
    COLR-COLOR-INT = '1'.
    COLR-COLOR-INV = '0'.
    COLR-NOKEYCOL = 'X'.
    APPEND COLR TO ITAB-COL.
    COLR-FNAME = 'LIFNR'.
    APPEND COLR TO ITAB-COL.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    LAYOUT-ZEBRA = 'X'.
    layout-coltab_fieldname = 'COL'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    IF LIST = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ELSEIF GRID = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ENDIF.
    Reward points if useful.

  • Color line in alv

    Please find details below ..
    This code in if statement do what I want (coloured cell )how can I colour my line .
    data definitions.
    DATA: BEGIN OF ztab OCCURS 0.
            INCLUDE STRUCTURE zskar_anz.
    DATA :  line_color TYPE shp_slis_t_specialcol_alv ,
            cell_color TYPE shp_slis_t_specialcol_alv .
    DATA: END OF ztab .
    IF ztab-stskz < 0 .
        ls_cell_color-fieldname = 'STSKZ'.
        ls_cell_color-color-col =  6.      "k&#305;rm&#305;z&#305;
        ls_cell_color-color-int =  0.
        APPEND ls_cell_color TO ztab-cell_color[].
        MODIFY ztab TRANSPORTING cell_color.
      ENDIF.

    Hi,
    See this code:
    Here is a sample program which illistrates the coloring in ALV grid.
    report zalv_0002 .
    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.
    at selection-screen output.
      perform get_data.
      perform fill_catalog.
      if w_docking_container is initial.
        perform create_objects.
      endif.
    *&      Form  create_objects
    form create_objects.
      create object w_docking_container
        exporting
          ratio                       = 60
        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.
    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.
      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.
    *&      Form  get_data
    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 '6'         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.
    *&      Form  fill_catalog
    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.
    I hope it helps u.
    Regards,
    Kumar

  • Field description in two line in ALV report

    Hi ,
    In ALV report I  want the description for each field to be displayed in two lines . For example
    the description for field matnr is " Material No for grade A " which is displayed in one line . But i want to display it as :  Material No
                                                           for grade A
    in two lines . Is it possible . Please help me out .
    Neetesh

    Hi Neetesh,
      Its not possible to display as you like in 2 lines header for single column. But i can provide the alternative way , it won't good logically. Please try the following logic.
    Let suppose you have 10 fields F1-f10. Each field has the 2 lines header. So take 20fields in your fields catalog ie take 10 dummy fields which are equal lenght of the fields F1-f10. and for the last 10 fields(F11-F20) set the row pos as 2, set the second line header to these field(F11-F20). So you will succed to display the 2 level header for single column. But the problem here is you will get one empty row additional row for each row. Because you have taken (F11-F20) fields are dummy and don't have the data also. This solution will works only in the case of ALV List display not in Grid Display.
      But Before that tell to your customer about this problem , Because I have done the same things when my customer giving important to 2 lines header and he accepeted that also.
    If suppose you have the data in 2 lines for each column then this solution will work fine. Thats what i implemented in my ALV Report.
    Warm Regards,
    Vijay.

  • "Custom" grouping and / or colored lines in ALV

    Hi!
    Two questions:
    1. Is it possible to use colors in the ALV for a given set of rows? I'd like to mark rows with a color, which are logically belongs together.
    2. Other approach would be to sort the ALV and via that the "similar" rows (i.e. some column values in the rows have the same value ) would be grouped.
    The normal ALV grouping feature is too general. E.g if the ALV contains a lot of empty cells, then those cells will be grouped as well, nevertheless they are logically don't belong together -> looks quite weird.
    If the custom grouping cannot be realized, then my approach would be the following:
    1. Sorting the table. -> rows where the content partially equal are in succession.
    2. Manually clear the cells in the second (in my business case only two lines can be partially equal, others are unique) row, which are the same as in the previous row.
    3. Use coloring to indicate that these two lines are belonging together.
    Best regards,
    Peter

    Hi Peter,
    It is possible to assign colors to a specific row. But you need to have some work around.
    You have to create an extra attribute for each column that you have in your table. The type of that attribute should be of WDUI_TABLE_CELL_DESIGN.
    After Instatiating your ALV Component you have to use the following statement for the column that you have to apply the color.
    ls_column-r_column->set_cell_design_fieldname( COLUMN1_DESIGN ). Assuming ls_column-r_column will have COLUMN1 as filed name.
    There are 16 colors that are defined and each combination from '00' to '15' will define one color.
    Look at the structure below.  Its a table with 4 columns(2nd and 4th represents colors for first and third columns)
    value11          00            value12          00
    value21          00            value22          00
    value31          02            value32          02.
    If you consider the above struture as your output table 3 rows and 4 columns  then your third row will be highlighted in green color because 02 represents green. You can hide your second column and fourth column in above example because they represents colors. Use the following statement to hide those columns.
    ls_column-r_column->set_visible(
                     cl_wd_uielement=>e_visible-none ). "ls_column-r_column will have 'COLUMN1_DESIGN'
    Let me know if you know more code.
    Thank You,
    Gajendra.

  • Reserve lines in alv report

    hi experts , how we reserve 15 lines from the top of the page in alv reports.
    regards
    subhasis

    If by reserve you mean should not move on scrolling then make them KEY from fieldcatalog.
    But I think maximum of 10-12 can be handled by that.
    Regards,
    Amit
    Reward all helpful replies.

  • How to select multiple lines in ALV report

    hi gurus,
    I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
    Regards,
    Satyajit

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      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.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 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.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    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_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        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 CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *       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'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "button add by me
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
    *       text
    *      -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
    *       text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
    *       text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
    here u can select morethan one line using control(ctrl)
    reward if usefull...

  • Output several lines in ALV report

    Hi all,
    My requirement is to output multiple lines (i.e. text lines) in a grid of an ALV report, so that user could later download it to an MS Excel sheet.
    Is there any solution to it?
    Many Thanks!
    e.g., target output is like this and all the text lines in Col B should belongs to 1 single record...
    Col A | Col B          |
    ===============
    rec1  | text line 1   |
    text line 2
    text line 3
    ===============
    rec2 |  text line 1  ||
    text line 2
    text line 3

    Thanks!
    Yes, I populated it, but each text line occupies one row ID, how can make it?
    can I display it as a table in a grid ?
    Thanks!

  • Logic needed to print blank line in alv report

    hi experts,
    can anyone please tell me the logic for this
    i want to logic one is
    1) in alv report contains
    a set of data contains 100 (5 datas)
    and a set of data contain 200(5 datas)
    i want to have one coloum containing serial no
    ex for 100 i want to move no '5' to one coloumn ,but it should display only ones not for all 5 records.
    same for 200 also i want to move 7 to this ,it should b displayed ones
    i used for at new command alos its not working
    2)suppose for particular date, 200 related records is not there
    it should conatin blank line,displaying 'NIL'.
    SO THE OPT FROMAT MUST BE
    MATNR            DOCNO
    100                  1000
    100                  1000
    100                    "
    100                     "
    100                    "
    200                   2000
    200                      "
    200                     "
    200                    "
    200                    "
    SUPPOSE 200 RECORD IS NOT THERE THE OPT SHLD B
    100           1000
    100            1000
    200           NIL

    Arun,
    1)
    If you are using the  function module REUSE_ALV_GRID_DISPLAY, then use the internal table it_sort with a row for the column where you want the suppression of repeated values.
    2)
    If you are using the  function module REUSE_ALV_GRID_DISPLAY, then simply ensure that your internal table t_outtab has the rows that you need containing 'NIL'.
    John

  • 2 header lines in ALV report

    Hello All,
                Does any one have any idea how to create 2 Header lines in an ALv report
    as in 1 cummulative header and under that 2nd detailed header.
    Please help me out.
    Cheers,
    Deepthee Kasal

    Hi,
    It is not possible to have 2 detailed headers in ALV reports.
    Regards,
    Satish

  • Add new line in ALV report on click of button...

    Dear All,
    How to add a new line for input in ALV report at runtime, on click of a button.
    Waiting for early and favorable reply.
    Regards,
    Dharmesh Vyas

    Hi,
    First of all u have to Create ur own PF-status and Assign Fcode e.g 'INSERTROW'.
    So, whenevr you will click Insertrow button it will be triggered in your User Command and then just Append the blank line in your Final Internal Table.
    And Refresh Icon will be there by default...
    To Trigger it You have to write rs_selfield-refresh = 'X'
    You can also follow the below link...
    Try it.
    Link:[http://wiki.sdn.sap.com/wiki/display/ABAP/ALVeasytutorial].
    Regards
    Arbind

  • Add new line in ALV report and Refresh button

    How to add a new line in a ALV report?
    How to add a refresh button in a report?

    Hi,
    First of all u have to Create ur own PF-status and Assign Fcode e.g 'INSERTROW'.
    So, whenevr you will click Insertrow button it will be triggered in your User Command and then just Append the blank line in your Final Internal Table.
    And Refresh Icon will be there by default...
    To Trigger it You have to write rs_selfield-refresh = 'X'
    You can also follow the below link...
    Try it.
    Link:[http://wiki.sdn.sap.com/wiki/display/ABAP/ALVeasytutorial].
    Regards
    Arbind

  • Skip 1 Line in ALV report.....

    Hi Experts,
    I have made ALV report in which user wants one blank line after each row.
    How to skip one line after each row in ALV ?
    Yusuf

    Hi Yusuf,
    It is really a typical requirement.
    There is a solution to that.
    In the internal table that you are passing to the function module, append a blank line to that itself.
    Like:
    LOOP AT itab INTO wa.
      APPEND wa TO itab3.
      CLEAR wa.
      APPEND wa TO itab3.
    ENDLOOP.
    REFRESH itab.
    itab[] = itab3[].
    But remember not to do sorting after that or not to pass the sorting table parameters.
    If you have an extra line at the bottom you can delete that by reading the number of lines through the describe statement and delete  the last row of the table.
    Try this hiope this will work.
    Reward points if found useful.
    Thanks & regards
    Abhijit

  • Reserved lines in ALV report

    Hi Experts,
    I have written few lines of code in "HTML_TOP_OF_PAGE" sub routine. This subroutine I am using in ALV. like below...
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM                  = G_REPID
          I_CALLBACK_HTML_TOP_OF_PAGE = 'HTML_TOP_OF_PAGE'
          IS_LAYOUT                                       = GS_LAYOUT
          IT_FIELDCAT                                    = IT_FIELDS
          IT_SORT                                           = IT_SORT
          I_SAVE                                             = 'A'
          IS_VARIANT                                      = G_VARIANT
        TABLES
          T_OUTTAB                                        = ITAB
        EXCEPTIONS
          PROGRAM_ERROR                           = 1
          OTHERS                                           = 2.
    I would like to reserve some lines for the top of page. i mean After displaying the data in top of page, ITAB data should be displayed.Now we can only visible three lines data only. still there are six lines are there. After displaying another six lines the Itab data should be displayed in ALV table.
    Of course, we can drag down my data table. But user doesn't want to see without any efforts.
    Pls help me.
    Thanks in advance
    Raghu

    CALL METHOD document->add_gap
        EXPORTING
          width = 50. should help you..
    FORM html_top_of_page USING document TYPE REF TO cl_dd_document.
      DATA: text TYPE sdydo_text_element.
      CALL METHOD document->add_gap
        EXPORTING
          width = 100.
      text =  'Jay custom ALV'.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'HEADING'.
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      CALL METHOD document->new_line.
      text = 'User Name : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      text = sy-uname.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
      text = 'Date : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      DATA: zword TYPE string, zdd TYPE string, zmmm TYPE string,
            zyyyy TYPE string, zfin TYPE string.
      CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
        EXPORTING
          input  = sy-datum
        IMPORTING
          output = zword.
      zdd = zword+3(2).
      zmmm = zword+0(3).
      zyyyy = zword+7(2).
      CONCATENATE zdd '-' zmmm '-' zyyyy INTO zfin.
      text = zfin.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 50.
      text = 'Time : '.
      CALL METHOD document->add_text
        EXPORTING
          text         = text
          sap_emphasis = 'Strong'.
      CALL METHOD document->add_gap
        EXPORTING
          width = 6.
      text = sy-uzeit.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->new_line.
      text = lv_count.
      CALL METHOD document->add_text
        EXPORTING
          text      = text
          sap_style = 'Key'.
      CALL METHOD document->new_line.
    ENDFORM.                    "HTML_TOP_OF_PAGE

Maybe you are looking for

  • Kann mich nicht mehr Creative Cloud anmelden

    Hallo Wenn ich mich auf meinem Bildbearbeitungs PC via Tool an der Creative Cloude anmelden möchte (Adobe-ID und Passwort) kommt nach 2 - 3 Sekunden immer die Meldung "Abgemeldet - Melden Sie sich an, um fortzufahren". Das kann ich machen so viel ich

  • Is there a view that looks like Outlook Today?

    Hi, I'm looking for a view on ical that shows events as a list, sort of like Outlook's Outlook Today view. Here's an example: http://farm4.static.flickr.com/3160/2455654848_0e2ba49d64.jpg Any ideas on this?

  • Migration assistant - oops!

    I just used migration assistant to migrate from an internal drive (MacHD). MacHD used to live in my Dual PowerMac G5. The migration took a long time, as the estimated time remaining counted down from 2 hours to "less than a minute left". It sat at "l

  • Qosmio X500-10W - Can I replace the HDD with another one?

    Hello I have a Qosmio X500-10W with two HDD Toshiba MK5055GSX 500GB 5400RPM 8MB ??SATA II but is one of hs so I wonder if I can be replaced by a more powerful style HDD 750GB 7200tr / min 16MB Toshiba course? merci

  • Library item changed apperance.

    I committed my nav bar ul to a library item and now the appearance of my nav bar has an off white background and I cannot change it back.  Why did this happen?  Thank you.