cancel
Showing results for 
Search instead for 
Did you mean: 

Allocation of Sales and Expenditure Accounts to Profit Center.

Former Member
0 Kudos

Hi,

I had earlier posted a question on how to allocate a BP to a Profit center:

Hi,

Is it possible to allocate a BP to one or more Profit centers when creating a BP Master in SAP;such that, on creation of a marketing document the Profit center is directly picked up instead of selecting it.

Please comment.

Regards,

The answer which solved it is :

Projects can be associated with a Business Partner in the Master data definition but not Profit Center.

Profit Center have associated distribution rules and are linked to G/L account or a transaction at the row level.

You could do this. Create a UDF in the BP Master to enter the profit Center information.

In the Sales Order Rows..in the Profit Center field create a Formatted Search to pull the Profit Center from the BP Master UDF

Example: Let us say your Profit Center User field on the BP Master is called U_PC

then your Formatted Search on the Marketing document would be

SELECT T0.U_PC FROM [dbo].[OCRD] T0 WHERE T0.CardCode = $[$4.0.0]

Set it to Auto Refresh on Item Code ....check Display Saved Values

If you want 2 Profit Centers on the BP Master and the user would select it in the Marketing document then let us presume your UDF's are U_PC1 and U_PC2,

the FMS would be

SELECT T0.U_PC1 FROM [dbo].[OCRD] T0 WHERE T0.CardCode = $[$4.0.0]

UNION ALL

SELECT T0.U_PC2 FROM [dbo].[OCRD] T0 WHERE T0.CardCode = $[$4.0.0]

Suda

Now, since the BP has already been allocated to the profit center anytime a service type credit note is passed which links to a Liability or an "Other" Account type, the profit center still gets allocated.

Can I make any changes to the query such that only Sales or Expenditure account could be allocated to the BP, and any other account if tagged the entry is not tagged with a profit center.

Please advise.

Edited by: Vishal Attal on Oct 14, 2008 12:53 PM

Edited by: Vishal Attal on Oct 14, 2008 12:54 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Vishal,

If you use segregate CoA, it will not work because the field value displayed is not the actual account code.

Thanks,

Gordon

Former Member
0 Kudos

Hi Gordon,

Do you have any other solution to sort this issue?

Regards,

Former Member
0 Kudos

What is your CoA type?

Former Member
0 Kudos

Hi Gordon,

What are you referring to when you say ' COA' type?

Regards.

Former Member
0 Kudos

Do you use segment Chart of Account or not?

Former Member
0 Kudos

Hi Gordon,

No we do not use segmentation of COA.

Regards

Former Member
0 Kudos

We use segment COA, so I have to replace acctcode with format code to test. Peter's FMS should work:

SELECT CASE WHEN (SELECT T1.ActType FROM dbo.OACT T1 WHERE T1.AcctCode = $[$39.94.0\]) = 'N' THEN (SELECT T0.U_PC FROM dbo.OCRD T0 WHERE T0.CardCode = $[$4.0.0\]) ELSE '' END

You can try it when you open a sales document and run this saved query to check if can you get anything. If not, change the 'N' to other value to see.

Former Member
0 Kudos

Hi Gordon,

Thanks for your reply!

But it still doesn't work.

I tried changing the value 'N' to 'I' and 'E' without any results.

Any other apect I maybe missing out.....?

Regards.

Former Member
0 Kudos

Have you got any error messages or just no return value?

Former Member
0 Kudos

Hi Vishal

The ELSE '' is 2 single quotes and not one double quote. Try that and let me know.

Kind regards

Peter Juby

Former Member
0 Kudos

Hi Peter,

Thanks for your reply.

But it still does not work!

Regards

Former Member
0 Kudos

Hi Vishal

I forgot an equal to sign. Try the following:

SELECT CASE WHEN (SELECT T1.ActType FROM dbo.OACT T1 WHERE T1.AcctCode = $http://$39.94.0) = 'N' THEN (SELECT T0.U_PC FROM dbo.OCRD T0 WHERE T0.CardCode = $http://$4.0.0) ELSE '' END

Kind regards

Peter Juby

Former Member
0 Kudos

Hi Peter,

Thanks for your immediate reply!

Still doesn't work..

I tried removing the " after ELSE as well.

Still doesn't work.

Please advice.

Regards.

Former Member
0 Kudos

Hi Vishal

Best will be to use the ActType field from OACT to check whether it is an "I" (Income) or "E" (Expenditure) and not an "N" (other) type.

Change query as follows:

SELECT CASE WHEN (SELECT T1.ActType FROM dbo.OACT T1 WHERE T1.AcctCode = $[$39.94.0]) <> 'N' THEN (SELECT T0.U_PC FROM dbo.OCRD T0 WHERE T0.CardCode = $[$4.0.0]) ELSE '' END

Let me know if it works

Kind regards

Peter Juby

Former Member
0 Kudos

Hi Peter,

Sorry for the late reply!

I tested this query, but it doesn't work.

Any other suggestion?

Thanks and Regards.