cancel
Showing results for 
Search instead for 
Did you mean: 

Table values are not passed to context.

Former Member
0 Kudos

Hi,

Im trying to build a online(WD ABAP) form with a BAPI which is having import, export and tables parameters.

I have binded Datasource with main node and Template source I have binded with the form which I created with the form interface using context fromBAPI. Then I got all importing and exporting parameters. And tables I have got under Changing Node of Data View in the form. But there is one other node called Data is created automatically under changing node and under that DATA node I got Table and under that I got again Data Node created and there I have all the attributes.

I dragged table on to the form. But when Im tesing the form by submitting, Im not getting table values which are entered in table. But all other values which are binded to importing parameters Im able to get the values.

Can some one tell me how to get the values from table to context? And can I have dynamic table in the form to map to the context so that I can update the data through BAPI?

Warm Regards,

J.Smitha.

Accepted Solutions (1)

Accepted Solutions (1)

mh97
Contributor
0 Kudos

Smitha,

You are correct that the WD context needs to be updated for lines added to the table in the form. One way to do this is to pass the data via a string. (You have a separate string field that is invisible on your form, and mapped to a string field in your context.) In WD parse the string and add the element(s) to the context with the values parsed from the string.

I hope that helps. And if there is a better way to do it I hope someone replies with a clear instruction.

Margaret

Former Member
0 Kudos

Hi,

Smitha, you can defnetly use dynamic table in interactive form. I had similar problem and I acheived like follwing:Basically you have to bind the table .

If you want to have fixed number of rows in the interactive form, then in wddoinit method bind the internal table to ur table node. for exmaple: if u want 2 rows in the form loop times . So by default when you open the form you will get two rows for the table.

**************BIND THE ITAB ****************************

DO 2 TIMES.

**

APPEND LW_LFBK TO LT_LFBK.

CLEAR LW_LFBK.

ENDDO.

*

CALL METHOD lo_nd_t_lfbk->bind_table

EXPORTING

new_items = LT_LFBK.

*******************************************************************

If you want to have dynmic table then take a submit button in the form instead of normal button,

in onaction submit write a loop every time you click that new submit button it should add a new row.

use above coding in onactionsubmit instead of doinit.

Thats it.

Regards,

Ravi

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Smitha,

Have a look at below tutorials:-

[Handling Dynamic Length Tables in Adobe Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669]

[Integrate tables & Images in Adobe Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/63f09fc2-0401-0010-1482-dbf9891e7613]

Chintan