cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation quantity cannot be changed by BADI

Former Member
0 Kudos

Hi All,

I have a requirement to change the quantity value in the confirmation at runtime. I used the method BBP_CONF_CHANGE of BBP_DOC_CHANGE_BADI. When the quantity is changed in the import parameter IT_ITEM it is not getting reflected in the confirmation screen.

I tried moving the value of IT_ITEM to export parameter ET_ITEM, but the table ET_ITEM doesn't have the quantity field in it. Is it something that cannot be changed or do we have some other BADI to take care of this change.

Thanks & Regards,

SRS

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi. Why do you want to change the quantity?

Is the quantity not something the user should carefully check and key in the correct quantity so that 3 way matching will be accurate?

Regards,

Dave.

Former Member
0 Kudos

Hi,

There is a custom field which is used to type in the actual quantity received. The standard quantity field will have a value relative to the lease duration of the item. So based on the quantity entered in the custom field the lease of the item should be calculated and entered in the standard quantity field. At this point I use the BBP_DOC_CHANGE_BADI. The business process we follow here is little bit complex to explain.

So here is the requirement that has to be fulfilled. The quantity in confirmation has to be edited as per the user entered value in the confirmation (custom field) and posted. But as I had already mentioned the method BBP_CONF_CHANGE of the badi BBP_DOC_CHANGE_BADI does not have the quantity field in the export parameter ET_ITEM to be changed.

Thanks & Regards,

SRS

Former Member
0 Kudos

Hi. You are correct, item quantity is not available in the doc change BADI.

Can you not use the BBP_DOC_CHECK_BADI to calculate what the quantity should be, and issue an error message if the user has not entered the right quantity?

That will force the user to enter the right quantity. You could also get rid of the custom field and let them enter it in the normal field.

If you are not using the portal you could issue the error with a message statment instead of putting it in ET_ERROR in the BADI, that way the user will get a pop up box telling them "quantity should be xxxxx". I have not tried this method in the portal, but I know pop ups are a bit odd in there, so this might not be possible that way.

Regards,

Dave.

Former Member
0 Kudos

Hi David,

The custom field is the quantity determining field in confirmation. Because the actual quantity field will have the lease duration term in it. The payment is made to the supplier as per the lease term and so the receiving quantity is maintained in the custom field.

Based on the receiving quantity, the actual quantity should be altered programmatically. An this is where our DOC_CHANGE badi comes into picture.

The DOC_CHECK badi is used in order to make sure that the user is not changing the confirmation quantity. The custom receiving quantity field should only be entered. DOC_CHECK badi has a ET_MESSAGE table which can be populated to throw the message to the user.

Anyway I'm working on it. I will update the message if I get a solution.

Regards,

SRS