Icon and text together in one column in alv list

Hello Everyone,
I want to display icon and text together in one column in ALV list.
I am using reuse_alv_grid_display function module.
Currently, i am able to see icon only in the column but i want to see both icon and text in one column in ALV.
Please let me know if this scenario is possible in ALV and how.
Thanks in advance.
Regards, Tarun

Hi,
Check this code....
REPORT  ZTEST_ALV_CHECK     MESSAGE-ID ZZ           .
TYPE-POOLS: SLIS,icon.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
      IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
      L_LAYOUT TYPE SLIS_LAYOUT_ALV/
DATA: BEGIN OF ITAB OCCURS 0,
      VBELN LIKE VBAK-VBELN,
      POSNR LIKE VBAP-POSNR,
      ICON(1),
     END OF ITAB.
SELECT VBELN
       POSNR
       FROM VBAP
       UP TO 20 ROWS
       INTO TABLE ITAB.
loop at itab.
if sy-tabix = 1 or sy-tabix = 2.
itab-icon = '1'.
elseif sy-tabix = 10 or sy-tabix = 20.
itab-icon = '2'.
else.
itab-icon = '3'.
endif.
modify itab index sy-tabix.
endloop.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-HOTSPOT = 'X'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_LAYOUT-lights_fieldname = 'ICON'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM       = SY-REPID
    IS_LAYOUT                = L_LAYOUT
    IT_FIELDCAT              = IT_FIELDCAT
  TABLES
    T_OUTTAB                 = ITAB
  EXCEPTIONS
    PROGRAM_ERROR            = 1
    OTHERS                   = 2.
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
vijay

Similar Messages

  • Display concatenad fields under one column in alv.

    How can I concatenate three or four fields(Taken from different tables) and can display under one column in ALV report?
    I want to display:
    final_column = production orderStatusmaterial type+maintenance status (concatenation of four fields).
    production order: caufvd-aufnr
    status: tj02t-txt04
    material type: mara-mtart
    maintenance status:mara-pstat
    I want to display only final_column in my alv output screen.
    Kindly guide.
    Thanks and regards.
    Thanks and regards.
    Message was edited by:
            cinthia nazneen

    Please  go through the below   code and  do the same   for appearing  the   four fields  of different table into  One Field catalog at   Display  by Concatenating .
    DATA  :v_tmp  type  string .
    Loop at  itab1.
    Read table  itab2  key field1 = itab1-field1 .
    Read table  itab3  key field1 = itab1-field1 .
    Read table  itab4  key field1 = itab1-field1 .
    Concatenate  itab1-field1 itab2-field1 itab3-field1 itab4-field1 into v_tmp.
      fieldcatalog-fieldname   = 'V_TMP'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endloop.
    Reward points if it is usefull .....
    Girish

  • How can I separate the "Icons and Text" of the browser control buttons (Back, Forward, etc.) from the Icons on the Add-on toolbar?

    At home, this is not an issue. I don't know why it's different here at work--same installation, same settings (as far as I can tell).
    Windows Vista
    Firefox 7.0.1
    Status-4-Evar installed to turn add-on bar into a status bar
    I have a NoScript add-on icon in the corner, which works fine. If I add a GreaseMonkey icon from the Customize menu, the "Icon and Text" appears for that icon, like the Icon and Text from the browser controls (Home, stop, etc). Other add-on icons also show Icon and Text (S4E, for instance). NoScript is the only one I've found so far which collapses down to just an Icon.
    This leads to the status (add-on) bar having a much larger height than I like. Essentially what I want is for only the Icon to appear in the Status bar (Add-on toolbar), while keeping Icons and Text in the Browser controls. My current workaround is simply removing the other add-on icons from the status (add-on) toolbar, but that takes away the ease of toggling and setting options.
    Please tell me if I can provide you with anything else, and thanks for your help.
    Edit: I've got some screenshots to show what I mean.
    [http://i41.tinypic.com/ftek9s.jpg desired behavior]
    [http://i43.tinypic.com/1z6a4h3.jpg problem when icon is added]

    Surely there must be some UserChrome.css that will solve this problem. Something like this:
    /* Remove text titles for icons in add-on bar */
    addonbar .button-text {
    visibility: collapse !important;
    Unfortunately that does not work. I probably have the button text item name wrong (there is a pound sign before addonbar but it doesn't show in this posting).

  • Why icons  and text on photoshop are very small, (i checked edit preferences interface)

    why icons  and text on photoshop are very small, (i checked edit>preferences>interface)

    In summary:
    1.  You have a "high dpi" screen.  The advantages to this are that things that are painted on the screen in a reasonable size will be made up of a lot of pixels, and will be very crisp and clean looking.
    2.  Photoshop has not yet embraced "high dpi" operation.  It's complex to do so, in that Adobe has to rewrite the software for all the controls on the screen to be able to use more pixels.  That's not to say it's impossible, it's actually fairly straightforward for a given control - but there are a HUGE number of controls in many, many different places in the application.
    Adobe has said they're working on it, and have made some noise about Microsoft not having supplied everything they need to succeed at the full reimplementation.  But the current version does not have the ability to size itself up to be a reasonable size on your "high dpi" display.
    That said, if you really, really want Photoshop to be "magnified up" to where all the controls (AND the pixels in the image you're editing) are much larger on your display, there is a workaround/hack...  It's a bit geeky and requires registry editing, and one day when Photoshop really does gain "high dpi" support you'll need to remove the hack, but here it is:
    http://forums.adobe.com/message/5962765#5962765
    I can't vouch for its performance, but it might make it usable for you in the interim.
    -Noel

  • Bookmarks toolbar shows icons AND text and won't change to icons only, like in vers 4

    Running Firefox 4.0.1 over Windows XP. In previous version, Bookmarks Toolbar showed only Icons, which expanded to Icons plus Text when cursor hovered over the Icon. Now the brute shows Icons AND Text, and refuses to customise to Icons only, even though that's how it is set. Strangely, it will customise to Text only. If I set it to show Icons and Text, I can't see any change at all, it's like the relevant lines of code are identical, or the drop down choices concerned both point to the same line of code (if you follow what I'm getting at). Sorry it's a bit verbose!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Photoshop CC icons and text are too small: how to adjust so they're readable? [was: Joanne]

    I have just downloaded Creative Cloud on a new computer.  The new photoshop icons and text are too small for me to see or work with.  I cannot seem to adjust this so its "useable"

    Hey Bob,
    Ive put feature requests for this in before and I know many others have as well. Is there any way to see if Adobe is actually working on this? I dont really consider this a feature request, it should be standard with the software. A feature request would be something like creative cloud libraries, not the ability to make font sizes and icons bigger.

  • How do I change the size of my icons and text

    I just purchased a new iMac 21.5   The display font and text are too small to read comfortably. How do I adjust the display, icons and text?

    Hi there.
    Just do a 'Right Click' on the desktop and a menu will appear.
    Choose 'Show View Options' at the bottom of the list and all the options are there for you to alter as you wish.
    Cheers

  • How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    Okay, I haven't found a way to add an extra space using Find/replace, but you might be able to add some text wrap to the check boxes that will push the text away from them.
    Open Find/Replace and click the Object tab.
    Click the Specify attributes to find button to the right of the Find Object Format: field.
    Under Basic Attributes, choose Stroke and then the Black swatch (assuming the black swatch is applied to the strokes of your check boxes). If there are no other stand-alone objects in your form with a Black stroke, this should be all you need. (If there are Black strokes on your table cells, they will be ignored.)
    Click OK
    Click the Specify attributes to change button to the right of the Change Object Format: field.
    Under Basic Attributes, choose Text Wrap & Other > Text Wrap > Type: > Wrap around bounding box (2nd button from left)
    Under Offset, set a Right offset at the distance you'd like to add (I don't know what units you use, but the 3-5 points might work for your purposes...might take some trial-and-error to get it where you want)
    Click OK
    Click Change All

  • Since 3 days i have unsharp icons and text in all programs

    hello
    since 3 days i have unsharp icons and text in all programs, but not in web or finder. programs like photoshop, after effects, open office etc. how can i fix that? tinkertool, and standard systemoptions didn´t help.
    it is very weared to me. the macbook pro retina is just 2 month old. it looks like a software bug?...

    Check this:
    http://support.apple.com/kb/PH13821
    You are still under warranty, take it in for inspection. Take full advantage of your warranty.

  • Icons and texts are serrated

    I use Photoshop CS6 on Macbook retina, icons and texts on the toolbar are serrated. Can you help me?

    Ever considered doing a Forum Search?
    http://forums.adobe.com/message/4490738#4490738
    Edit:
    http://forums.adobe.com/message/4545788#4545788

  • Icons and texts are serrated in Photoshop CS6

    I use Photoshop CS6 on Macbook Pro retina, icons and texts on the toolbar are serrated. Can you help me?

    Try posting on the Adobe Photoshop users discussion board - http://forums.adobe.com/community/photoshop.
    Good luck,
    Clinton

  • How to increase toolbar icon and text size on new pc

    I just purchased a new laptop and with the new screen resolution, the icons and text on the toolbars, menu and address bar are small.
    I was wondering it there was a way to increase the size of all these things?
    I tried changing the screen resolution on the laptop but any setting other than the native display setting causes everything to be fuzzy
    Any help is greatly appreciated
    == This happened ==
    Every time Firefox opened
    == I installed firefox on new laptop

    Hello Tony.
    I see that you are using Windows 7. Windows 7 (and other versions of Windows) have accessibility tools that will let you change the scale of the image. This will have an effect on all applications, not just Firefox. Contact Microsoft for help on that.
    In any case, you may have luck if you search for a specially made theme: [http://addons.mozilla.org/ addons.mozilla.org]. I doubt it will look pretty though.

  • Icon and Text on a JButton

    I want a button which has an icon AND text on. (The text above the icon) is this possible? and if, how?

    Yes it is possible. Look in the api - you'll see there is a constructor:
    JButton(String text, Icon icon)You can also create a button and call setIcon later.
    There are other icons you can set as well depending on the state. See the API for AbstractButton for more detail on:
    setDisabledIcon
    setDisabledSelectedIcon
    setPressedIcon
    setRolloverIcon
    setRolloverSelectedIcon
    setSelectedIcon

  • Need dissociation street name and street number from one column?

    Hi all,
    I have one table A with one column with Street name and street number.
    And I was adding second column and now need update this second column with street number
    and delete street number from first column.
    How can unpluging street name and street number from one column?
    (street name are 90% char, number is 100 numeric, in 10% street name name
    starts with number (1.HEROES 223, 1.HEROES 224...)
    Gordan

    Hi,
    Solution of Mr. Wijk come first, however I like to post (it's very similar and incomplete, I know...). Supose you have a table call address (use position -1 like Mr. Wijk to look backward). It's better in cases like '1.My Street 123' (the space before the number is very important)
    SELECT substr(a.street_name,
                  1,
                  instr(a.street_name,
                        -1) - 1) street_name,
           substr(a.street_name,
                  instr(a.street_name,
                        -1) + 1) street_number
      FROM address a;Regards,

  • JLabel Icon and Text

    Hi,
    I am creating a JLabel and setting an ICon with setIcon method. The label has a square border and a text. The Icon covers the the label with "X" form corner to corner on the square border. I can't see the text after setting the Icon. I tried to set the text after Icon, still it is hidden.
    So what should I do to display the Icon and Text at the same time and want the text to be visible.
    thanks,
    NT

    public static void main(String[] args)
    JFrame jf = new JFrame();
    jf.setSize(500, 250);
    JPanel jp = new JPanel();
    jp.setSize(250, 250);
    jp.setLayout(null);
    ImageIcon im = new ImageIcon("4.gif");
    JLabel jl = new JLabel();
    jl.setOpaque(true);
    jl.setBounds(0, 0, 150, 16);
    jl.setBorder(new LineBorder(Color.BLACK));
    jl.setText("NAME");
    jl.setIcon(im);
    jp.add(jl);
    jf.add(jp);
    jf.setVisible(true);
    this sets the icon and the text, but the icon is first and then the text. I want the icon on top of Text.
    thanks,
    NT

Maybe you are looking for