on 05-25-2011 5:06 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.