cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization on Billing Block at item level

Former Member
0 Kudos

Hello,

we would like to prevent some users to change the billing block at item level (VBAP-FAKSP).

Would you know how to do this? Is there any authorization objet we could use?

There is (V_VBAK_AAT-ACTVT) but it is at header level so it does not fit our requirements.

Thank you in advance for any information & regards,

Didier

Accepted Solutions (0)

Answers (2)

Answers (2)

Jelena
Active Contributor
0 Kudos

Hans had the right idea, but I think this should rather be done in the user exit USEREXIT_CHECK_VBAP in MV45AFZB since it's usually triggered when the item is changed.

Inside Hans's sample code the developer will need to add AUTHORITY-CHECK comand. You'll also need a custom authorization object to check and to assign to the roles.

This is basic ABAP stuff, so your ABAPer should know, actually.

Former Member
0 Kudos

hi Didier,

you can use an Userexit with a E-Message, to preven the change.

Userexit mv45afzz

Save_prepare

check, if the VBAP-FAKSP has changed

field-symbols : <yvbap> like line of yvbap,

<xvbap> like line of xvbap.

loop at yvbap assigning <yvbap>

read xvbap assigning <xvbap>

with key vbeln = <yvbap>-vbeln

posnr = <yvbap>-posnr.

if sy-subrc eq 0 and

<xvbap>-updkz ne 'D'.

if <xvbap>-faksp ne <yvbap>-faksp.

call function popup_to_inform ......

Message e...() .....

endif.

endif.

unassign <xvbap>.

endloop.

Hans

hans

Former Member
0 Kudos

Thank you for the idea Hans.

However, it might be trick to link it to an authorization role. What if, for example, I have an another role that would need the same limitation?

kind regards,

Didier