on 08-28-2007 10:06 AM
Hi Experts ,
I need to create some dummy data for my webdynpro application.
In my application i have three tables each with some 15 rows.
And these three tables are linked with some key fields.
Now i have created the GUI but i need to add some dummy data.
can you please suggest me what are the different possible ways to create this dummy data.? Even if it involves creating some classes or some other application , i dont mind .I would be happy to know different available options.
Regards,
Ashish Shah
Hi Ashish,
Lets assume the structure of the node to be,
Person(Node)
|_FirstName(Attribute)
|_LastName(Attribute)
Please fine the code below.
Collection tableRows = new Vector();
IPrivate<MyView>.I<Person>Element personElement = null;
personElement = wdContext.currentPersonElement();
personElement.setFirstName("Rekha"):
personElement.setLastName("Malavathu");
tableRows.add(personElement):
wdContext.nodePerson().bind(tableRows);
or
IPrivate<MyView>.I<Person>Element personElement = null;
personElement = wdThis.wdGet<MyComponentControlelr>.wdGetContext().createPersonElement();
personElement.setFirstName("Rekha"):
personElement.setLastName("Malavathu");
wdThis.wdGet<MyComponentControlelr>.wdGetContext().nodePerson().addElement(person);
Hope this helps to enter a single row data.
If you try the same in a loop you will get the entire list of 15 rows.
Regards,
Rekha Malavathu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Take data from other "dummy" databases, such as NorthWind on MS SQL Server
2.dummy data can be generated from the SAP R/3 also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! Ashish,
go to link
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#63">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#63</a>
and check the "Context Programming and Data Binding" tutorial.Here you will get a class which create the Dummy table data.
enjoy
Mithileshwar
Hi Ashish
you can use a FOR LOOP and add the dummy data .i mean you can control the data through programatically
Ex.
for(i=0;i<=10;i++)
{
wdcontext.currentContextElement<>.setXX(i+1); // if this is an integer value
...
..
}
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.