cancel
Showing results for 
Search instead for 
Did you mean: 

how to retrieve data from database without using any fm

Former Member
0 Kudos

hi

please tell me how to retrieve data from database without using any FM (function module). i want to tap the data into an internal table and then show it through a table( i.e U I element).

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Please follow the below steps.

1.Create a context node with attributes from structure as you required.

2.Go to DOININT method use 'Web Dynpro ABAP Code Wizard' from application tool bar to read the context.

3. Write select query and move selected data into internal table.

4. Now bind internal table to context node.

5. go to view drag insert table UI element and then create binding with context node.

Please see below articles and examples.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7a89b067-0801-0010-8192-a9896a60...

WDR_TEST_TABLE

WDR_TEST_TREE

WDR_TEST_UI_ELEMENTS

Former Member
0 Kudos

Hi Vishwdeep,

Well there are different ways of getting data from database table but all the ways have only one commant i.e select(i am talking explicitaly about webdynpro framework)

Solution 1) U create internal table in any user defiend of method of view or in hooks methods and write select query in that method .U will get data in ITAB as webdynpro abap framework is embedded in abap workbench(not like java webdynpro).

Solution 2)As per MVC pattern you should not write select queries in your view methods instead write it down in class/methods and use that class as assistance class .

Thease are the two ways that you can get data in webdynrpo.

If any query feel free to ask.

regards

PG

Former Member
0 Kudos

hi,

You can directly use your select statement in WDA. but it is advisable to use FM because of modularization.

Yogesh N