cancel
Showing results for 
Search instead for 
Did you mean: 

Want to add one record (total ) at table during runtime

Former Member
0 Kudos

Hi,

I want to display total of all fields of table ui element. All the data comes through bapi but total is not coming so i want to total at runtime.

Please help in this issue.

Regards

Gurprit

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi GURPRIT BHATIA,

Please check:

/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities

Former Member
0 Kudos

Hi Gurpit,

1. Create a new value node total and an attribute in your node called value1 of type integer.

2. Goto Outline View--> Right Click on your table and select Insert Column.

3. Right Click on the Newly added column>Inset Table Cell Editor> From the list select textview.

4. Bind the text property of this text view in the table cell editor to the context value1.

In your Action where you execute your BAPI

Loop through the output node and add the total

IPrivate<viewname>.ITotalElement ele = null;

for(int i=0; i<wdContext.node<outputnode>().size();i++)

{

ele = wdContext.nodeTotal().createTotalElement();

ele.setValue1(wdContext.node<outputnode>().get<outputnode>ElementAt(i).get<attribute>()wdContext.node<outputnode>().get<outputnode>ElementAt(i).get<attribute>()....);

wdContext.nodeTotal().addElement(i);

}

Regards,

Murtuza

Former Member
0 Kudos

hi gurprit

e.g table is it_schedule_table1 in node output1................

int i=wdContext.nodeOutput1().nodeIt_Schedule_Table1().size();

float total=0;

for (j=0;j<i;j++)

{

total = total+wdContext.nodeOutput1().nodeIt_Schedule_Table1().getIt_Schedule_Table1ElementAt(j).get<attributename>);

}

with regards

jayesh talreja

Former Member
0 Kudos

hi gurprit.........

u know size of ur table

take in integer variable then loop that

in loop add all records

if u have any problem again write..........

with regards

jayesh talreja