on 10-14-2008 11:53 AM
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
Hi Vishal,
If you use segregate CoA, it will not work because the field value displayed is not the actual account code.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi Vishal
The ELSE '' is 2 single quotes and not one double quote. Try that and let me know.
Kind regards
Peter Juby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.