cancel
Showing results for 
Search instead for 
Did you mean: 

Ud Code Not To be changed.

former_member553099
Participant
0 Kudos


Dear all,

Ud code once given it should not to be changed in an inspection lot

Without removing QA12 T code we need to do this.

Kindly suggest your suggestions.

Regards,

U.linganathan

Accepted Solutions (0)

Answers (2)

Answers (2)

gianmaria_leoni
Explorer
0 Kudos

Dear Linganathan U,

As I undertood, you want to let users use QA12 but in any case they can't change an already taken UD so it is not feasible to use authorizations checks.

You can try to check "INSPECTIONLOT_UPDATE" BAdI:

     CHANGE_AT_SAVE     Change Inspection Lot When Saving

     CHANGE_BEFORE_UPDATE     Change Inspection Lot Before Accessing Update

     CHANGE_IN_UPDATE     Change Inspection Lot in Update

     CHANGE_UD_AT_SAVE     Change Usage Decision When Saving

     CHANGE_UD_BEFORE_UPDATE     Change Usage Decision Before Accessing Update

     CHANGE_UD_IN_UPDATE     Change Usage Decision in Update

     CREATE_AT_SAVE     Create Inspection Lot When Saving

     CREATE_BEFORE_UPDATE     Create Inspection Lot Before Accessing Update

     CREATE_IN_UPDATE     Create Inspection Lot in Update

     SET_UD_AT_SAVE     Make Usage Decision When Saving

     SET_UD_BEFORE_UPDATE     Make Usage Decision Before Accessing Update

     SET_UD_IN_UPDATE     Make Usage Decision in Update

In particular may help you methods:

CHANGE_UD_AT_SAVE,

There you can check if the UD set by the user have been changed from the one stored in the DB and in this case you can raise an exception with error message "You can not change UD." avoiding the saving.

Hope this could help you.

BR

Gianmaria

john_lutz
Active Participant
0 Kudos

Hi,

Lock it down through security, where only select users may have authorization to QA12.

Regards,

John


busyaban7
Active Contributor
0 Kudos

Hi U Linganathan,

I would like to add one point on John's correct feedback.

Yes, it's true that someone with super user role or QA12 access can change the UD. But here you also need to analyze the behavior what your user is trying.

Pls note that normally UD codes are linked to stock posting proposals, to move the Q-stock to unrestricted or blocked stock. But normally, this stock posting works in one direction only. For example, if UD = A is applied, then the stock will be posted to unrestricted stock. Now if you change UD code to R means reject, though at the transaction level you can change the UD code, but the stock posting will not change automatically from unrestricted to blocked stock. There is one more catch involved here. If stock quantity is available in the same storage location, you can try creating a follow up action linked to UD code to work on background to do material movement accordingly.

Thanks,

Arijit