Application Development 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: 

Handling Unit Contains Items that cannot be assigned - How to resolve?

pbist0103
Participant
0 Kudos
1,047

Hello,

We are facing the HUDAILOG(157) error and we know the business reason for the SAP standard throwing this error but the customer still wants this to be done and they want it their way. Now, if we by pass this check in the FM using some implicit enhancement spots will it make the system do the assignments or is there any other way to get this done?

2 REPLIES 2

Sandra_Rossi
Active Contributor
932

I guess you would be very very lucky that someone who has this exact knowledge reads your question on time, so I recommend that you contact SAP Consulting, to get in touch with SAP experts in this domain. (and you'll have to provide all the details)

pbist0103
Participant
0 Kudos
932

This can be done - In VL02N the user is getting the HUDIALOG (157) error because they are trying to assign new batch, location, or storage in the HU. This is not allowed as per the standard SAP program. To overcome this the solution would be to suppress the ABAP code in the line 1186 onwards written inside the ELSE part in the subroutine MATCH_ITEMS of the include LV51PU26 of the Function Group SAPLV51P. This subroutine is triggered from the Function Module V51P_ADD_HU_TO_OBJEKT. But at a huge risk this ELSE part is obviously triggered when the check in the IF side fails and it will create a document that has master data related issues and would be risky. If one has the permission one can put their own custom checks and balances do an enhancement and it would be working. But don't do it or ask SAP consulting if they can provide some options.