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

Very special authorization issue

Former Member
0 Likes
1,072

Hello,

I have the following problem with authorizations:

Our inventory user, sometimes need to change the indicator "Unlimited" in tab Delivery of Purchase order document, in order to receipt more quantity than the one in the Purchase order document.

The user do that by double clicking in the field "purchase order" of "purchase order data" tab in the MIGO transaction.

The problem is that this user, must have only authority for this change, and no other in the PO document.

How is this possible ??

Thanks in advance.

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on Dec 2, 2010 12:56 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,015

Hi,

You can achieve that by creating Z Authorization Object using SU21 and implementing MB_MIGO_BADI. Write the code using AUTHORITY CHEKC syntax. I did similar requirements where standard Auth Object is not available.

Thanks & Regards,

Faheem.

Hello,

I have the following problem with authorizations:

Our inventory user, sometimes need to change the indicator "Unlimited" in tab Delivery of Purchase order document, in order to receipt more quantity than the one in the Purchase order document.

The user do that by double clicking in the field "purchase order" of "purchase order data" tab in the MIGO transaction.

The problem is that this user, must have only authority for this change, and no other in the PO document.

How is this possible ??

Thanks in advance.

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on Dec 2, 2010 12:56 PM

6 REPLIES 6
Read only

Former Member
0 Likes
1,016

Hi,

You can achieve that by creating Z Authorization Object using SU21 and implementing MB_MIGO_BADI. Write the code using AUTHORITY CHEKC syntax. I did similar requirements where standard Auth Object is not available.

Thanks & Regards,

Faheem.

Read only

0 Likes
1,015

thanks for the quick reply.

I haven't done something relative before. Where do i write that code ? and what code exactly is this ?

Do you have any links of guides / tutorials about this ?

thank you very much.

Read only

0 Likes
1,015

Hi,

I don't have any tutorial, we are here to help to get the idea, not to solve your query, but I will summarize the steps. Search the forum for tutorials(if available any).

Create authorization object using SU21. Follow these steps :

1)Create Z Object Class from the Application toolbar-->Create->Object Class

Give Z name(Ex:ZCLASS).

2)Create Authorization Object from the Application toolbar-->Create->Authorization Object

Give Z name(Ex:ZOBJECT) and give field name ACTVT and click on "Permitted Activities", check the check box "02 Change'.

.

Then implement the BADI MB_MIGO_BADI. Write the code to check the authority in method LINE_MODIFY as


"Write your field condition here say your field will be set as 'X',( the structure available here is CS_GOITEM )
"Say for example you want to check field CS_GOITEM-FIELD
IF CS_GOITEM-FIELD = 'X'.

    AUTHORITY-CHECK OBJECT 'ZOBJECT' ID 'ACTVT' FIELD '02'.

    IF SY-SUBRC <> 0.

      MESSAGE E000(ZSW) WITH 'You are not authorized to do this activity'.

    ENDIF.

ENDIF.

Note : Most of the MIGO fields will come in the above said BADI, if your requirement is not getting full filled with this BADI then search for some other BADI/Exit/Enhancement Point

Thanks & Regards,

Faheem.

Read only

0 Likes
1,015

Thanks for the answer that looks like a quick guide !

But i have a question. Why you add the code to the MIGO ? the authority check concerns the change of the purchase order.

Read only

0 Likes
1,015

Dear,

Why I have given you the BADI of MIGO is because you wrote :

The user do that by double clicking in the field "purchase order" of "purchase order data" tab in the MIGO transaction.

.

If you want to check the same in PO then write the code in the customer exit. MM06E005 .

Thanks & Regards,

Faheem.

Read only

0 Likes
1,015

thanks for the reply,

i mention that because, that's the process the user follows. he doesn't go to ME22N to change the order, he do so by double clicking in this MIGO field, and i didn't know what authorizations objects are affected or not by this way.

thanks again anyway.