Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9990

Re: BPC Legal Consolidation Roll Up in Group

$
0
0

Hi Laura,

 

To create the BADI customization in BPC, you can use below link as reference.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f4252d-98ca-2b10-e689-f85085ae2d12?overridelayout=t…

 

In my logic, I use class IF_UJO_QUERY to get the query adapter and to get the data from the children.

 

DATA:     lo_query            TYPE REF TO if_ujo_query


"Get the data from Notes Application

   TRY.

       "Get Query Adapter based on environment and application

       lo_query = cl_ujo_query_factory=>get_query_adapter(

           i_appset_id = appset_id

           i_appl_id   = appl_id

       ).

 

       "Executing query to get the data in Notes Application

       lo_query->run_rsdri_query(

         EXPORTING

           it_dim_name       = lit_dim_list  " BPC: Dimension List

           it_range          = lit_range     " BPC: Selection condition

           if_check_security = abap_false    " BPC: Generic indicator

         IMPORTING

           et_data           = <lfs_query_result>

*          et_message        = lit_message   " BPC: Messages

       ).

     " Exception of common read

     CATCH cx_ujo_read.      "#EC NO_HANDLER

       "Update Execution Log of BPC BADI

       "Error in reading data of Group Children

       CALL METHOD zcl_bpc_badi_collect_data=>update_message

         EXPORTING

           im_message_type = message_type_error

           im_message_no   = '015'.

       error_flag = abap_true.

       "Free all memories reserved for the following objects

       REFRESHlit_dim_list,

                 lit_range.

       FREE:     lo_query,

                 lit_dim_list,

                 lit_range.

       UNASSIGN  <lfs_query_result>.

       RETURN.

   ENDTRY.

.

Then after the data is obtained from the children, you can write the data into the specific cube by changing the Group member into the top group by using below code.

 

"Write the result data into Consolidation model

     TRY.

         CALL METHOD cl_ujk_write=>write

           EXPORTING

             i_appset_id = appset_id

             i_appl_id   = text-con

           IMPORTING

             et_data     = <lfs_cons_data>.

       CATCH cx_uj_static_check .

         "Update Execution Log of BPC BADI

         "Error in writing the data into Consolidation Model

         CALL METHOD zcl_bpc_badi_collect_data=>update_message

           EXPORTING

             im_message_type = message_type_error

             im_message_no   = '46'.

         error_flag = abap_true.

     ENDTRY.


Some of the parameters used in the code are dependent to my local environment, so I think you might need to change it a little bit.

Thanks.

 

Regards,

 

Siswono


Viewing all articles
Browse latest Browse all 9990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>