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

authorizations

Former Member
0 Likes
592

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
Read only

Former Member
0 Likes
559

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
Read only

Former Member
0 Likes
557
Read only

Former Member
0 Likes
560

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.

Read only

Former Member
0 Likes
557

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