cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing Subtotal functionality

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

You can make use of fixedBottom cells with calculated attributes.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi

if ur problem has solved make the question as solved

Regards

Hazrath

Former Member
0 Kudos

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