cancel
Showing results for 
Search instead for 
Did you mean: 

Bind multiple fields to one node in data view

former_member188032
Participant
0 Kudos

I have a need to have an interactive form where data from a single data source is displayed in multiple fields on the form. In addition these fields are open for input. I have bound the multiple fields on the form to one node in the data view. The data is being displayed in the multiple fields. This form is being routed thru workflow so various agents are updating the form. The problem that I am having is that the form only seems to allow input in the first field on the form but not the other fields that are tied to the same data source. For example, field A and field B are bound to node SUMMARY. I can add/change/delete data in field A but not in field B. After I have done some entry in field A, I can then sometimes make changes in field B. We have a requirement that field A be enabled for agent #1 but field B is invisible. Later in the workflow, agent #2 needs to make final changes on a "summary" page so agent #2 had field B enabled.

Does anyone have any idea how to correct this data entry issue so that data can be entered into either field that is tied to a single node?

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Data binding can be very tricky. I don´t think it is possible to anything like the thing you want.

I don´t even understand why would you need to do this. If (workflow or not) the data are seen multiple on the form, it is because some difference should be noticed (like one field combines two fields using concatenate string function or something like that).

I can understand you need multiple instances of one data field to get multiple version from various people. But why would you do such a thing using a single field?

- In ABAP coding you wouldn´t do such a thing. You would add "change lines" to the initial value or something like that.

- Or you would change the infotype and note down who has changed the value, but you would limit the validity of the value, do not just change it.

- Or if multiple users in ERP would change the single field. You would note down the history of the changes, who did it, when etc.

My recommendation is:

create a structure with fixed number of "rows", like VER1, VER2 etc.

bind your form fields to the proper "versions" of the initial field (can be called VER0 or something...).

former_member188032
Participant
0 Kudos

Having multiple fields in the backend is not an option. I will not go into the business reason in detail but the last page of the form contains a final version of data pulled from various locations on the form where the data on the other pages was input by multiple agents in the process flow. The last agent in the workflow needs to put the "finishing touches" to the data and should not have to search all over in the form to find the appropriate data fields.

I have found 2 possible solutions and would like to know if anyone can recommend one over the other.

First solution - bind multiple fields on the form to one node in the data view. This seems to work correctly on the form and data can be entered into either field, with the data being passed back to the webdynpro context in the one node in the data view (corresponding node in WD context).

Second solution - the node/attribue in the WD context must have the same name as a DDIC element. The node in the data view must have this same name. The field names on the form must also have the same name. Define the binding for the field names as Global. I have not validated that the data is passed back to the WD.

Former Member
0 Kudos

Hi,

A third option could be to copy the values via scripting to the corresponding fields. You would need at least Reader 8 for this (i.e. that values for fields with no data bindings are saved withing the PDF).

Regarding binding multiple fields to one data node: This does not work for implicit binding and for bindings to repeated data nodes (i.e. with "[*]" in the data binding).

Regards,

Juergen

former_member188032
Participant
0 Kudos

Juergen,

In the data view, the data field that I am binding to has an occurrence of (1:1). I am binding field A and field B on the form to this one data field in the data view. I am assigning the binding by selecting the binding tab on the Object Palette for each form field (A and B). This seems to be working when the form is rendered thru the WebDynpro Abap application. Is there any reason that I need to change the way I am doing this? I wasn't sure from your previous comment if this approach is OK.

Thanks so much for your help on this and my other question related to field access.

Former Member
0 Kudos

Hi Joyce,

If you do not change your WD context then there is no reason to change this. But keep in mind that this only works for 1:1 relationships.

Juergen

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

I wish you good luck with our solutions. I think neither will work and if so (by chance), nobody will be able to change this app but you in the future. This is not the way the form app should be structured.

You should use multiple backend fields, or at least multiple form fields but only one has the interactibe binding and the others get their values by the hardcopy.

Let us know, how did you finish your app, I am curious about it. Have a nice day, Otto