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

BAPI or FM to add/remove values to/from authorization objects.

0 Likes
2,003

Hello SAPients,

I've been searching but I can't find any BAPI or Function Module to add/remove values from authorization objects. Let's say that in the Object M_MATE_MAT, authorization M_MATNR_ALL and field BEGRU I need to add/remove values to change the authorizations as needed. Something like what the PFCG Tcode does, but with BAPI/FM. My other option consists on using BDC but PFCG is too complicated for that and I don't think that the result is reliable.

Any help would be greatly appreciated.

Thanks in advance for your kind help.

Hello SAPients,

I've been searching but I can't find any BAPI or Function Module to add/remove values from authorization objects. Let's say that in the Object M_MATE_MAT, authorization M_MATNR_ALL and field BEGRU I need to add/remove values to change the authorizations as needed. Something like what the PFCG Tcode does, but with BAPI/FM. My other option consists on using BDC but PFCG is too complicated for that and I don't think that the result is reliable.

Any help would be greatly appreciated.

Thanks in advance for your kind help.

5 REPLIES 5
Read only

Former Member
0 Likes
1,302

Hi,

See the given link, It may help you.

Regards,

Shamma

Read only

0 Likes
1,302

Shamma,

Thanks for your reply. Actually, I'm not adding fields to the Authorization Object, I'm just adding values to the already created fields. For example, I want the users to have access to the invoices 111, 222, and 333, then I add those values to the corresponding field in the corresponding Authorization Object. Later on, we need to avoid the users from changing the invoice number 222, so, I remove the value 222 from the corresponding field in the corresponding Authorization Object, I can do that manually using TCode PFCG but I need to do it programmatically, that's why I'm looking for a BAPI or FM.

Any other idea?

Thanks in advance.

Read only

Former Member
0 Likes
1,302

Hello,

You can check with BAPI_MATERIAL_SAVEDATA.

Regards,

Shamma

Read only

0 Likes
1,302

Hi Shamma,

Can you please tell me what exactly should I be looking for in BAPI_MATERIAL_SAVEDATA in order to solve my problem?

Thanks!

Read only

Former Member
0 Likes
1,302

Hi,

You can check with these links, It may help you.

Regards,

Shamma