cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Value attributes

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

the output are fieldname, field value and field index of the table. but the output table consists fields and these fields i want to import in nwds.

I don't want to use the table only the output fields in the table. So i can make a form of it.

Former Member
0 Kudos

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

Former Member
0 Kudos

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?

Former Member

Answers (1)

Answers (1)

Former Member
0 Kudos

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