Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member185177
Contributor
6,579


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.".



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



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.



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



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



 

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

24 Comments
Former Member
0 Kudos

Hi Krishna,

Thanks for your valuable information on SAP BI Analysis authorizations and really helpful....

Regards,

Pradeep

former_member183012
Active Contributor
0 Kudos

Hi Krishna,

Useful Information..thanks for sharing :smile: .

sriramvijay_ravidoss
Contributor
0 Kudos

Hi,

Bookmarked. Useful information.

-Sriram

former_member185177
Contributor
0 Kudos

Hi Pradeep,

You are welcome...thanks dude :smile:

Regards,

Krishna Chaitanya.

former_member185177
Contributor
0 Kudos

Hi Ganesh,

Thanks for your feedback mate :smile: :smile: :smile:

Regards,

Krishna Chaitanya

srinivas_anilkumar
Active Contributor
0 Kudos

Excellent.. We had been doing this in our project manually and this code has helped reduce the overall effort less than 1 hr.

former_member185177
Contributor
0 Kudos

Thanks for your valuable comments.  I just shared what i learned and implemented in our project.  :smile:

Former Member
0 Kudos

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

former_member185177
Contributor
0 Kudos

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.

Former Member
0 Kudos

HI Krishna

Useful Information.Keep up the good work.

Thanks

Jahnavi.D

former_member185177
Contributor
0 Kudos

Thanks Jahnavi for such wonderful comments.  :smile:

Former Member
0 Kudos

Hi Krishna,

Nice to see such document from you.  Thanks for sharing

Regards,

Avinash

polepalli_jagadish
Associate
Associate
0 Kudos

Hi Krishna,

Thanks for sharing the useful and valuable information.

Regards,

Jagadish.

former_member185177
Contributor
0 Kudos

Hi Jagadish,

Thanks for your valuable feedback along five star rating. :smile: :smile: :smile: :smile: :smile:

Regards,

Krishna Chaitanya.

Former Member
0 Kudos

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

former_member185177
Contributor
0 Kudos

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.

Former Member
0 Kudos

Nice post! Thank you for sharing.

Best Regards

Venkat...

former_member185177
Contributor
0 Kudos

Thanks for the 5 * (star) rating :smile: :smile: :smile: :smile: :smile:

Regards,

Krishna Chaitanya.

Former Member
0 Kudos

thanks for the reply but my aa is based on 0mainplant

is there any way to create AA with 0mainplant

i have explained my problem here

Mass copy or creation  of Analysis Authorization

former_member185177
Contributor
0 Kudos

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.

Former Member
Good idea!
Can't find the program.
BR,
Steffen 
former_member185177
Contributor
0 Kudos
Hi Steffen,

 

I have updated with the code.

 

Regards,

Krishna Chaitanya
former_member537494
Discoverer
0 Kudos
Still useful in 2021. Since 740 version, the right table is rsecval_string
Cr_1234
Explorer
0 Kudos
Hi Krishna,

What should the test.csv file look like?

 

Kind regards,

Vera
Labels in this area