cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to bind the database values to the fields in form in PDK

Former Member
0 Kudos

Hi all,

i need to create a PDK application on which i need to bind the my field attribute values to the values in database. Is it possible to map them through context mapping in pdk or wheather i need to set these parameters to the backend table attributes. Please help me to solve this. It will be very helpful to me if u send some sample code to bind some values like user id , country and some other.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hai,

Is it possible to bind the context values to the form using ABstract Portal Component?..

Former Member
0 Kudos

Hi,

Yes it is possible. Why not. The only thing is that coding in an abstract portal component is more cumbersome as compared to JSP DynPage.So something like this:

void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{
 
response.write("<form>");
....and here use an Iterator to run through the return Table of the RFC and add it to the options of the <select></select> input object of the HTML
response.write("</form>");

}

So its easier since theres no learning curve but cumbersome.

P.S. If you liked the answer do consider rewarding points.

Regards,

Prem SAP GDC.

Former Member
0 Kudos

Hi,

What technology are you planning to use when you wish to create a PDK application.

I would suggest you use web dynpro wherein context mapping is easy. Are you talking about data from an SAP system or some other database? If its the former then WD makes the work much easier.

If its another database you could use the connector framework API along with JSP DynPage to arrive at a solution.

Regards,

Prem

GDC

Former Member
0 Kudos

Hi,

In my application i need to implement a another technology which is not possible in web dynpro. For that one i need to develop the application in PDK with JSP or EJB. Is it possible to bind the context variables in JSP DynPage?. I am new to PDK and i have little knowledge in JSP DynPage concepts only. As per database part, i am using SAP database only. My form contains 4 dropdown lists and these values are already available in SAP database. By executing some BAPI's i need to connect these with my application. This is my requirement. For this purpose wheather i need to create context variables or directly by executing the BAPI's these values will bind to the dropdownlists in my form. Kindly suggest me which is possible.

Former Member
0 Kudos

Hi,

May I know what is it that may not allow you to use WD.Ok anyways, you can use JSP DynPage. Theres a lot of help available on that. You can bind context variables but not the easy way you can do it in WD.

In case of JSP DynPage you have to create a model for each of data that populates your 4 dropdowns and then assign it to the dropdowns.

This is how: http://help.sap.com/saphelp_nw70/helpdata/en/09/9c0e41a346ef6fe10000000a1550b0/content.htm

You can execute BAPI's using SAP JCo. Theres a lot available on that as well.

In short the model you create out of the data returned by JCo forms the data that will be bound to your dropdowns.

Regards,

Prem,

SAP GDC.

P.S. If this helped consider rewarding points