The overall process is separated into preparatory steps and the invoice printing.
- The threshold data from Origin & Preferences is saved in an intermediate data base table in the SAP system.
- The data is taken directly from the tresholdfile file. The file name must match the connection settings in the customizing. On success the file is deleted.
This step is performed by the report /AEB/WF_IMPORT_MMD_JOB.
In order to use the material data, it is necessary to synchronize it into the O&P Material monitor. In this step the material data gets linked to an organizational unit.
This step is performed by the report /AEB/WU_SYNC.
The functions of the O&P invoice printing have to be integrated directly into the SAP invoice printing procedure.
All document data are retrieved at runtime from the data base. After this, the data can be changed by a BAdI implementation. Next, the corresponding material monitor entry is determined. Now every item is checked whether the preference is achieved. Finally, the preference texts are generated. The requirements of the agreements with regard to language, name of the countries involved, and signature requirement are taken into account.
|Business object||Relevant types of rules|
|Invoice||Determination of organizational unit|
Several functions are available:
|Invoice||- Method /AEB/CL_WU_PB_PREF_CHK_INV_BC - determine_preference_texts (suggested)|
- Function module /AEB/WU_PB_DET_INV_PREF_TEXTS (deprecated)
|Any other business object||Function module /AEB/WU_PB_DET_CUS_PREF_TEXTS|
|Business object||BAdI method to change the data|
|Invoice||/AEB/WU_DOC_INV_01 – after_std_filling|
|Sales order||/AEB/WU_DOC_SD_01 - after_std_filling|
|Delivery||/AEB/WU_DOC_DLV_01 - after_std_filling|
|Any other business object||/AEB/WU_DOC_CUS_01 – after_std_filling|
In case you use the function module /AEB/WU_PB_DET_CUS_PREF_TEXTS, please note that you have to fill the country of departure using BAdI method /AEB/WU_DOC_CUS_01 – after_std_filling.
The determined preference texts have to be printed on the invoice. The head text can be placed at the beginning or the end of the invoice. Item texts should be printed at the corresponding item.
Besides the determination of preference texts, there are some additional methods in class /AEB/CL_WU_PB_PREF_CHK_INV_BC.
The fields VBAK-KUNNR and VBRK-LAND1 are the basis for determining the partner/country.
This method must be used to create instances.
This method specifies if the invoice document with the declarations of origin must be signed manually.
This method specifies for which item a declaration of origin may be submitted. The method returns the value of "X" if a declaration of origin may be submitted, and the value of '"-" if no declaration of origin may be
submitted. The method can be called in the invoice printing process at runtime to trigger further processes
relating to the declaration of origin according to the status of individual items.
The following conditions must be met before the method can select the correct preference text:
- The “ex-works price” is relevant for determining preference. The method needs to have this value indicated in the calculation subtotal field VBRP-KZWI5. This means that the “ex-works price” must already appear in this field when the preference text is selected. The ex-works price is to be specified for a quantity of 1.
- The invoice must already be posted in the SAP system – that is, available under the document number in the SAP database.
- The following logic is applied for returning the preference texts:
- The preference text that occurs most frequently in the items is returned at the header level.
- Only if a preference text at the item level differs from the text at the header level, it is also returned at the item level.
- If no item is entitled to preference, no text is returned at the header level.
The method provides the preference texts for a document at runtime, so it can be integrated into the invoice printing process in order to print the correct preference texts.
This method returns an indicator that specifies for the invoice if a declaration of origin may be submitted. The method returns the value of "X" if a declaration of origin may be submitted, and the value of '"-" if no declaration of origin may be submitted.
The invoice must already be posted in the SAP system – that is, available under the invoice number in the SAP database.
The method provides the preferential origins of the invoice items if it is necessary to print these on the invoice item. The corresponding agreement provides if it is necessary.
This method determines the non-preferential country of origin ("non-preferential origin") from the Material Monitor threshold data (/AEB/WUMMDMON) for every item. If no value can be determined from the data, the country of origin from the material master is returned.
Updated over 1 year ago