cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for tutorial or working example - repeating table item

mh97
Contributor
0 Kudos

Hi all,

I am trying to build an interactive form in ABAP webdynpro, that includes the ability for the user to add rows to a table. The problem is that when the form is submitted, the context only receives 1 row of data when 2 or more were created. (Non-repeating form data is processed just fine; an object is created, but with only the first line of detail data.)

The context node cardinality is 1..n; I have an "add item" button on the form that adds a row for entering data. I can enter the second row (or more) of data, but when I submit the form, in the ABAP debugger the result of this statement:

lv_item_count = lo_nd_req_items1->get_element_count( ).

is always 1, even when multiple lines were entered in the form. ("req_items1" is the child node of the form_data node, and contains the attributes corresponding to the item structure)

In the LiveCycle Designer, the object reference for the repeating element (row) is

FORM_DATA.Form.ReqItems.REQ_ITEMS1.DATA

and the binding on DATA is

$record.REQ_ITEMS1.DATA[*]

Also, on DATA "Repeat Row for each Data Item" is checked (enabled), and Min Count is set at 1, Max Count is not entered, and Initial Count is not entered.

Unfortunately I'm fairly new to ABAP as well as interactive forms. But I think if I could just find a working example or a tutorial that demonstrates use of a dynamic table, I'd be able to find what I am doing wrong. But so far my searches on SDN have been frustrating.

Can anyone point me to an example of how to correctly handle the data from a dynamic table? Or suggest what might be the problem?

Any help will be greatly appreciated!

Margaret

p.s.: versions are: Netweaver 7.0 SP14, LiveCycle Designer 7.1

Accepted Solutions (0)

Answers (2)

Answers (2)

mh97
Contributor
0 Kudos

I found that this can be done, for a table with an indeterminate number of rows, by exporting the data as a concatenated string and then in the webdynpro, parse the data string and update the context to add items as needed. If the number of rows is known at design time, or a reasonable maximum can be specified, the context can be built with the required number of rows and the data bound directly.

Former Member
0 Kudos

Hi Margaret,

You can refer to the Purchase Order Dynamic Interactive form template available with Lifecycle designer. Traverse the below path and open the Purchase Order.pdf

C:\Program Files\Adobe\Designer 7.1\EN\Samples\Purchase Order\Dynamic Interactive\Purchase Order.pdf

In this file you will find the Dynamic table example.

Hope this helps!!

Regards,

Arafat

mh97
Contributor
0 Kudos

Hi Arafat,

Thank you for the suggestion but I had already looked at that.

I am looking for a working example or step-by-step tutorial that updates a table in SAP, using ABAP webdynpro. The PO example provided with Designer does not connect with SAP; also, the tutorial steps provided in the Designer Help do not even match the way the example form is constructed! (Help says use table object, the example pdf uses a repeating subform).

My problem seems to be in the binding between the form and SAP. I have tried various changes and nothing I try is transferring any data except the first row of the table.

I hope someone has a SAP example for this situation.

Margaret