2012 Apr 11 5:03 PM
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!
2012 Apr 11 6:15 PM
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.
2012 Apr 11 5:10 PM
without translation, hard to tell, but it looks like its complaining about not having a POSNR (ITEM) 10?
2012 Apr 11 5:19 PM
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.
2012 Apr 11 5:27 PM
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?
2012 Apr 11 5:40 PM
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.
2012 Apr 11 6:15 PM
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.
2012 Apr 11 6:46 PM
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!
2012 Apr 11 6:57 PM
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.
2012 Apr 11 6:59 PM
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!