HOW TO BADIs for SPOs with volatile partitions.docx

12
 HOW TO: BADIs for SPOs with volatile partitions Version: 1.0 HOW TO: BADIs for SPOs with volatile partitions Page: 1 / 11

Transcript of HOW TO BADIs for SPOs with volatile partitions.docx

Page 1: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 1/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

HOW TO: BADIs for SPOs with volatile partitions

Page: 1 / 11

Page 2: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 2/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

Document history:

Version Date Author CR Comments

1.0 2!10!201" #la$%io Pinevs&' (A

Page: 2 / 11

Page 3: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 3/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

Table of Contents

1 INTRODUCTION.....................................................................................................................4

1.1 Ba)&*ro$n% ! The #hallen*e of Volatile or #o+ple, -o*i)al Partitionin* #on%itions......................1.2 Se+anti)all' Partitione% O/e)ts SPOs an% #o+ple, or Volatile Partitionin* #on%itions.............

2 IMPLEMENTATION..................................................................................................................5

2.1 #entrall' Define SPO PartProvi%er 3 I+ple+ent BA%I 4S-PO5BADI5PA4TITIO(I(6.................2.2 RSLPO_BADI_PARTITIONING: Method GET_T_SPO – returns SPOs.........................................2." RSLPO_BADI_PARTITIONING: Method GET_T_PART - returns Partitions...................................72. RSLPO_BADI_PARTITIONING: Method GET_T_PART_TEXT - returns desri!tion o" Partitions .82. RSLPO_BADI_PARTITIONING: Method GET_T_PART_#RIT - returns Partitionin$ #riteria%!artition harateristi%s& ' (a)ues&..............................................................................................................9

3 SPO WIZARD – MAINTAIN PARTITIONS – CALL BADI (2..........................................................!

4 MASS MAINTENANCE AND ACTI"ATION O# SPOS USIN$ BADI "IA TRANSACTIONRSLPO%MASS%ACT......................................................................................................................1&

1

Page: 3 / 11

Page 4: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 4/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

1 Background

1.1 The Challenge of Volatile or Complex Logical Partitioning

Conditions

Traditionally logical partitioning modeling is done case by case (tactical logical partitioning). In

other words the definition of logical partitions is done for each InfoCube and each DSO

individually. evertheless the partition characteristic and the partition characteristic values assigned

to the !art!roviders of different InfoCubes" DSOs are often identical# e.g. the Sales Order InfoCube

is logical partitioned by year resulting into $ !art!roviders storing data of the last $ years. The same

 partitioning could apply to purchasing order InfoCubes etc.

The logical partitioning for our little e%ample can be modeled in various ways e.g.

• &ssigning a fi% partition characteristic values# assign a fi% year for each !art!rovider e.g.!art!rovider ' for the actual year *'*+ !art!rovider for **,+ !art!rovider $ for **-

• odeling a rolling window# define a rule which assigns partition characteristic values (in

the e%ample year) in an automated way to the !artitions

/ith this simple e%ample we can learn two things (at least)#

'. /e should not use different logical partitioning implementations for the same re0uirements of

different Info!roviders as this will decrease maintainability and increase costs. 1eside this we will

have a lot of second best implementations li2e implementation '. in the e%ample

. If partitioning conditions are volatile over time we should not assign fi% values but a rule basedlogical partitioning to remain fle%ible. The origin of the volatility means that with every new year

the partition condition will change.

If we loo2 to the real world we can learn a third thing#

3. 1uilding a logical partitioned InfoCube or DSO in a continuous rollout situation not all partition

characteristic values are 2nown at definition time and often even the final number of !art!roviders

is not 2nown. That means over time you have to maintain the logical !artitions again and again

assigning new values to !art!roviders and" or creating new !art!roviders.

/e have this situation designing 1/s using the 4ayered Scalable &rchitecture (4S&).

/e can summari5e that individual modeling of 4ogical !artitioned InfoCubes" DSOs is the second

 best choice especially with large 1/s (6D/) as we have numerous Info!roviders following the

same logical partitioning conditions.

1.2 Semantically Partitioned Objects SPOs! and Complex or VolatilePartitioning Conditions

The new S!O feature is a big step forward modeling comple% partitioning conditions as the new

wi5ard ma2es the assignment of partitioning characteristics and partitioning characteristic values to

semantical partitions (!art!rovider) transparent and consistent (DT! filters).

Page: 4 / 11

Page 5: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 5/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

 evertheless we still have to manually enter the partition characteristic(s) and partition

characteristic(s) values for each S!O defining the semantical partitions. Thus with the standard S!O

wi5ard functionality we are confronted with the same challenges mentioned before even though on

a higher more comfortable level#

• homogeneous modeling of different S!Os with identical semantical partitioning

characteristic and values

• volatile semantical partitioning by time

To overcome these challenges the S!O supports a rule based central definition of !art!roviders and

related DT!s offering the possibility to get all necessary criteria defining !art!roviders via a 1&dI

implementation (1&dI RSLPO_BADI_PARTITIONING).

2 Imlementation

2.1 Centrally "e#ne SPO PartPro$ider % &mplement '(d& )SLPO*'("&*P()T&T&O+&+,

7ou have to create a 1&dI implementation of the S!O 1&dI RSLPO_BADI_PARTITIONING 

using S6'-" S6',.

The interface IF_RSLPO_BADI_PARTITIONING contains five

methods#

8ig. '# S!O 1&dI ethods

The methods GET_T_SPO, GET_T_PART, GET_T_PART_TEXT and GET_T_PART_CRIT 

return the parameters to define the S!O !art!roviders+ the method GET_T_PART_DTP returns the

 parameters to define the DT!s filling the S!O !art!roviders.

2.2 RSLPO_BADI_PARTITIONING: Method GET_T_SPO – returns SPOs

/e have to return the (technical) names of the S!Os that shall be managed using the 1&dI

8ig.# S!O 1&dI ethod 96T:T:S!O

 Coding for our e%ample#

Page: 5 / 11

Page 6: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 6/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

method IF_RSLPO_BADI_PARTITIONING~GET_T_SPO.

  DATA:

  l_spo TYPE rslponme.

! Ret"rn t#le $%th nmes o& s"pported BAdI SPOs.!

* TEST SPO 

  L_SPO ' ()*TE)P(.  APPEND L_SPO TO R_T_SPO. endmethod.

In our e%ample the name S!O ;C,T6C!< is returned.

2.- RSLPO_BADI_PARTITIONING: Method GET_T_PART - returnsPartitions

This method is called for each S!O+ which is returned by the first method GET_T_SPO and returnsthe !artitions and the display position of the !artition.

8i

g.$# S!O 1&dI ethod 96T:T:!&=T

Coding for our e%ample#

method IF_RSLPO_BADI_PARTITIONING~GET_T_PART.

  DATA:  l_s_prt TYPE rslpo_#d%_s_prt.

! Ret"rn t#le $%th the prt%t%ons o& SPO I_SPO.IF I_SPO ' ()*TE)P(.

  )ONSTANTS: )_YEAR_FRO+ TYPE N LENGT, - AL/E (0112(.

  DATA: L_IND TYPE N LENGT, 0 AL/E 34  L_N/+_PART TYPE N LENGT, 04  L_YEAR_FRO+ TYPE N LENGT, -4  L_)/RR_YEAR TYPE N LENGT, -.

  L_YEAR_FRO+ ' )_YEAR_FRO+5-6.  L_YEAR_TO ' SY7DAT/+5-6.  L_N/+_PART ' L_YEAR_TO 7 L_YEAR_FRO+ 8 3.

Page: ' / 11

Page 7: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 7/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

  9,ILE L_IND LE L_N/+_PART.  L_S_PART7POSIT ' L_IND.

  L_S_PART7IDPART ' L_IND.

  APPEND L_S_PART TO R_T_PART.  L_IND ' L_IND 8 3.  END9,ILE.

  ENDIF.

END+ET,OD.

The method returns for our e%ample S!O ;C,T6STC!< four !artitions.

2. RSLPO_BADI_PARTITIONING: Method GET_T_PART_TEXT - returnsdesri!tion o" Partitions

This method is called for each S!O+ which is returned by the first method GET_T_SPO (other

assignments only done here will be ignored) and returns the names " description of the !artitions.

The method supports multilanguages.

8

ig.3# S!O 1&dI ethod 96T:T:!&=T:T6>T

method IF_RSLPO_BADI_PARTITIONING~GET_T_PART_TET.

  DATA:

  l_te;t_d TYPE str%n<4

  l_te;t_e TYPE str%n<4  l_s_prt_te;t TYPE rslpo_#d%_s_prt_te;t.

IF I_SPO ' ()*TE)P(.

  )ONSTANTS: )_YEAR_FRO+ TYPE N LENGT, - AL/E (0112(.

  DATA: L_IND TYPE N LENGT, 0 AL/E 34  L_N/+_PART TYPE N LENGT, 04  L_YEAR_FRO+ TYPE N LENGT, -4  L_YEAR_TO TYPE N LENGT, -.

  L_YEAR_FRO+ ' )_YEAR_FRO+5-6.

  L_YEAR_TO ' SY7DAT/+5-6.  L_N/+_PART ' L_YEAR_TO 7 L_YEAR_FRO+ 8 3.

  9,ILE L_IND LE L_N/+_PART.

Page: / 11

Page 8: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 8/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

  L_S_PART_TET7IDPART ' L_IND.  L_S_PART_TET7LANG/ ' (E(.

  L_S_PART_TET7TTLG ' L_YEAR_TO.

  APPEND L_S_PART_TET TO R_T_PART_TET.  L_IND ' L_IND 8 3.  L_YEAR_TO ' L_YEAR_TO 7 3.  END9,ILE.

  ENDIF.

END+ET,OD. 

2./ RSLPO_BADI_PARTITIONING: Method GET_T_PART_#RIT - returnsPartitionin$ #riteria %!artition harateristi%s& ' (a)ues&

This method is called for each S!O+ which is returned by the first method GET_T_SPO and returnsthe partitioncriteria(s) and the assigned values for partitions returned by the method GET_T_PART

(other assignments onlydone here will be ignored)#

8ig.?# S!O 1&dI ethod 96T:T:!&=T:C=IT

 Coding for our e%ample#

method IF_RSLPO_BADI_PARTITIONING~GET_T_PART_)RIT.

  DATA:  l_s_prt_=r%t TYPE rslpo_#d%_s_prt_=r%t.

! Ret"rn t#le $%th the prt%t%on%n< =r%ter%.

  IF I_SPO ' ()*TE)P(.

  )ONSTANTS: )_YEAR_FRO+ TYPE N LENGT, - AL/E (0112(.

  DATA: L_IND TYPE N LENGT, 0 AL/E 34

  L_N/+_PART TYPE N LENGT, 04  L_YEAR_FRO+ TYPE N LENGT, -4

  L_YEAR_TO TYPE N LENGT, -.

  L_YEAR_FRO+ ' )_YEAR_FRO+5-6.  L_YEAR_TO ' SY7DAT/+5-6.  L_N/+_PART ' L_YEAR_TO 7 L_YEAR_FRO+ 8 3.

  9,ILE L_IND LE L_N/+_PART.  L_S_PART_)RIT7POSIT ' L_IND.  L_S_PART_)RIT7IDPART ' L_IND.  L_S_PART_)RIT7IOB>N+ ' (1FIS)YEAR(.

Page: ) / 11

Page 9: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 9/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

  L_S_PART_)RIT7OPT ' (E?(.

  L_S_PART_)RIT7LO9 ' L_YEAR_TO.  APPEND L_S_PART_)RIT TO R_T_PART_)RIT.

  L_S_PART_)RIT7IOB>N+ ' (1FIS)ARNT(.

  L_S_PART_)RIT7OPT ' (E?(.  L_S_PART_)RIT7LO9 ' (@-(.  APPEND L_S_PART_)RIT TO R_T_PART_)RIT.  L_IND ' L_IND 8 3.  L_YEAR_TO ' L_YEAR_TO 7 3.  END9,ILE.

  ENDIF.

END+ET,OD. 

The so far described methods return all information necessary defining the !art!roviders of an S!O.

! "#$ %i&ard ' (aintain #artitions ' Call BAdI )2*

6ntering the !artition maintenance screen you do not need to enter any partitions or partition

characteristic values. These are entered via the 1&dI# ;1uild @ersion 8rom 1&dI Implementation<#

 8ig. A# 6%ample aintain S!O !artitions using 1&dI implementation screen

The result loo2s as follows#

Page: ! / 11

Page 10: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 10/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

8i

g.B# 6%ample S!O !artitions after getting data using 1&dI screen

/e observe that all S!O !art!roviders are defined li2e given in the mapping table above# names+

 partition characteristic+ partition characteristic values and even the se0uence li2e the partitions are

shown.

+ (ass (aintenance and Acti,ation of "#$s -sing BAdI ,ia TransactionR".#$/(A""/ACT

The Transaction RSLPO_MASS_ACT allows maintaining all 1&dI managed S!Os (returned by

method GET_T_SPO) centrally.

RSLPO_MASS_ACT compares the 1&dI (methods GET_T_PART, GET_T_PART_TEXT,

GET_T_PART_CRIT) returned S!O definition with the active version of these S!Os and lists

whether there are differences:

 8ig.-# 6%ample =S4!O:&SS:&CT screen

In detail the status highlights ew !artitions+ Deleted !artitions and Changed !artitions.

7ou can now select any set of 1&dI managed S!Os and apply the new 1&dI settings in a masschange and activation run.

Page: 1& / 11

Page 11: HOW TO BADIs for SPOs with volatile partitions.docx

7/17/2019 HOW TO BADIs for SPOs with volatile partitions.docx

http://slidepdf.com/reader/full/how-to-badis-for-spos-with-volatile-partitionsdocx 11/11

  HOW TO: BADIs for SPOs with volatile partitionsVersion: 1.0

RSLPO_MASS_ACT allows reducing the S!O interactive modeling to an absolute minimum for

all S!Os managed via 1&dI in case of 

adding new !art!roviders

• adding new partition criteria values to e%isting an !art!rovider 

• removing partition criteria values if no data for this values e%ist any longer in the

!art!rovider (planned)

• dropping" deleting !art!roviders

• automated generation of DT!s (planned) not ust the DT! assignment li2e with the S!O

/i5ard

RSLPO_MASS_ACT functionality therefore perfectly addresses the volatile logical partitioning

challenges mentioned above applying changes consistently throughout 1/.

P 11 / 11