Do you write GridBagLayout code by hand?

I used to do a lot of Swing development and I became fluent in Swing LayoutManagers -- especially GridBagLayout (which is like a foreign language to most people ;).
I wrote a couple very nice utilities to generate the GridBagLayout code for me based on a drag-and-drop UI and it saved me a lot of time. I am wondering, are there still a lot of people writing such code by hand? I've been working in the JSF world for the past couple years, so I don't know if there's a need for such utilities anymore.
If there is, I might consider spending some time with my utility and packaging it up as a proper application. Or possibly just releasing the source as an open source project?
So, again, does anyone still write GridBagLayout code by hand?

Good grief, I'd probably stab myslef repeatedly with a fork, were I to do it by hand. In days of yore I wrote a wrapper class, named GBC (for faster typing). It would contain a set of constructors, creating underlying GridBagConstraints, and then methods for modifying each constraint, and each method returned the object itself. The ok() method returned the underlying constraints object, So, the actual code looked something like:
add(new JLabel("test"), new GBC(0, 0).anchor(WEST).fill(BOTH).ok());or actually:
add("test", new GBC(...));,since my panel's add methods are always overridden to allow easy adding of labels.
But since I stumbled upon MigLayout... I have never looked back. The last time I used GridBagLayout was maybe a year ago. And only to implement a change request to some old codebase.
Edited by: rkr1410 on 2010-10-28 09:58
Edited by: rkr1410 on 2010-10-28 09:59 - aded code tags

Similar Messages

  • Where do you write your code?

    I've just started to learn Flex. One question I have is where
    you put the ActionScript code?
    I know i can put it in several locations (e.g. inline, within
    a script-tag, in actionscript-files, in actionscript classes) but
    what's the best way to go?
    Up until now I haven't done so much coding, so I have just
    written the code inside a <mx:Script>-tag in my MXML-file.
    I'm starting to realize though that having both MXML and
    ActionScript in the same file is a bit inconvinient when the amount
    of code increases.
    Since I come from the dark side ;) (Microsoft), I'm used to
    having to files for each page/component; one with the "UI code"
    (MXML in this case) and one with the logic (AS in this case). I
    like that model, so I tried to do something similiar in Flex. My
    MXML-file looks like this:
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" applicationComplete="MainCode()">
    <mx:Script source="MainCode.as" />
    <!-- Other MXML code -->
    </mx:Application>
    Then I create the MainCode.as and give it a function called
    MainCode(). That way, I now have the code in a separate file/class,
    and themethod becomes the starting point of the execution. Kind of
    like the "document class" in Flash.
    First, this seemed like a good solution to me BUT soon I
    realized it has a big flaw. Since the class is not hard linked to
    the MXML, I will not get any intellisense/codehints about the
    components/controls I use in the MXML (at least I don't in
    FlashDevelop).
    So, how do you do it? Is there a way that is considered "best
    practice"?

    "haagel" <[email protected]> wrote in
    message
    news:[email protected]...
    > I've just started to learn Flex. One question I have is
    where you put the
    > ActionScript code?
    > I know i can put it in several locations (e.g. inline,
    within a
    > script-tag, in
    > actionscript-files, in actionscript classes) but what's
    the best way to
    > go?
    >
    > Up until now I haven't done so much coding, so I have
    just written the
    > code
    > inside a <mx:Script>-tag in my MXML-file. I'm
    starting to realize though
    > that
    > having both MXML and ActionScript in the same file is a
    bit inconvinient
    > when
    > the amount of code increases.
    >
    > Since I come from the dark side ;) (Microsoft), I'm used
    to having to
    > files
    > for each page/component; one with the "UI code" (MXML in
    this case) and
    > one
    > with the logic (AS in this case). I like that model, so
    I tried to do
    > something
    > similiar in Flex. My MXML-file looks like this:
    >
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > applicationComplete="MainCode()">
    > <mx:Script source="MainCode.as" />
    > <!-- Other MXML code -->
    > </mx:Application>
    >
    > Then I create the MainCode.as and give it a function
    called MainCode().
    > That
    > way, I now have the code in a separate file/class, and
    themethod becomes
    > the
    > starting point of the execution. Kind of like the
    "document class" in
    > Flash.
    >
    > First, this seemed like a good solution to me BUT soon I
    realized it has a
    > big
    > flaw. Since the class is not hard linked to the MXML, I
    will not get any
    > intellisense/codehints about the components/controls I
    use in the MXML (at
    > least I don't in FlashDevelop).
    >
    > So, how do you do it? Is there a way that is considered
    "best practice"?
    It's better to do one of two things:
    1) Get everything pretty much complete and then only pull it
    out to an as
    file when you're done. That way you get code hinting all the
    way up to the
    time that you pull out the code. Note that this will _not_ be
    a class and
    should not have a constructor, etc. or be named the same
    thing as any MXML
    file in your project.
    2) Only pull out things that can truly stand alone, and make
    them separate
    class. You need to look up these terms on google or your
    favorite search
    engine "loosely coupled Flex components."
    Also note that you can use more than one script tag, and
    these will be
    visible in outline view. Unfortunately you can't give them
    ID's. Also,
    using bookmarks can help with managing files with both MXML
    and AS.

  • How would you write a code to automate this??

    Hi team,
    Still trying to improve my coding..
    So I have got all of these buttons... how would I go about coding so I dont have this function repeated 100 times??
    Cheers,
    Sub
    e.g.
    GSmain.gsshape.gss1.gssr.gssr1.addEventListener(MouseEvent.CLICK, page2go)
    function page2go(e:MouseEvent){
              gotoAndStop(2);
    GSmain.gsshape.gss1.gssr.gssr2.addEventListener(MouseEvent.CLICK, page3go)
    function page3go(e:MouseEvent){
              gotoAndStop(3);
    GSmain.gsshape.gss1.gssr.gssr3.addEventListener(MouseEvent.CLICK, page3go)
    function page3go(e:MouseEvent){
              gotoAndStop(4);
    etc etc

    // loop from 1 to 100
    for(var i:int=1;i<=100;i++){
    // use array notation to coerce flash to convert strings to objects
    GSmain.gsshape.gss1.gssr["gssr"+i].addEventListener(MouseEvent.CLICK, pagego)
    function pagego(e:MouseEvent){
    // gssr1,gssr2,etc are all currentTarget event dispatchers. one of them called this function.  to find which, use the flash string methods.
    // e.currentTarget.name is a string like "gssr1","gssr2",...,"gssr100"
    // the String.substring(n) method returns a substring of String starting at index n.
    // so e.currentTarget.name.substring(4) is "1","2",...,"100" depending on which object was clicked
    // int("n"), converts a string to an int for use in the gotoAndStop() method:
              gotoAndStop(int(e.currentTarget.name.substring(4)));

  • //remove this line if you want to edit the code by hand? um which line?

    Several of my pages are locking up and I don't know why. As I work through the code, I remembered that I altered some text in a SendEmail by directly altering the page rather than using the Server Behavior. Don't understand why that would matter but whatever...
    Now as I ponder if that is causing the problem, I ran across this commented line in the code:
    //remove this line if you want to edit the code by hand
    But are they talking about the line just after that line of //remove or do they mean the actual comment line of
    //remove this line if you want to edit the code by hand?
    Thanks for your help

    Trigger and $tNG look suspiciously like ADDT code to me. Ask the guys in the ADDT forum (http://forums.adobe.com/community/dreamweaver/addt). There are a couple of them in there who know the code intimately. I haven't touched ADDT for ages.

  • Please HELP ASAP! I/O Command Line, How do you write them? System.in?

    I'm trying to create a program where the user can enter a year and gets the date of Easter on that year he/she entered. So far i've implemented the Easter class which contains the methods for getting the day and month of Easter, but I'm trying to write the main class which is kind of tricky for me. The main class is supposed to be the one asking the user for the year. Except I don't even know what you have to write. I did a bit of research and eventually found something like this: " InputStreamReader cin = new InputStreamReader(System.in)" I realize that that is a constructor and that cin is actually a variable supposed to hold whatever the user inputs. Except I just want to make sure if that's kind of the guidelines on how to make it so that the user can enter something back. Also, I want the user to enter a year- so in other words an int type. Here's why:(The Implemented Class for Easter)
    public void Year()
    //Method body
    public int getEasterSundayMonth(int y)
    //Method Body
    public int getEasterSundayDay(int y)
    //Method Body
    Yea I want to make it so that the user's input is "int y" that way I can perform my methods in order to give them back the day and month Easter is on. So my 2 questions are on how to write the code so I can get a user's input, and on how to substitute the user's input into the variable "y" I just started learning Java about 3 weeks ago as a Sophmore in high school, so it's a bit difficult for me. Thanks in advance.

    You should really work on expressing yourself more succinctly.
    shadowpal2 wrote:
    I did a bit of research and eventually found something like this: " InputStreamReader cin = new InputStreamReader(System.in)" I realize that that is a constructor and that cin is actually a variable supposed to hold whatever the user inputs.You misunderstood. System.in is used to read standard input to the Java process. If you don't know what "standard input" is: basically it's stuff that you could type at the console when you're running the program, but it could be file content depending on how you invoke the program.
    InputStreamReader is a class that takes that stream of input bytes and turns it into a stream of characters. It doesn't really hold anything.
    Except I just want to make sure if that's kind of the guidelines on how to make it so that the user can enter something back.It's one way of many of getting user input. Actually it's only part of one common idiom for getting user input.
    Also, I want the user to enter a year- so in other words an int type. Just use a java.util.Scanner.
    Yea I want to make it so that the user's input is "int y" The user's input is always going to be characters. Scanner has methods to automatically turn input into other types. If you use something else (like the common idiom involving InputStreamReader) you'd need to convert the Strings you read into ints by hand, which isn't hard but why do it if Scanner does it for you?
    Read the docs for java.util.Scanner.

  • Best way to write readable code?

    So I'm waist deep in building my GUI by hand and it occurs to me that I'm probably not doing this the best way possible. What I have now is listed below and I was thinking that other possibilities would be to write other methods like initMainFrame() and initSearchPanel() and such that would be called from initComponents() (though I would have to either put the objects outside of those methods, probably declared immediately above the method declaration for readability, or somehow make them class scope that're declared within a method which I think I've seen somewhere, but have been unable to reproduce) or to make new class files that handle this.
    So any comments on my ideas (good/bad/etc) or insight on how you structure your code when making a GUI would be much appreciated.
        public static void initComponents() {
            // main frame
            JFrame mainFrame = new JFrame("CookBook");
            Dimension d1 = new Dimension(255, 255);
            //mainFrame.setSize(d1);
            BorderLayout mainLayout = new BorderLayout();
            mainFrame.setLayout(mainLayout);
            mainFrame.setPreferredSize(d1);
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // end main frame
            // menu
            JMenuBar menuBar = new JMenuBar();
            JMenu file = new JMenu("File") ;
            JMenuItem exit = new JMenuItem("Exit");
            file.add(exit);
            menuBar.add(file);
            mainFrame.setJMenuBar(menuBar);
            // end menu
            // start search bar
            JPanel search = new JPanel();
            SpringLayout searchLayout = new SpringLayout();
            search.setLayout(searchLayout);
            JLabel nameLabel = new JLabel("Name: ");
            JTextField name = new JTextField(10);
            searchLayout.putConstraint(SpringLayout.SOUTH, nameLabel, 0, SpringLayout.SOUTH, name);
            searchLayout.putConstraint(SpringLayout.WEST, nameLabel, PADDING, SpringLayout.WEST, search);
            searchLayout.putConstraint(SpringLayout.WEST, name, PADDING, SpringLayout.EAST, nameLabel);
            searchLayout.putConstraint(SpringLayout.NORTH, name, PADDING, SpringLayout.NORTH, search);
            search.add(nameLabel);
            search.add(name);
            Vector<String> initCatValue = new Vector<String>(1);
            initCatValue.add("Category");
            JComboBox category = new JComboBox(initCatValue);
            category.setEditable(true);
            searchLayout.putConstraint(SpringLayout.WEST, category, PADDING, SpringLayout.WEST, search);
            searchLayout.putConstraint(SpringLayout.NORTH, category, PADDING, SpringLayout.SOUTH, name);
            search.add(category);
            mainFrame.add(search);
            // end search bar
            // status bar
            JPanel status = new JPanel();
            FlowLayout statusLayout = new FlowLayout(FlowLayout.RIGHT);
            status.setLayout(statusLayout);
            JProgressBar progressBar = new JProgressBar();
            status.add(progressBar);
            mainFrame.add(BorderLayout.SOUTH, status);
            // end status bar
            mainFrame.pack();
            mainFrame.setVisible(true);
        }

    or somehow make them class scope that're declared within a method which I think I've seen somewhere, but have been unable to reproduceIf this is your problem then here is one method:
    public class GUI{
    JFrame mainFrame;
    public static void initComponents() {
            initMainFrame();
            initMenu();
            initSearchPanel();
            initStatusBar();
            mainFrame.pack();
            mainFrame.setVisible(true);
    private void initMainFrame(){
           // main frame
            JFrame mainFrame = new JFrame("CookBook");
            Dimension d1 = new Dimension(255, 255);
            //mainFrame.setSize(d1);
            BorderLayout mainLayout = new BorderLayout();
            mainFrame.setLayout(mainLayout);
            mainFrame.setPreferredSize(d1);
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // end main frame
    private void initMenu(){
           // menu
            JMenuBar menuBar = new JMenuBar();
            JMenu file = new JMenu("File") ;
            JMenuItem exit = new JMenuItem("Exit");
            file.add(exit);
            menuBar.add(file);
            mainFrame.setJMenuBar(menuBar);
            // end menu
    private void initSearchPanel(){
          // start search bar
            JPanel search = new JPanel();
            SpringLayout searchLayout = new SpringLayout();
            search.setLayout(searchLayout);
            JLabel nameLabel = new JLabel("Name: ");
            JTextField name = new JTextField(10);
            searchLayout.putConstraint(SpringLayout.SOUTH, nameLabel, 0, SpringLayout.SOUTH, name);
            searchLayout.putConstraint(SpringLayout.WEST, nameLabel, PADDING, SpringLayout.WEST, search);
            searchLayout.putConstraint(SpringLayout.WEST, name, PADDING, SpringLayout.EAST, nameLabel);
            searchLayout.putConstraint(SpringLayout.NORTH, name, PADDING, SpringLayout.NORTH, search);
            search.add(nameLabel);
            search.add(name);
            Vector<String> initCatValue = new Vector<String>(1);
            initCatValue.add("Category");
            JComboBox category = new JComboBox(initCatValue);
            category.setEditable(true);
            searchLayout.putConstraint(SpringLayout.WEST, category, PADDING, SpringLayout.WEST, search);
            searchLayout.putConstraint(SpringLayout.NORTH, category, PADDING, SpringLayout.SOUTH, name);
            search.add(category);
            mainFrame.add(search);
            // end search bar
      private void initStatusBar(){
             // status bar
            JPanel status = new JPanel();
            FlowLayout statusLayout = new FlowLayout(FlowLayout.RIGHT);
            status.setLayout(statusLayout);
            JProgressBar progressBar = new JProgressBar();
            status.add(progressBar);
            mainFrame.add(BorderLayout.SOUTH, status);
            // end status bar
    }There can many other methods to solve this same problem... choose anyone which suits you.
    Thanks!

  • How difficult would it be to write a code that prevents sites from changing your homepage wtihout u knowing it happened?

    Today I had the unhappy experience of a company or site I visited that installed three programs I didn't want. I uninstalled all of them in windows control panel (]remove programs). This however did not solve my problem.....no matter what I did I could not get startpage to come back. I did many things like go to tools and options and type it in close out and open and it was still not there. Finally my grandson uininstalled Firefox and reinstalled it and it was back.
    My question is: Can you not write a code in the software that prevents this from happening and when people install Firefox ask them if they want this feature or write an ad on. Please this problem grows every day it gets worse. Before all you had to do is change it back now one can not get rid if it so easily.
    We really would love this feature ask anyone.
    Susan and TY for listening.

    Thanks You for your feedback. However this is support forum, You should suggest new features trought ''Help -> Send Your opinion'' or [https://input.mozilla.org/pl/feedback/firefox/31.0/ this website].
    By the way there is method described in [http://kb.mozillazine.org/Locking_preferences this support article], maybe someone using Windows will write user friendly guide how to do it.
    All I can tell you is that you have to lock ''browser.startup.homepage'' to ''about:home''

  • Can anyone share with me how you  write Javadoc?

    Can anyone share with me how their companies write Javadoc?
    Are your developers solely responsible for it? Do your technical writers own it or review it? How do you make sure it's good?
    Right now, my software developers are mostly responsible for writing all the API info and it's of poor quality and really lacking details. I don't mean spelling/grammar-type problems. My developers just don't seem to "get" what information to include, no matter how many guidelines or checklists I give them.
    A very simple example is:
    * Gets the status
    public java.lang.Integer getStatus() {...}With no indication of what status values may be returned and what the values might mean.
    How do you ensure that what you write is actually useful? Please help!
    I'm aware of the method Sun recommends, but I want to know what others do.
    Thank you

    Hi,
    Well, concerning the question what a good API documentation should be. Just imagine, you are a programmer and you want to use that API. You need to know how it works. There can be only three ways to find it:
    (1) The API documentation
    (2) Probing experiments. Even a good documentation may not describe everything. Sometimes, the only way to understand certain things you particularly need may be guessing something, writing a code basing on it and see how it works. Then, guessing something again, more precisely now, and so on. Even a very good documented API (for instance, javax.swing) may require that sort of approach to be able to use it eventually.
    (3) At last, when source codes are available, one may look at them and try to understand precisely, what a particular method actually does.
    I think the better the API documentation the less one may need to endeavor those two last steps. There is actually a limit about it. Without any proper explanation at all, one may never be able to use a particular API, neither after probing it nor after looking at source codes (that is not to say the sources may be simple unavailable at all).
    Concerning how to write the API documentation, that's mostly the question of managing your team. I think, basically, the original source of the ultimate information about everything implemented in the projects are those very programmers (developers) and, probably, some software architects. But those guys normally are not especially eager to write any documentation (especially developers). That your example just demonstrates it. It seems, your programmers just wrote that "Gets the status" for you to make them leave in rest after that. In addition, the programmers normally have such a sort of work and activity that does not match particularly well with the writing literature and doing their main job simultaneously. You should not enforce them to do that!
    To write a good documentation, you will need to engage a technical writer. That's normally a guy with some programming background. However, writing some literature is actually what he does the best. (Sometimes, such people do something else about written word beyond the technical writing.) The job of that guy would be to write the documentation. This will take from him (or her) two basic things:
    (1) The ability to understand the whole software system (that's where his programming background will be needed!);
    (2) To communicate with the programmers who have developed the stuff and to obtain from them all the necessary information they know. That may require some personal (verbal) communication with them, because asking them to write everything again will only result in the same "Gets the status" explanations. However, to be successful in this, the technical writer needs to have some explicit management approval behind him. Otherwise, some of the guys will avoid speaking to him at all (saying they lack the time). So, the management should assign them the necessary priority for such communications.
    Particularly big projects may even need to have the whole team of technical writers.
    Anyway, writing docs is a hard work. But it is extremely important! The good documentation may both increase your sales and eliminate lots of expense on further support of your customers.
    Regards,
    Leonid Rudy
    http://www.docflex.com

  • How to write source code in smart forms?

    hi friends,
    can anyone can help me in writing  sorcecode in smartforms r
    any materail link.
    if it is helpful points can b rewarded.Thanks in advance.

    Hi,
    Check this link for
    how to write source code in smart forms?
    http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
    You can write Source Code in smartforms By Choosing Program Lines.
    Check this link with Screen Shots
    http://****************/Tutorials/Smartforms/PO/page1.htm
    Reward All Helpfull Answers
    Regards
    Fareedas
    Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM

  • How to write a code for  open new txt file in swing

    hai all,
    now i do one project in java.that project's GUI is Swing. But i don't known swing (basic).So how to write a code for open new txt file and "Open window " in menu item on swing.that means when i click the "New" on menu that time open a new txt file. open also like that type.
    plz give me that code ! very urgent
    Advance Thanks !
    RSK

    Swing Tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    Since you don't know the basic of swing read the tutorial, it is for your own good because it is useless if we provide you with a code you don't even understand and how it works.
    If you want a menu read the tutorial about using menus and for opening a file read using JFileChooser.
    note: don't use the word urgent because it implies that your problem is more important than others.

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    Html snippet is not working on iweb 9. i can't write a code, Html snippet is not working on iweb 9. i can't write a code

    You don't get this window when you insert an HTML snippet on the page?
    Click to view full size
    If you don't try the following:
    delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
    go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
    Click to view full size
    launch iWeb and try again.
    OT

  • How to write the code?

    Hi,
    I have a internal table T. when the t-zuonr is blank, the ALV look like:
    t-zuonr                     document no       data
                              200630303  AB  2007.08.31
                              200627855  AB  2007.06.30
                              200627887  AB  2007.06.30
    MSFT047/07         93631164   RV  2007.10.19
    MSFT061/07         93594484   RV  2007.10.09
    MSFT061/07         93594485   RV  2007.10.09
    MSFT061/07         93594486   RV  2007.10.09
    MSFT061/07         93594487   RV  2007.10.09
    MSFT061/07         93594488   RV  2007.10.09
    MSFT061/07         93594489   RV  2007.10.09
    MSFT061/07         93594490   RV  2007.10.09
    *I need to not show the company which t-zuonr is space.
    How can I write the code?*
    The original source code is as following:
    SORT t.
      LOOP AT t.
        AT NEW bukrs.
          CLEAR anz_dl.
          CLEAR htext-anzahl.
          CLEAR htext-datei.
          htext-text1 = ' records writen in file '.
          CLEAR p_pfad.
          CONCATENATE
              i_pfad
              'CU_CC'
              t-bukrs
              sy-datum+6(2)
              sy-datum+4(2)
              sy-datum(4)
              sy-uzeit
              '.txt'
         INTO p_pfad.
          CLEAR outtab.
          REFRESH outtab.
          REFRESH: gt_outalv.                                  "INS MG020207
        ENDAT.
       IF t-shkzg = 'H'.
         h_betrg  = t-wrbtr * -1.
       ELSE.
        h_betrg  = t-wrbtr.
        h_dmbtr  = t-dmbtr.
       ENDIF.
        s-filler1 = s-filler2 = s-filler3 = s-filler4 = s-filler5 = ';'.
        s-filler6 = s-filler7 = s-filler8 = ';'.
        s-filler9 = s-filler10 = s-filler11 = s-filler12 = s-filler13 = ';'.
        s-filler14 = ';'.
        s-belnr = t-belnr.
        IF t-xblnr NE space.                                    "WD041005a
          s-xblnr      = t-xblnr.                               "WD041005a
        ELSE.                                                   "WD041005a
          s-xblnr      = t-belnr.                               "WD041005a
        ENDIF.                                                  "WD041005a
        WHILE s-xblnr(1) EQ '0'.                            "INS MG130606
          SHIFT s-xblnr LEFT.                               "INS MG130606
        ENDWHILE.                                "INS MG130606
    *<<< CR01 CHANGE START BY LI_Y 2008/01/10
        IF t-waers = 'JPY'.
        h_dmbtr = h_dmbtr.
        else.
        h_dmbtr = h_dmbtr * 100.
        endif.
    *>>> CR01 CHANGE END BY LI_Y 2008/01/10
        WRITE t-kunnr TO s-kunnr NO-ZERO.
        s-lifn2 = s-kunnr.
        shift s-lifn2 RIGHT.
        s-lifn2(1) = 'R'.
      S-KUNNR = T-KUNNR+5(5).
        s-bldat+2(1) = '/'.
        s-bldat+5(1) = '/'.
        s-bldat0(2) = t-bldat4(2).
        s-bldat3(2) = t-bldat6(2).
        s-bldat6(4) = t-bldat0(4).
        s-budat+2(1) = '/'.
        s-budat+5(1) = '/'.
        s-budat0(2) = t-budat4(2).
        s-budat3(2) = t-budat6(2).
        s-budat6(4) = t-budat0(4).
        s-netdt+2(1) = '/'.
        s-netdt+5(1) = '/'.
        s-netdt0(2) = t-netdt4(2).
        s-netdt3(2) = t-netdt6(2).
        s-netdt6(4) = t-netdt0(4).
        s-waers      = t-waers.
        s-dmbtr      = t-dmbtr.
        s-sgtxt      = t-sgtxt.
        CLEAR s-twaer.
        SELECT SINGLE waers INTO s-twaer
                            FROM t001
                            WHERE bukrs = t-bukrs.
        IF h_betrg < 0.
          hs_betrg+0(1) = '-'.
        ELSE.
          hs_betrg+0(1) = ' '.
        ENDIF.
        WRITE h_betrg CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
                                                        NO-SIGN
                                                        LEFT-JUSTIFIED.
        REPLACE ',' WITH '.' INTO hs_betrg.
        WRITE hs_betrg TO s-betrg.
        IF h_dmbtr < 0.
          hs_betrg+0(1) = '-'.
        ELSE.
          hs_betrg+0(1) = ' '.
        ENDIF.
        WRITE h_dmbtr CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
                                                        NO-SIGN
                                                        LEFT-JUSTIFIED.
        REPLACE ',' WITH '.' INTO hs_betrg.
        WRITE hs_betrg TO s-dmbtr.
        s-compcode   = t-bukrs.                                 "fw070905
        IF p_downl = 'X'.
          MOVE s TO outtab-s.
          APPEND outtab.
          ADD 1 TO anz_dl.
        ENDIF.
        gs_outalv-belnr = s-belnr.                             "INS MG020207
    *<<<< CR01 START CHANGE BY LI_Y 2007/12/24      " ADD as_outalv-zuonr
        gs_outalv-zuonr = s-zuonr.                             "CR01
    *>>>> CR01 EDD CHANGE BY LI_Y 2007/12/24         "ADD as_outalv-zuonr
        gs_outalv-kunnr = s-kunnr.                             "INS MG020207
        gs_outalv-bldat = s-bldat.                             "INS MG020207
        gs_outalv-netdt = s-netdt.                             "INS MG020207
        gs_outalv-betrg = s-betrg.                             "INS MG020207
        gs_outalv-waers = s-waers.                             "INS MG020207
        gs_outalv-compcode = s-compcode.                       "INS MG020207
        gs_outalv-budat = s-budat.                             "INS MG020207
        gs_outalv-sgtxt = s-sgtxt.
        gs_outalv-kmmnt = s-kmmnt.
        gs_outalv-vbeln = s-vbeln.
        gs_outalv-xblnr = s-xblnr.
        gs_outalv-lifn2 = s-lifn2.
        gs_outalv-dmbtr = s-dmbtr.
        gs_outalv-twaer = s-twaer.
        APPEND gs_outalv TO gt_outalv.                         "INS MG020207
        AT END OF bukrs.
          WRITE anz_dl  TO htext-anzahl.
          WRITE p_pfad  TO htext-datei.
          CONDENSE htext.
    *<<<< CR01 START CHANGE BY LI_Y 2007/12/24
    WA_SORT-fieldname = 'BELNR'.     " speicfy field name..
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOT = 'X'.
    APPEND WA_SORT TO I_SORT.
    Thank you!!

    Hi,
    Do this. Declare another internal table of identical structure as table t say t1.
    REFRESH t1.
    APPEND LINES OF t TO t1.
    DELETE t1 WHERE zuonr IS INITIAL.
    and then use t1 to display the ALV.
    Hope this helps.
    Regards,
    Aditya

  • HT204387 how can i make ipad discover my bluetooth GPS again?witched it on the iPad discovered it but I didn't havre the pairing code to hand.

    Can I reset iPad bluetooth? It recognised my bluetooth GPS when I first switched on but I didnt have the pairing code to hand and the pairing opportunity timed out. It seems to have decided to ignore the GPS bluetooth now.

    The only option is to wipe the device clean and restore it to factory settings.  Hope you have a backup.
    Follow the instructions in  iOS: How to back up your data and set up your device as a new device http://support.apple.com/kb/HT4137 to restore the device to factory settings.
    Once you have setup the device as a new one, you can then sync it back with your iTunes account and all your music, apps, contacts and any other content sync'ed with iTunes will be loaded on the device. Any content that is stored only on the device and not sync'ed with iTunes, like app logins or data, will be lost during this process. Be forewarned that this is a long process and can take a couple of hours or more to complete. This can be painful, but it is necessarily so to prevent users from working around the security settings. After the restore is complete, you can setup a new Restrictions passcode. Make a note of the passcode to avoid this situation in future.
     Cheers, Tom

  • How can i write a code to get sume of value from days.

    Hi,
    how can i write a code to get the sum of value of days(example 1 to 30).
    This is in BPS ...
    i created multi planning area and creted planning function with {keyfigure name,planning area,days}.
    now i want to read all the actual values  from basic planing area(basic cube) and calculate the sum of the value.if you have idea can you share the code.
    ENTRIES = VARC ( 'zvardays' ).     ex(zvardays like 28 days or 29 days or 30 days or 31 days)
    COUNT = ENTRIES.
    *Get the all the days value from actual
    FOREACH PAREA = 'basic planning area'.
      COUNT = 1.
    DO
         SUM = SUM + {amount, count}      (amount is a keyfirgure value)
    ENDDO.
    COUNT = COUNT+1.
       SUMACT =  SUM.
    ENDFOR.
    can you correct the above code ....to read the values and sum of the those value.
    Thanks...

    Hi ..
    That is ok..
    Can you provide sample code for my requirement..
    and also how can i pass the error message (can you help me syntax )
    and if my acutal-total  is not equal to plan-total  then
    i have to pass the error message and then  i have to restrict save the data  how i can i restrict(user can not save the data until the values should be equal) .
    Can you help me it is very urgent..
    thanks.//
    Edited by: Eyda rose on Jun 4, 2008 9:29 PM

Maybe you are looking for

  • Windows not working, please help me

    Hi ... I have a problem with windows 8 in my macbook pro, in the past year it happens twice, first time it was solved by itself and now happened again and take too long around tow weeks, the problem is " Whenever i turn the windows 8 it just gives me

  • Which Keynote fonts & transitions are compatible with Powerpoint?

    Hi, I've used some jazzy transitions in my Keynote and will export to Powerpoint and play it from a PC. Now I'm told that there might be compatibility issues with the transitions. Can anyone tell me what are the safe transitions I can use in Keynote

  • Firewire plug fits very loosely

    I have a LaCie external drive, the black one with the blue light underneath, and the plug fits so loosely into my MacBookPro that any jostling of the 'book or the cord causes it to come unplugged. Then I get that intimidating error message, threateni

  • Voucher to Payment creation in

    Hello All, I am a newbie to Peoplesoft. I am trying to learn the complete flow from entering voucher to payment creation in AP module. I created a voucher but this voucher is not picked up in Pay Cycle. I must be missing something. Can somebody help

  • Highlight/color elements in video, add arrows ?

    Hi all This is my first time posting here so bare with me. I'm new to Premiere (noob) and my knowledge is close to sea bottom, but I am ambitious . I was given a project by my university which is due at the end of the next month. What am I trying to