Left and right justifiation in alv grid

I m using alv grid to display a tbale.I have to justify one perticular cell depending on value.So i have to first check the value of that field in itab and then justify right or left accordingly.
Therefore , i cnt use just field of field catalog as im not goin to justify whole column.
I tried to save justified value in itab  and then display in alv but alv doesnt display white space charaters in start and end.
Could you help me with this topic.
regards

hii,
i think this is not possible.

Similar Messages

  • Left- and right-justifying with dot leaders in JLabel and JButton

    Hi,
    I am developing checklists using JLabel and JButton components and want to finish up with the text in each component looking something like the following (each line is a separate button/label):
    ACTION No1............................RESPONSE No1
    ACTION No2............................RESPONSE No2
    ACTION No3............................RESPONSE No3
    The idea is to have the �Action� text left-justified and the �Response� text right-justified with dot-leaders as shown.
    Each text line will be put into its own fixed length label or button.
    I plan to construct a string from text blocks �ACTION No1� and �RESPONSE No1� and add the calculated, exact no of dots in between to fill the space.
    The text font can be fixed (e.g. Courier) or proportional (e.g. Arial).
    My question is how to calculate the number of dots to add to fill the space for different fonts and font sizes.
    I think that using FontMetrics could provide some help but am not sure how this would work.
    Can anyone help.
    Many tks
    John

    Hi,
    I've developed your suggested code further to enable selected JLabels to be toggled visible(true/false) by pressing a JButton.
    I'd like however that when a label is made invisible that the rest of the labels/buttons move up to fill the space left by the now invisible label and vice versa.
    How do I do this, can you enlighten me on a solution?
    Modified code included below. Not very elegant but serves to illustrate the point in question and only makes the label invisible.
    Many tks
    John
    package componentwierd;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ComponentWierd extends JFrame implements ComponentListener, ActionListener {
        boolean isVisible = true;
        JLabel label2 = new JLabel();
        public ComponentWierd() {
            getContentPane().setLayout( new GridLayout(0, 1) );
            // Using my original suggestion
            JLabel label = new JLabel();
            label.setLayout(new BorderLayout());
            label.add(createWierdComponent());
            getContentPane().add(label);
            JButton button = new JButton();
            button.setLayout(new BorderLayout());
            button.add(createWierdComponent());
            button.addActionListener(this);
            getContentPane().add(button);
            // Using Font Metrics
            // JLabel label2 = new JLabel("Label2 West...Label2 East");
            label2.setText("Label2 West...Label2 East");
            label2.addComponentListener( this );
            getContentPane().add(label2);
            JButton button2 = new JButton("Button2 West...Button2 East");
            System.out.println(button2.getIconTextGap());
            button2.addComponentListener( this );
            button2.setVisible(true);
            getContentPane().add(button2);
        public void actionPerformed(ActionEvent e) {
            if (isVisible == true) {
                isVisible = false;
                label2.setVisible(false);
            } else if (isVisible == false) {
                isVisible = true;
                label2.setVisible(true);
        private JComponent createWierdComponent() {
            JPanel panel = new JPanel(new BorderLayout());
            panel.setOpaque( false );
            panel.add(new JLabel("Label WEST"), BorderLayout.WEST);
            panel.add(new JLabel("..............................................."));
            panel.add(new JLabel("Label EAST"), BorderLayout.EAST);
            return panel;
        public void componentResized(ComponentEvent e) {
            if (e.getComponent() instanceof JLabel) {
                JLabel component = (JLabel)e.getComponent();
                String text = component.getText();
                String fitText = fitText(component, text);
                component.setText( fitText );
            if (e.getComponent() instanceof JButton) {
                JButton component = (JButton)e.getComponent();
                String text = component.getText();
                String fitText = fitText(component, text);
                component.setText( fitText );
        private String fitText(JComponent component, String text) {
            // Calculate the total width for painting the text
            // (Not sure why I need the -8)
            Insets insets = component.getInsets();
            int availableWidth = getWidth() - insets.left - insets.right - 8;
            // Calculate the minimum width our text will take
            String start = text.substring(0, text.indexOf("."));
            String middle = "...";
            String end = text.substring(text.lastIndexOf(".") + 1);
            FontMetrics fm = getFontMetrics( component.getFont() );
            int startWidth = fm.stringWidth( start );
            int middleWidth = fm.stringWidth( middle );
            int endWidth = fm.stringWidth( end );
            int minimumWidth = startWidth + middleWidth + endWidth;
            // Add dots to fill out the extra space
            StringBuffer buffer = new StringBuffer(start);
            buffer.append(middle);
            if (minimumWidth < availableWidth) {
                String dot = ".";
                int dotWidth = fm.stringWidth( dot );
                int dots = (availableWidth - minimumWidth) / dotWidth;
                for (int i = 0; i < dots; i++) {
                    buffer.append( dot );
            buffer.append(end);
            String result = buffer.toString();
            return result;
        public void componentHidden(ComponentEvent e) {}
        public void componentMoved(ComponentEvent e) {}
        public void componentShown(ComponentEvent e) {}
        public static void main(String[] args) {
            ComponentWierd frame = new ComponentWierd();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.setSize(200, 200);
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
    }

  • Justify left and right margins of text

    Is there any way to justify both left and right margins of text in the P Pro CS5.5 titler?
    TIA

    Colin,
    That is correct. I would guess that it was added about PS ver. 4.0, when Text went from Raster to Vector, while working in the Image. The Paragraph Palette controls Justification.
    Jay,
    Thanks for the Feature Request. While I seldom alter Justification in Titler, there are some other aspects from PS (and AI and InDesign), that would be useful, such as full Alignment. I keep requesting that, plus some others (Spell Check would be nice, but even PS does not offer that... ), but so far, Adobe has either not been able to adapt Titler, or there have just been too few requests. As Adobe has added concentration on PrPro, it might well be that more requested features will begin showing up. Here's hoping.
    Good luck,
    Hunt
    PS - for major Title work, I usually just go to AI, and then PS (or maybe only PS) to create them as PSD's. Titler is quite good, and so very useful, but when I want/need more, I just fire up another Adobe program.

  • Tab delimited and Right justified fields

    Hi
    My requirement is to produce an output file where the line items consists of 5 fields of variable lengths and all of them are tab delimited and right justified at the same time
    for eg.
    ABC       123456ghtje  4567.45678   67.45678  pqr
    where all the values in the first field 'ABC' and 2nd field '123456ghtje' are right justified and are tab delimited and asme is the case for '4567.45678' , '67.45678' and 'pqr'
    they are all separated from each other by a tab but are not fixed lengths
    How can i achieve that ? i am using File Receiver Adapter ??
    Can it be done without Adapter Module ?
    Thanks
    Dev
    Edited by: sd on Feb 22, 2010 2:25 PM
    Edited by: sd on Feb 22, 2010 2:26 PM

    > they are all separated from each other by a tab but are not fixed lengths
    When thay are not fixed length fields, why do you have to worry about left or right justification? In delimetted files, you would only have the delimitter between the fields. You do not need to fill spaces for justifying them.
    VJ

  • Need to add Header  and footer in an alv grid display output.

    How can I add header and footer in an alv grid dispay output.
    For the grid display, I am using the function module "REUSE_ALV_GRID_DISPLAY".

    HI,
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      ls_text = 'Footer title'.
    adds and icon (red triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'IL'.
    adds test (via variable)
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Bold text'
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Nor'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Yellow '
          sap_emphasis = 'str'.
    adds and icon (yellow triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'IC''.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Mor'.
    *set height of this section
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = l_grid.
      CALL METHOD l_grid->parent->parent->(f)
        EXPORTING
          id     = 3
          height = 14.
    ENDFORM. "end_of_list_html.
    This will solve  it. Post if you need more help in this.
    Regards,
    Madhu.

  • Touchpad left and right clicks don't work on Yoga 2 pro

    Hi,
    I just bought a a yoga 2 pro. After setting up, I found that the two bottom keys, left and right keys on the trackpad do not work. Double tap also doesn't work. I reinstall the touchpad driver to no avail. Other gestures on the touchpad work fine, single tap registers as left click, two finger scroll also works. Also, when I use a blue tooth mouse, left and right key works fine.
    I am not sure if this is a hardware problem as when I swipe on the area of the two bottom keys, they register the movement. Just not click. Anyone can help me?

    Hello,
    I've had a Yoga2 Pro now for six months or so.  Just recently the left click stopped working correctly.  What I notice is that when holding down the left click button on the touch pad, and I try to drag a slider (like a volume slider or to drag a selection box or to drag a scroll box on a page, or to highlight text) and it stops holding down the click.  Sometimes it works, sometimes it keeps stopping.  
    Now, the right click is malfunctioning as well.  I press right click on something like an image, and nothing happens.  I have to right click on something 2-10 times now for it to register that I'm right clicking.
    Also, should I be able to tap the touchpad with two fingers and have that be a right click, or am I just reading that I should be able to do that on the screen (which  can)?
    I have downloaded the drivers for the y2p touchpad and the y2-13 and the generic ones from the synaptics webpage, but before I uninstall my drivers and try to install those, I want to be sure that is the correct and only possible fix.  I'm hoping its not a hardware malfunction.  I am running Win 8.1.
    Thank you.

  • My ipod's music quality is inferior. It doesnt have the surround sound/ left and right audio channel unlike my brothers ipod? is there a problem with the chip?

    I have an ipod touch 4g (8GB), I got this about 2.5 months ago, the same time my brother get his. My problem is that I noticed that audio quality is better on his device than mine. I have been listening to music and had different music devices before (non-Apple product and mobile phone) and the quality of music is better when I used to listen to those devices as well as my brother's ipod touch. Im referring to the left and right audio channels. Im not so good about the technical stuff but the best explanation I can give you is in a music or a movie, there's an effect wherein you can here a sound only at the left ear phone/speaker that you cant hear at the right earphone/speaker. I mean for example in a song, a guitar intro can be heared only at the left
    ear while the background music plays on the other ear. Or when theres and echo effect on the song that alternates sound on the left and right ear. I hope youre getting what Im trying to say. Im bothered that my ipod is fake or has an internal problem on the chips or something because I didnt bought this at an Apple Center/Mac Center. I bought it on a retailer. I am not able to visit any store or Genius Bar  or contact an apple specialist through phone because of my work schedule and work load.  I have contacted the retailer before when I tried to return it for replacement or repair but he told me that it is under Apple's warranty, not theirs. I do hope that I can get a help from you because I want to really enjoy my device. Thank you and Im looking forward for the responce/assistance form you.

    I suggest you don't apply pressure to the screen - it's a Touch - you touch the screen not push it.
    Phil

  • I use "hdmi to component converter" to connect apple tv with my old plasma tv by component cable. Sound is ok but the picture split 2screens left and right. Still can't fix it. Anyone can help or has any idea? should I try convert to av?

    I use "hdmi to component converter" to connect apple tv with my old plasma tv by component cable. Sound is ok but the picture split 2screens left and right. Still can't fix it. Anyone can help or has any idea? should I try convert to av?

    Your TV hasn't entered some odd picture in picture mode has it with  two 'inputs' side by side?
    AC

  • How do I deal with audio, seperate left and right and make each stereo--CS5

    I have a two mono mike recording which I can seperate into two seperate audio timeline tracks one is now left track in a seperate timline and the other is right in the other timeline, how do I make each of these tracks then into psuedo stereo tracks?  Do I have to go to Soundbooth or is there a simple way in Premiere?

    Bill G, tell me what I am missing and I'll use your method.  I have what I think you are describing, and I don't understand the need to do anything special, if you use channel mapping.
    I record a lav on one channel, and a different wireless mic on the other.  When captured, I have a clip that PR would normally treat as a single stereo track.
    BEFORE putting any clips on the timeline, select all clips and set channel mapping.  Set each channel to mono.  Now PR treats these as two mono tracks.  The output for each mono is the master track, which in my project is stereo.  I can change "volume" for each track in the mixer, etc.  but each channel is provided to the left and right  master output.
    I didn't go back to sort out what you had, but if you had two stereo tracks, one each with a left and right channel only, I can see that you needed some other solution.

  • Is there a way to tie to iPads together so that when you turn a page with a tap on one, both iPads turn a page.  I am using the ipad to replace piano sheet music.  The challenge is that ordinary sheet music is on both a left and right page.

    We are trying to use an ipad to replace ordinary paper sheet music on a piano.  When truning ordinary paper pages, it is sometimes hard to grasp one page, turn it quickly and get it to stay turned.  The idea with using an ipad is that a tap turns the page, it stays turned.  However,,,,,ordinary sheet music is on both left and right pages.  With one turn you get 2 new pages.  The ipad, being smaller results in only one page and therefore twice as many page turn taps; more taps equals less hands on the piano.  If we could tie 2 ipads together and get them both to turn the page simultaneously it would be nice.  We are trying to get used to using the ipad.  We are using ForScore app to get sheet music into the ipad; we could load one with odd pages and one with even pages.  Maybe this is getting too complicated.
    Anyway to tie 2 units together
    John

    No way to control one device from the other.  But, according to ForScore, you should be able to display two sheets side by side in landscape mode (2-up view)?  Not sure if that helps as it must make the actual print smaller to do so.
    http://www.forscoreapp.com/about/#interface

  • ? how to add page numbers in pages 5.2, starting with 2.  Pages '09 had an option to not show folio on page one.  Also any how to do left and right folios for a Tabloid?  Many trhanks

    ? how to add page numbers in pages 5.2, starting with page 2.  Pages '09 had an option to not show folio on page one.  Also any idea how to do left and right folios for a Tabloid?  Many thanks  . . .

    Hello jacquemac,
    Your first question:
    There might be a better way of achieving what you wish to do, but following these steps could help you out.
    You might want to blend in Thumbnails and Invisibles either with (cmd+shift+i and cmd+alt+p) or over the View section in the Menubar.
    1. go for Documents (right end of the Toolbar) -> Section
    2. place your cursor at the very top of your second page and click "Create new Section->Starting with this page" in the side bar on your right.
    (what you are actually doing next is setting the pagenumbers for each section you created. You can see your sections in the Thumbnail view.)
    3. click on your first page (the first and only page of your first section) and mark the checkbox "Hide on first page of section"
    4. click on your second page (the first page of your second section) and  "Insert page number" -> start at 1
    Your second question:
    Im not quite sure i understand what exactly you want to do here. One page, two columns, each column with another page number? As far as i know this is not possible.
    greetings jl

  • I have a video I 'm editing and some of the shot taken (on the left and right) I would like to remove. Is this possible to do ? If so, how?

    I have a video I 'm editing and some of the shot taken (on the left and right) I would like to remove. Is this possible to do ? If so, how?

    If you mean there are parts of the picture at the sides you want to remove, you have at least 2 choices.
    You can mask the edges of the frame or enlarge it so that the left and right sides are outside the picture area.
    The latter suggestion will reduce the quality of the video and you will also lose an equal amount from the topand bottom, though you could slide the image up or down.

  • Shift+scroll no longer scrolls left and right!!

    I have a logitech mouse w/ a scroll wheel
    I have always been able to hold down shift to get the scroll wheel to scroll left and right instead of up and down
    and it's suddenly stopped working and I have no idea why
    can anyone help?

    I THINK this is related to installation of a new logitech bluetooth mouse driver
    that stinks. a logitech driver should only control the logitech mouse. it shouldn't affect how other mice work with the OS

  • ITunes 7 playing only from left and right channels with 5.1 speakers

    I have an SB Audigy 1 sound card with Creative Inspire 5200 digital 5.1 speakers, and iTunes only plays audio from the left and right speakers, and the subwoofer. The other 3 speakers work; I've tested them.

    I am having more or less the same problems as you guys. Currently I use a soundblaster audigy 4 with "CMSS 3D" function ... it used to work with itunes but started to get all weird with the 7.0 update. If nobody knows how to fix this I will have to use 6.xx again :/
    I'd be grateful for any advice as well,
    thanks in advance.
    Windows XP

  • In Final Cut Pro X 10.1.1 I'm trying to separate left and right stereo tracks to delete left and pan right to centre. I cannot find a way to do this.

    I record in stereo with a 10KHz tone down the left channel to defeat AGC on my camera and mic feed into the right channel. When I edit, I want to mute/delete the left channel and pan the right into the centre, to leave me with mono audio across both left and right. I could do this easily in FCP 6 but can find no way to do it in FCP X. I'm using the same source files. When I choose Dual Mono mode in the Audio Inspector, it mixes left and right and pushes the combined signal into both channels, giving me a mix of 10KHZ tone and audio in both left and right. Stereo mode shows me the two channels correctly with one driven hard (the tone) and the other at good voice levels. I just want to kill the left channel and pan the right to centre.
    I'm converting original TOD files using MPEG Streamclip before import and definitely keeping audio as stereo.
    This is driving me nuts! It should be simple and is in FCP 6. Any help greatly appreciated.
    Stereo Setting
    Mono Setting

    Mb - If you're using FCPX 10.1.1 and Mavericks, make certain you've downloaded the most current Sony XDCAM FCPX plugin from sonycreativesortware.com unless you're using an older version of FCPX and then you'd need the previous XDCAM plugin.
    You shouldn't see 8 mono tracks.  There are import settings in /fCPX that you can check and I don't ask FCPX to analyze my media or seperate mono or combine stereo, etc.  I like to have everything come in as it is, especially because I know what I've done with every channel, etc.
    What I wrote to Ian is what I'd tell you - so please take a look at how you can make a "stereo" track that is actually two mono tracks, mono.  Once you do that you can address each mono channel by itself since it needs different volume, compression, and EQ than other channels.
    There are ethernet, USB, and firewire controllers that work in FCPX, but that's not the typical workflow because generally if you're getting into any amount of post audio sweetening beyond basic "staples" audio treatment, you would instead use "Roles" to export your audio to Logic or Pro Tools and do you work in those applications and then cut the final product back into your FCPX project.  In Logic or Pro Tools is where you might use a controller.
    In terms of automating levels, I'm not positive I know what you mean.  Compressor is a nice internal Logic plugin that kind of automates levels in a way but its about compressing peaks at a threshold that you set and at a ratio of compression.  So I may not understand what other automation is available unless you've exported you tracks to Logic or Pro Tools.

Maybe you are looking for

  • How the material PRT issue/receipt to the production order can be handled?

    Hi PP Gurus,         For one of our clients, the handling of PRT is to be controlled with the issue/receipt for the production order. 1. What is the procedure for issue/receipt of PRT material in the SAP? 2. What is the procedure to block the PRT for

  • Sharing (synchronizing) a single iTunes library over multiple computers

    Okay, i've been looking all over for a simple answer to this problem for a while and haven't found a solution that doesn't involve paying for third-party software or a lot of seemingly unnecessary hassle. Here's my situation: I have an older 12" Powe

  • Php vs textfile dynamic text

    ok i am at the last part of my project. it worked all well and reads all text fields from a text file as seen on : http://www.myblueranch.com/index2.html now i am trying to get the same thing working from MYSQL. Notice that the text file i used for i

  • Resolution problems on desktop

    My monitor is blurry.I tried most things i can think of.Changed resolution in control panel.Tried every setting,but still blurry.Even did a full recovery with no change.Please help if you can.Thanks,Mike.

  • Third Party Mouse disconnects

    Recently bought a MacBook Pro in the past week. I got a cheap third party wired mouse that worked great with 10.8.5. The entire time I owned this laptop I have never had a problem with this mouse. Today I decided to upgrade to 10.9. Now the mouse can