cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive RFC questions

Former Member
0 Kudos

I have successfully used and enhanced the FlightList example.

Now I'm trying to do some real life stuff and I have some problems and questions

I use a BAPI as model (BAPI_ALM_NOTIF_CREATE).

1. I apply templates to generate a controller and to populate a view with a form. Most fields in the form becomes protected or read-only, without any sign of this in the properties for the fields or the context. What should I do to be able to enter values in these fields. The fields that are writable are the attributes directly under the top node (circle with c icon), and the ones under the next level nodes (yellow/grey arrow icon.

2. If I edit the data link between the controller and the model, I can see a number of nodes. When should I use which one? (Bapi_Alm_Notif_Create_Input - which have an output node, Bapi_Alm_Notif_Create_Output, Bapi_Sender, Bapi2080_Notactvi, Bapi2080_<many different>, Bapiflag, Bapiret2). In the flight list example I only used the Input part.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Lars,

1. Read only input fields or (normally) editable view elements indicate, that the corresponding model node is not properly initialized (there's not at least one node-element bound to it). It's very easy to get confused with this (using Apply templates or not), please have a look at 2.

2. What you get from the Adaptive RFC model import in case of BAPIs, looks always like a hierarchical structure i mentioned in this post:

From my point of view it's a good practice, that you create a "master" custom controller (MCC), which manages one model completely.

MCC's context has an Input model node, which is bound to the Input class of the model and contains children model nodes which are bound to the related model "subclasses" (Output, Return...). This is exactly what you get using the model binding wizard and selecting the Input(Node)->Input(Class) binding, including all subnodes and attributes. MCC creates and binds the Input node (like generated by "Apply template Service Controller" in wdDoInit()), validates input parameters, executes the calls, processes errors and return values.

Other custom controllers for managing search, advanced search, listing results, editing are using MCC for that. Their contexts contain the model nodes needed for their specific purpose (only the input for search, only the output for list...) mapped to the corresponding model nodes in MCC. So you'll get one consistent data model with multiple variations.

Hope that helps.

Best regards

Stefan