Application Development 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: 

authorizations

Former Member
0 Kudos

hi,

I need to give authorizations to my bdc program to two users to execute that program. So can i know from u the steps to use authorizations.

Thank you,

regards

raghu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If you are using BDC or BAPI it will take care of authorizations. If the user is not authorized, error will be thrown.

But still if you want to check for authorization you refer the below example.

AUTHORITY-CHECK OBJECT 'ZCB_FI_CBS'

ID 'COMP_CODE' FIELD p_bukrs

ID 'ACTVT' FIELD '03'.

IF sy-subrc <> 0.

MESSAGE e014(zcbs) WITH 'No Authorization for Company Code'(m02)

p_bukrs.

ENDIF.

3 REPLIES 3

Former Member
0 Kudos

Former Member
0 Kudos

Hi,

If you are using BDC or BAPI it will take care of authorizations. If the user is not authorized, error will be thrown.

But still if you want to check for authorization you refer the below example.

AUTHORITY-CHECK OBJECT 'ZCB_FI_CBS'

ID 'COMP_CODE' FIELD p_bukrs

ID 'ACTVT' FIELD '03'.

IF sy-subrc <> 0.

MESSAGE e014(zcbs) WITH 'No Authorization for Company Code'(m02)

p_bukrs.

ENDIF.

Former Member
0 Kudos

Hi

Probably the easier way is create a Z-Transaction to run your BDC program and assign that new transaction to profile of the users (trx PFCG).

Max