Skip to Content

Comments Selection Table using BAdI

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

  • 1.How do we access the comments table from the BAdI?
  • 2.Do we use the enhancement spot - UJ_CUSTOM_LOGIC BAdI?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Nov 27, 2017 at 08:18 PM

    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+

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 27, 2017 at 12:12 PM

    "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 :(

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 27, 2017 at 12:57 PM

    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.

    • 1. Scenario is that controllers are restricted by security to a specific entity. A controller from entity A will enter data (including comments to an input form). As part of saving the data/comments the comments written to an interco (I_B) will copy to that entity ( B ) this will allow the controller from Entity B to immediately see the intercompany data posted against his company (B ).

    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

    • A)To confirm we use the UJ_CUSTOM_LOGIC enhancement spot and
    • B)How does the programmer select the desired comments table. SQL Select or CT Data?

    Thanks

    Eyal

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Nick,

      No we didn't delete. Once re realized the work effort required we dropped this development.

      We are implementing SAP Intercompany - rather than work with comments as initially planned.

      Good luck

      Eyal

  • Nov 27, 2017 at 01:21 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 13, 2017 at 05:13 AM

    Thanks Vadim

    Add comment
    10|10000 characters needed characters exceeded