How to generate a selective deletion program for info provider



This blog basically explains how to generate a program for selective deletion

Case: If you have an infoprovider, you want to perform a selective deletion with specified selections based on DSO values in such a way that if the DSO is carrying the same values that are already exist in the cube and you don’t want to update/use those historic values available in CUBE on regular basis then make use of the following steps to ease your job.

Let us assume infoprovider name is ZFCUBE1, on this cube I am planning to perform a selective deletion on regular basis by referring the DSO values ZTESTSEL and characteristic ZSELCHAR..

  •  Execute the t-code SE38 (ABAP Program screen).          

  •  Give the standard program “RSDRD_DELETE_FACTS” and execute (by clicking on F8).        

  •  It will take you to the following screen.         

  •  In this we have to provide the data target name (infoprvider) here in our case I am giving the name as “ZFCUBE1”.
  • If you are providing the technical name then please ensure that you have flagged the checkbox presented at “Use technical name?” screen, choose the radio button generate selection program.
  • Give the name of the report which ever you wish to give. Here I am giving it as “ZTEST_SEL_DEL” and executing it.        

  • After execution it will generate a selective deletion program for the given info provider as in our case it is “ZFUBE1” and the program would be “ZTEST_SEL_DEL”.
  • We have to create a ABAP program in that call ZTEST_SEL_DEL program and pass the parameters for this through ABAP program.
  • Of course we can directly place this piece of code in the generated program(ZTEST_SEL_DEL) it self .But if you want execute the same set of selection for multiple cubes then it is better to create the below piece of code and call this.

REPORT zbw_del_TESTSEL.  

DATA : lt_SELCHAR TYPE STANDARD TABLE OF /bic/AZTESTSEL000,        

 lw_SELCHAR TYPE /bic/AZTESTSEL000.  

 SELECT * FROM /bic/AZTESTSEL000 INTO TABLE lt_SELCHAR.  

LOOP AT lt_SELCHAR INTO lw_SELCHAR.    

SUBMIT ZTEST_SEL_DEL WITH l_id = lw_SELCHAR -/bic/SELCHAR   

AND RETURN.   

CLEAR lw_SELCHAR -/bic/SELCHAR. 

ENDLOOP.

ENDIF.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Now create a process chain :
  • Execute the t-code RSPC         

  • Click on create icon or press F5 button.
  • It will prompt for the following screen

 

        

  • Give the process chain name & Description

  • Click on continue.
  • It will prompt you for start process

  • Create a start process & say continue.

  • Choose ABAP program process type under general services.

  • Click on create give the name and it will prompt you for ABAP program give the program name& save it.
  • Connect this ABAP program process to Start process.

From now onwards if you want to run the selective deletion you can just execute the process chain that’s all.

In our case we have to include this process chain after load completion of ZTESTSEL DSO data .So, that it will check the cube data and clear the historical data if any which meets the DSO current data.

And finally collect all and transport it.

Important Note:  

Please make sure about the loading flow or configuration before placing the selective deletion process.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章