on 07-31-2006 1:00 PM
is there a way to create or import dynamic value attributes into a predefined valuenode with a bapi as source. The Bapi provides me a table and the fields in the table need to be imported into a value node in NWDS. So i can make a form of this.
Hi,
You can go for the use of custom controller. In there you can bind the attributes of the output of BAPI to the attributes of Outputvaluenode
Regards
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess you will have to give some more details about what your are trying to do. I see three possibilies:
If you do have a fixed structure that you want to display, then a model binding should work. Create an Adaptive RFC Model for your BAPI, create a model node in your context, bind the structure to the node and use "Apply template" -> "Form".
If you do have a structure where some additional fields will be added, then Adaptive RFC should provide them and you could still bind the structure to a model node in your context, but would have to programmatically add UI elements which bind to the extra fields.
If the extra fields themselves are described by the data returned, i.e. it contains the meta data necessary to create the form, then you will have to create both context and UI elements programmatically. There is no means to import such dynamic information into NWDS.
Hope this helps
Markus
Markus thanks.
The returned data from the table contains the elements for the form i need to make (manually).
Looks like the thing we want is :
If the extra fields themselves are described by the data returned, i.e. it contains the meta data necessary to create the form, then you will have to create both context and UI elements programmatically. There is no means to import such dynamic information into NWDS.
Can you clarify this bit more for me what you mean?
Have a look at this tutorial:
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/b3f6e990-0201-0010-c087-c865f2c738b3
Hi,
You can use the BAPI output by directly or can be bind it to the local value node.
I. You can directly bind the BAPI node to the View and bind the output node to the Table UI element.
II. You create a local node
1.Create the value nodes with the same cardinality of the BAPI input and output.
2. bind the input values and execute the Bapi.
3. For the output node do the code
Private<ViewName>.I<BapiName>Node nodeWeb=wdContext.node<BapiName>();
IPrivate<ViewName>.I<Name>Node nodeCC=wdContext.node<Name>();
nodeCC.invalidate();
int size=nodeWeb.size();
for(int j=0;j<size;j++){
IPrivate<ViewName>.I<BapiName>Element elementWeb=nodeWeb.get<BapiName>ElementAt(j);
IPrivate<ViewName>.I<Name>Element elementCC=wdContext.create<Name>Element();
elementCC.set<Param>(elementWeb.get<Param>());
nodeCC.addElement(elementCC);
}
4. Bind The output node to the view to the Table UI Element.
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.