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

Implementing Subtotal functionality

Hi,

I have a web dynpro application in which i need to implement the subtotal functionality for a table.I have a table which has 5 columns, where in the first 2 columns have datatype string.So i need to find the sub total of the third column wrt first column and second column.In the same way, i need to find the subtotal of any column with integer datatype wrt any column with string datatype.

Please suggest me how to proceed.

Regards,

Padmalatha.K

Points will be rewarded.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 09:32 AM

    Hi,

    Create a calculatted attribute to do the calculation

    
    public int getSub_Col(IPrivateTestCompView.IContextElement element)
      {
        //@@begin getSub_Col
    	  int x = element.getAttributeValue("<Your first attribute");
    	  int y = Integer.parseInt(element.getAttributeValue("<Your second string attribute"))
          return x+y;
        //@@end
      }
    
    Pl handle the exceptions
    

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 09:25 AM

    Hi

    First get the string and change it into int by using the Integer.parseInt(String s) method.

    Then u can add all the elements.

    Regards

    Hazrath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 09:30 AM

    Hi

    if ur problem has solved make the question as solved

    Regards

    Hazrath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 09:50 AM

    Hi Ayyaparaj,

    I want to calculate the subtotals.Is there any API s available that can be incorporated into Webdynro. Or do we have any inbuilt functions to find the subtotal.

    Regards,

    Prasanna Kumar.S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 10:17 AM

    Hi,

    Do u have any link so that I need to review through the materials and implement I since I na new to this technology.

    If any material for Subtotal Implementation will be helpful

    Reagrds,

    Padmalatha

    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.