cancel
Showing results for 
Search instead for 
Did you mean: 

Insert & Read records from java dictionary table using web dynpro java

Former Member
0 Kudos

Hi All,

I have created a dictionary project with a database table TMP_TABLE1 with fields ID,FNAME and LNAME.

I have declared it as a public part.

I have another web dynpro DC whcich will use dictionary DC.

I have done the steps till this point

Now I want to know as to how can we insert new records and read those records from web dynpro DC view?

Please let me know the steps for the same using web dynpro java (not using Java Beans or EJB).

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member214651
Active Contributor
0 Kudos

HI Radhika,

Try the following:

1. Create a Context Node with a structure mapping with your dictionary table in Dictionary DC.

2. Populate the values in the Dictionary DC.

3. Use this DC in the other DC

4. U can then access the node for adding and reading the values.

Regards,

Poojith MV

Former Member
0 Kudos

Hi ,

Thanks for the quick response!

What I have done is in the Dictionary Dc i have created structure same as the table structure and I have bound the

context node (from web dynpro DC) to this structure.

How to populate values in Dictionary DC?

former_member214651
Active Contributor
0 Kudos

HI Radhika,

Create a method in the Dictionary DC for adding and reading and create an instance of the node and add the values i.e

<node Object> = wdContext.createandAdd<NodeName>Element();

<nodeobject>.set<attribute>(<input>);

this will populate the data in the node.

once u populate the node, add this to the Interface controller of the Dictionary DC. Add this DC in the second DC and access the node and perform the operations.

Regards,

Poojith MV

Former Member
0 Kudos

I am not getting what you are saying.

See I have created 2 DCs

DC1 - Dicionary Project - Public Part pp_dictionary

DC2 - Web dynpro Project - Used DCs->pp_dictionary

that means web dynpro DC is using Dictionary DC (where I have created database table)

Now I want to read and write data to this table.

How do I do it?

Former Member
0 Kudos

Hi Poojith,

Please provide some inputs on my last post.

former_member214651
Active Contributor
0 Kudos

Hi Radhika,

Try following the steps as per this document.

[url]http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c

or

[url]/docs/DOC-8061#20 [original link is broken]

Poojith MV

Former Member
0 Kudos

Hi Poojith,

Thanks for the links.

Both the links explain the use of EJB in web dynpro applications.

Could you please tell me how to access i.e. insert and read records from dictionary table using only java web dynpro and not using EJBs.

Regards,

Radhika