Former Member

# Formula..

Hello Experts

Its my first time to write formula/s and totally stuck to write below formulas!

My table name is : GLPCA

Fields names are:

Account Number RACCT

Value In company code currency (Revenue) HSL

Quantity MSL

From these, I need to calculate routines for following!

1) Contribution Margin: Formula: Sale Reneve - var Cost = RACCT - HSL

2) Gross Margin Formula: Contribution Margin - fixed Manufacturing Cost Run time

3) Avg selling price = HSL/MSL

4)Value In company code currency (Variable Cost) = HSL with RACCT group/account group=variable manufacturing cost

5) Value In company code currency (Fix Cost) = HSL with RACCT group/account group=fix manufacturing cost

Regards

Arshiyan

10|10000 characters needed characters exceeded

### Related questions

• Posted on Dec 31, 2013 at 07:44 AM

Brother... let me start from what I understand from your question.

1) you want to create the above mentioned formulas in transformations.

1) create your datasource on the mentioned table.

2) Replicate it in your SAP BW system and then create a data model including all the fields for which you want to create formula.

3) then assign the required fields to each dimension for which you want to build formula. Choose the routine type Formula. Then apply your formulas in whatever form you required by selecting the fields you required in your formula with the action you need (addition, subtraction etc)

Let me know if it was helpful or if you need more assisstance

10|10000 characters needed characters exceeded
• Posted on Dec 31, 2013 at 08:19 AM

Hi,

First let us know--Out of the below fields what all are keyfigues and characteristics then based on this we can decide what all can be calculated at Reporting level (Bex) and at Transformation level.

Account Number RACCT

Value In company code currency (Revenue) HSL

Quantity MSL

Regards,

AL

10|10000 characters needed characters exceeded
• Posted on Dec 31, 2013 at 08:30 AM

Hi,

As Stated by ANSHU , first let us know all KFG's and CHAR's.

Here RACCT - HSL : Account Number RACCT (this is Char/NUMC) how can we do calculation

Regards,

Seshu.P

10|10000 characters needed characters exceeded
• Former Member
Posted on Dec 31, 2013 at 10:00 AM

Hi Arshiyan,

Based on your comment all keyfigures are coming from database itself. So you need to calculate formulae in Query designer itself.

1) Contribution Margin: Formula: Sale Reneve - var Cost = RACCT - HSL

In the column section Create formula ---> Give the description as Contribution Margin.

In the formula workspace give Z_Rev - Z_VAR_COS

2) Gross Margin Formula: Contribution Margin - fixed Manufacturing Cost Run time

For Gross Margin use Contribution Margin formula - Z_FIX_COS

3) Avg selling price = HSL/MSL

Create Formula in the columns then give HSL / MSL in the formula workspace. Provide the Descriptions for formula as Avg Selling Price

4)Value In company code currency (Variable Cost) = HSL with RACCT group/account group=variable manufacturing cost

5) Value In company code currency (Fix Cost) = HSL with RACCT group/account group=fix manufacturing cost

and for 4 and 5 you need to get the clarification from your business for formulas.

Thanks,

Purushotham.