cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Dummy data for tables

ashish_shah
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member193726
Active Participant
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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

ashish_shah
Contributor
0 Kudos

Hi Kawalpreet ,

Can you please tell me how can i take dummy data from MS sql server or java dictionary tables.

Ashish Shah

Former Member
0 Kudos

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

ashish_shah
Contributor
0 Kudos

Hi Mithileshwar ,

If you know , can you tell me how can i create a java dictionary table and use the data stored over there in my webdynpro application?

Regards,

Ashish Shah

Former Member
0 Kudos

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