09-02-2008 7:42 AM
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
09-02-2008 7:47 AM
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.
09-02-2008 7:45 AM
Hi,
Check these links-
http://help.sap.com/saphelp_nw04/Helpdata/EN/52/671292439b11d1896f0000e8322d00/content.htm
Creating Authorization object-
09-02-2008 7:47 AM
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.
09-02-2008 7:57 AM
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