cancel
Showing results for 
Search instead for 
Did you mean: 

How to search data from a context node.

Former Member
0 Kudos

Hi Friends,

Thanks for ur help for previous problem . I am facing some other problem i.e how to

search data from a context node.

i have a context node :-

Car(main node) which consist of details, owners, engine and Brand as its sub node.

the value attibutes of difft nodes are:-

Car- category

Details- Mileage, Price, registration_no, miles_used

owner - name, phnno,addrs

Brand - main_brand, co_brand

Engine- Bhp,Rpm

Now i have to apply a search criteria on the basis of price, miles_used .

pls help to implement that .

Thanks & regards

Pravin jha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Don't you have a model behind your context? If you have, you should execute the search on the model and rebuild the context from the search results.

Armin

Former Member
0 Kudos

no as i am a learner i dont know how to use model .

right now i have created m BOL file and stored my data there .

Now pls confirm me how to retrieve data from there

Former Member
0 Kudos

Hi Pravin,

There are two types of context nodes: Value and model nodes.

Model is an abstraction of the backend. The data interactions (data retrieval , data persistance etc) in a web dynpro application are done using the model. The possible models could be a RFC, Web Service and Java Bean.

The model is represented as a model node in the context.

You can refer to help.sap.com for more information. Also, try this link on the models:

http://help.sap.com/saphelp_nw70/helpdata/EN/6a/11f1f29526944e8580c5e59333d96d/frameset.htm

Regards,

Kartikaye J Gomber

Former Member
0 Kudos

Hi PRAVIN,

What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:

Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.

Now you can create a table of this node "Car" and can easily search on the basis of any criteria.

I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.

Cheers!!!

Umang

Former Member
0 Kudos

Thanks for your help but actually i want the code and concept so that i can understand.Actually i have the context in the same way that i have given in the first message.

secondly i will make another view having the context node as like you have told but actually how i will search within that node like if the searching criteris price wise .

then what code i have to write please provide me with some help.

Thanks again for ur help

Former Member
0 Kudos

hi

can you be more clear with your question

search criteria on the basis of price, miles_used ? what you have to perform .

Former Member
0 Kudos

Either i have to provide a view in which there will be two option

like search by price, search by Miles_used

so that if a user wants that he can buy cars less than 5 lakh rs then he will enter the value 5 in the text box and when he clicks on the search button then the cars with less then 5 lakhs price will be displayed from the context node.

same is the case with miles_used