Sei sulla pagina 1di 4

7/24/2017 Top down Distribution explained with an example - ERP Financials - SCN Wiki

Getting Started Store

Community WIKI SAP Community Welcome, Guest Login Register Search the Community

ERP Financials / / General Documentation - Profitability Analysis

Top down Distribution explained with an example


Created by Waman Shirwaicar, last modified on Mar 27, 2017

Purpose
Top down distribution (TDD) in CO-PA is a complex functionality and frequently customers have problems in understanding how this works. The purpose of this WIKI is to explain the system behavior with
an example as well as throw some light on issues which customers face during TDD

Overview
Firstly TDD (transaction KE28) is explained with an example. Then some of the customizing options in KE28 are explained. Error / info messages which occur during TDD are also explained. This should
help customers to solve most of the issues they face in TDD.

Example
Let's explain TDD (KE28) with the help of an example.

There are 2 characteristics with processing option "Distribute". They are Product (ARTNR) and Customer (KNDNR). Then we have three characteristics with processing option "Copy" (in other words
'retain'). They are Company Code (BUKRS), CO Area (KOKRS) and Business Area (GSBER). Value field to be distributed is Gross Sales (VV310) and also reference data are based on this value field.
Reference data are with record type (VRGAR) F and source data with record type B.

We have following source data in the system i.e. data, where ARTNR and KNDNR is initial with VRGAR = 'B' (together with selection criteria used i.e. BUKRS = '1040') defines value to be distributed. So
we have following data to be distributed:

VRGAR ARTNR KNDNR BUKRS KOKRS GSBER VV310


B # # 1040 1000 2000 1000

Value '#' means initial.

Then we have following reference data with VRGAR equals 'F' (all segments below are receivers. If any of field ARTNR and KNDNR is equal to initial, then it doesn't mean that such segment isn't a
receiver. Not receiver is only segment, where both characteristic ARTNR and KNDNR are equal to initial):

VRGAR ARTNR KNDNR BUKRS KOKRS GSBER VV310

F # A 1040 1000 2000 1


F P1 A 1040 1000 2000 2
F P1 # 1040 1000 2000 1
F P1 # 1040 1000 2000 1
F P1 A 1040 1000 2000 1
F P2 A 1040 1000 2000 2
F P3 A 1040 1000 2000 2

So after performing of Top-Down, you will get following result.


VRGAR ARTNR KNDNR BUKRS KOKRS GSBER VV310

B # # 1040 1000 2000 -1000


B # A 1040 1000 2000 100
B P1 A 1040 1000 2000 200
B P1 # 1040 1000 2000 100
B P1 # 1040 1000 2000 100
B P1 A 1040 1000 2000 100
B P2 A 1040 1000 2000 200
B P3 A 1040 1000 2000 200

Example in account based CO-PA in S/4 HANA Finance:


You post 100 EUR to PA segment 100 (with initial customer) and cost center ABC.
You then decide to do a TDD based on distribution characteristic customer.
So TDD reverses the initial line item. It then posts 40 to PA segment 101 (customer X) and 60 to PA segment 102 (customer Y).

If you summarized the cost center the posting to table ACDOCA would look like the following:

KNDNR PAOBJNR Amount Cost center ACCASTY_N1 (statistical account assignment type)
100 100 ABC KS (cost center)
100 -100
X 101 40
Y 102 60

Statistical postings are posted to table COEP as well and COEP is not touched in KE28.

If you copied the value for cost center the posting to table ACDOCA would look like the following:

KNDNR PAOBJNR Amount Cost center ACCASTY_N1 (statistical account assignment type)
100 100 ABC KS (cost center)
100 -100 ABC
X 101 40 ABC
Y 102 60 ABC

Still table COEP would not be touched, nor would be ACCASTY_N1.

https://wiki.scn.sap.com/wiki/display/ERPFI/Top+down+Distribution+explained+with+an+example 1/4
7/24/2017 Top down Distribution explained with an example - ERP Financials - SCN Wiki
If you distributed onto cost center, no statistical account assignments could occur:

PAOBJNR Amount Cost center ACCASTY_N1 (statistical account assignment type)


100 100
100 -100
101 40 ABC
102 60 DEF

In this latter case, looking only on field cost center, the ACDOCA reporting would be different of course, because you had posted additional amounts on cost center ABC and DEF, so for a proper cost
center reporting you would need to consider the account assignment type (ACCASTY), as is done by the compatibility view for COEP.

Processing Options
Processing option 'Copy': The characteristic values are kept as they are. There is no derivation (and it can't be) performed for characteristics with processing option 'Copy'.

Processing option 'Summarize': The values of this characteristic are summarized i.e. initialized. If this characteristic is defined by derivation, the system rederives it else it remains initial.

Kindly note that by Top-Down Distribution for actual data (KE28) only unassigned values are distributed i.e. please keep in mind that top-down distribution process only records which have the initial value
(# - non assigned) in each of the characteristics in distribution level. This gives guarantee that values are distributed only once for defined processing options and selection criteria.

When you select in the variant 'By value fields' option, there has to be non-zero value in ALL value fields which are selected in 'Value fields' screen (reference data).

Transaction KE28 reads segment data meaning tables CE4XXXX and CE3XXXX (XXXX = operating concern). So only the segment level characteristics are available in KE28. Any characteristic set to
'Not used' in transaction KEQ3 will not be available in the 'processing instructions' and 'selection criteria' of KE28.

KE28 log
Message KG1133 'Editing has been completed successfully' informs end user that processing of data for ALL selected segments was done without any error. This message is displayed also in case that
no data / line items were posted as result of Top-Down Distribution (TDD) run. The fact that no line items were posted as result of Top-Down Distribution run can't be evaluated as error. From the
processing logic point of view there is nothing wrong because no error was raised for processed (data) segments.

From the distribution point of view only error is situation that there is value to be distributed (within segment) and there are no reference data (within segment). In such a case, system raises error KG323
'Value could not be distributed.' Basically for the system to find reference data for the selection criteria given in the variant there need to be line items in the reference data which have the same
characteristic combination as those in the source data for the characteristics selected in the 'cpy' column of the processing instructions. If that is not the case system gives 'KG323' which is justified. You
must consider important fact that error message is always raised for concrete segment (given by characteristics with processing option copy) which you can see also in the log of top-down distribution.
Such error has no influence (doesn't avoid posting) for other segments processed without any error raised. This of course means that some data line items could be posted also in case that error message
was raised for other data segments. It's just information for end user that some segments were not distributed.

KG323 can also occur if there are no values in the reference data for the value field specified in the reference base

Copy with Reference

Let me explain with an example the concept of 'copy char values with ref' in the selection criteria

Source data:
PRCTR Customer Value field.

6 # 40
7 # 60

Reference data:

PRCTR Customer Value field.


1 A 10
2 B 30
3 B 15
4 C 25
5 C 20

Copy with reference for PRCTR:


Sourcedata Reference data
6 1
6 2
7 3
7 4
7 5

Result:

PRCTR Customer Value field.


6 A 10
6 B 30
7 B 15
7 C 45

TDD Posting
Processing of data by Top-Down Distribution(TDD) is done according data read from segment level therefore also 'reversal' (please note that it's not real reversal, it's just clearing of source value of
segment where field with processing option 'Distribute' is equal to initial) is done in the same way. In other words, TDD has no information about concrete line items, which belongs to entered selection
criteria. Moreover, one has to consider that content of new lines posted as result of TDD run is determined by definition of processing options. Important fact is that content of fields with processing option
'Summarize' is given by derivation so we can't perform any real reversal of line items. Characteristics marked as 'sum' are cleared during reversal and are filled via derivation (KEDR) if possible. Using this
logic we are able to clear multiple source line items with a single reversal line item. Else we would need a 1:1 reversal. The idea of TDD is to distribute from a higher level char to a lower level char i.e. for
example from customer group to customer or product group to product based on certain reference data. If you want to retain certain characteristics during this process they should be part of the selection
criteria or marked as 'copy'.

https://wiki.scn.sap.com/wiki/display/ERPFI/Top+down+Distribution+explained+with+an+example 2/4
7/24/2017 Top down Distribution explained with an example - ERP Financials - SCN Wiki
When data are processed by TDD the line items are not so important, actually the system reads the aggregated data from the object level or from the summarization level (if exists) and as result new line
items are posted to database. So if one would like to check result of TDD or cancellation of TDD distribution run he must always take into account definition of relevant variant of KE28 and check data by
suitable report (transaction:KE30).
Cancelation of TDD run is always based on line items meaning that system will read all line items posted by relevant TDD run; it does reversal of them and posts them to database. There is no derivation
or any further action performed. In fact, we just read line items posted, reverse them and post them to database.

TDD Planning

The logic in planning is different from that in actual. Transaction KE1G can be used for TDD in planning. From release 46C the TDD planning is possible in KEPM itself. Transactions KE28 and KE1G
provide with similar features and functionality but they are working with different data and they aren't exactly the same regarding processing and features. Regarding KE1G, this transaction provides with
two top-down methods:

1 - 'Distribute total value'

2 - 'Distribute "nonassigned" only'

The second one is similar to the method used by KE28. The first option is not possible in KE28.

Let me explain planning in top down distribution using a simple example.

Sender characteristics: company code, country and profit center

Receiver characteristics: Customer group, functional area and partner profit center.

Value field to be distributed:VV004

Reference value field: VV090

Sender:

Doc no. company code country profit center VV004

1 FR20 FR L001 20

1 FR20 ES L001 20

Receiver:

Doc no. Customer group Functional area PPRCTR VV090 country company code PRCTR VV090

2 01 TECH 1 FR FR20 L001 1

2 01 TECH 2 ES FR20 L001 2

2 02 TECH 3 ES FR20 L001 3

2 02 TECH 4 FR FR20 L001 4

When the planning TDD is run the sender items are reversed.

Doc no. company code country PRCTR customer group functional area PPRCTR VV004 VV090

3 FR20 FR L001 F02 L002 -20 0

3 FR20 ES L001 F02 L003 -20 0

Then the senders are distributed to the receivers.

3 FR20 FR L001 01 TECH 4 0

3 FR20 ES L001 01 TECH 8 0

3 FR20 ES L001 02 TECH 12 0

3 FR20 FR L001 02 TECH 16 0

So the sender characteristics are retained in the distribution. The receiver characteristics are populated from the receivers. You can see that functional area F02 is replaced by TECH and PPRCTR is
initialized. The distribution happens based on the combination of values for country and customer group since that is the unique combination.

In planning TDD the sender characteristic is the equivalent of the 'copy' functionality in KE28 i.e. it needs to be the same in sender and receiver.

'Copy with reference' function is only possible in KE28. It is not implemented in planning (KEPM or KE1G) since it is not necessary here. In planning you can use the functions in KEPM to prepare the
reference data like you want to use it for plan TDD e.g. you can use the "transformation of characteristics" inside the copy function of KEPM to get the reference data transformed. Then you can use this
reference to do the TDD.

https://wiki.scn.sap.com/wiki/display/ERPFI/Top+down+Distribution+explained+with+an+example 3/4
7/24/2017 Top down Distribution explained with an example - ERP Financials - SCN Wiki

KE28A

KE28A can be used to run KE28 variants sequentially or in parallel. This is very useful when you have to run the same variants every period. So it is not necessary to go into the variant and change the
period everytime but this can be done from KE28A. KE28A variants can be also changed from the Schedule Manager or the Closing Cockpit so this transaction can be integrated with these tools. If you
flag "parallel processing" in KE28A, means system runs all KE28 variants in parallel. This makes only sense in case of testrun or if all the variants have selection criteria distinct from each other.

For example:

Variant A distributes values down to product

Variant B distributes values down to product and customer.

If you run these variants sequentially in order A and B you will get different result compared to running in order B and A. If you start these variants in parallel the order of execution is not clear and
therefore the system selects the first one randomly. System sets a lock on characteristic product (source data containing product with initial value) when you start one of these variants in productive run.
Than it's not possible to run the other variant in parallel. So if you want to run variants in parallel ensure that they have distinct selection criteria like record type, period etc.

Related Content
https://wiki.scn.sap.com/wiki/x/vxKEFQ

Related Documents
Related SAP Notes/KBAs
SAP Note 1822415: Message KG873 in Top Down Distribution after upgrade

SAP Note 77476: Information: top-down planning

ke29 ke29n

Contact Us SAP Help Portal


Privacy Terms of Use Legal Disclosure Copyright Follow SCN

https://wiki.scn.sap.com/wiki/display/ERPFI/Top+down+Distribution+explained+with+an+example 4/4

Potrebbero piacerti anche