Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

authorization check

Former Member
0 Likes
456

Hi experts,

Can any one give me good example using AUTHORITY_CHECK function module..

thanks

kaki

1 ACCEPTED SOLUTION
Read only

madan_ullasa
Contributor
0 Likes
412

hi,

i had used it in one of my development.

check if it is of use for u.

regards,

Madan.

SELECT vstel

FROM tvst

INTO TABLE t_sel

WHERE vstel IN s_vstel.

REFRESH t_authority.

CLEAR t_authority.

LOOP AT t_sel.

IF t_sel[] IS NOT INITIAL.

AUTHORITY-CHECK OBJECT 'V_LIKP_VST'

ID 'VSTEL' FIELD t_sel-vstel

ID 'ACTVT' FIELD '01'

ID 'ACTVT' FIELD '02'

ID 'ACTVT' FIELD '03'

ID 'ACTVT' FIELD '04'

ID 'ACTVT' FIELD '18'

ID 'ACTVT' FIELD '24'

ID 'ACTVT' FIELD '25'

ID 'ACTVT' FIELD '85'.

IF sy-subrc <> 0.

t_authority-vstel = t_sel-vstel.

APPEND t_authority.

CLEAR t_authority.

ENDIF.

ENDIF.

ENDLOOP.

CONCATENATE 'No Authorization For : ' ' ' INTO w_mes.

LOOP AT t_authority.

CONCATENATE w_mes t_authority-vstel INTO w_mes SEPARATED BY space.

ENDLOOP.

IF t_authority[] IS NOT INITIAL.

  • message i068 with w_mes.

MESSAGE w_mes TYPE 'I'.

  • EXIT.

LEAVE LIST-PROCESSING.

ENDIF.

2 REPLIES 2
Read only

madan_ullasa
Contributor
0 Likes
413

hi,

i had used it in one of my development.

check if it is of use for u.

regards,

Madan.

SELECT vstel

FROM tvst

INTO TABLE t_sel

WHERE vstel IN s_vstel.

REFRESH t_authority.

CLEAR t_authority.

LOOP AT t_sel.

IF t_sel[] IS NOT INITIAL.

AUTHORITY-CHECK OBJECT 'V_LIKP_VST'

ID 'VSTEL' FIELD t_sel-vstel

ID 'ACTVT' FIELD '01'

ID 'ACTVT' FIELD '02'

ID 'ACTVT' FIELD '03'

ID 'ACTVT' FIELD '04'

ID 'ACTVT' FIELD '18'

ID 'ACTVT' FIELD '24'

ID 'ACTVT' FIELD '25'

ID 'ACTVT' FIELD '85'.

IF sy-subrc <> 0.

t_authority-vstel = t_sel-vstel.

APPEND t_authority.

CLEAR t_authority.

ENDIF.

ENDIF.

ENDLOOP.

CONCATENATE 'No Authorization For : ' ' ' INTO w_mes.

LOOP AT t_authority.

CONCATENATE w_mes t_authority-vstel INTO w_mes SEPARATED BY space.

ENDLOOP.

IF t_authority[] IS NOT INITIAL.

  • message i068 with w_mes.

MESSAGE w_mes TYPE 'I'.

  • EXIT.

LEAVE LIST-PROCESSING.

ENDIF.

Read only

0 Likes
412

Thank you Madan Kochana .

Full points alloted...

kaki