We are deriving vendor code as a characteristic from Batch master (Transaction code: MSC1N & Table MCHA) in COPA document via Billing document.
But incorrect vendor code is deriving in COPA document. This is happening only during creation of billing document through batch job. Either it is picking from previous / later billing document / Item no of billing document. Individual billing creation in VF01 no problem.
We are using COPA enhancement COPA0001and exit EXIT_SAPLKEDRCOPA_001.
Could you please suggest me which went wrong or provide me the correct enhancement or exit.