on 08-03-2017 5:54 PM
Hello all, I have a requirement to copy data to target model when users enter/change any data in input sheets in the source model.
That should trigger my script logic calculation every time a record is saved in source Model, and only update the new values, incase if any changed record that should clear old record in target model and copy only changed record, we imported RUNLOGIC_PH BAdi, can I use this for my requirement? do I need to create a default logic in source model?
I created a script logic to work with by executing DM package with category selections, can I copy that logic and change the syntax to work with default logic? always user selects a category in the input sheets.
Thank you
First please close your previous question accepting the correct answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Found the solution, hence closing this thread.
Created DEFAULT.LGF in source model,included runlogic badi to clear the record in target model.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim, could you please let me know in which scenario this approach will not work?
I am clearing only changed record in the target using variables in scoping, like below.
*START_BADI RUNLOGIC_PH
QUERY=OFF
WRITE=ON
APP=PROJECTREPORTING
LOGIC=CLEAR.LGF
DIMENSION COSTELEMENT=%COSTELEMENT_SET%
DIMENSION DATASRC=%DATASRC_SET%
DIMENSION PO=%PO_SET%
DIMENSION PROJECT=%PROJECT_SET%
DIMENSION TIME=%TIME_SET%
DIMENSION CATEGORY=%CATEGORY_SET%
*END_BADI
this is clear in target model.
*WHEN CATEGORY
*IS *
*REC(EXPRESSION=0)
*ENDWHEN
Yes, in my scenario I am loading properties data from source as dimensions in the target model, so if any changes in property value in the source it will not overwrite in target model because it will not find the unique key, so I am clearing that and loading new data.
Ex:- in source model
Dimension Property
Project Comm area Signdata
1 ABC $100
Target model
Dimension1 Dimension2
Project Comm area Signdata
1 ABC $100
Now the property Comm area is changed from ABC to XYZ in source model and user changed the sign data from $100 to $200, if I have not cleared this in target it will not overwrite and my records in target as
Dimension1 Dimension2
Project Comm area Signdata
1 ABC $100
1 XYZ $200
for this reason, I am clearing, apart from this is there any other scenarios which my approach is not going to work?
Hi Vadim-I just closed my previous question accepting the correct answer.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.