on 06-20-2005 2:41 PM
Hi,
I'd like to use the same view to display and change some data, let's say a sales order for example.
I've imported BAPI_SALES_ORDER_CREATE and BAPI_SALES_ORDER_CHANGE into my RFC Model and created 2 Controllers for each BAPI.
I've also bound my View to the controllers, but it seems not possible to map the context elements to 2 controllers at the same time.
Is it the right solution for my scenario?
Any advice?
Thanks,
Nicolas
Do you mean that you would like to have both controllers having the same data ?
For ex: you wan to load data using a BAPI, then allow user to make some change, and finally save those changes using another bapi, depending on what have been done (create in case it's a new order, change in case it's a change)...
In that case, you can't map context elements to both, but what you could do is, before calling your final bapi (save or change), copy elements from current context element to input element of your bapi.
To do so, you can use WDCopyService.copyCorresponding(wdContext.currentSaleOrderElement(), wdContext.currentBapi_Create_Input());
Hope this helps !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are using two FMs you can't bind the modelnode to tow different sources at the same time.
If you create FM in such a way that after creating a new record, the RFC should return a collection of records back to the Model.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You could use the Component Controller and do the mapping between the model and the Component controller and controller to the view. In this case you would be mapping the models for Change and Create BAPI to the View using the Component Controller.
Well i guess this would be a way of doing it.
regards
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will summarize your points.
1. You want to show bothe create and display items in the same view
2. You have 2 custom controllers for each BAPI/FMs.
Solution.
1. Go to view properties and include both the coustom controllers in the required controllers.
2. Now create Modelnode in the view for both create and display BAPIs and map to coreesponding custom controller model nodes.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anilkumar,
Thanks for ur answer. That's what I've done, but it seems I can't use the same Model Node in my View for both controllers create and display. It works fine if I use 2 different nodes and map them to each controller, but as they have the same structure I don't wish to do it this way. Is there any trick?
Regards,
Nicolas
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.