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

Problem with SD_SALESDOCUMENT_CREATE BAPI

marcela_martinez
Participant
8,906

Hi everybody,

I'm having a problem with SD_SALESDOCUMENT_CREATE BAPI. It was doing ok but we are trying with a different material with a diferent UM and it doesn't work and I can't give with the solution.

RETURN table shows the following messages:

1 S V4 233 SALES_HEADER_IN procesado con éxito  000000 VBAKKOM

2 E V1 414 UM p.cantidad prevista ****** no está prevista en posición 000010 p.material 000000000000570374  000000 ******

3 E V4 248 Error en SALES_ITEM_IN 000010  000000 VBAPKOM

4 E V1 331 No existe la posición 000010 .  000000 000010

5 E V4 219 El documento de venta  no se modifica  000000

It´s in spanish because my instance has no t configured all the transaltions, but if you need to translate it please tell me.

I'm passing common and ISO UM and the material is ok for both of them (I checked it at MM02 t-code).

Kind regards!

1 ACCEPTED SOLUTION
Read only

TuncayKaraca
Active Contributor
0 Likes
4,831

Hi Marcela,

Probably you gave a value for SALES_ITEM_IN-TARGET_QTY and if it is so, you need to give also a value to SALES_ITEM_IN-TARGET_QU and/or SALES_ITEM_IN-T_UNIT_ISO

And I think probably you are already giving value to SALES_ITEM_IN-SALES_UNIT  and/or SALES_ITEM_IN-S_UNIT_ISO.

8 REPLIES 8
Read only

Former Member
0 Likes
4,831

without translation, hard to tell, but it looks like its complaining about not having a POSNR (ITEM) 10?

Read only

0 Likes
4,831

Thx David, but that message is at the end of the validations. It always appears when there are previous errors and BAPI couldn't create the item.

Here is my translation:

1 S V4 233 SALES_HEADER_IN processed 000000 VBAKKOM

2 E V1 414 UoM Target quantity UoM****** is not covered at line 000010 for material 000000000000570374  000000 ******

3 E V4 248 Error in SALES_ITEM_IN 000010  000000 VBAPKOM

4 E V1 331 Item 000010 doesn't exist.  000000 000010

5 E V4 219 Sales document was not changed 000000

Kind regards.

Read only

0 Likes
4,831

Yes, perhaps so.  Just a thought...the UoM values that got displayed as ***** are there as good data in the input, and those input values are set in Configuration?

Read only

0 Likes
4,831

Yes thet are David. I follow the BAPI with the debug and all the values are ok. I couldn't find where the E-V1-414 error appeared.

Thanks and regards.

Read only

TuncayKaraca
Active Contributor
0 Likes
4,832

Hi Marcela,

Probably you gave a value for SALES_ITEM_IN-TARGET_QTY and if it is so, you need to give also a value to SALES_ITEM_IN-TARGET_QU and/or SALES_ITEM_IN-T_UNIT_ISO

And I think probably you are already giving value to SALES_ITEM_IN-SALES_UNIT  and/or SALES_ITEM_IN-S_UNIT_ISO.

Read only

0 Likes
4,831

Thanks Tuncay, I did what you suggested but it didn´t work

I didn't wrote it but I also filled sales_schedules_in table.

Kind regards!

Read only

0 Likes
4,831

My guess is MATERIAL_UNIT_CONVERSION function module runs, so put a debug in the function module and run your process. It might help you to see what is wrong.

Read only

0 Likes
4,831

People!!! Problem solved.

The point is that MSEHI data element has a conversion routine. There are some UM that are the same (as KG) but there are anothers that not (BOL is BAG in internal code). So when you fill ITEM table you have to convert UM to the input code.

Thanks everybody for the attention and the examples.

Kind regards!