Image / Picture in alv Cell

Can i display a image or an icon in a particular column of alv?

Hi, Gopal
Hi, Test the following code i have tested it is appearing the ICOM in the Cells of ALV.
TABLES : ekpo.
TYPE-POOLS : slis.
Type-pools: icon.
TYPES : BEGIN OF t_ekpo,
        ebeln TYPE ekpo-ebeln,
        ebelp TYPE ekpo-ebelp,
        matnr TYPE ekpo-matnr,
        werks TYPE ekpo-werks,
        menge TYPE ekpo-menge,
        status(4) type c,
        END OF t_ekpo.
*VARIABLES
DATA : check(1),
       rep_id TYPE sy-repid.
*INTERNAL TABLE TYPE OF ZEKPO
DATA : it_ekpo TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE.
*FIELD CATALOG
DATA : it_field TYPE slis_t_fieldcat_alv,
       wa_field TYPE slis_fieldcat_alv.
*SORTING
DATA : it_sort TYPE slis_t_sortinfo_alv,
       wa_sort TYPE slis_sortinfo_alv.
INITIALIZATION.
  check = 'X'.
  rep_id = sy-repid.
START-OF-SELECTION.
  SELECT ebeln
         ebelp
         matnr
         werks
         menge
         FROM ekpo
         INTO CORRESPONDING FIELDS OF it_ekpo.
    Write icon_green_light as icon to it_ekpo-status. " Here is Solution
    APPEND it_ekpo to it_ekpo.
    ENDSELECT.
*          FIELD CATALOG
  wa_field-fieldname = 'EBELN'.
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 10.
  wa_field-seltext_l = 'PO #'.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
  wa_field-fieldname = 'EBELP'.
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 10.
  wa_field-seltext_l = 'Line Item'.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
  wa_field-fieldname = 'MATNR'.
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 15.
  wa_field-seltext_l = 'Material'.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
  wa_field-fieldname = 'WERKS'.
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 6.
  wa_field-seltext_l = 'Plant'.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
  wa_field-fieldname = 'MENGE'.
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 10.
  wa_field-seltext_l = 'Qty.'.
*  wa_field-outputlen = 17.
*  wa_field-edit = 'X'.
  wa_field-do_sum = check.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
  wa_field-fieldname = 'STATUS'. " Here Appearing the Field
  wa_field-tabname = 'IT_TAB'.
  wa_field-outputlen = 15.
  wa_field-seltext_l = 'Qty.'.
*  wa_field-outputlen = 17.
*  wa_field-edit = 'X'.
  wa_field-do_sum = check.
  APPEND wa_field TO it_field.
  CLEAR wa_field.
*          SORT W.R.T. PURCHASE ORDER NUMBER
  wa_sort-spos = 1.
  wa_sort-fieldname = 'EBELN'.
  wa_sort-tabname = 'IT_EKPO'.
  wa_sort-up = check.
  wa_sort-subtot = check.
  APPEND wa_sort TO it_sort.
  CLEAR wa_sort.
*          DISPLAY RECORDS IN ALV GRID
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = rep_id
      it_fieldcat        = it_field
      it_sort            = it_sort
    TABLES
      t_outtab           = it_ekpo
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
  IF sy-subrc = 0.
  ENDIF.
Kind Regards,
Faisal
Edited by: Faisal Altaf on Jan 27, 2009 5:41 PM

Similar Messages

  • How to display an image in an alv grid in each corresponding row?

    Hi,
    please tell me how to  display an image in an alv grid in each corresponding row, like;;
    tony            23   newyork      <image>
    Mkitharyan  63   washington  <image>
    NOT BY HOTSPOTS/URL.

    you can put image in each cell you want:
    data lo_cmp_usage type ref to if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if lo_cmp_usage->has_active_component( ) is initial.
        lo_cmp_usage->create_component( ).
      endif.
      DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_alv( ).
        DATA lo_value TYPE ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(    ).
    data col type ref to  CL_SALV_WD_COLUMN.
    col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).
    data image type ref to cl_salv_wd_uie_image.
    CREATE OBJECT image.
    image->SET_SOURCE_FIELDNAME( 'IMAGE' ).
    COL->SET_CELL_EDITOR( image  ).

  • Regarding Background Picture in ALV

    Hi..
    How to set the background picture in ALV.
    Regards
    Sandeep.

    have loaded the background image to be displayed in ou ALV reports using transaction OAER and passed the object to th call function 'REUSE_ALV_GRID_DISPLAY' in the report program
    also other way is
    Steps for uploading Logo :-:
    1.  Goto the transaction OAER
    2.  Enter the class name as 'PICTURES'
    3.  Enter the class type as 'OT'
    4.  Enter the object key as the name of the logo you wish to give
    5.  Execute
    6.  Then in the new screen select Standard doc. types in bottom window
         Click on the Screen icon 
         Now, it will ask for the file path where you have to upload the logo
    7.  Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
    or 
    Import Logo and Background Picture for Reporting
    In this step, you can import a customer-specific logo and a background picture into the R/3 System. These will be displayed in the header area of reports in HR Funds and Position Management.
    From the SPRO: 
    HR Funds and Position Management --> Dialog Control --> Customize Reporting Interface --> Import Logo and Background Picture for Reporting.
    Activities
    1. Enter the Name of your logo/background picture as an object key in the initial screen.
    2. Make sure that the class name is PICTURES, and the class type is OT.
    3. Choose Execute.
    4. Double-click the document type Picture on the Create tab page.  A dialog box will appear in which you can enter the path in which the logo/background picture can be found.
    5. Enter the path and choose Open.  The logo will be uploaded into the current R/3 System. If the logo/background picture is to be transported into other systems as well, choose Transport.
    6. Return to the initial screen and repeat the procedure after having entered the Name of your background picture as an object key.
    Please note that the logo/background picture can only be displayed in ALV-based reports with an HTML header. Manually programmed reports such as business distribution plans are not based on the ALV.
    If you have selected several initial objects, ALV-based reports in HR Funds and Position Management will automatically use a hiearchical-sequential display. A logo is not displayed here either. Note also that the logo cannot be printed (see print preview in program).
    Make sure that the logo does not exceed a height of 100 pixels because it would mean that the header of the report will be scrollable.

  • Help needed to add an image to a datagrid cell in actionscript

    Morning all,
    I am still quite new to flex development and I have an application which uses xml to populate a datagrid. One of the row columns should display a small image but I don't know how to do that.
    Can anyone show me how to add an image to a datagrid cell in actionscript?
    I've added a sample of the code I have written already below. Any help would be much appreciated.
    Thanks in advance,
    Xander
    My XM
    <?xml version="1.0" encoding="UTF-8"?>
    <dataset>
    <modules>
    <module id="1">
    <icon>assets/sample_image1.png</icon>
    <key>core</key>
    <name>Core</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 15:59 UK</installed>
    </module>
    <module id="2">
    <icon>assets/sample_image2.png</icon>
    <key>webproject</key>
    <name>Web Project</name>
    <description>Description of module</description>
    <installed>Wednesday, 24th June 2009 @ 17:32 UK</installed>
    </module>
    </modules>
    </dataset>
    My Actionscript
    private function dataSetHandler(event:Event):void {
        var ds:XML = new XML(event.target.data);
        var rows:XMLList = ds.elements('modules').elements('module') as XMLList;
        var columns:Array = new Array();
        for (var i:int=0; i<rows[0].elements().length(); i++) {
            var column:DataGridColumn = new DataGridColumn();
            var tag:String = rows.*[i].name();
            column.headerText = rows.*[i].name();
            column.dataField = rows.*[i].name();
            if (tag == 'icon') {
                var img:Image = new Image();
                img.id = "iconpath";
                img.width = 23;
                img.height = 20;
                img.source = rows.*[i].name();
               column.itemRenderer = img;   <-- this line shows as an error when I try to compile
            columns[i] = column;
        mydatagrid.columns = columns;
        mydatagrid.dataProvider = rows;

    you cant just set image object to itemrenderer, you need to use classfactory.
    http://livedocs.adobe.com/flex/3/html/help.html?content=cellrenderer_4.html

  • How do you resize a image/picture and save it?

    Hello, I know how to resize a image. But how do I save a new image/pictures has Jpeg with new size properties?

    Use File>Save As or File>Save for web. Either of these will create a new document as long as the name is different or is in another folder.

  • Scaling of images in a table cell

    Hi,
    I have an issue aboute the scaling of images in a table cell. The table layout is fixed but the images can vary. I tried to transform the images but every time the transformation matrix has a scaling != 1.0 the function results in an error.
    The following code is used.
    PageItem pi = myCell.getNthChildPageItem(0);
    TransformationMatrix[] matrix = pi.transformValuesOf(kCoordinateSpacesInnerCoordinates.value);
    TransformationMatrix scalemat = matrix[0].scaleMatrix(OptArg.makeDouble(0.5), OptArg.makeDouble(0.5));
    Unit[] matValues = UnitUtils.createDouble(scalemat.getMatrixValues());
    pi.transform(
    enums.kCoordinateSpacesInnerCoordinates.value,
    VariableTypeUtils.createEnumeration(enums.kAnchorPointCenterAnchor.value),
    VariableTypeUtils.createUnitList(matValues),
    OptArg.makeVariableType(VariableTypeUtils.createEnumeration( enums.kMatrixContentScaleValues.value ) ),
    OptArg.noBoolean()
    Any suggestions?
    Regards,
    tom

    Hi!
    You may try to vary the settings for property "type"
    navigation
    function
    reporting
    result
    If this does not help to solve your issue open a ticket at SAP Support.
    There are several UIElements which show such a behaviour and you have no (documented) chance to change this.
    Hope this helps.
    Regards,
    Volker

  • POJO How to include a Image/Picture into a report

    Hi All,
    the POJO Data Source support works fine but how can i include a image/picture into a Report ??
    My Pojo contains a Blob and a byte[] but if i trag 'n' drop it onto the report design surface (myReport.rpt), C4E creates automatic fields for me but the Blob and the byte[] does not become available for reporting.
    In the application i would like to move a image into the blob or into the byte[].
    What is wrong ??
    Thanks a lot for Your help
    René
    MY POJO
    public class RhuPlakatData {
    private String text11;
    private Blob blob1;
    private byte[] bytes;
    public byte[] getBytes() {
    return bytes;
    public void setBytes(byte[] bytes) {
    this.bytes = bytes;
    public String getText11() {
    return text11;
    public void setText11(String text11) {
    this.text11 = text11;
    public Blob getBlob1() {
    return blob1;
    public void setBlob1(Blob blob1) {
    this.blob1 = blob1;

    Hi James
    Unfortunately, I found no solution.
    Did You found a solution??
    Thanks for Your help
    Greetings
    René

  • AA 9 Standard: Create a Field to Import Image/Picture?

    I will be creating a form where the user needs to insert a picture of a bulding per row item.  I have looked for a tutorial for this but not successful.  I am a beginner at PDF forms; how do you program a field to allow the user to import an image (picture) with predetermined sizing?

    Ok.....with a 4 page form with pics, I'll have to try another software...Maybe Access or Publisher...Word is only good for small forms...Currently in Excel but client wants to change to a user friendly format...
    Thanks for your assistance!

  • Image in wordreport tabale cell

    Hi,
    I m trying to insert image into my desired  cell of my wordreport table,it is being inserted but into cells other than my described cell.How can i insert it in any cell   that in which i  want.I am going into my desired cell by Gotocell number function and Gotonext cell functions than after reaching into my desired cell of the table  i insert image with the function insertimageincell,it is being inserted but not in that cell where i reside at that time.
    How can i fix this problem please?
    Imran from lovely pakistan.
    Solved!
    Go to Solution.

    Hi Emran,
    I am sorry that I did not see this post earlier, but I have been away from the forums for a few weeks. I actually know the exact issue you are facing and it is a bug that we fixed in CVI 2012. The problem is with the GoToCell function working correctly in newer version of Microsoft Word. If you cannot upgrade to CVI 2012, there are a couple of options to work around it. 1) Use a Word doc with the 97-2003 file format. You can create a blank Word document and select Save As >> Word 97-2003 Document. If you load this Word doc instead of creating a new one, the GoToCell function will work properly. Likely, you do not need the features of the later version of Word anyway. 2) Alternatively, you can use the WriteToCell function with a blank string instead of GoToCell. WriteToCell lets you specify which cell to write to. Once it writes the string, it leaves the cursor there which allows you to then place your image.
    This is related to known issue with bug ID 335556.
    National Instruments
    Product Support Engineer

  • The safari software will not display images (pictures).  I have done the "reset" but still no help.  What should i try next?

    the safari software will not display images (pictures).  I have done the "reset" but still no help.  What should i try next?

        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        "Develop" menu will appear in the Safari menu bar.
        Click Develop and make sure that"Disable Images" is not enabled in the dropdown.

  • 2 questions - change image size within print cell, and saving print template w/ specific images

    Hi,
    Searched the forums for the answer to these but couldn't find much.
    1. Is there a way to change the image size within a cell (under print module). For example, zoom in 140% on a a specific image but still have it within the original cell size?
    2. Say I create and fill in an elaborate print template with my images - is there a way to save the FILLED IN version of the template to edit at a later time? For example if I wanted to load it back up w/ all the original images layed out in the print template, but maybe change a few and resave as jpeg?
    Thank you!

    Hi
    I'm not sure but maybe you can use a rectangle to hold the .ai image, resize the rectangle and fit proportionally the image inside it
    hope this help
    Eli

  • ALV cells as buttons

    Hello,
    I'm using attribute cl_gui_alv_grid=>mc_style_button to put some cells in my ALV as buttons. I need that when the user push those buttons an event is raised. Does someone have any example of buttons in ALV cells?
    Thank you and regards.

    Hello,
    I'm using attribute cl_gui_alv_grid=>mc_style_button to put some cells in my ALV as buttons. I need that when the user push those buttons an event is raised. Does someone have any example of buttons in ALV cells?
    Thank you and regards.

  • Alv cell color with FM

    hi ,
    can one send me program for alv cell color with help of function modules
    kiran

    Hi Kiran .
    <b>1.Cell Color.</b>
    While Building Fieldcatalog ,there is one field called
    EMPHASIZE.You have to set like this .
    i_field-emphasize = 'C26'.
    <b>2.ROW COLOR.</b>
    Have a look at this example .
    <b>a</b>.Define one variable COLOR in ur main ITAB.
    <b>b</b>.Fill it .
    <b>c</b>.Pass this info.
      w_layout-info_fieldname = 'COLOR'.
    <b>d</b>. display it .
    *& Report  ZGRID_COLOR                                                 *
    REPORT  zgrid_color                             .
    TYPE-POOLS slis.
    DATA: BEGIN OF i_pa0001 OCCURS 0,
    <b>        color(3) TYPE c,</b>
            pernr TYPE pa0001-pernr,
            subty TYPE pa0001-subty,
          END OF i_pa0001.
    DATA :i_field TYPE slis_t_fieldcat_alv,
          w_field LIKE LINE OF i_field,
          w_layout TYPE slis_layout_alv.
    START-OF-SELECTION .
      PERFORM get_data.
      PERFORM fieldcat.
      PERFORM layout_build.
      PERFORM dispaly .
    *&      Form  fieldcat
    FORM fieldcat .
      CLEAR :w_field,i_field[].
      w_field-fieldname = 'PERNR'.
      w_field-tabname   = 'I_PA0001'.
      w_field-seltext_m = 'PERNR'.
      APPEND w_field TO i_field.
      CLEAR w_field.
      w_field-fieldname = 'SUBTY'.
      w_field-tabname   = 'I_PA0001'.
      w_field-seltext_m = 'SUBTY'.
      APPEND w_field TO i_field.
      CLEAR w_field.
    ENDFORM.                    " fieldcat
    *&      Form  dispaly
    FORM dispaly .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = 'ZGRID_COLOR'
      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                   =
    <b>   is_layout                         = w_layout</b>
       it_fieldcat                       = i_field
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = i_pa0001
    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.                    " dispaly
    *&      Form  get_data
    FORM get_data .
      SELECT pernr subty
      FROM pa0001
      INTO CORRESPONDING FIELDS OF TABLE i_pa0001
      UP TO 10 ROWS.
    LOOP AT i_pa0001.
        IF sy-tabix GT 5.
      <b>    i_pa0001-color = 'C51'.</b>
          MODIFY i_pa0001 INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " get_data
    *&      Form  layout_build
    FORM layout_build .
    <b>  w_layout-info_fieldname = 'COLOR'.</b>
    ENDFORM.                    " layout_build
    I hope it helps u .
    <b>Thanks,
    Venkat.O</b>

  • How do I turn off image/picture from Creative Zen display?

    :How do I turn off image/picture/cover art from Creative Zen display?
    I wouldn't mind it, but it's almost ALWAYS wrong! Why is that? It seems to pick a random - and I mean random - album cover every time I upload songs. WHAT makes it decide this? I have dance collection cover pics turning up for rock songs!
    If someone an help me solve this problem, I don't mind having the images show up.
    Thanks!

    >Hi,
    The album art is usually associated with an album artwork and is supplied together with the music tracks. The player will not display it if there isn't one. You might want to make sure that the album art is linked correctly to the music track.
    Refer to this article for details:
    http://support.creative.com/kb/showarticle.aspx?sid=879?

  • How to insert an in-line image into a table cell using Pages on OS X?

    How can I insert an image into a table cell using Pages (OS X) without it becoming the cell background? I want it to be a regular in-line image, but can't figure out how to do this for the life of me. Thanks!

    Welcome to Discussions.
    To insert an image into a cell, select the cell, then go to the Graphics Inspector and from the Fill drop down choose Image Fill and then select then image you want. You can now select from a new drop down how you want the image to fit.
    Walt

Maybe you are looking for

  • Unable to install weblogic server 6.1 (evaluation) on w2000

    Just after the installation program unpacks the files, the process is aborted. We are trying to install it on a PIII 800Mhz machine with 128MB RAM and w2000. When executing the same file on a NT 4.0 ( same machine ) there is NO problem. Any hint ? th

  • Connecting To Mysql Server

    Hi all, In SAP is it possible to connect a mysql database and get data from? Our resources(machines) have a server and this server keeps data about production. And i want to connect this db server and get data with my syntax, constraints? Can i direc

  • Composite key in Time dimension

    Hi All, I would like to know Time dimension with Composite key. I have a requirement where I want to store 2 Calendars in Time dimension table. for e.g : for one calendar Weekstarts from SUN-SAT and for another it is from MON-TUE DateKey   Type WeekS

  • TS3694 Getting error 1644 when trying to restore a backup... suggestions?

    Been trying to get the phone operational.  Have been getting robo text from verizon.  Verizon suppor suggested wiping phone clean and starting again.  wiping works fine.... restoring not so much  Gett 1644 with resore. Still getting flipping robo tex

  • Gear Fit being advertised but not available!

    The Samsung gear fit is being advertised in the weekly ad in my area, RI/MA but it is not available ANYWHERE! What is the issue? The weekly ad popup states that it is in stock at 7 stores near me but then when you go to actually buy it online for sto