2011 Jun 28 9:33 AM
Hi all,
I know this is (primarily) an APO related question but as we have more traffic and readers here and it is a pure development task, I hope for an answer:
We want to transfer an additional customer data field for purchase order items to APO by standard CIF interface.
In ERP, we have customer extension CIFPUR01 with component function EXIT-SALMEAP_001. We extendend CIFPUORCUS and added field ZZ_BEZWEG in include CI_PUORCUS.
In the function we create entries in TABLES parameter IT_OUTPUT_CUS accordingly.
In APO, we would like to have the data in database table /SAPAPO/MMFIELD. I could not find the MMFIELD structure in any of the available exit functions.
Please, if you have an idea, let me know how to get the data to /SAPAPO/MMFIELD.
Thanks a lot in advance.
Best regards,
Clemens
2011 Jun 29 12:33 PM
obviously not really in the focus of many developers.
Anyway, let me share the solution I used:
We found SAP Note 821934 that describes the process we implemented:
As mentioned we use EXIT_SAPLMEAP_001 to transfer additinal date in extension CIFPUR01 on the ERP side.
This is called in the CIF interface for purchase orders, we used SAP Project CIFPUR01 to implement the outbound interface in R/3 retail system.
In APO, we created an implementation for the BAdI /SAPAPO/DM_PO_MNTN.
Following the instruction in the SAP note, we extende table /SAPAPO/MM_DOC, included the structure CI_PUORCUS to have the addional field(s) in this table.
The BAdI interface method CHANGE provides the tables IT_OUTPUT_CUS holding the additional data, CT_MM_DOC for transferred purchase order data and CT_POSMAP. CT_POSMAP provides a link between IT_OUTPUT_CUS and CT_MM_DOC. IT_OUTPUT_CUS has a key with document number, item, and schedule line but CT_MM_DOC has a GUID unique key.
CT_POSMAP has both keys and provides the link between the tables.
Coming from IT_OUTPUT_CUS we look in CT_POSMAP for the GUID of this document/item, then put the tgransferred field value in CT_MM_DOC record with this GUID.
BUT: Only newly created PO items provide this link in CT_POSMAP. For PO updates we must SELECT the reference from database table /SAPAPO/POSMAPN for R3OBJ = '2'. DELNR and DELPS are PO document and item number, POSID is the GUID in CT_MM_DOC.
If you want it more standard but more complex, use function
/SAPAPO/MAP_DELPS_GET_POSID for this purpose.
I have no idea if we are the only system in the world confronting this task
Regards,
Clemens
2020 Mar 23 9:43 AM
Hi Clemens.
I have the same issue, not is common.
We are working with the note 821934 and the BADI ME_CHANGE_CHARACTER was extended to add a new field.
Your information is very helpful to understand the BADI /SAPAPO/DM_PO_MNTN, thanks for that.
I'm looking for information or example code to apply the solution specifically about user exit "EXIT_SAPLMEAP_001" to be share with ABAP team because APO is new for them and We are working together to resolved and move forward.
Thanks in advance.