How to Add Checkbox and icon in ALVGRID

Hi Experts,
  i have one Requirement. i need to add Checkbox, Selectall,icon(Unlock or inactive) infront of Contracts of ALV GRID.How to achive that.
Thanks,
Venkat.

Hi
For check box
At declaring field catalog using structure LVC_S_FCAT
mark CHECKBOX = 'X' and also EDIT = 'X'.
For reference check below subroutine in program BCALV_EDIT_05.
form build_fieldcat changing pt_fieldcat type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = pt_fieldcat.
*§A2.Add an entry for the checkbox in the fieldcatalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
* mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
* do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
* optional: set column width
ls_fcat-outputlen = 10.
append ls_fcat to pt_fieldcat.
endform.
For Icon:
CONSTANTS:
     icon_id_failure            LIKE icon-id   VALUE ' ((Content component not found.)) @',
     icon_id_okay              LIKE icon-id   VALUE ' ((Content component not found.)) @'.
TYPES: BEGIN OF ls_tab,
       matnr LIKE equi-matnr,
       maktx LIKE makt-maktx,
       b_werk  LIKE equi-werk,
       b_lager LIKE equi-lager,
       lgobe LIKE t001l-lgobe,
       sernr LIKE equi-sernr,
       icon LIKE icon-id,
       objnr LIKE equi-objnr,
      END OF   ls_tab.
*Table that display the data for the ALV.
DATA: itab  TYPE ls_tab OCCURS 0 WITH HEADER LINE.
    PERFORM get_h_date .
    IF h_date => sy-datum .
      itab-icon = icon_id_okay.
    ELSE .
      itab-icon = icon_id_failure.
     ENDIF.
Regards
Sudheer

Similar Messages

  • How to add program documentation icon on selection screen

    Hi All,
    Please let me know how to add  program documentation icon on selection screen.
    Thanks
    Jog

    THis is pretty straight forward, in se38, enter program name, click change.  Now click Go To, Documentation.  Enter the documentation on this screen, save and activate, now run the program,  the icon will be there.
    REgards,
    Rich Heilman

  • How to add MenuBar and MenuItems in JSP Form

    Help Me,
    Dear Forum,
    I am user of jDeveloper 10g working on JSP (Web Module).So How to add MenuBar and Menu Item, in Our jsp Form.What this type control exist?
    regards
    javed khan

    You should do this instead:
    iframe.setJMenuBar(i_menuBar);

  • How to add ParallelElement and  SerialElement in strobe Player

    hey frnd,
    i'm showing rtmp video from loud api to user and want to add some ads with list of mp3s.
    I'm using strobe player but not getting idea to do this .
    How can we send more parameters to strobe like xmllist or How to add ParallelElement and  SerialElement in strobe Player.
    thx in advanced,

    Ooohh... you mean, like the one mentioned in http://indesignsecrets.com/adding-zoom-and-print-to-indesign-swf-files.php?
    But they want to get paid for their hard work, the bastards!

  • How to add zooming and printing in e-magazine created by indesign?

    Could you please give ma an advise me how to add zooming and printing in e-magazine created by indesign? Many thanks

    Ooohh... you mean, like the one mentioned in http://indesignsecrets.com/adding-zoom-and-print-to-indesign-swf-files.php?
    But they want to get paid for their hard work, the bastards!

  • How to add depreciation and interest in product costing?

    how to add depreciation and interest in standard cost estimate and actual costing in product costing ?

    Hi,
    WHy the admin and sales overhead will be deited to cost of product. The cost of product should include only the factory related direct cost and overhead cost .. not the sales and admin ovehead. exp. for those treat them as period expense and pass on the same to COPa and there those can be analysed there..
    I hope i am clear..
    Regards
    Prabhat

  • How to use Checkbox  and radio buttons in BI Reporting

    Hi BW Experts,
       My Client has given a report in ABAP format and the report has to be develop in BI.It contains Check boxes and the radio buttons. I don’t know how to use Checkboxes and radio buttons in Bex.For using this option, do we need to write a code in ABAP.Please help on this issue.
    Thanks,
    Ram

    Hi..
    Catalog item characteristic
    - Data element
    - Characteristic type
    Entry type
    List of catalog characteristics
    Designer
    Format (character)
    Standard characteristic
    Alternative: Master characteristic
    (used for automatic product
    assignment)
    Simple entry field
    Alternatives:
    Dropdown listbox or radio button
    list

  • How to Hide Menus and Icons in SAP Login Screen.

    Hi
    Can Any one Guide me on How to Hide Menus and Icons in SAP Screen.
    Example: System Drop Down Menu, Help Drop Down menu Etc and
    ICONS: Trash Button, Truck Button , Print Button
    Using OS Level Regedit or SAP Level using any Parameter.
    Thanks & Regards
    Daniel . K

    AFAIK the system menu can´t be hidden - because people won´t be able to log off (but by using the X in the right upper corner). Additionally it contains additional transactions (own data etc.) that users should be able to change.
    Markus

  • Funtion Module: SO_NEW_DOCUMENT_ATT_SEND_API1-How to add TO and CC email id

    In the Funtion Module: SO_NEW_DOCUMENT_ATT_SEND_API1- How to add TO and CC email ids?
    In the TABLE parameter RECEIVERS, there is field RECEIVER where we pass email ids and field COPY which should be 'X'.
    But my concern is how will it distinguish that which email ids should be in TO and which should b in CC?
    Kindly help. Thanks in advance.
    Thanks & Regards,
    Anindita Ghosh

    Hello Anindita,
    Say you need to send mail to 2 receivers and the 1st one is TO and the second is CC.
    Just create 2 entries in the internal table of type SOMLRECI1.
    wa_receiver-receiver = <email id of TO>
    wa_receiver-express = 'X'.
    wa_receiver-rec_type = 'U'   (if sending to an external internet id - yahoo,gmail etc)
    append wa_receiver to it_receiver.
    clear wa_receiver.
    wa_receiver-receiver = <email id of CC>
    wa_receiver-express = 'X'.
    wa_receiver-rec_type = 'U'   (if sending to an external internet id - yahoo,gmail etc)
    wa_receiver-copy = 'X'.
    append wa_receiver to it_receiver.
    clear wa_receiver.
    Hope this helps
    Regards
    Sachin

  • How to add checkboxes to frame

    So I have two classes in my package. I am having trouble adding the checkbox group to my frame. I got it to add to my applet but I can not figure out how to add it to my frame. Here is what I have so far. When I run this program it puts the checkboxes in my applet and not in my frame.
    this is my painter class:
    package pt;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2006</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class painter extends Applet {
    private int xValue=-10, yValue=-10;
    MyFrame x;
    Checkbox Red, Black, Magenta, Blue, Green, Yellow;
    CheckboxGroup cbg;
    public void init()
    x= new MyFrame("Christie's Window");
    x.show();
    x.resize(250,100);
    cbg = new CheckboxGroup();
           Red = new Checkbox("Red", cbg,true);
           Black = new Checkbox("Black", cbg,false);
           Magenta = new Checkbox("Magenta",cbg,false);
           Blue = new Checkbox("Blue", cbg, false);
           Green = new Checkbox("Green", cbg, false);
           Yellow = new Checkbox("Yellow", cbg, false);
           add(Red);
           add(Black);
           add(Magenta);
           add(Blue);
           add(Green);
           add(Yellow);
         addMouseMotionListener(new MotionHandler(this));
    public void paint(Graphics g)
    g.drawString("Drag the mouse to draw", 10, 20);
    g.fillOval(xValue, yValue, 4,4);
    //Override Component class update method to allow all ovals
    // to remain on the screen by not clearing the background
    public void update(Graphics g)   { paint(g); }
    // set the drawing coordinates and repaint
    public void setCoordinates(int x, int y)
      xValue = x;
      yValue = y;
      repaint();
    // Class to handle only mouse drag events for the Drag applet
    class MotionHandler extends MouseMotionAdapter {
      private painter dragger;
      public MotionHandler(painter d)  { dragger = d; }
      public void mouseDragged( MouseEvent e)
        { dragger.setCoordinates( e.getX(), e.getY() );   }
        } and here is MyFrame class:
    package pt;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2006</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class MyFrame extends Frame {
    MyFrame(String x){
       super(x);
        public boolean handleEvent(Event evtObj) {
          if(evtObj.id==Event.WINDOW_DESTROY) {
            hide();
            return true;
          return super.handleEvent(evtObj);
    }

    here's your conversion, with listeners to change the color
    //import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    //public class painter extends Applet {
    class painter extends Frame {
    Color color = Color.RED;
    private int xValue=-10, yValue=-10;
    //MyFrame x;
    Checkbox Red, Black, Magenta, Blue, Green, Yellow;
    CheckboxGroup cbg;
    //public void init()
    public painter()
    //x= new MyFrame("Christie's Window");
    setTitle("Christie's Window");
    //x.show();
    //x.resize(250,100);
    setSize(600,400);
    setLocation(200,100);
    cbg = new CheckboxGroup();
           Red = new Checkbox("Red", cbg,true);
           Red.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Red.getState()) color = Color.RED;}});
           Black = new Checkbox("Black", cbg,false);
           Black.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Black.getState()) color = Color.BLACK;}});
           Magenta = new Checkbox("Magenta",cbg,false);
           Magenta.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Magenta.getState()) color = Color.MAGENTA;}});
           Blue = new Checkbox("Blue", cbg, false);
           Blue.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Blue.getState()) color = Color.BLUE;}});
           Green = new Checkbox("Green", cbg, false);
           Green.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Green.getState()) color = Color.GREEN;}});
           Yellow = new Checkbox("Yellow", cbg, false);
           Yellow.addItemListener(new ItemListener(){
            public void itemStateChanged(ItemEvent ie){
              if(Yellow.getState()) color = Color.YELLOW;}});
    Panel p = new Panel();
           p.add(Red);
           p.add(Black);
           p.add(Magenta);
           p.add(Blue);
           p.add(Green);
           p.add(Yellow);
    add(p,BorderLayout.NORTH);
         addMouseMotionListener(new MotionHandler(this));
    addWindowListener(new WindowAdapter(){
          public void windowClosing(WindowEvent we) { System.exit(0); }});
    public void paint(Graphics g)
    super.paint(g);
    g.setColor(color);
    g.drawString("Drag the mouse to draw", 10, 75);
    g.fillOval(xValue, yValue, 4,4);
    //Override Component class update method to allow all ovals
    // to remain on the screen by not clearing the background
    public void update(Graphics g)   { paint(g); }
    // set the drawing coordinates and repaint
    public void setCoordinates(int x, int y)
      xValue = x;
      yValue = y;
      repaint();
    // Class to handle only mouse drag events for the Drag applet
    class MotionHandler extends MouseMotionAdapter {
      private painter dragger;
      public MotionHandler(painter d)  { dragger = d; }
      public void mouseDragged( MouseEvent e)
        { dragger.setCoordinates( e.getX(), e.getY() );   }
      public static void main(String[] args){new painter().setVisible(true);}
    }

  • How to add custom file icons on SharePoint 2010 document library?

    Hi there,
    In a document library SharePoint shows the PDF and Word etc icons all fine - however we have a custom file format with a custom icon. Is this possible to add this custom icon for our custom extension? How?
    Thank you so much.

    Hi,
    You could accomplish your requirement by using jQuery with these steps, and this code is using jQuery to modify it on the current page, if you would like to make it work on all library, you need to choose the former method or add this JQuery script on all
    library pages manually:
    Upload a custom icon to file “14\ Template\Images” or your SharePoint document library.
    Add this code below in the document library that you want to extend your custom icon, you could add code by following these: Click edit page in the document library -> add a web part -> choose Content Editor -> click edit source in the Ribbon ->
    add the source below -> click OK.
    <script src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script type="text/javascript">
    $(document).ready(function(){
    var fileObject = $("[title$='docx']");
    for(var i=0; i < fileObject.length; i++){
    //fileObject[i].outerHTML="<img width=\"16\" height=\"16\" title=\"test.docx\" alt=\"test.docx\" src=\"/_layouts/15/images/custom.png\" border=\"0\">"; // upload your custom icon to file ” 14\ Template\Images”, replace your src URL
    fileObject[i].outerHTML="<img width=\"16\" height=\"16\" title=\"test.docx\" alt=\"test.docx\" src=\"/sites/sharepoint2013/Shared%20Documents/custom.png\" border=\"0\">"; // upload your custom icon to SharePoint document library, replace your src URL
    </script>
    The screenshot below is my result:
    Best Regards
    Vincent Han
    TechNet Community Support

  • How to add Checkbox in Table

    Hi,
    I want to add CheckBox in Table. my requirement is multiselection. I Implemented the following steps, but it's not working. anyone can tell me,what mistake i did?
    I created two "Value Attribute"(check,Name) under a "Value Node"(Student) in context.
    check - Boolean
    Name - mapped a Dictionary simple Type(5 values)
    Include a Table in Layout and select Create Binding on right clicking of Table.
    Checked only Student and check -> Next
    Selected the Editor as checkbox -> Finish
    Selected Name from context and assigned to checkbox text property.
    Then I deployed the application. But only one checkbox is displayed in Table without any text.
    Please give me the suggestion, how to do this.
    Thanks in Advance
    Rajakumar

    Hello,
    I think you have a fundamental misunderstanding on how Checkboxes work. A Checkbox triggers a boolean value with true (checked) or false (uncheked).
    When you map your name attribut to text you will see the content of that attribute as text behind. But not the metadata.
    You may want to use a RadiobuttonGroup or CheckboxGroup for your purpose.
    Frank

  • Air iOS - How to add iPhone 6 icons to app.xml?

    I'm using Flash CS6 and Air 3.9 to publish an iOS app.
    How to add the icons for iPhone 6 and iPhone 6 Plus to the app.xml?
    I tried this but got an error:
    <icon>
    <!-- all other icon sizes -->
    <image120x120>AppIcons/app_120.png</image120x120>
    <image180x180>AppIcons/app_180.png</image180x180>
    </icon> 
    Any help appreciated.
    Thanks

    Hi,
    Thanks for reporting, but things are working fine at our end. Could you please tell us the error you are observing. Also i would recommend you to use latest SDK and Flash pro.
    Thanks,
    Jitender

  • How to Add Header and Footer in Flat file

    HI All,
    I am using ODI 11g.
    MY interface is populating data from joining to 2 tables through sql query and Loads in to Flat file.
    But i need to add Header and Footer in the Flat file.
    In the below 3 lines
    The 1st line is header ....2nd line is Data ....3rd line is Footer.
    Any ideas how to work on this.
    HSB9KT.KTPRTO.EBSDATA.D0000000 20120626020636
    CFFE00263 SOLGSR014991340000527894536058173880207SOLNE06242012072420120000009048382650000247MRS
    T00000000000000000000
    Thanks,
    Lony

    Hi Drieux,
    i am able to add Header and Footer in this.
    But i want the header like Its like HSB9KT.KTPRTO.EBSDATA.D0000000 || SYSDATE (YYYYMMDDHHMMSS)
    In my Out put i only see header as HSB9KT.KTPRTO.EBSDATA.D0000000 .
    I have added a Variable where i am using SELECT to_char(sysdate,'YYYYMMDDHHMMSS') FROM DUAL query.
    create header (HSB9KT.KTPRTO.EBSDATA.D0000000 #v_DATE)
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=FFT_SOLSNP$CRLOAD_FILE=/home/tarak/FFT_SOL.datSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=descrSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=1SNP$CRLENGTH=994SNP$CRPRECISION=994SNP$CR$$SNPS_END_KEY*/
    Any idea why this sysdate part is not showing in Header.

  • How to add image and videos in jframeusing netbeans..

    hi. im using netbeans where you can create a jframe form by just dragging and dropping items... can someone help me how to add an image? what item should i drag onto my jframe? help me pleasee...

    demo:
    import java.net.*;
    import javax.swing.*;
    public class ImageExample implements Runnable {
         public void run() {
              URL url = null;
              try {
                   url = new URL("http://blogs.sun.com/roller/resources/jag/SouthParkJAG-small.png");
              } catch (MalformedURLException e) {
                   throw new RuntimeException(e);
              JFrame f = new JFrame();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(new JLabel(new ImageIcon(url)));
              f.pack();
              f.setLocationRelativeTo(null);
                    f.setVisible(true);
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new ImageExample());
    }

Maybe you are looking for

  • How to connect my airport time capsule to my at

    Am I missing some kind of special cord? I can start the software and the software recognizes the airport time capsule only if I plug the single ethenet cord into the time capule not the AT&T router. Anyone have a minute to help a big dummy here?

  • Mass change for material master data

    Dear all, Previously my company had marked some storage location for MRP indicator to exclude the storage location stock from MRP run. Now I need to reactive back those storage location, where should I go? I know a way which can active back material

  • How can I Delete the error podcast file in my iPhone?

    I've tried to download some podcast content from iTunes. But I've failed to download these files. In the iTunes, there is another same contents that has a little different name of file. That files were good, so I've downloaded successfully. After dow

  • Clicking on a link sends the screen to the dashboard

    WehnI open a page and click on another link on that page, it goes to the 'Dashboard'. I return to my page and click again and it goes where I requested. Later, on other pages, it will go to the dashboard again. This happens a lot. I am on an iMac wit

  • MIRO : Error Message

    Hello, In our company we do the invoice with nonvaluated GR . suppose there are 2 line items in the PO,one item has net value 70000 & 2nd is 30000Rs. I did invoice for 1st item 80000 & for 2nd item 20000 Rs,system should not give any error message. b