cancel
Showing results for 
Search instead for 
Did you mean: 

Initial planning level - distribution function

Former Member
0 Kudos

Hello,

based on the How-to "Log changes in plan data using DataStore Object" we created a DSO containing all delta records created by a data change (with the time they were changed and the user).

What we need however is to extract the information on which planning level the change took place:

We have for example the 6 chars Sales Area/Customer/Customer group/Material/Material group/Plant in the aggregation level.

- User changes data on level Sales Area/Customer

- Data is distributed down to the most detailed level via distribution function.

Is there any possibility that the information on which planning level the user initially changed data (in this case Sales Area/Customer) could be extracted (and subsequently written to a DSO/cube)?

Any help would be very appreciated.

Edited by: Jan Potmesil on May 25, 2011 6:18 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member5472
Active Contributor
0 Kudos

Hi,

Check if this code meets ur requirement


Get the data that has been changed by the planning function
*called by UPC_FUNCEXEC - this is for information only
   w_objplan = cl_sem_planarea_attributes=>get_instance( i_area ).
   w_objchalev = w_zct_objplan->r_factory->create_chalev( ito_cha ).
   w_objkyflev = w_zct_objplan->r_factory->create_kyflev( ito_kyf ).
w_objchasel = w_zct_objplan->r_factory->create_chasel( ito_chasel ).
    w_objdata ?= w_zct_objplan->r_factory->create_data(
                                      ir_chalev = w_objchalev
                                      ir_chasel = w_objchasel
                                      ir_kyflev = w_objkyflev ).

    CALL METHOD w_objdata->read
      EXPORTING
        i_enqmode = 'E'
      EXCEPTIONS
        OTHERS    = 1.
    IF sy-subrc <> 0.
*Error message
    ENDIF.

    CALL METHOD w_objdata->get_data
      EXPORTING
        ir_chasel = w_zct_objchasel
      IMPORTING
        eth_data  = xth_data.

Former Member
0 Kudos

Hi Jan,

there is no standard functionality to keep track of changed records. But you can write an ABAP logic in function module.

you can create an internal table and store the changed records in it. (In order to get changed records, you can loop over records with blank sales area/customer in your case).

then write these changed records in DSO.

Hope it helps.

Former Member
0 Kudos

Hello Shailesh,

thank you for your feedback; but we have already implemented this ABAP logic and the changed records are stored in a DSO. What we need is to have instantly the characteristic combination available where the distribution function started (looping over blank characteristics would be of no help).

Kind regards,

Jan