on 01-23-2005 8:51 PM
Hi,
I am creating a Master Detail application. I have list of orders retrieved using a BAPI. Based on user selection of any order, I would like to call another BAPI to retrieve item details. I know that I can use context programming. But I think I did not understand this fully.
Could some one clarify or give sample code for the following.
1) How do I get order number from the row retrieved[using getLeadSelection gives me current row selected]. where are the row values stored and how i can retrieve. Basically, where I need to put the coding?
2) How do I pass this order number and where I put the coding to execute second BAPI with this number and get back the results
3) I would like to used tabbed display to show the results, do I need to take any additional step apart from mapping to get the desired output.
Thanks for your help.
Raju
Message was edited by: Raju Datla
Hi
In addition it is also a good thing to use supply functions for these kinds of tasks
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/web dynpro tutorial and sample applications.faq
Search string Supply Function in page
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To react on a table's lead selection change, you could define an action / event handler in the view controller and use table.setOnLeadSelect(action) to handle the lead selection change.
To get the new selected row / node element, you can either use the event parameter "row", which is the index of the new selected row, or take the lead selection of the table's data source node.
The data of the selected row are the attribute values of the node element at the lead selection (in the table's data source node).
In the event handler, you can call a method of a custom controller (or component controller), that calls the BAPI or whatever model function for getting the detail data.
If you want to use a tab strip, you can either put all tab contents into one view, or you can use view container UI elements and separate views in each tab.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armin,
Thanks for your help. It works to an extend that first click on any item retrieves first row not the selected row. Do you think I might be missing something?
Supply function is not appearing in view context. Do you think supply function is part of custom controller not view. Any way my action is captured using table's onLeadSelect.
Thanks
Raju
Armin,
Further to above I noticed that always first row details are retrieved. It seems the code is not picking up currently selected node.
The code I used is
wdContext.node..().get...ElementAt(wdContext.getLeadSelection()).getAttributeValue("....").toString()
;
Can you or some one correct me if I am using wrong method.
Thanks
raju
Message was edited by: Raju Datla
To create a supply function, you have to go to the context editor and fill the value "supplyFunction" in the property sheet of the context node. Supply functions normally should be placed in custom controllers as they are not view-specific.
Are you calling invalidate() after calling into the model?
Armin
Thanks Armin,
It looks like I am getting the first row of data irrespective of my click on any row. I noticed it a while ago. Then my code seems not retrieving currently selected row. Do you think I should use supply function? or can you have a look at the code I pasted in my previous post and am I missing anything?
Regards,
Raju
Good Armin,
Thanks for your help.
I have to try using supply function which I will do later.
I am assigning the points and by the way if you come across any pattern development, please do let me know. I want to develop a search pattern to search order(sales or po or service, etc) after being used in an application
Thanks once again,
Raju
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.