To Display Image in Alv Grid....

Hello Gurus,
I want to display an image/icon ( custom icon ) in the ALV grid.
I know to display standard icons in ALV. But i dont know how to store custom icons in the system.
I want to display an icon or image depending upon certain conditions. i need to display these images/icons for each row of the ALV grid.
Please let me know if i can show images or icons ( not standard ) for each row in ALV grid.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 25, 2008 10:20 AM

check out CL_GUI_PICTURE and the demo programs
SAP_PICTURE_DEMO
SAP_PICTURE_DEMO_ICON
RSDEMO_PICTURE_CONTROL
you can fit the picture in to the control with the following modes.
DISPLAY_MODE_FIT
other options
DISPLAY_MODE_NORMAL
DISPLAY_MODE_STRETCH
DISPLAY_MODE_NORMAL_CENTER
DISPLAY_MODE_FIT_CENTER
Regards
Raja

Similar Messages

  • Not able to display logo on alv grid output

    hi
    can anybody guide me.
    i have written code for displaying logo on alv grid report.
    i uploaded bmp image using OAER
    but even then i am not able to display logo on the report please help me
    i am using 4.7 version..
    code...
    REPORT  ZALVLOGO                                .
    type-pools: slis.
    data: i_sflight type table of sflight.
    *data: begin of i_sflight occurs 10.
    *include structure sflight.
    *data: end of i_sflight.
    data: it_events type slis_t_event,
           wa_events type slis_alv_event.
    select * from sflight into table i_sflight.
    perform form_fill_table.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_TOP_OF_PAGE            = 'top-of-page'
       I_STRUCTURE_NAME                  = 'sflight'
      TABLES
        T_OUTTAB                          = i_sflight
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *&      Form  top_of_page
          text
    -->  p1        text
    <--  p2        text
    FORM top-of-page .
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader.
    wa_header-typ = 'h'.
    wa_header-info = 'FLIGHT DETAILS'.
    APPEND wa_header to t_header.
    CLEAR WA_HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        IT_LIST_COMMENTARY       = t_header
        I_LOGO                   = 'ENJOY'.
      I_END_OF_LIST_GRID       =.
    ENDFORM.                    " top_of_page
    *&      Form  form_fill_table
          text
    -->  p1        text
    <--  p2        text
    FORM form_fill_table .
    clear wa_events.
    wa_events-name = 'top-op-page1'.
    wa_events-form = 'top-of-page'.
    append wa_events to it_events.
    ENDFORM.                    " form_fill_table

    hi ,
    First upload images  in SAP using transaction se78
    http://www.howforge.com/step-by-step-upload-bitmap-images-to-sap
    Then use that Image name to call using function module 
    in top of -page 
    call function 'REUSE_ALV_COMMENTARY_WRITE'
          exporting
            i_logo             = 'KAL1_LOGO'
            it_list_commentary = lt_top_of_page_no_sel.
    Regards
    Deepak.

  • Display amount in ALV Grid with different Decimal Places based on Currency

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
    we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65
    i need to display values like AED : 22.56

    HI Experts,
    Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
    im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
    AED---22.56
    KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
    i need to display values like AED : 22.56
                                             KWD---22.565 but here field is NETWR with 2 decimal.
    Need to Display amount in ALV Grid with different Decimal Places based on Currency
    Regards,
    Dileep Kumar Reddy

  • WD4A : Displaying images in ALV table

    Hi,
    Does anyone know how to display images in ALV tables in Webdynpro?

    Hello,
    You can define an attribute in the context with the type CHAR 30 and define it value like an icon from WDA (like ~Icon/GreenLed). And then you need to create an method to define the attributes of the column that will have the image like follows:
    METHOD display_alv .
      DATA: lr_alv_usage       TYPE REF TO   if_wd_component_usage,
            lr_config          TYPE REF TO   cl_salv_wd_config_table,
            lr_col_header      TYPE REF TO   cl_salv_wd_column_header,
            lr_function_wd     TYPE REF TO   cl_salv_wd_function,
            lr_button          TYPE REF TO   cl_salv_wd_fe_button,
            lr_image           TYPE REF TO   cl_salv_wd_uie_image,
            lr_header          TYPE REF TO   cl_salv_wd_header,
            lr_uie_link        TYPE REF TO   cl_salv_wd_uie_link_to_action,
            lr_if_controller   TYPE REF TO   iwci_salv_wd_table,
            lr_function_set    TYPE REF TO   if_salv_wd_function_settings,
            lr_table_settings  TYPE REF TO   if_salv_wd_table_settings,
            lr_column_settings TYPE REF TO   if_salv_wd_column_settings.
      DATA: lt_columns         TYPE          salv_wd_t_column_ref,
            ls_column          TYPE          salv_wd_s_column_ref,
            lv_text            TYPE          string.
    * Instantiate ALV Component
      lr_alv_usage = wd_this->wd_cpuse_all_alv( ).
      IF lr_alv_usage->has_active_component( ) IS INITIAL.
        lr_alv_usage->create_component( ).
      ENDIF.
    * get reference to model
      lr_if_controller = wd_this->wd_cpifc_all_alv( ).
      lr_config        = lr_if_controller->get_model( ).
    * modify visible rows
      lr_config->if_salv_wd_table_settings~set_visible_row_count( iv_rows ).
      lr_config->if_salv_wd_table_settings~set_selection_mode(
                                           wd_assist->co_alv_selmode ).
    * create function
      lr_function_set ?= lr_config.
      lr_function_wd = lr_function_set->create_function(
                       wd_assist->co_func_det_nfe ).
      CREATE OBJECT lr_button.
    *read text
      lv_text = wd_assist->read_text( iv_key = '002' ).
      lr_button->set_text( lv_text ).
      lv_text = wd_assist->read_text( iv_key = '001' ).
      lr_button->set_tooltip( lv_text ).
      lr_button->set_image_source( wd_assist->co_icon_seldet ).
      lr_function_wd->set_editor( lr_button ).
    * set table header
      lr_table_settings ?= lr_config.
      lr_header = lr_table_settings->get_header( ).
      lv_text = wd_assist->read_text( iv_key = '003' ).
      lr_header->set_text( lv_text ).
      lv_text = wd_assist->read_text( iv_key = '004' ).
      lr_header->set_tooltip( lv_text ).
      lr_header->set_image_source( wd_assist->co_icon_list ).
      lr_column_settings ?= lr_config.
      lt_columns = lr_column_settings->get_columns( ).
      LOOP AT lt_columns INTO ls_column.
        CASE ls_column-id.
          WHEN 'ICON'.
            CREATE OBJECT lr_image.
            lr_image->set_source_fieldname( ls_column-id ).
            lr_image->set_tooltip_fieldname( 'ICON_TOOLTIP' ).
            ls_column-r_column->set_cell_editor( lr_image ).
          WHEN 'ID'.
            CREATE OBJECT lr_uie_link.
            lr_uie_link->set_text_fieldname( ls_column-id ).
            ls_column-r_column->set_cell_editor( lr_uie_link ).
          WHEN 'ICON_TOOLTIP' or 'LOGSYS'.
            ls_column-r_column->set_visible(
                               cl_wd_uielement=>e_visible-none ).
        ENDCASE.
    *set header binding of medium description, otherwise title
        lr_col_header = ls_column-r_column->get_header( ).
        lr_col_header->set_ddic_binding_field(
                            if_salv_wd_c_column_settings=>ddic_bind_medium ).
      ENDLOOP.
    ENDMETHOD.
    Here will be showed an icon (column ICON) and an link (column ID).
    Regards,

  • Not gettting quantity displayed in the alv grid

    hi experts
    iam displaying vbeln, matnr, quantity, sellingprice etc for an customer using fieldcat. in alv grid.
    iam able to get all the fields other than quantity in the output.
    i have taken vbap-kwmeng, actually in the va03 it is displaying from komp.
    i have tried with the following
      wa_fieldcat-col_pos =  5.
      wa_fieldcat-fieldname = 'KWMEMG'.
      wa_fieldcat-tabname = 'IT_DISPLAY'.
    wa_fieldcat-datatype =  'QUAN'.
      wa_fieldcat-outputlen = 15.
      wa_fieldcat-seltext_m = 'QUANTITY'.
    wa_fieldcat-ref_fieldname = 'KWMENG'.
    wa_fieldcat-ref_tabname = 'VBAP'.
    wa_fieldcat-qfieldname = 'VRKME'.
    wa_fieldcat-qtabname   =  'VBAP'.
    but iam not getting the respective output.
    please help
    thanks in advance.
    maaya

    I am not sure why are you not getting :
    Just remove col_pos and see the results,and also increase output len to 18.
    <b>clear wa_fieldcat.</b>
    wa_fieldcat-col_pos = 5. -> first comment and see the results
    wa_fieldcat-fieldname = 'KWMEMG'.
    wa_fieldcat-tabname = 'IT_DISPLAY'.
    wa_fieldcat-outputlen = 18.
    wa_fieldcat-seltext_m = 'QUANTITY'.
    wa_fieldcat-seltext_s = 'QUANTITY'.
    wa_fieldcat-seltext_l = 'QUANTITY'.
    <b>append wa_fieldcat to i_fieldcat.</b>
    Always clear the wa_fieldcat.
    Thanks
    Seshu

  • Display button in ALV Grid

    Hi,
    I have a requirement in ALV:
    I need to display a button on the top of alv grid list.Could you please help me out with this.
    Thanks,
    Sandeep

    Hi,
    In the below links some ALV GRID programs are there.Once u check this.I think this is very helpful to u.
    http://www.abap-tutorials.com/tag/alv-grid/
    TO achieve this you should copy the u2018STANDARDu2019 GUI status from program SAPLKKBL using transaction SE90 u2013>Programming SubObjectsu2013> Gui Status.
    Steps:
    1). Using SE80/SE41 you can copy a GUI status from one program to another. It mentions which one in the FMu2019s help.
    2). Create a form named like so:
    Code:
    Form Set_pf_status
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS u2018ZSTANDARDu2019.
    ENDFORM. u201CSet_pf_status
    In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called u2018%DELETEu2019.
    3). Create the following report:
    Code:
    Form User_command
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
           Detects whether the icon/button for
           u2018Return Tag Deletionu2019 has been pressed. If it has then
           detect whether any rows have been highlighted and then
           set the delete flag.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    DATA: li_count TYPE I.
    IF r_ucomm EQ u2018%DELETEu2019.
      LOOP AT %g00 WHERE mark EQ u2018Xu2019.
        ADD 1 TO li_count.
      ENDLOOP.
      IF li_count GT 0.
        gc_delete_flag = u2018Xu2019.
        r_ucomm = u2018&F03u2032. u201CBack arraow
      ELSE.
        MESSAGE W000 WITH u2018Please highlight the rows to be deleted!u2019.
      ENDIF.
    ENDIF.
    ENDFORM.  u201CUser_command
    As Iu2019ve added an extra button to indicate which records should be deleted I need to identify a form to be called to process when this button is chosen.
    Then when you call the ALV function you to specify the following extra details:
    Code:
        call function u2018REUSE_ALV_GRID_DISPLAYu2019
             exporting  i_callback_program = gc_repid
                        I_CALLBACK_PF_STATUS_SET = u2018SET_PF_STATUSu2019
                        I_CALLBACK_USER_COMMAND  = u2018USER_COMMANDu2019
                        i_grid_title       = lc_grid_title
                        is_layout          = lc_layout
                        it_fieldcat        = gt_fieldcat
                        it_sort            = sort
                        i_save             = l_save
                        is_reprep_id       = l_bbs_id
                        is_variant         = l_variant
             tables     t_outtab           = %g00
             exceptions program_error      = 1
                        others             = 2.
    The parameters in capitals are the extra ones that need to be added.

  • Display zeros in ALV grid

    I have a strange problem with an ALV grid.
    I have used the FM "LVC_FIELDCATALOG_MERGE" to create a fieldcatalog from a structure. The structure contains a field called NETWR that is based on the NETWR data element (which is a CURR data type).
    When the grid is displayed, however, zero values are not displayed - the cell is blank.
    I thought the default behaviour for a CURR field was to display zeros?
    I have checked and the NO_ZERO field in the fieldcat is initial.
    Any other ideas?

    According to this link, it has to be displayed. Check it one more time whether you set No_zero is initial or not.
    http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649baf17411d2b486006094192fe3/frameset.htm
    Warm Regards,
    Vijay

  • Display image into Data Grid

    Hello,
    I have to display into a data grid, in Flex 2, 2 columns:
    first column ( "Images") must contain a picture with an object and
    second column (" quantity") must contain the amount of that object
    that I want to buy. The problem is that I must take the name of the
    image from an .xml file, specified like this:
    <mx:DataGrid id="obj" dataProvider="{ObjList}" > where
    ObjList is the .xml file with <name/>
    <picture_address/> etc.
    The second column must contain a textbox so I can input a
    number of items for each picture ( can be also a combobox where
    from I can select some value, from 1 to 20 for example).
    I've searched the Internet and I haven't found a solution
    yet. Please give me a link or a solution for this problem.
    Tudor

    use itemrenderes.... the example below shows how to add an
    image.... you can do the same thing with a text box or combo box
    <mx:DataGridColumn width="10" headerText="Image">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Canvas width="100%" height="100%">
    <mx:Image verticalCenter="0" horizontalCenter="0"
    source="{data.picture_adress}""/>
    </mx:Canvas>
    </mx:Component>
    </mx:itemRenderer>

  • To display Title In ALV Grid Display on first line of table

    Hi SAP Experts,
             Here is one Issue..
    I have some check boxes on selection screens,
    When i have selected one,
    The related title should be display on the first line of Itab[]...
    and if once collect is used to suppress the data
    with the same itab can we print normal itab and how...
    Waiting for Your Reply.....
    Thanks In Advance

    Hi Krishna,
    I can't imagine what you want.
    In ALV grid object, you can change the title text for each column displayed. This is done via field catalog or, in SALV, column object methods.
    In ALV fullscreen, you can define a TOP-OF-PAGE area where you may have what ever you want independent from the grid table content. I think you can not use this because you have the grid in a container.
    You may define it as a docking or splitter container and place the grid in lower and the title in upper area. But this will need some experience with container controls and a certain level of coding abilities.
    Regards,
    Clemens

  • Making  selected rows to display mode in ALV  grid

    I Have program with ALV grid display, which has check box as the first field.
    The requirement is like.
    When i select some rows in the grid display with the check box and click on a button , then the selected
    rows shud change to display mode and others rows shud be in edit mode as before.
    *& Report  ZSRI_CHCKBOX_ITAB_UPDATE
    REPORT  ZSRI_CHCKBOX_ITAB_UPDATE.
    TYPE-POOLS: SLIS.
    DATA: BEGIN OF ITAB OCCURS 0,
            CHK    TYPE C,
            VBELN  TYPE VBAP-VBELN,
            POSNR  TYPE VBAP-POSNR,
            MATNR  TYPE VBAP-MATNR,
            MATWA  TYPE VBAP-MATWA,
            MATKL  TYPE VBAP-MATKL,
          END OF ITAB.
    DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
          W_FCAT TYPE SLIS_FIELDCAT_ALV,
          RT TYPE SLIS_SELFIELD,
          W_LAYOUT TYPE SLIS_LAYOUT_ALV  .
    PARAMETERS: S_VBELN TYPE VBAK-VBELN.
    DATA: WA LIKE LINE OF ITAB.
    DATA: G_GRID_REFERENCE TYPE REF TO CL_GUI_ALV_GRID.
    DATA: BEGIN OF ITAB1 OCCURS 0,
            CHK    TYPE C,
            VBELN  TYPE VBAP-VBELN,
            POSNR  TYPE VBAP-POSNR,
            MATNR  TYPE VBAP-MATNR,
            MATWA  TYPE VBAP-MATWA,
            MATKL  TYPE VBAP-MATKL,
          END OF ITAB1.
    DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
    START-OF-SELECTION.
      SELECT VBELN POSNR MATNR MATWA MATKL FROM VBAP
        INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE   VBELN EQ S_VBELN.
      W_FCAT-COL_POS = 1.
      W_FCAT-FIELDNAME = 'CHK'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-CHECKBOX = 'X'.
      W_FCAT-EDIT = 'X'.
      W_FCAT-SELTEXT_L  = 'CHECK'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 2.
      W_FCAT-FIELDNAME = 'VBELN'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-SELTEXT_L  = 'SALES'.
      W_FCAT-EDIT = 'X'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 3.
      W_FCAT-FIELDNAME = 'POSNR'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-SELTEXT_L  = 'ITEM'.
      W_FCAT-EDIT = 'X'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 4.
      W_FCAT-FIELDNAME = 'MATNR'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-SELTEXT_L  = 'MATERIAL'.
      W_FCAT-EDIT = 'X'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 5.
      W_FCAT-FIELDNAME = 'MATWA'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-SELTEXT_L  = 'MATERIAL QTY'.
      W_FCAT-OUTPUTLEN = 20.
      W_FCAT-EDIT = 'X'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 6.
      W_FCAT-FIELDNAME = 'MATKL'.
      W_FCAT-TABNAME = 'ITAB'.
      W_FCAT-SELTEXT_L  = 'MATERIAL GROUP'.
      W_FCAT-OUTPUTLEN = 20.
      W_FCAT-EDIT = 'X'.
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = SY-REPID
         I_CALLBACK_PF_STATUS_SET          = 'STATUS1'
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         IS_LAYOUT                         = W_LAYOUT
         IT_FIELDCAT                       = T_FCAT[]
        TABLES
          T_OUTTAB                          = ITAB[].
    *&      Form  STATUS1
    FORM STATUS1 USING P_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STATUS1' EXCLUDING P_EXTAB.
    ENDFORM.                    "PF_STATUS_SET
    *&      Form  USER_COMMAND
    FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
                            R_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'READ'.
    R_SELFIELD-REFRESH = 'X'.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              E_GRID = G_GRID_REFERENCE.
          CALL METHOD G_GRID_REFERENCE->CHECK_CHANGED_DATA.
          LOOP AT ITAB INTO WA WHERE CHK = 'X'.
            APPEND WA TO ITAB1.
          ENDLOOP.
          W_FCAT1-COL_POS = 1.
          W_FCAT1-FIELDNAME = 'CHK'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-CHECKBOX = 'X'.
          W_FCAT1-SELTEXT_L  = 'CHECK'.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          W_FCAT1-COL_POS = 2.
          W_FCAT1-FIELDNAME = 'VBELN'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-SELTEXT_L  = 'SALES'.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          W_FCAT1-COL_POS = 3.
          W_FCAT1-FIELDNAME = 'POSNR'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-SELTEXT_L  = 'ITEM'.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          W_FCAT1-COL_POS = 4.
          W_FCAT1-FIELDNAME = 'MATNR'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-SELTEXT_L  = 'MATERIAL'.
          W_FCAT-OUTPUTLEN = 20.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          W_FCAT1-COL_POS = 5.
          W_FCAT1-FIELDNAME = 'MATWA'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-SELTEXT_L  = 'MATERIAL TYPE'.
          W_FCAT-OUTPUTLEN = 20.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          W_FCAT1-COL_POS = 6.
          W_FCAT1-FIELDNAME = 'MATKL'.
          W_FCAT1-TABNAME = 'ITAB'.
          W_FCAT1-SELTEXT_L  = 'MATERIAL GROUP'.
          W_FCAT-OUTPUTLEN = 20.
          APPEND W_FCAT1 TO T_FCAT1.
          CLEAR W_FCAT1.
          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
              I_CALLBACK_PROGRAM = SY-REPID
              IT_FIELDCAT        = T_FCAT1[]
              IS_LAYOUT          = W_LAYOUT
            TABLES
              T_OUTTAB           = ITAB[].
    CLEAR ITAB1.
    CLEAR ITAB1[].
    CLEAR T_FCAT1.
    CLEAR T_FCAT1[].
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Edited by: dharmaji Srinivasu on Feb 6, 2009 1:22 PM

    Hi
    Check out the following links:
    http://www.sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm  " To obtain selected rows
    http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm  "To make cells editable
    In the case stmt for particular button you can do:
    loop at itab into wa.
          if wa-sel EQ 'X'.
          Process records that have been selected
          endif.
    endloop.
    Hope this helps
    Regards,
    Jayanthi.K

  • Like SM30 ,table should be display in editable ALV Grid(for Dynamic DB )

    Hi Friends,
    plese help me how to display  ALV grid in editable mode for differnt types of data base tables.
    same as like SM30 transaction.
    Moderator message: please search for available information/documentation/previous discussions before asking.
    Edited by: Thomas Zloch on Nov 11, 2010 6:40 PM

    Hi,
    In SLIS_T_FIELDCAT_ALV you specify the field as edit = X.
    Give it as mentioned, where you assign fieldname and positions etc.
    Thanks&Regards

  • Two Internal tables to be displayed as separate ALV grid.

    Hi Friends,
    I have 2 internal tables say i_tab1 and i_tab2.
    I_TAB1 contains 10 records.
    I_TAB2 contains 15 records.
    My requirement is to display I_TAB1 with title 'Success Records' and ITAB2 with title 'Missed Records'.
    It should be done thro ALV grid Display. I can do using ALV LIST Display. But I need using GRID display.
    Its version 4.6C.
    How to do this?
    Regards,
    Viji

    Hi,
    Use a container and the spliters as below:
    DATA: container1   TYPE REF TO cl_gui_container,
          container2   TYPE REF TO cl_gui_container,
          container3   TYPE REF TO cl_gui_container,
          main1        TYPE REF TO cl_gui_custom_container,
          splitter1    TYPE REF TO cl_gui_splitter_container,
          grid1        TYPE REF TO cl_gui_alv_grid,
          grid2        TYPE REF TO cl_gui_alv_grid,
          grid3        TYPE REF TO cl_gui_alv_grid,
          ls_layo      TYPE lvc_s_layo,
          count        TYPE i VALUE 0,
          g_okcode     LIKE sy-ucomm,
          r1,r2.
    DATA: alv_fcat     TYPE lvc_t_fcat WITH HEADER LINE.
    * First Main Container
    CREATE OBJECT main1
           EXPORTING container_name = 'MAIN_CONTAINER'.
    * First Splitter Container
    CREATE OBJECT splitter1
           EXPORTING parent  = main1
                     rows    = 2
                     columns = 1.
    * Place Container1 in First row First column
    CALL METHOD splitter1->get_container
      EXPORTING
        row       = 1
        column    = 1
      RECEIVING
        container = container1.
    * Place Container2 in Second row First column
    CALL METHOD splitter1->get_container
      EXPORTING
        row       = 2
        column    = 1
      RECEIVING
        container = container2.
    * Create grids
      CREATE OBJECT grid1
             EXPORTING i_parent      = container1.
      CREATE OBJECT grid2
             EXPORTING i_parent      = container2.
    CALL METHOD grid1->set_table_for_first_display
        EXPORTING
          is_layout       = ls_layo
        CHANGING
          it_outtab       = itab1[]
          it_fieldcatalog = alv_fcat[].
    * Display itab2 in grid2
      CALL METHOD grid2->set_table_for_first_display
        EXPORTING
          is_layout       = ls_layo
        CHANGING
          it_outtab       = itab2[]
          it_fieldcatalog = alv_fcat[].

  • Problem in displaying data in alv grid.

    Hi Experts,
    I am using the class CL_GUI_ALV_GRID for displaying my data in the ALV Grid.
    But I have a requirement
    If there are more than one record with the same values in some fields I have to display the values in the first record itself . for other records I have to display the record with the fields having different values of the previous record.
    And another requirement is When the user use the scroll bar regarding the same datas, the first record displayed will contain the datas used.
    How can we achieve this functionality?
    Regards
    Kasinath

    Hi,
    while preparing internal table to be passed to ALV, you have to implement the logic for these scenarios.
    Regards,
    Raghavendra

  • How to display tooltip in ALV GRID CELL?

    Hello,
    I'm trying to display dynamic tootips for data in ALV GRID Cells.
    My ALV Gid Cells content does not display Icon or symbol or Exception but pure data (In my case dates).
    Is there a way to do display a toolip that will change dynamicaly according to a rule.
    I took a look at the BCALV_DEMO_TOOLTIP program
    but it does not answer my expectation since it display
    toltip for Icon or symbol or Exception.
    Can someone help on this case.
    Best regards
    Harry

    Hai Harry
    •     icon
    value set: SPACE, 'X'           'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    •     symbol
    value set: SPACE, 'X'          'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    Thanks & regards
    Sreenu

  • Displaying amounts in ALV grid

    hi,
    iam fetching ESBTR from FEBKO which i have to display using ALV grid.
    but the problem is when there is no value in that field it should display zeros 0.00
    but it is displaying space.
    can somebody help me in this.
    neha

    hi,
    I tried using no_zero property also .Iam sending the sample code . please check it.
    *& Report  ZTEST17                                                     *
    REPORT  ZTEST17                                 .
    type-pools: slis.
    types: begin of x_tab1,
           bukrs type bukrs,
           hbkid type hbkid,
           hktid type hktid,
           bankn type bankn,
           waers type waers,
           hkont type hkont,
           ESBTR type ESBTR_EB,
           AZDAT type AZDAT_EB,
           end of x_tab1,
           begin of x_tab2,
           KUKEY type KUKEY_EB,
           ESBTR type ESBTR_EB,
           AZDAT type AZDAT_EB,
           waers type waers,
           end of x_tab2.
    data: t_tab1 type standard table of x_tab1,
          w_tab1 type x_tAb1,
          t_tab2 type standard table of x_tab2,
          w_tab2 type x_tab2.
    data: g_bukrs type bukrs,
          g_hbkid type hbkid,
          g_hktid type hktid,
          g_kukey type KUKEY_EB.
    DATA: afield     TYPE slis_fieldcat_alv,
          t_fieldcat TYPE slis_t_fieldcat_alv.
    data: l_tabix type sy-tabix.
    select-options: s_bukrs for g_bukrs,
                    s_hbkid for g_hbkid,
                    s_hktid for g_hktid,
                    s_kukey for g_kukey.
      SELECT bukrs hbkid hktid bankn waers hkont
        INTO CORRESPONDING FIELDS OF TABLe t_tab1
        FROM t012k
       WHERE bukrs IN s_bukrs
         AND hbkid IN s_hbkid
         AND hktid IN s_hktid.
    LOOP AT T_TAB1 into w_tab1.
    l_tabix = sy-tabix.
          SELECT kukey esbtr azdat waers
          INTO TABLE t_tab2
          FROM febko
          WHERE anwnd = '0001'
          AND hkont = w_tab1-hkont
          AND bukrs = w_tab1-bukrs
          AND kukey IN s_kukey.
          SORT t_tab2 BY kukey DESCENDING.
          READ TABLE t_tab2 into w_tab2 INDEX 1.
         if sy-subrc eq 0.
         move w_tab2-esbtr TO w_tab1-esbtr .
         modify t_tab1 from w_tab1 index l_tabix.
         endif.
    endloop.
      CLEAR afield.
      afield-fieldname     = 'BUKRS'.
      afield-ref_tabname   = 'BSEG'.
      afield-ref_fieldname = 'BUKRS'.
      afield-col_pos       = '1'.
      APPEND afield TO t_fieldcat.
    House Bank Account
      CLEAR afield.
      afield-fieldname     = 'HBKID'.
      afield-ref_tabname   = 'T012K'.
      afield-ref_fieldname = 'HBKID'.
      afield-col_pos       = '2'.
      APPEND afield TO t_fieldcat.
    House Bank Account ID
      CLEAR afield.
      afield-fieldname     = 'HKTID'.
      afield-ref_tabname   = 'T012K'.
      afield-ref_fieldname = 'HKTID'.
      afield-col_pos       = '3'.
      APPEND afield TO t_fieldcat.
    Bank Name
      CLEAR afield.
      afield-fieldname     = 'BANKN'.
      afield-ref_tabname   = 'BNKA'.
      afield-ref_fieldname = 'BANKN'.
      afield-col_pos       = '4'.
      APPEND afield TO t_fieldcat.
    Currency
      CLEAR afield.
      afield-fieldname     = 'WAERS'.
      afield-ref_tabname   = 'TCURC'.
      afield-ref_fieldname = 'WAERS'.
      afield-col_pos       = '5'.
      APPEND afield TO t_fieldcat.
    G/L Account
      CLEAR afield.
      afield-fieldname     = 'HKONT'.
      afield-ref_tabname   = 'T012K'.
      afield-ref_fieldname = 'HKONT'.
      afield-col_pos       = '6'.
      APPEND afield TO t_fieldcat.
    Bank Account Balance
      CLEAR afield.
      afield-fieldname     = 'ESBTR'.
      afield-no_zero       = ' '.
      afield-reptext_ddic  = 'Bank Statement Balance'.
      afield-just          = 'L'.
      afield-cfieldname    = 'KRW'.
      afield-ref_fieldname = 'ESBTR'.
      afield-ref_tabname   = 'FEBKO'.
      afield-col_pos       = '7'.
      APPEND afield TO t_fieldcat.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM             = sy-repid
       IT_FIELDCAT                    = t_fieldcat
      TABLES
        t_outtab                       = t_tab1[]
    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.

Maybe you are looking for

  • Error when installing Itunes 7, need help!

    Everytime i try installing the new itunes 7, i get this error, http://img84.imageshack.us/my.php?image=ituneshelpsl5.png

  • How to use recovery dvd on new hard drive, install window 7

    hello, i have trouble with my laptop. my hard drive got bad sectors and now i need to replace my hdd to new one. im not sure how to reinstall window 7 on my new hdd. is it possible to install operating system on new hard drive using recovery disk? an

  • Blocking URL to next page in JSP

    Hi I am creating simple Login Application using JSP. In "Login.jsp" I enter values of UserName & Password into textboxes and then submit the form. When I click Submit Button control(action) goes to "index.jsp". In "index.jsp" I retrive values of User

  • Folder level javascript.

    how can i use getNthPageWord methode from folder level script.

  • Adobe Reader & DirectX 11

    Operating system is Win Vista Home Premium 32 bit.  After installing DirectX 11 some months ago I can no longer view a particular PDF though have no problem with others.  Current Adobe Reader is 9.3 which shows the Preferred Renderer opertions as Dir