cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module to convert base quantity to the nearest order unit for a material

0 Kudos

Dear Folks,

I have created a program to create PR, which uses the 'BAPI_REQUISITION_CREATE'. My requirement is the BAPI should take care of the quantity conversion like how standard ME51 behave.

For example, a material ABC with 'EA' as base UOM and 'BOX' as Order Unit. and.

Quantity conversion is maintanied as One Box = 28 EA.

When the material ABC is entered in ME51N with the quantity as 2. System automatically convert the quantity to 28 (rounding of nearest Order Unit) while creating PR. But bapi 'BAPI_REQUISITION_CREATE' is not taking care of this unit conversion to the nearest order Unit. If I input 2 as the quantity to the BAPI, it is creating PR with 2 EA instead of 28 EA. Do we need to pass any parameters to the BAPI or is there any function module to converted the entered quantity to the nearest order unit for a material? Please suggest.

I have already searched SDN, but coudln't able to find proper solution unless I have to do it manually.

Thanks in advance

Santosh

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Santosh,

Can you please check FM: MATERIAL_UNIT_CONVERSION

Regards,

Akshat

0 Kudos

Dear Akshat

Thanks for the response. I have already tried this function module. it is just converting from Alt UOM to base UOM. If I give 2 as input quantity, function module output is giving as 56. It supposed to give 28 for my requirement, as it should consider the nearest order unit quantity for a given quantity.

Thanks.

0 Kudos

Hi Santosh,

Can we have Order Unit in Purchase Requisition, as you have mentioned:

"When the material ABC is entered in ME51N with the quantity as 2. System automatically convert the quantity to 28 (rounding of nearest Order Unit) while creating PR" (Is there any enhancement)

As per SAP Note 20847 - ME51(N): Always only base UoM in PReq

This function is not provided and is also not included in later Releases.

Also:

https://archive.sap.com/discussions/thread/927548

https://archive.sap.com/discussions/thread/1212529

You might have gone through the above points, but i could only find these.

Regards,

Akshat