cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate total Gross Value of all sales order Based on Customer !!

Former Member
0 Kudos

Dear all,

I want to calculate total gross value of all sales order of particular Customer.

Suppose i have created one sales order and i have selected one customer XYZ  and the gross value of this SO is 20000rs, again i have created a new sales order and this time i have selected same Customer XYZ and the Gross Value of this Sales Order is 30000rs.

now i want to calculate total gross value of both sales order of XYZ customer .

Means I want to calculate total gross value of sales order based on Particular Customer .

Please Help me.

Thanks & Regards,

Manoj Kannaujiya.

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Manoj,

When shall this calcualtion start? Triggering on Save of the SO?

Where shall the value be persisted? Own Custom BO, extension field of SAP BO Customer, ...

Bye,

   Horst

Former Member
0 Kudos

Hi Horst,

The above query is solved.

I have another query in Cloud for Customer.

In C4C there is a customer work center - go to account there is a YTD Revenue field.

I want to apply some validation on YTD Revenue.

But i am not finding  the YTD revenue field at the time of coding. 

Please Help me.

Thanks,

Manoj

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Manoj,

You can't find the field in the ABSL coding; it's a controller field and exist only in the UI.

Sorry,

    Horst

Former Member
0 Kudos

Hi Hort/Manoj,

I have the same requirement.

I need to update “calculated total gross value to Sales Value KUT field.”

Please help me how to do it.

Thanks & Regards,

SRINIVAS BORRA

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Srinivas,

It is not possible to acces calculated fields, neither im KUT nor in PDI.

Sorry,

  Horst

Former Member
0 Kudos

Hi Horst,

Please find the following link about my requirement.

Thanks

Srinivas Borra

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Srinivas,

But the calculated field from the UI does not map to the element of the node.

Even if they carry the same name.

Sorry,

   Horst

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Horst,

Thanks for your help.

I fixed that issue.

Please find the following code.

import ABSL;

import AP.CRM.Global;

import AP.Common.GDT;

var NetAmount = 0;

var NetCurrency ="";

if(this.IsSet())

{

       var salesOrderQry = CustomerQuote.QueryByElements;

       var salesOrderParams = salesOrderQry.CreateSelectionParams();

       salesOrderParams.Add(salesOrderQry.PartyBuyerPartyKey.PartyID.content,"I","EQ",this.InternalID);

       var salesOrderRes = salesOrderQry.Execute(salesOrderParams);

      

       if(salesOrderRes.Count() > 0 )

       {

              foreach(var eachSalesOrder in salesOrderRes)

              {

                     var totalValue = eachSalesOrder.TotalValues;

                     NetAmount = NetAmount + (totalValue.NetAmount.content);

                     NetCurrency = totalValue.NetAmount.currencyCode;

              }

       }

       this.CurrentCommon.SalesVolume = NetAmount.ToString().TrimRight("0")+" "+ NetCurrency;

}

Thanks & Regards,

SRINIVAS BORRA

Former Member
0 Kudos

Hi Horst,

I have done this task, but not in the after modify event.

I want this when account is loading.

Please help me how to proceed.

Thanks & Regards,

SRINIVAS BORRA

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Srinivas,

This is a duplicate thread to

Let's keep the answers in your thread.

Bye,

   Horst

Former Member
0 Kudos

Hi Horst,

Thanks for  update and I will follow your comment.

Thanks & Regards,

SRINIVAS BORRA