Configuring a document type in the target company
We want to post a cross-company posting in the target company with a different document type than in the source company. The reason for that is that asset depreciations (with external numbering) are in fact made cross-company (yes I know, we should in fact move the asset to the target company, but originally all assets were entered in one company, and depreciated in the target company). The document in the target company, since it uses also the externally numbered AF doctype, receives the same number as in the source company, which makes the document numbering non-contiguous. Changing the document type in the target company to another value with internal numbering should correct that.
Is there a way to configure the document type in the target company? If not, would you still advise to move the assets to the target company?
There are many ways to achieve this goal. For one, there are the filters in the SALE configuration where you can define simple mappings and value transformations -- a bit complicated to set up but they do the job.
I normally prefer doing the remapping in the code. If it is as simple as you describe you may decide to use one of the user exits of the inbound IDoc function to code the desired mapping.
If you have to do more complicated mappings, I suggest to build a wrapper function for the IDOC_INVOIC_INVOIC_xx that does first the transformation and then calls the original function.
This was first published in March 2007