cancel
Showing results for 
Search instead for 
Did you mean: 

Code for calculating the column total in SAP 8.81

Former Member
0 Kudos

Hi,

I am using SAP B1 8.81 PL 06

Can anybody post a sample code to get the column total in the matrix of sales order of SAP 8.81 ?

Thanks

Md.nazeer Shaikh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if i understand you, you can put the total column with it


oMtx.Columns.Item("COLUMN NAME").ColumnSetting.SumType = BoColumnSumType.bst_Auto;    

Former Member
0 Kudos

Hi Danilo,

were you able to get this code running? According to the help file

oColumn.ColumnSetting.SumType = SAPbouiCOM.BoColumnSumType.bst_Auto;

should work, but if I try to do it on the quantity column of an order I get an error (0xffffe4A2)

Edited by: Sebastiaan Kortleven on Nov 24, 2011 12:14 PM

Former Member
0 Kudos

Hi Danilo,

I followed the methods mentioned,the system throws exception if i try to use the code on quantity column of sales order

Where will be this sum visible? Do i need to create one more UDF or it will show in last row of the document??

KIndly help

Thanks

Md.nazeer Shaikh

Former Member
0 Kudos

Hi,

normally it should create a extra cell at the bottom of the column that shows you the total. It works on a matrix on a user defined form, but not on the business forms.

Maybe you could create a msg for this. I'm also getting an error.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi this sample code for sum of column and show in Forms any other edit text

you just write the event to lost focus and paste this code



Dim sum As Double = 0
 For i As Integer = 1 To oMatrix1.VisualRowCount
 sum = sum + CDbl(oMatrix1.GetCellSpecific("Col_total", i).Value)
  Next

frmStockMgmt.Items.Item("txtDctot1").Specific.Value = sum

Thanks & regards

B.Lakshmi Narayanan

Former Member
0 Kudos

Hi Nazeer.....

You may get the Column Total on Run time by simply Right Click and click on Volume and Weight Calculation......

And you may get the LineTotal in Type Column. You have to activate it through Form Setting......

Regards,

Rahul

Former Member
0 Kudos

Thanks Rahul,

I want to show the total for Quantity and Open quantity which will be populated in sales order by the system

I am unable to see the line total option in line total in Type column eventough i have ticked it in formsetting

It is showing only the Regular,Subtotal and Text options

Thanks

Md.nazeer Shaikh

Former Member
0 Kudos

Hi Md.nazeer Shaikh,

Linetotal is the field name. In the type column, you can only get Subtotal type. That is what you need if the column can be subtotaled.

Thanks,

Gordon