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

Authorisation check for company code

Former Member
0 Likes
459

Hi,

Im new to badi concepts , can anyone explain me the steps to do this.

Users should be able to post documents in any company code but should not be able to view the balance sheet of other company code. To meet this requirement BAdI FAGL_AUTH_ADD_DATA_C will be implemented. The BAdI would check for the company code values allowed in Z authorisation object in the user profile. If the authorisation object permits the company code, user will be allowed to execute the report; otherwise an error message will be displayed.

2 REPLIES 2
Read only

Former Member
0 Likes
408

Hi,

U go to saptechnical.com...U can get clear idea abuot BADI..There step by step procedure is there..

Regards:

Prabu

Read only

Former Member
0 Likes
408

Hi Bhagya jyothi,

I dont knw whether we can use this in a BAPI or not but I used this code for the same requirement in a Function Module.

LOOP AT RECORD_TAB.

AUTHORITY-CHECK OBJECT 'ZFI_BUKRS'

ID 'BUKRS' FIELD RECORD_TAB-STRING+3(4).

IF sy-subrc ne 0.

DELETE RECORD_TAB.

ENDIF.

ENDLOOP.

Hope this helps you

Thanks,

Manish