Help in making this GUI without using IDE (snapshot attached)

[Layout image| [https://rapidshare.com/files/2954811682/layout.JPG]]
hi, i am new java swing library and i want to create a layout just like a image posted above without using IDE.
i need some idea/help regarding two issues which i m facing at the moment one how to set the size of the button and how im suppose to set the alignment of labels,textboxes and buttons according to the image here is the source code below :
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
public class Form extends JFrame {
private JLabel lblUserName;
private JLabel lblNewPassword;
private JTextField txtUserName;
private JPasswordField txtNewPassword;
private JButton btnLogin;
private JButton btnClear;
private JPanel mainPanel;
private JPanel centerPanel;
public Form() {
// initialize the components
initComponents();
     // add the components
addComponents();
     // add the listeners
//addListeners();
// display components
displayComponents();
private void initComponents() {
getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
mainPanel = new JPanel(new BorderLayout());
centerPanel = new JPanel(new GridLayout(3, 4, 20, 5));
lblUserName = new JLabel("Username : ");
lblNewPassword = new JLabel("password : ");
txtUserName = new JTextField(15);
txtNewPassword = new JPasswordField(15);
btnLogin = new JButton("Login");
btnLogin.setPreferredSize(new Dimension(2,2));
btnClear = new JButton("Clear");
btnClear.setPreferredSize(new Dimension(2,2));
private void addComponents() {
centerPanel.add(lblUserName);
centerPanel.add(txtUserName);
centerPanel.add(new JLabel(""));
centerPanel.add(lblNewPassword);
centerPanel.add(txtNewPassword);
centerPanel.add(new JLabel(""));
centerPanel.add(new JLabel(""));
centerPanel.add(btnLogin);
centerPanel.add(btnClear);
Font titleFont = new Font("San Serif",Font.PLAIN,12);
Color titleColor = Color.blue;
mainPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Admin Login",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,titleFont,titleColor));
mainPanel.add(centerPanel, BorderLayout.CENTER);
getContentPane().add(mainPanel);
private void displayComponents() {
setTitle("Form");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(600, 200);
setVisible(true);
public void actionPerformed_BtnUpdate(ActionEvent e) {
JOptionPane.showMessageDialog(this, "Your profile has been updated successfully.");
public void actionPerformed_BtnBrowse(ActionEvent e) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.showOpenDialog(this);
public static void main(String[] args) {
try {
Form myForm = new Form();
     catch (Exception exception) {
System.err.println("ERROR - " + exception.getMessage());
Edited by: 932179 on May 4, 2012 1:30 PM
Edited by: 932179 on May 4, 2012 1:30 PM

Welcome to the forum.
Take the list of +"All Known Implementing Classes"+ from here http://docs.oracle.com/javase/7/docs/api/java/awt/LayoutManager.html and find out what combination best fits your needs.
I usually have some nested BorderLayouts and GridLayouts.
When I need lables and input fields aligned I use GroupLayout (which I personally prefer over GridBagLayout...).
Anyway, you may have got better answers if you postet this in the right place:
Swing
bye
TPD

Similar Messages

  • Using text in a GUI without using .swing classes

    In a Java application, is there any way to create a text object that can be positioned in a GUI like an ImageIcon (using a class from the standard Java API)? For example, when using ImageIcon, you feed the x and y-coordinates, whereas with .swing, you'd have to create a new panel, position the panel, and re-position the panel using BorderLayout.(direction).
    Ex. (with ImageIcon, you'd place it like so):
    //construct ImageIcon w/ URL
    ImageIcon myImage = new ImageIcon(new URL("http://..."));
    //x and y are pixels to the right and to the bottom from the top left corner
    myImage.paintIcon( (Component), (Graphics), x, y);
    //I'm looking for one that does the same, like this (without using an image, preferrably), TextMessage is what the class might be:
    TextMessage myText = new TextMessage("Here is some string to print out");
    myText.printText( (Component), (Graphics), x, y)

    or you can paint a string, like this
    public void paint(Graphics g) {
         super.paint(g);
         g.drawString("Hello World!", x,y);  // replace x, y with your own coordinates
    }hope that helps

  • How can i construct this query without using CASE statement?

    I've a following code. I'm using this script in Hibernet. So, i cannot use CASE there. Because, hibernet doesn't support case in select statement. How can i construct the same thing which will give me the same result without using CASE?
    SELECT ofc.FLT_LCL_ORIG_DT
         , ofc.CARR_IATA_CD
         , ofc.FLT_NBR
         , ofc.ORIG_ARPT_CD
         , ofc.DEST_ARPT_CD
         , sum( ofc.CNCT_PSGR_CNT) AS BOOKED_CNCT_PSGR_CNT
         , sum( CASE WHEN o.fsdr_mrkt_cd = 'D' AND d.fsdr_mrkt_cd = 'D'           THEN '0'
            ELSE to_char(ofc.CNCT_PSGR_CNT,'99')                             END ) AS BOOKED_INTL_CNCT_PSGR_CNT
         , sum(CASE WHEN o.fsdr_mrkt_cd||d.fsdr_mrkt_cd = 'DD'
                    THEN '0'
            ELSE to_char(ofc.CNCT_PSGR_CNT,'99')
            END) AS NEW_BCNT
    FROM OPS_FLT_CNCT ofc
                        , STN o
                        , STN d
                    WHERE ofc.CNCT_ORIG_ARPT_CD = o.STN_CD
                      AND ofc.CNCT_DEST_ARPT_CD = d.STN_CD
                     -- AND TRUNC(ofc.FLT_LCL_ORIG_DT) = trunc(to_date('22-MAY-2007','DD-MON-YYYY'))
                      AND ofc.CARR_IATA_CD = 'UA'
                      AND ofc.FLT_NBR = '1218'
                      AND ofc.ORIG_ARPT_CD = upper('DEN')                AND ofc.DEST_ARPT_CD = upper('IAD')                  GROUP BY ofc.FLT_LCL_ORIG_DT
                           , ofc.CARR_IATA_CD
                           , ofc.FLT_NBR
                           , ofc.ORIG_ARPT_CD
                           , ofc.DEST_ARPT_CD ;And, the output look like this --
    FLT_LCL_O CARR FLT_N ORI DES BOOKED_CNCT_PSGR_CNT BOOKED_INTL_CNCT_PSGR_CNT   NEW_BCNT
    22-MAY-07 UA   1218  DEN IAD                    9                         0          0
    23-MAY-07 UA   1218  DEN IAD                    1                         0          0
    24-MAY-07 UA   1218  DEN IAD                    2                         1          1
    25-MAY-07 UA   1218  DEN IAD                    1                         0          0Thnaks in advance for reply.
    Regards.
    Satyaki De.
    #####

    2 ideas:
    1. Inline function to perform the CASE funcionaltity for you
    2. Piplelined function to generate the entire dataset
    Both will be slower than just using CASE in a query, but we're working around big constraints

  • Help required to create portal without using any vendor specific API's

    Hi All,
    I am trying to develope a portal without using any vendor specific API or tool like Weblogic workshop or Vignette Wizard. I would like to know whether Sun Microsystem provides any API for developing portal. I would also appreciate if I can get few links for developing portal using java API's...
    Thanks in advance...
    Dgk

    Sure Sun provides the tools: it is called the compiler. Now all you need to do is write the code for a portal. But since there are vendor specific solutions available that could make your life a lot easier, writing one yourself is like reinventing the wheel.
    Pardon my mild sarcasm, but avoiding API's not developed by Sun is not the general idea behind the Java platform. You are encouraged to use those API's.

  • How can I fix this select without using subquery?

    Hi guys is there any way to do the where below (in bold) without using an aggregate query before?
    select
    SUM(NET_AMOUNT)
    as net,
    SUM(TAX_AMOUNT)
    as tax,
    SUM(NET_AMOUNT)+
    SUM(TAX_AMOUNT)
    as total from ledger left join alloc on ledger.trxid=alloc.trxid where
     (SUM(NET_AMOUNT)+
    SUM(TAX_AMOUNT))
    > allocated
    net and tax are in the ledger and allocated is in the alloc table. Sometimes the total of the amount (net+tax) is greater than the allocated so I need to retrieve all the rows where allocated is null or  tot is greater than allocated.
    It's possible without CTE?
    Thanks

    Resolved.
    SUM(NET_AMOUNT)
    as net,
    SUM(TAX_AMOUNT)
    as tax,
    SUM(NET_AMOUNT)+
    SUM(TAX_AMOUNT)
    as total from ledger left join alloc on ledger.trxid=alloc.trxid ....group by....
    having ((SUM(NET_AMOUNT)+
    SUM(TAX_AMOUNT))
    > allocated)
    Sometimes I need to post the issue in the forum just to remember how do the things.
    Thanks and sorry

  • I have two questions and appreciate anyones help, First I can not seem to copy music from a legitimately purchased CD into my iTunes library or i pod, can anyone help me with this? it used to work. i have i pod touch and second-.

    Thank you for any help I appreciate it. Apple products came highly recomended to me, and I have been largely happy with my i phone, i pod, i pad mini and macbook. I admit I tunes always confused me, it is so hard to copy things back and forth from computer to device or vice versa. Most importantly my partner has given me a set of CD with audio books, legitimate CD's not burned copies, and I wish to play them on my i pod touch. I have donethis before with CD''s, however now I look i see all the songs and audio books from CD's have been removed from my device after synch with my itunes on my macbook??? and I can no longer cooy the new CDs on to there? i try put them in the library, and they show up but they are not in black printing like the other songs, they are a faded grey color. They play on the mac book in itunes, so i know they are THERE, they just wont go on my device??? What am I doing wrong and why did all my other ones turn to grey gaded text and go off my i pod.
    Furthermore, i thank anyone who takes time to help me, it isnt your job, it is apple's job, but they want me to pay forty bucks for the priviledge of contacting them for help because my warranty expired !! They obviously did something with a new update of their i tunes, there should be NO DIFFICULTY copying audio books i legally own the CD for onto my i pod, why is it so impossible? I have asked my father, my brother, my flat mate, no one can work it out, so its not just that im an idiot.
    People warned me that apple does things like this, makes stupid programs like i tunes, that make nothing but trouble so you have to pay to ask for help, and make it so you have to buy everything from their library not on CD. I woudl buy from them if they had the audio books and songs I wished to purchase but they don't always have what i want. And if they did why shoudl i pay AGAIN when i paid for the CD already , i paid for the I pod, i legally own them both so why can i not put my own music on there??? It makes me miss my simple MP3 player where i just plugged it to my computer and copy/paste. It really makes me wonder why when i POD is so much more expensive why its so much more trouble and you have to pay to ask for help??? I really have enjoyed my macbook (After being windows used all my life), i love my i pad and i phone, and until now i adored my i pod, but if it's not going to let me listen to my own music and audio files i may as well throw it in the trash and go get a mp3 player, and warn everyone I know.     If there IS a way to copy my own music to the device then WHY IS IT SO HARD?? Just to make people pay to ask for help or what?
    I am a loyal apple customer, All my devices are apple and until now i have been happy and willing to pay more for a good product. But i tunes is ridiculous! It's already synched things i didnt want synched and deleted things i didn twant deleted, and thats fine i told myself maybe im too dumb and dont get it. buT i've been trying all week and asked other peopel and still cant get this simple task done, and after purchasing their devices and recommending them to my friends, its a slap in the face to say they wont even let me ask a support question without paying forty bucks!  Thanks for nothing apple.
    A very unhappy customer-- not just that i cant pplay my music and audio books, but that i cant even contact anyone for help without paying after i purcahsed four different products off them in the two years!

    The sort fields should generally be empty unless you've putting in custom values to sort solo artists by their surnames. You can apply common changes to thousands of tracks at once, just don't apply the wrong change because there is no undo.
    It is a good idea to backup before undertaking large scale changes. See this backup tip for a suggested approach.
    tt2
    Message was edited by: turingtest2

  • I Need Help With Making This Program Work

    The directions for this program:
    Enhance the Student class to contain an Advisor. The advisor has a name (type Name), phone number (type String). Place edits in the Name class to validate that the length of the first name is between 1 and 15, middle inital <= 1, and lastName is between 1 and 15. Throw an IllegalArgumentException if the edits are not met. The advisor attribute in the Student class should replace the advisorName. Document the Name, Advisor, and Student classes including the preconditions and postconditions where necessary. Create a test class that will instantiate a Student, fully populate all of its fields and print it out. Do not document the test class. Submit for grade Student.java, Advisor.java, and Name.java.
    public class Student
         private Advisor advisorName;
         private Advisor phoneNumber;
         public void setAdvisorName(Advisor anAdvisorName)
             advisorName = anAdvisorName;
         public Advisor getAdvisorName()
             return advisorName;
         public void setPhoneNumber(Advisor aPhoneNumber)
             phoneNumber = aPhoneNumber;
         public Advisor getPhoneNumber()
             return phoneNumber;
    public class Name
         private String firstName;
         private String midInit;
         private String lastName;
         public String getFullName()
             return firstName + " " + midInit + " " + lastName;
         public String getFirstName()
             return firstName;
         public String getMidInit()
             return midInit;
         public String getLastName()
             return lastName;
            Calculates length of the first name.
            (Postcondition: getFirstName() >= 0)
            @param s the length of the first name to calculate
            (Precondition: length of aFirstName > 0 and <= 15)
         public void setFirstName(String aFirstName)
             if(aFirstName.length() < 1)
               throw new IllegalArgumentException();
             if(aFirstName.length() > 15)
               throw new IllegalArgumentException();
               firstName = aFirstName;
            Calculates length of the middle initial.
            (Postcondition: getMidInit() >= 0)
            @param s the length of the middle initial to calculate
            (Precondition: length of s > 0 and <= 1)
         public void setMidInit(String aMidInit)
             if(aMidInit.length() == 1)
               throw new IllegalArgumentException();
               midInit = aMidInit;
            Calculates length of the last name.
            (Postcondition: getLastName() >= 0)
            @param s the length of the last name to calculate
            (Precondition: length of aLastName > 0 and <= 15)
         public void setLastName(String aLastName)
             if(aLastName.length() < 1)
               throw new IllegalArgumentException();
             if(aLastName.length() > 15)
               throw new IllegalArgumentException();    
               lastName = aLastName;
    public class Advisor
         private Name advisorName;
         private String phoneNumber;
         public String getFullName()
            return advisorName + " " + phoneNumber + " ";
         public Name getAdvisorName()
             return advisorName;
         public String getPhoneNumber()
             return phoneNumber;
         public void setAdvisorName(Name anAdvisorName)
             advisorName = anAdvisorName;
         public void setPhoneNumber(String aPhoneNumber)
             phoneNumber = aPhoneNumber;
    public class Test
         public static void main(String[] args)
            Name name1 = new Name();
            name1.setFirstName("Timothy");
            name1.setLastName("O'Neal");
            name1.setMidInit("J.");
            System.out.println("name1 = " +
                name1.getFirstName() + " " +
                name1.getMidInit() + " " +
                name1.getLastName());
            Student st = new Student();
            st.setAdvisorName(name1);
            Name name2 = st.getAdvisorName();
            System.out.println("name2 = " +
                name2.getFirstName() + " " +
                name2.getMidInit() + " " +
                name2.getLastName());   
            name2.setFirstName("Timothy");
            System.out.println("name2 = " +
                name2.getFirstName() + " " +
                name2.getMidInit() + " " +
                name2.getLastName());       
            System.out.println("name1 = " +
                name1.getFirstName() + " " +
                name1.getMidInit() + " " +
                name1.getLastName());
            System.out.println("name1 = " + name1.getFullName());   
            System.out.println("name2 = " + name2.getFullName());
    }I can't get the test class to compile and i'm not sure if this is what i'm suppose to do

    public class Test
    public static void main(String[] args)
    Student st = new Student();
    Advisor advisor = new Advisor();
    st.setAdvisor(advisor);
    Name name1 = new Name();
    name1.setFirstName("Jake");
    name1.setLastName("Schmidt");
    name1.setMidInit("K.");You have the general idea, I think. You are just doing it backwards.
    You create and advisor and assign it to a student. But you don't give
    the advisor a name until after you assign it to the student.
    You should create an advisor, give the advisor a name and then add it to the student.
    //create the name
    Name name1 = new Name();
    name1.setFirstName("John");
    name1.setLastName("Smith");
    name1.setMidInit("K.");
    //create the advisor
    Advisor advisor = new Advisor();
    advisor.setAdvisorName(name1);
    //create the student
    Student student = new Student();
    //assign the advisor to the student
    student.setAdvisor(advisor);
    //now the student has an advisor named John K. Smith
    //What is the name of the advisor?
    String name = st.advisor.getAdvisorName().getFullName();
    //I know that line looks complicated...but that's how you have created your class structure.
    Instead you could have done:
    Class Student{
    private Advisor advisor;
    public String getAdvisorName(){
    return advisor.getFullName();
    class Advisor{
    private Name advisorName;
    public getFullName(){
    return advisorName.getFullName();
    This way, if you wanted to know the advisor's name you would go:
    String name = st.getAdvisorName();
    which is much easier.
    I think it would be much easier to help you if we were both in the same room, on the same computer :)

  • [as2] Making a tween without using the tween class take 2

    Hi. The previous topic was ok to use with paramaters that makes a square only.
    If you try to make a movie clip travel along a rectangle diagonal within 90 seconds, the movie clip makes some curves.
    Any help?
    Thanks

    function initTweenF(mc:MovieClip, x1:Number, y1:Number, x2:Number, y2:Number, sec:Number):Void {
        var freq:Number = 70;
        clearInterval(mc.tweenI);
    //this is just a variable?
    // yes, flash does not round variables to the nearest .05 so these
    // two variables will not accumulate/compound rounding errors
       mc.x = x1;
        mc.y = y1
        mc._x = mc.x;
        mc._y = mc.y;
    //the formula freq/(1000*sec) can you explain it?
    // tweenF will be called 1000*sec/freq times so mc.x, for example, will be
    // incremented 1000*sec/freq times.  ie, mc.x after all those calls will be
    // x1+(x2-x1)*freq/(1000*sec) * 1000*sec/freq = x1+(x2-x1) = x2
        mc.tweenI = setInterval(tweenF, freq, mc, (x2-x1)*freq/(1000*sec), (y2-y1)*freq/(1000*sec), x2, y2);
    function tweenF(mc:MovieClip, xInc:Number, yInc:Number, x2:Number, y2:Number):Void {
       mc.x += xInc;
        mc.y += yInc;
        mc._x = mc.x;
        mc._y = mc.y;
        if (Math.abs(mc._x-x2)<Math.abs(xInc) && Math.abs(mc._y-y2)<Math.abs(yInc)) {
            mc._x = x2;
            mc._y = y2;
            clearInterval(mc.tweenI);

  • Help! web.xml security without using WAR files

    I'm currently using the RDBMSRealm and URL ACL security for my app. I would like to use the web.xml descriptor for security so that I can specify login pages and such. We currently are not using WAR files. I've been having alot of trouble setting this up. Is there a way to use the RDBMS realm along with the web.xml security? It looks like it should work, but I can't seem to get it to function. How do I specify the regular document root as a webapp? I'm currently running WLS 5.1 with SP4. Thanks.

    The RDBMSRealm is just the authentication mechanism underneath WLS versus the
    web.xml of the WebApplication which describes all the access control for that WebApp.
    the later being scoped only to that WebApp.
    you don't need to deploy in a war file, you can expand the archive into an identical
    directory structure and then just point us towards the top level of that structure.
    see: http://www.weblogic.com/docs51/classdocs/webappguide.html
    .paul
    chris wrote:
    I'm currently using the RDBMSRealm and URL ACL security for my app. I would like to use the web.xml descriptor for security so that I can specify login pages and such. We currently are not using WAR files. I've been having alot of trouble setting this up. Is there a way to use the RDBMS realm along with the web.xml security? It looks like it should work, but I can't seem to get it to function. How do I specify the regular document root as a webapp? I'm currently running WLS 5.1 with SP4. Thanks.

  • XML Gurus: help with cloning a node without using clone!

    Dear all,
    I have to copy one piece of XML from one part of the document to another. Unfortunately I cannot simply do a copy and paste:
    Node nodeLeaf = nodeChild.cloneNode(true);
    nodeAncestor.appendChild(nodeLeaf);
    because some fragments of the nodeLeaf mustn't be copied (depending on the node value)
    So I cannot make a deep clone of the leaf.
    I have to make a clone of nodeLeaf by myself. (Copying its child with a recursive function)
    I have built a recursive function but I cannot understand why it doesn't work correclty (text values are skipped and also some pieces of the xml aren't copied correclty)
    // Passing the full leaf and a leaf with only the first tag, under which I clone manually the nodes.
    Node copyNode = appendNodes(nodeLeaf, nodeLeaf.cloneNode(false));
    private Node appendNodes(Node node, Node copyNode) {
    NodeList kids = node.getChildNodes();
    int length = kids.getLength();
    if (kids != null) {
    for (int ii = 0; ii < length; ii++) {
    Node nodeKid = kids.item(ii);
    copyNode.appendChild(nodeKid.cloneNode(false));
    appendNodes(nodeKid,nodeKid);
    return copyNode;
    Anybody can give me a help ?
    thanks a lot
    Francesco

    Here are a couple of suggestions:
    1) General stuff.
    NodeList kids = node.getChildNodes(); will always generate a NodeList. It may have no entries, but there is no need to check for if (kids != null). Your for loop will do nothing if the length is zero.
    2) You need to change your code as follows:
    for (int ii = 0; ii < length; ii++)
       Node nodeKid = kids.item(ii);
       Node newOutputNode = nodeKid.cloneNode(false);
       copyNode.appendChild(newOutputNode);
       appendNodes(nodeKid,newOutputNode);
    }Dave Patterson

  • Please help me making this report

    I want help to make report display the orders per date and the dates that not have any orders like :
    1/3/2007 order details
    2/3/2007 order details
    3/3/2007 no orders
    4/3/2007 order details
    and 3/3/2007 not exit in the database

    There are two things to know here.
    First, adding an integer number to date field will yeild another date separated from the first one by the given number (of days).
    Second, selecting rownum from any table will bring as many consecutive numbers as many records in the table.As we don't know how many days the user would like to see on the report, we take one of the standard tables with pretty big number of records (all_tables).
    Try these two simple queries to clarify the situation:
    select rownum from all_tables where rownum < 10
    select to_date('31-DEC-2006') + rownum from all_tables where rownum<10

  • F4 help on ALV without using OO

    Hi,
    How can I get F4 help on an ALV field without using OO concept?
    That particular field does not have a value table assigned to it. So i have manually created a matchcode.
    regards
    Nishant.
    Message was edited by: Nishant Gupta

    hi,
    check these links
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/f4-help-in-alv-grid-812677
    http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/f4-help-in-alv-grid-812668
    ALV grid f4 help
    ALV F4 Help Error
    Re: Help in ALV grid

  • HT4970 I want to sync reminders from my computer to my iphone without using iCloud, help me

    please help, want to sync reminders without using icloud??

    how are your reminders set up on your computer?
    If you have your reminders in Gmail you can sync it over google calendar

  • How to delete the record in the table without using lead selection?

    hi,
    I have added the separate column "delete" to the table uielement and so for each record or row of the table the appropriate "delete" link to action will be there................the code below works when the particular row is selected through lead selection only.......
    help me how to delete without using lead selection.....
      DATA:
      NODE_MODULE                         TYPE REF TO IF_WD_CONTEXT_NODE,
      ELEM_MODULE                         TYPE REF TO IF_WD_CONTEXT_ELEMENT,
      STRU_MODULE                         TYPE IF_V_MODULE=>ELEMENT_MODULE .
       data itab TYPE TABLE OF zac_modules.
      navigate from <CONTEXT> to <MODULE> via lead selection
      NODE_MODULE = WD_CONTEXT->GET_CHILD_NODE( NAME = `MODULE` ).
      get element via lead selection
      ELEM_MODULE = NODE_MODULE->GET_ELEMENT(  ).
      get all declared attributes
      ELEM_MODULE->GET_STATIC_ATTRIBUTES(
        IMPORTING
          STATIC_ATTRIBUTES = STRU_MODULE ).
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
        IMPORTING
         TABLE  = itab )
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id.
    CALL METHOD NODE_MODULE->BIND_TABLE
        EXPORTING
          NEW_ITEMS            = itab
       SET_INITIAL_ELEMENTS = ABAP_TRUE
       INDEX                =
    ENDMETHOD.

    Hi  ,
    The onclick event provides you with a standard paramater "CONTEXT_ELEMENT" which has the element from which the event is triggered.
    so you can declare this in the handler(if it is not there) and use it as follows.
    CONTEXT_ELEMENT  TYPE REF TO IF_WD_CONTEXT_ELEMENT  an importing paramater.
    DATA:
    NODE_MODULE TYPE REF TO IF_WD_CONTEXT_NODE,
    ELEM_MODULE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
    STRU_MODULE TYPE IF_V_MODULE=>ELEMENT_MODULE .
    data itab TYPE TABLE OF zac_modules.
    CONTEXT_ELEMENT->GET_STATIC_ATTRIBUTES(
    IMPORTING
    STATIC_ATTRIBUTES = STRU_MODULE ). "Using the context_element paramater to get the static attributes.
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
    IMPORTING
    TABLE = itab )   "getting all the data.
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id. "deleting the particular row from the table and binding it.
    CALL METHOD NODE_MODULE->BIND_TABLE
    EXPORTING
    NEW_ITEMS = itab
    * SET_INITIAL_ELEMENTS = ABAP_TRUE
    * INDEX =
    thanks,
    Aditya.

  • Cross-system stock transfer order (cross CC and without using APO)

    Dear experts,
    I want to set up a stock transfer order scenario cross two SAP systems (and cross company code).
    The examples given in SAP documentation point to scenarios using a joint APO system.
    At the same time the documentation reads:
    The number of process variants is a result of the combination of system landscapes and organizational units:
    - with or without joint SAP APO
    Does anyone in here have experience in setting up this scenarion without using APO system and could help me with a process flow and the IDOC sequence used for this?
    Thanks and regards
    Norbert

    Hi,
    and thanks for looking into this.
    No, I do not have an APO (company is using JDA/manugisitcs) and I want to set up cross system STO between two ECC 6.0 systems directly.
    I do have a number of idocs running between the systems already and also know the place where to configure a plant for cross system goods flow.
    What I would like to know is if this scenario is supported at all and if yes, what is the sequence of idocs and and what are their triggers (in other words - the technical side of the business process) .
    Best regards
    Norbert

Maybe you are looking for

  • Small Biz DR plan

    Hi guys, I need to implement a Disaster Recovery (avoidance) plan for my small business. We did some research and I think found an awesome solution for under $1000 (Aussie dollars) but would value your feedback. In the office, we have 1x PB (1.5GHz P

  • Oracle 8.0.5 on Linux 6.1

    I run "sh oratab.sh" as root from the CD installation directory but get error of form: sh: oratab.sh ReadOnly variable GROUPS I have manually created the /etc/oratab file and given full permissions to it. Other errors I have had in past attempts: * t

  • How to include conditions in select query

    i want to write a select query wherein plants have to to be fetched from table vekp and if it is a plant then the  set movement type to 999 else leave for exiting.please help me on this

  • Web Service Issue

    Hello Everyone, I am having an issue with web services. I created an ABAP FM based web service in R/3 (WAS 640). The web service was created successfully but when I try to publish it to wsNavigator using WSADMIN, it take me to the wsNavigator on our

  • Oracle 8i, stage is in an invalid state

    I'm trying to install ORacle 8i on RHEL 3. Before launching the "runinstaller" script, I set the following variable: export LD_ASSUME_KERNEL=2.4.1 After I run the runInstaller script, and fill the details for the Source and Destination, I get the fol