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

Authority check in RFC function modules

Former Member
0 Likes
3,177

'Hi,

How can we check authorisation in RFC function module.I have a unique requirement where I need to find authorisation to cost center object in RFC function module.But when we make RFC,its sy-uname will be different from calling program's sy-uname.Obviously authority-check will not work within RFC function modules.How can I get around the requirement.your help will be rewarded.

Thanks & Regds

Surendranath

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,731

Hi surendranath,

1. Such authorisation should be done

BEFORE calling the RFC.

2. The RFC should be called only if the authoirsation is successsful,

in the CALLING Program.

3. Even suppose its possible to know the sy-uname,

then how are we going to check the authorisation,

in THE CALLING SERVER ?

regards,

amit m.

5 REPLIES 5
Read only

Former Member
0 Likes
1,732

Hi surendranath,

1. Such authorisation should be done

BEFORE calling the RFC.

2. The RFC should be called only if the authoirsation is successsful,

in the CALLING Program.

3. Even suppose its possible to know the sy-uname,

then how are we going to check the authorisation,

in THE CALLING SERVER ?

regards,

amit m.

Read only

0 Likes
1,731

Hi amit,

you are correct if I am calling RFC from ABAP.My case is I am calling from Guixt(third party tool which sits on GUI).

Regds

Surendranath

Read only

0 Likes
1,731

If the calling application is run online and the application is not using a generic user id for all users, then the calling application can pass the user name as a parameter to the RFC. This can then be used for authority checks.

Let me know if this can work.

Cheers

Read only

0 Likes
1,731

Hi Kiran,

authority-check will check the authorisation for the current user(sy-uname) implicitly.If I am not wrong, passing sy-uname to RFC FM is of no use..Still I am looking out the avenue if I could get what I want by digging some tables.At the end every thing in SAP will be stored in tables..

Thanks & Regds

Surendranath

Read only

Former Member
0 Likes
1,731

Hi Surendra

If the RFC FM is for one time (to use in one program or in a few programs) I guess, you can Export the necesorry data from RFC to the calling program(s) and perform the authority check in the program(s).

If you go for this option maintain appropriate documentation for the FM to avoid confusions.

Regards

Surya.