cancel
Showing results for 
Search instead for 
Did you mean: 

Code for deleting the dimension members

Reejapanath
Explorer
0 Kudos

Hi

Is ther is any method for deleting the dimension members and processing the dimension after that automaticaly.

in the members ther is a hierachy existing .plese give teh code

Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

But deleting of members requires also deletion of all transaction data stored on this member...

Vadim

Reejapanath
Explorer
0 Kudos

yes . i am using the custom_logic badi for making the transactional data zero. but it is not reflecting still able to see teh values for that member .

Plesae advise?


Former Member
0 Kudos

Hi,

Posting a transaction data of 0 is not the same as deleting the transaction record. You need to remove that record, completely, from the database. This means you need to do a lite optimization using the 0 compression.

However, its not only deletion of the transaction data. You also need to ensure that the member is not referred anywhere, for example, in the BPFs.

Hope this helps.

former_member186338
Active Contributor
0 Kudos

Compress cube with zero elimination...

former_member186338
Active Contributor
0 Kudos

But in general, the requirement is a bit strange. Can you explain a business case?

Reejapanath
Explorer
0 Kudos

we are creating a dummy wbs members with values and need to copy that value sto th e original once teh budget got approved .after copying the values the DUMMy wbs need to deleted.

So i am using the badi custom logic and in the ct_data making the dummy as 0 and the copying the value to th eoriginal .

then using the save method with row flag eq D and using Process method to automaticaly procedd teh dimension.

but not getting the expected .please help.

thank you


former_member186338
Active Contributor
0 Kudos

Ups, "copying the values the DUMMy wbs need to deleted" - why? You can clear transaction data on the dummy members but what for to remove id's?

Vadim

Reejapanath
Explorer
0 Kudos

it will create a lot of dummys in th esystem.

but in my code i amnot able to make it as zero and not able to copy ,

pls help

former_member186338
Active Contributor
0 Kudos

You will reuse the dummy members in the next planning cycle.

In theory you can include cube compress with zero elimination in your code but it will take significant amount of time to process. I can't recommend this approach.

Vadim

Reejapanath
Explorer
0 Kudos

ok.please help m eth code for clearing and copying .that is not happening in my case.

thank u

former_member186338
Active Contributor
0 Kudos

For simple copy and delete you can use script...

For custom logic badi you receive ct_data with the incoming scope (query=on). Loop ct_data adding new members to copy and assign zero to old scope.

Vadim

Reejapanath
Explorer
0 Kudos


yes i am doing the same thing and getting the success message for teh data manager package .

but when i cheke the dummy members it is showing the old value not the zero.

pls help

former_member186338
Active Contributor
0 Kudos

Have to be zero. What method are you using to write data to the cube? Default WRITE=ON or write back?

Vadim

Reejapanath
Explorer
0 Kudos

default write = on

even i checked in the cube also it is not ther

Reejapanath
Explorer
0 Kudos

*START_BADI Z_MOVE_DUMMY

QUERY = ON

WRITE = ON

*END_BADI

code

   LOOP AT ct_data ASSIGNING <ls_rec> .
        <ls_result_rec> = <ls_rec>.

   READ TABLE  <fs_members_result_table_cx>  ASSIGNING <fs_member_attr_wa_cx>
                                                                   WITH KEY ('ID') = <fs_project>.
        IF sy-subrc EQ 0 .
          ASSIGN COMPONENT 'PROJECT_NEW'  OF STRUCTURE <fs_member_attr_wa_cx> TO <fs_prjnew>.
         
          IF <fs_prjnew> IS NOT INITIAL .

            ASSIGN COMPONENT 'SIGNEDDATA' OF STRUCTURE <ls_result_rec> TO <fs_signeddata>.
            lv_value = <fs_signeddata>.
            CONDENSE lv_value.
            CLEAR <fs_signeddata>.
            APPEND <ls_result_rec> TO <lt_final>. for zero

         <fs_signeddata> =  lv_value.
            <fs_project> = <fs_prjnew>.
            APPEND <ls_result_rec> TO <lt_final>. for  new value

         ELSE.
            APPEND <ls_result_rec> TO <lt_final>.for existing value
          ENDIF.

     ENDIF.
      ENDLOOP.

      REFRESH :ct_data.
      ct_data[] = <lt_final>.
      free  <lt_final>.
sort ct_data.

please help

former_member186338
Active Contributor
0 Kudos

May be not CLEAR <fs_signeddata>. but <fs_signeddata> =  0.

Reejapanath
Explorer
0 Kudos

no 😞

i have tried that also .getting a successful log with details

 

QUERY: ON

WRITE: ON

BADI EXECUTION TIME IN TOTAL :41625.00 ms.

DATA TO WRITE BACK:

ACCOUNT BUDGET_VER CATEGORY CURR DATASOURCE DIVISION PROJECT TIME SIGNEDDATA

666701 Final Beyond_Budg_Yr AED Input 110000 1065512 2015.12 175.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100001.2015.00001 2015.12 0.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100001.2015.00002 2015.12 0.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100001.2015.00003 2015.12 0.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100001.2015.00004 2015.12 0.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100001.2015.00005 2015.12 0.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100002.2015.00001 2015.12 40.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100002.2015.00002 2015.12 20.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100002.2015.00003 2015.12 35.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100002.2015.00004 2015.12 30.00

666701 Final Beyond_Budg_Yr AED Input 110000 1100002.2015.00005 2015.12 50.00

666701 Final Budg_Yr AED Input 110000 1065512 2015.12 125.00

666701 Final Budg_Yr AED Input 110000 1100001.2015.00001 2015.12 0.00

666701 Final Budg_Yr AED Input 110000 1100001.2015.00002 2015.12 0.00

666701 Final Budg_Yr AED Input 110000 1100001.2015.00003 2015.12 0.00

666701 Final Budg_Yr AED Input 110000 1100001.2015.00004 2015.12 0.00

666701 Final Budg_Yr AED Input 110000 1100001.2015.00005 2015.12 0.00

666701 Final Budg_Yr AED Input 110000 1100002.2015.00001 2015.12 10.00

666701 Final Budg_Yr AED Input 110000 1100002.2015.00002 2015.12 20.00

666701 Final Budg_Yr AED Input 110000 1100002.2015.00003 2015.12 25.00

666701 Final Budg_Yr AED Input 110000 1100002.2015.00004 2015.12 40.00

666701 Final Budg_Yr AED Input 110000 1100002.2015.00005 2015.12 30.00

666701 Final Budget AED Input 110000 1065512 2015.12 300.00

666701 Final Budget AED Input 110000 1100001.2015.00001 2015.12 0.00

666701 Final Budget AED Input 110000 1100001.2015.00002 2015.12 0.00

666701 Final Budget AED Input 110000 1100001.2015.00003 2015.12 0.00

666701 Final Budget AED Input 110000 1100001.2015.00004 2015.12 0.00

666701 Final Budget AED Input 110000 1100001.2015.00005 2015.12 0.00

666701 Final Budget AED Input 110000 1100002.2015.00001 2015.12 50.00

666701 Final Budget AED Input 110000 1100002.2015.00002 2015.12 40.00

666701 Final Budget AED Input 110000 1100002.2015.00003 2015.12 60.00

666701 Final Budget AED Input 110000 1100002.2015.00004 2015.12 70.00

666701 Final Budget AED Input 110000 1100002.2015.00005 2015.12 80.00

33 RECORDS HAVE BEEN WRITTEN BACK.

former_member186338
Active Contributor
0 Kudos

But zeros are written! Can you show BPC report (screenshot) with results after badi run?

Vadim

Reejapanath
Explorer
0 Kudos
(AED.'000')
Project CodeDescriptionProposed 2015 BudgetExpenditure ProfileUPLOAD DOCUMENT
Budg Year 2015Beyond Budget Year 2015
11000011100001300125175Upload Document
1100001.2015.00001Dummy5010400
1100001.2015.00002Dummy4020200
1100001.2015.00003Dummy6025350
1100001.2015.00004Dummy7040300
1100001.2015.00005Dummy8030500
former_member186338
Active Contributor
0 Kudos

Not clear!

Can you provide a screenshot of simple EPM report with:

ACCOUNT BUDGET_VER CURR DATASOURCE DIVISION on the page axis

PROJECT on row axis

CATEGORY and TIME on column axis

For All dimensions please show only member ID to compare with badi log

Vadim

Former Member
0 Kudos


I suggest that you reassign the hierarchy parent to an 'Archived WBS' node. This will separate from your WBS members from SAP, and your 'Plan / Dummy WBS' that were created only in SAP BPC.

Once this is reassigned to a new parent, users will need to refresh their master data (you can do this via the EPM Add-in under 'More' or create a button for hte user to use VBA; then they should see the amount.

If there is truely no data (your ABAP has offset / deleted the data against the member you currently plan to delete) then an administrator can delete them weekly or monthly with ease if you have a lite optimise (with zero elimination) scheduled daily.

Reejapanath
Explorer
0 Kudos

Hi All,

The issue because of the BADI UJR_WRITE_BACK. I am using this badi for the same model .so when running this DM the write_back badi is executing and all the data is got refreshed.

Is ther any way to get the running DM name .so i can put the check inside the badi .

Thanks for all the replies .

former_member186338
Active Contributor
0 Kudos

It looks like your write back badi is somehow incorrect... We use write back and custom logic in the same model without issues.

Can you describe your write back badi?

Vadim

Former Member
0 Kudos

Hi,

You need to look into the class - IF_UJA_DIM_DATA.

Please refer to the below link from SCN:

http://scn.sap.com/docs/DOC-41342

Hope this helps.