Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:25 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 06:33 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 07:46 AM

    Hi GURPRIT BHATIA,

    Please check:

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.