Ansicht
Dokumentation

RSEC_GET_AUTHS_FILTERED -

RSEC_GET_AUTHS_FILTERED -

CPI1466 during Backup   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

The functional module fills BI reporting variables in customer exit RSR00001 for multidimensional authorizations.

When variables are automatically filled from authorizations, all values from all user authorizations are collected and then used to set the variables. With many profiles, this can prevent the user from being able to execute the query after the variables are filled.

With this function module, it is now possible to fill the variables using customer exit RSR00001 with values from exactly one profile, allowing the query to be executed.

Example

The call in the customer exit for reporting variables might look as follows:

IF i_step = 1.

data: l_t_range_filter type RSR_T_RANGESID,

l_s_range_filter type RSR_s_RANGESID,

l_t_range type RSR_T_RANGESID.

CALL FUNCTION 'RSSB_GET_AUTHS_FILTERED'

EXPORTING

I_IOBJNM = i_iobjnm

I_T_RANGE_FILTER = l_t_range_filter

I_INFOPROV = i_s_cob_pro-infoprov

IMPORTING

E_T_RANGE = e_t_range

* E_TSX_AUTH_VALUES_USER_IOBJ =

EXCEPTIONS

NOT_AUTHORIZED = 1

INTERNAL_ERROR = 2

USER_DOESNT_EXIST = 3

X_MESSAGE = 4

OTHERS = 5.

IF sy-subrc <> 0.

clear e_t_range.

ENDIF.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF. "step

The following report first sets the filter for characteristic 0COMP_CODE and then queries the corresponding value for characteristic ZSALE.

*&---------------------------------------------------------------------*

*& Report Z_RSSB_GET_AUTHS_FILTERED *

*& *

*&---------------------------------------------------------------------*

*& *

*& *

*&---------------------------------------------------------------------*

REPORT Z_RSSB_GET_AUTHS_FILTERED .

type-pools: rsr.

data: l_uname type syuname value 'BTEST'.

data: l_t_range_filter type RSR_T_RANGESID,

l_s_range_filter type RSR_s_RANGESID,

l_t_range type RSR_T_RANGESID.

* filter 0COMP_CODE

l_s_range_filter-sign = 'I'.

l_s_range_filter-opt = 'EQ'.

l_s_range_filter-low = '10'.

append l_s_range_filter to l_t_range_filter.

CALL FUNCTION 'RSSB_GET_AUTHS_FILTERED'

EXPORTING

I_IOBJNM = '0COMP_CODE'

I_T_RANGE_FILTER = l_t_range_filter

I_CLEAR = RS_C_true

I_UNAME = l_uname

EXCEPTIONS

NOT_AUTHORIZED = 1

INTERNAL_ERROR = 2

USER_DOESNT_EXIST = 3

X_MESSAGE = 4.

IF SY-SUBRC <> 0.

* todo

ENDIF.

* Get the corresponding value for ZSALE

CALL FUNCTION 'RSSB_GET_AUTHS_FILTERED'

EXPORTING

I_IOBJNM = 'ZSALE'

I_UNAME = l_uname

IMPORTING

E_T_RANGE = l_t_range

EXCEPTIONS

NOT_AUTHORIZED = 1

INTERNAL_ERROR = 2

USER_DOESNT_EXIST = 3

X_MESSAGE = 4.

IF SY-SUBRC <> 0.

* todo

ENDIF.

Notes

The authorized values are stored internally for each call with InfoObject i_iobjnm in the function module. If no filters are specified in I_T_RANGE_FILTER, the first profile is used for the first call.

The user authorizations are sorted alphabetically after they are read for the first call. You can therefore use the authorization names to determine which one is used for filling.

The values previously determined are used as filters in the second and any subsequent calls, so that only those authorizations are included that result in a valid profile along with the values already specified in e_t_range.

You can also use the I_T_RANGE_FILTER parameter to select specific profiles, for example, by specifying a filter for the first call that matches a specific profile only.

Further information





Parameters

E_TSX_AUTHS_FOR_FILTER
E_TSX_AUTH_VALUES_USER_IOBJ
E_T_FLAT_FROM_HIER
E_T_MSG
E_T_RANGE
I_CLEAR
I_IGNORE_HIERARCHIES
I_INFOPROV
I_IOBJNM
I_T_HIER_FILTER
I_T_RANGE_FILTER
I_UNAME

Exceptions

INTERNAL_ERROR
NOT_AUTHORIZED
USER_DOESNT_EXIST
X_MESSAGE

Function Group

RSEC_UTILS

Addresses (Business Address Services)   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 5932 Date: 20240523 Time: 131648     sap01-206 ( 68 ms )