Incorrect item order when using CRM_COPY_PROCESS_PREPARE

Problem: you created a Follow-Up transaction in CRM but Follow-Up items are not properly connected to the original ones. There might also be an issue of missing values in newly created items.

Solution: The CRM_COPY_PROCESS_PREPARE FM sorts newly created items by HEADER and NUMBER_INT fields. Where original items are sorted by GUID. You need to copy original items to a not-sorted table and then sort them by HEADER and NUMBER_INT fields. After this you will be able to match records by index.

2 Komentarze.

  1. I have one problem, after calling the FM 'CRM_COPY_PROCESS_PREPARE’ and the FM 'CRM_ORDER_MAINTAIN’ as mentioned in the CL_CRM_ADMINH_RUN_BTIL->COPY_HEADER the values in lt_orderadm_i_com doesn’t copy the line items with product, it just copying and creating all the items without product. How to copy all the line items with product ?

    • Mateusz Adamus

      Unfortunately I do not have a solution for this problem.
      What I propose you do is to first use the CRM_COPY_PROCESS_PREPARE function and then manually add missing products to the copied items.