Introduction

 

We face many challenges in our BI projects in terms of creation of Analysis Authorizations in a bulk. Users always expect outstanding security of our BI reports. No matter what ever we do in the back end (Modeling and Query Designer). I am going to share very important tips & techniques which I have learned through out my experience which consists of some standard thumb rules too.

 

This blog is going to explain you about “Creation of bulk analysis authorizations”. I am not going to talk about standard Steps to be carried out.  For example we need to create Profit center wise analysis authorizations and respective roles wherein the no.of analysis authorizations will at around 200 to 500.  In such situation i created a program in that we need to just upload the profit center numbers in CSV format.

 

The program will create the required Technical names of analysis authorization along with customized descriptions (whatever we want) within a fraction of second it will create all Analysis Auth. objects.

 

Please go through the screenshots mentioned below, as it contains how we create one Analysis authorization in our system.

 

1 :- Enter the Tcode ‘RSECADMIN’  and later click on “Ind. Maint.”.

1.JPG

2 :- Specify the Tech.Name of AA and click on “Create”.

2.JPG

3 :- Specify the Short, Medium and Long Text and then click on infoprovider icon and select your info objects.  For example i want to create profit center wise AA objects including Cost center and Controlling Area.

3.JPG

4:-  Click on Profit Center intervals and maintain the value of Profit center.

4.JPG

5:- Maintain the info provider values as mentioned below.

5.JPG

 

6:- Save and activate.

 

The above six steps will take time at least a minute time to create one analysis authorization.  So for this i explored a lot and i found three tables are updated when we are creating one AA object.  RSECVAL, RSECBIAU, RSECTXT.

 

I just want to share this program to all of you, so that it can helps us to create bulk AA objects.

 

NOTE:-  Please be take care of this program before running.  If ‘text.csv’ file is not there in our C:\ then it will not do any harm to our AA objects.  As i did not add any checks before updating these values.

 

Conclusion :

 

It is always better to keep an eye on above points while developing / creating AA objects. This blog will help us to skip our 3 man days work and will give the output within seconds.  I have tried my level best to make it very clear to achieve this peculiar requirement. I am sure this is going to help us, as many clients does this kind of analysis authorizations.

 

Thank You

*&---------------------------------------------------------------------*
*& Report  ZTEST_AA
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ZTEST_AA.

TABLES: rsecval, rsectxt, RSECBIAU.

DATA: lstring(255) TYPE C,
      lfld(9) TYPE C.

DATA: l_idx TYPE sy-tabix.

TYPES: BEGIN OF ty_str,
  lstr(255) TYPE C,
  lfld1(6) TYPE C,
  lfld2(9) TYPE C,
  lfld3(9) TYPE C,
END OF ty_str.

DATA: tstr TYPE TABLE OF ty_str,
      lstr TYPE ty_str.

DATA: ts(15) TYPE C,
      d(8) TYPE C,
      t(6) TYPE C.

d = sy-datum.
t = sy-uzeit.

CONCATENATE d t INTO ts.

data: auth(12) type c,
      cnt(6) type c VALUE 'ZGLPC_',
      VAL(10) TYPE C value '0000'.

DATA: ST TYPE RSTXT20 VALUE 'GL Profit CTR',
      MT TYPE RSTXT40 VALUE 'GL STEP Profit Center',
      LT TYPE RSTXT60 VALUE 'GL STEP Profit Center'.


PERFORM UPLOAD_FILE.

loop at tstr INTO lstr.

  CONCATENATE st lstr-lfld1 INTO st SEPARATED BY space.
  CONCATENATE Mt lstr-lfld1 INTO mt SEPARATED BY space.
  CONCATENATE lt lstr-lfld1 INTO lt SEPARATED BY space.
  CONCATENATE cnt lstr-lfld1 INTO auth.
  CONCATENATE val lstr-lfld1 INTO val.
PERFORM UPD_TBL.
clear: st, mt, lt, val, lstr.
st = 'GL Profit CTR'.
mt = 'GL STEP Profit Center'.
lt = 'GL STEP Profit Center'.
val = '0000'.

ENDLOOP.


WRITE: 'hi'.
*&---------------------------------------------------------------------*
*&      Form  UPD_TBL
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM UPD_TBL .

  DATA: trsectxt TYPE TABLE OF rsectxt,
        wrsectxt TYPE rsectxt,
        trsecval TYPE TABLE OF rsecval,
        wrsecval TYPE rsecval,
        tRSECBIAU TYPE TABLE OF RSECBIAU,
        wRSECBIAU TYPE RSECBIAU.
********************Active version *****************
  wRSECBIAU-AUTH = auth.
  wRSECBIAU-OBJVERS = 'A'.
  wRSECBIAU-OBJSTAT = 'ACT'.
  wRSECBIAU-CONTTIMESTMP = '0'.
  wRSECBIAU-TSTPNM = 'KMUNAGAP'.
  wRSECBIAU-TIMESTMP = ts.

  modify rsecbiau FROM wrsecbiau.
  CLEAR: wrsecbiau.

********************Modify version *****************

  wRSECBIAU-AUTH = auth.
  wRSECBIAU-OBJVERS = 'M'.
  wRSECBIAU-OBJSTAT = 'ACT'.
  wRSECBIAU-CONTTIMESTMP = '0'.
  wRSECBIAU-TSTPNM = 'KMUNAGAP'.
  wRSECBIAU-TIMESTMP = ts.

  modify rsecbiau FROM wrsecbiau.
  CLEAR: wrsecbiau.



********************Active version *****************
  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = '0TCAACTVT'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = '03'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = '0TCAIPROV'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = '0TCAIPROV'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = '0FIGL_R10'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = '0TCAVALID'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = 'ZCOSTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = 'ZCO_AREA'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = ':'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = 'ZCO_AREA'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = 'COCE'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = 'ZPROFTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = val.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'A'.
  wrsecval-tcTIOBJNM = 'ZPROFTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = ':'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.
********************Modify version *****************
  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = '0TCAACTVT'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = '03'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = '0TCAIPROV'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = '0TCAIPROV'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = '0FIGL_R10'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = '0TCAVALID'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = 'ZCOSTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'CP'.
  wrsecval-tcTLOW = '*'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = 'ZCO_AREA'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = ':'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = 'ZCO_AREA'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = 'COCE'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = 'ZPROFTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = val.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.


  wrsecval-tcTAUTH = auth.
  wrsecval-OBJVERS = 'M'.
  wrsecval-tcTIOBJNM = 'ZPROFTCTR'.
  wrsecval-tcTSIGN = 'I'.
  wrsecval-tcTOPTION = 'EQ'.
  wrsecval-tcTLOW = ':'.
  wrsecval-tcTHIGH = ''.

  modify RSECVAL FROM WRSECVAL.
  CLEAR: wrsecVAL.

**********Modify version ****************************
  wrsectxt-tcTAUTH = auth.
  wrsectxt-OBJVERS = 'M'.
  wrsectxt-tcTLANGU = 'E'.
  wrsectxt-tcTTXTSH = st.
  wrsectxt-tcTTXTMD = mt.
  wrsectxt-tcTTXTLG = lt.

  modify RSECTXT FROM WRSECTXT.
  CLEAR: wrsectxt.

*********Active version***********
  wrsectxt-tcTAUTH = auth.
  wrsectxt-OBJVERS = 'A'.
  wrsectxt-tcTLANGU = 'E'.
  wrsectxt-tcTTXTSH = st.
  wrsectxt-tcTTXTMD = mt.
  wrsectxt-tcTTXTLG = lt.

  modify RSECTXT FROM WRSECTXT.
  CLEAR: wrsectxt.
*****************************************************
ENDFORM.                    " UPD_TBL
*&---------------------------------------------------------------------*
*&      Form  UPLOAD_FILE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  -->  p1        text
*  <--  p2        text
*----------------------------------------------------------------------*
FORM UPLOAD_FILE .

***************txt file*****xml transport****


CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = 'c:\test.csv'
   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = ','
   HEADER_LENGTH                 = 0
   READ_BY_LINE                  = 'X'
   DAT_MODE                      = ' '
   CODEPAGE                      = ' '
   IGNORE_CERR                   = ABAP_TRUE
   REPLACEMENT                   = '#'
   CHECK_BOM                     = ' '
   NO_AUTH_CHECK                 = ' '
  tables
    data_tab                      = tstr
 EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17 .
IF sy-subrc <> 0.
*Implement suitable error handling here
else.
  data: f1(9) type c,
        f2(9) type c,
        f3(9) type c.
  loop at tstr into lstr.
    l_idx = sy-tabix.
    if l_idx > 0.
    split lstr-lstr at ';' into f1 f2 f3.
    lstr-lfld1 = f1.
    lstr-lfld2 = f2.
    lstr-lfld3 = f3.
    modify tstr from lstr index l_idx TRANSPORTING lfld1 lfld2 lfld3.
    clear: f1, f2, f3.
    endif.
  ENDLOOP.

ENDIF.

ENDFORM.                    " UPLOAD_FILE
To report this post you need to login first.

22 Comments

You must be Logged on to comment or reply to a post.

  1. Jagan Peddamallu

    We can achieve the same using below steps and this is teh standrd way Given by SAP

    1) load data to 0TCA_DS01 , 0TCA_DS02

    2) Generate the Auth values from RSECADSMIN -> Generation -> Flat Authorization / hierarchy Authorizations using above DSO’s

    3) in Query Creata a variable for infoobjects which is processing by Authorization

    Regards

    Jagan

    (0) 
    1. Krishna Chaitanya Post author

      Hi Jagan,

      Thanks for the comments.  Yes we can achieve it through the above,

      1)  Even for that DSO’s again we need to maintain the Data in BW.

      2)  We need to restrict and maintain the security for those DSO’s on the maintained data.

      3)  For some clients/accounts, they don’t want to maintain such data in BW.

      In such situation it should be mandatory to create such bulk analysis authorization without maintaining the above data in the standard DSO,s.

      Regards,

      Krishna Chaitanya.

      (0) 
  2. King raja

    Hi krishna .

    thnaks for the program but i am not sure what paramets should be used given in the text file ?

    incase ii need to mass copy of AA?

    what can i do about it

    thanks

    kumar

    (0) 
    1. Krishna Chaitanya Post author

      Hi Mahesh,

      The thing is the text file contains only profit center numbers, nothing more than that.  After creation of these bulk AA objects using this text file.  Simply go to RSECADMIN click on mass maintenance there you can activate all the newly created AA objects and capture those AA objects in transport to move these AA objects from one environment to another.

      Regards,

      Krishna Chaitanya.

      (0) 
        1. Krishna Chaitanya Post author

          Hi Mahesh,

          Use 0mainplant instead of ZCOSTCTR in the below mentioned code

            wrsecval-tcTAUTH = auth.

            wrsecval-OBJVERS = ‘A’.

            wrsecval-tcTIOBJNM = ‘ZCOSTCTR’.

            wrsecval-tcTSIGN = ‘I’.

            wrsecval-tcTOPTION = ‘CP’.

            wrsecval-tcTLOW = ‘*’.

            wrsecval-tcTHIGH = ”.

          Use required info provider name instead of 0FIGL_R10 in the below mentioned code.

            wrsecval-tcTAUTH = auth.

            wrsecval-OBJVERS = ‘A’.

            wrsecval-tcTIOBJNM = ‘0TCAIPROV’.

            wrsecval-tcTSIGN = ‘I’.

            wrsecval-tcTOPTION = ‘EQ’.

            wrsecval-tcTLOW = ‘0FIGL_R10’.

            wrsecval-tcTHIGH = ”.

          As i shared the sample code to all of you that whatever the changes you can do if you are aware of ABAP coding. Else take any ABAPer help and based on the requirement we can do any manipulation in the code. 

          It will resolve your problem.

          Regards,

          Krishna Chaitanya.

          (0) 

Leave a Reply