‎2014 Oct 15 2:16 PM
Hello All,
I'm using BAPI_PO_CHANGE to add a new line item to Purchase order of standard BSART type NB.
Line item is getting added to PO correctly as well as components. The problem is that field Batch is not getting copied to components.
in the line item table I'm using material 6850 with quantity 9.
Then in the components tab I'm adding 3 lines (taken from my report) like this
1 - material 6850, qty 2, batch NNBT1
2 - material 6850, qty 3, batch NNBT2
3 - material 6850, qty 4, batch NNBT3
I'm also filling componentsx tab as the components are getting added to the line item.
After executing BAPI I see that the new line item was added with the components and quantities but only thing missing is the batch field that is left blank.
I can see that after executing BAPI, besides my 3 lines, there are also 2 more lines with materials 6356 and 6368 belonging to the material BOM.
I'm not a functional guy so not sure how to proceed.
Material 6850 is the header material of the BOM, Should I change the BOM and add the material 6850 to items?
Am I missing any parameter in components table when calling the BAPI?
Any ideas how to resolve?
EDIT: I found that there's a program validation in FM MAP2I_BAPICOMP_TO_MEPOCOMP within BAPI_PO_CHANGE. I think LOG_MM_OM_1 and LOG_MMFI_P2P are business functions. I do not think activating this is an option in my system (not sure about the impact).
I checked some OSS Notes but they are not releveant for my system.
Note 666888
1230268 - Field Vendor Batch never filled for PO BAPIs
758810 - BAPI_PO_CHANGE vendor batch and batch not visible
Thanks in advance!
Regards!!
‎2014 Oct 16 2:34 AM
Hi Emanuel,
If you manually edit the PO in ME22 and set the batch number, does it save correctly. When you check the document after save, do you get any errors?
Hopefully this should highlight any potential issues, if any are present.
Cheers,
Katan
‎2014 Oct 16 3:48 PM
Hi Katan,
Yes It saves correctly in ME22N.
It was resolved using enhancement defined in FMs MAP2I_BAPICOMP_TO_MEPOCOMP and MAP2I_BAPICOMPX_TO_MEPOCOMPX.
Thanks for your reply!
Regards!
Emanuel.