on 09-20-2007 6:51 AM
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
Hi GURPRIT BHATIA,
Please check:
/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.