on 11-27-2017 10:06 AM
Hi Experts,
We want to copy selected comments swapping the entity and Interco similar to the IC_MATCHING in the IFRS toolkit.
This will allow us to share comments between entity and Interco sets.
For Example:
ENTITY INTERCO AUDITID SComment1
1010 I_1120 INPUT_ICE Product x Sales
1120 I_1010 INTCO_ICE Product x purchases
Previously we created a BAdI for financial data but now the data is located in a different table.
(We know the comments table name via UJ0_GET_GEN_TABNAME)
3 Will we receive the data via the CT_DATA or do we need to run a SQL SELECT from the database?
The goal is to run the BAdI from BPC via DM package or possibly even via the default script.
Thanks in advance.
Regards,
Eyal
Searching SAP notes just found the badi that will do what you need:
BADI_UJC_COMMENT_PREPROCESS
https://launchpad.support.sap.com/#/notes/2002431
https://launchpad.support.sap.com/#/notes/2424484
This badi is available for SAP Business Planning and Consolidation 10.1, version for SAP Netweaver, support package 03+
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Some extra explanation:
When you save data (values) to BPC model:
1. write back badi is triggered with the data to be saved in CT_DATA
2. After data is saved the default.lgf is launched with the scope of data saved.
Nothing happens when comment is saved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
Thanks. Yes we are using the copy comments and clear comments functionality. I also have the comments table name already from UJ0_GET_GEN_TABNAME.
We want to to run via the default script (this is a specific model for this functionality – no other data is in this model).
My questions are
Thanks
Eyal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"We want to to run via the default script (this is a specific model for this functionality – no other data is in this model)."
Not possible - no info is available about saved comments.
Have to repeat:
P.S. There is no event that is triggered when comments are saved 😞
It means that your A and B questions are meaningless.
User can launch a DM package to copy comments from one company to another (May be with badi to switch user to prevent security issues).
P.S. There is no event that is triggered when comments are saved 😞
What I did in the past was to create a "dummy" member that would be changed (+1) every time the comment was altered. That was the work around to trigger custom logic and be able to handle the comments...
But that obviously has its limitation such as, only possible via the specific input form that created for that..
Ups, just found badi!
Nah, not related to the cell but for the comment context - e.g. Project Definition. Then you'd have record saved against the project ID dim + dummy member. It was just a few so no implications with number of dummies.
Amazing finding that badi, and more amazing is the fact that was released in 2014 and no one noticed!
My search:
Class: CL_UJC_CMTMANAGER
Method: ADD_NEW_CMT (looking for enhancement point)
And:
...
TRY.
lf_badi_impl_found = abap_true.
" Find BAdI implementation
GET BADI lo_badi
FILTERS
appset_id = d_appset_id
application_id = d_appl_id.
CATCH cx_badi_not_implemented.
lf_badi_impl_found = abap_false.
ENDTRY.
IF lf_badi_impl_found <> abap_false.
CALL BADI lo_badi->pre_process
EXPORTING
i_appset_id = d_appset_id
i_appl_id = d_appl_id
i_module_id = i_module_id
i_oper_mod = uj00_c_cmt_oper_add
IMPORTING
et_message = ct_message
ef_success = lf_badi_call_success
CHANGING
ct_compact_cmtbl = lt_compact_cmtbl.
ENDIF.
Then double click on pre_pocess, and... badi found!
"How do we access the comments table from the BAdI?" - look on the code of UJ0_GET_GEN_TABNAME to get the name of table and then access this table from ABAP. What's the issue?
Please look also on a standard chain: /CPMB/COPYCOMMENTS
Class: CL_UJD_BPC_CLEAR_COMMENTS
Case is not clear:
"The goal is to run the BAdI from BPC via DM package or possibly even via the default script."
DM package - use standard chain.
default /write back - can be some issues, explain business case!
P.S. There is no event that is triggered when comments are saved 😞
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
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.