Skip to Content
avatar image
Former Member

Web Dynpro and Java Dictionary

Hello,

I am creating WD Applications for accessing RFC Funtionalities in en ERP.

Everything works fine.

Now I would like to store some data in an DB Table on the WAS.

I have created a Dictionary project and have deployed the table to the WAS.

I can see the table in the database if I look onto the DB with an DBM system.

So far no problem.

Now I would like to access this table from an WebDynpro.

All I have learned so far is to create a bean, implement the DB access in there and use the bean from the WebDynpro as discussed in the various documentations.

I cannot belive that.

Is there no other way to access this?

I think there must be a way like importing a model or doing something with the context of the controller or the local dictionary.

Can anyone help me answering that question before I develop some beans for the data access.

Best regards

Uwe

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 10, 2009 at 04:23 PM

    Hi Uwe

    I didn't believe too. But this is true.

    The java dictionary is only to generate DDL.

    To access the table and manipulate it, you need use other tecnologies, lije ejb, sqlj, jdbc...

    See this thread:

    [Manipulating Table create by Dictionary|Manipulating Table create by Dictionary]

    Regards

    Marcos

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 13, 2009 at 06:09 AM

    Hi Uwe,

    You can achieve this by developing an EJB and creating a model(Adaptive webservice model) in webdynpro.

    Steps:

    1. Create an Entity Bean which represents the DB table.

    2. Create a session bean and write a business method to insert a record to the table. This session bean should internally call Entity bean's create method to insert a record in the data base.

    3. Expose the Session bean as webservice. (Let us suppose InsertRecordWS)

    4. Create an EAR project and deploy the EJB project.

    In Webdynpro:

    1. Create an Adaptive Webservice Model and for the InsertRecordWS webservice by using the .wsdl file.

    2. Map the model context to your controller.

    3. Map the controller's model context to your view and write the code to execute model.

    Hope this clears!

    Regards,

    Jaya.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 13, 2009 at 06:56 AM

    Hi Uwe

    >Now I would like to access this table from an WebDynpro.

    >All I have learned so far is to create a bean, implement the DB access in there and use the bean from the WebDynpro as discussed in the various documentations.

    Usually a data is coming to Webdynpro applications via Models. Model can invoke some service or query and store the output data in the context of your WD controller. There are Web-service model, RFC model, EJB model and other types.

    So in your case the data propagation can be the following:

    a) DB table <-- EJB <-- EJB Model <-- WD Controller's Context <-- WD View

    b) DB table <-- EJB <-- Webservice <-- Webservice Model <-- WD Controller's Context <-- WD View

    Of course it's possible to read a data and put it in WD Context without use of models. In the case you have to access EJB directly in WD application and read the data manually in your WD Context. However, this is not recommended.

    BR, Sergei

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 14, 2009 at 01:07 PM

    Thank you very much for your answers.

    I am not amused but I thought so already.

    Best regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded