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

bapi_po_create1 Order unit cannot be used

Former Member
0 Likes
3,496

Hello everyone,

I'm using the BAPI_PO_CREATE1 to create a purchase order, but it's giving me the following error:

"Order unit MGW cannot be used", i'm using a material with the unit MGW defined in MM02.

Any ideas?

Thanks,

Fábio Galvã

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,228

I think you need to use the Conversion Routine :- CONVERSION_EXIT_CUNIT_INPUT for internal representation of order unit( MEINS). U have to pass MGW and u will get the internal representation of it, and that can be passed to ur BAPI.

9 REPLIES 9
Read only

Former Member
0 Likes
2,228

Hi,

Are you getting the same error while trying to create PO through tcode ME21N?

Regards

Vinod

Read only

Former Member
0 Likes
2,229

I think you need to use the Conversion Routine :- CONVERSION_EXIT_CUNIT_INPUT for internal representation of order unit( MEINS). U have to pass MGW and u will get the internal representation of it, and that can be passed to ur BAPI.

Read only

Former Member
0 Likes
2,228

Hi,

Check in trasaction: CUNI, whether 'Commertial meas.unit' has been checked for MGW or not. If not check and try.

--

Reddy

Read only

0 Likes
2,228

Hi everyone,

Thanks for the replies.

Passing my unit through CONVERSION_EXIT_CUNIT_INPUT it gives me the same MGW.

I went to CUNIT and it has the check in 'Commertial meas.unit'.

I tried going to the transaction ME21N and it gave me this error "Please check units of measure and conversion factor"

Any Ideas were I can solve this?

Thanks,

Fábio Galvã

Read only

0 Likes
2,228

Hi,

Check the purchase info record data of this material/UoM in EINA & EINE Tables. Also check the conversion factors in MARM Table

Regards

Vinod

Edited by: Vinod Kumar on May 12, 2010 5:02 PM

Read only

0 Likes
2,228

In trasaction KUNI itself, there is one block for 'Conversion', values are maintained there?

--

Reddy

Read only

0 Likes
2,228

Thanks for all the replies,

I've given points to all the helpfull replies.

I've managed to create the PO with the unit I wanted, MGW, butt it only placed the unit in 'Order Price Unit (Purchasing)' and placed UN on 'Purchase Order Unit of Measure'. My requirement is to create a PO with MGW on both fields.

Is there any other field I need to fill so that the BAPI creates a PO like I need?

Thank you,

Fábio Galvã

Read only

0 Likes
2,228

Any ideas?

Read only

0 Likes
2,228

To pass this problem, after the call of BAPI_PO_CREATE1 I called BAPI_PO_CHANGE passing the other unit, making both units equal.

Thank you.