Ansicht
Dokumentation
WRF_DISPRO_TD_DF_ASSIGN - Assign Time-Dependent Default Values to Promotions
rdisp/max_wprun_time - Maximum work process run time RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
Functionality
This function module creates or updates time-dependent promotion data with default values in the database table WRF_DISPRO_TD. Time-dependent promotion data is only processed on level 2 and level 3 of the database table. No time-dependent promotion data on level 1 is created or updated.
As a minimum, you must make an entry in the imported range table IT_AKTNR. The system reads the promotion header table WAKH for all promotions of the range table (if the corresponding import parameter IT_WAKH is not already filled).
If the import parameter IT_DISPRO_DF_Q contains change pointers for promotions, the promotions in question must also be contained in IT_AKTNR/IT_WAKH. These promotions will not be processed completely, but only partly, as defined by the change pointers. Prerequisites for the change pointer table are the following:
- At least AKTNR and ARTNR are filled
- If there is already an entry where AKTNR/ARTNR are filled and KUNNR is empty, no entries for a combination of AKTNR and ARTNR with filled KUNNR are allowed.
The promotions are locked for processing. The system does not process promotions that cannot be locked and instead raises a message that the promotion in question is already locked.
For each promotion, the system assigns default values to time-dependent promotion data in the following way:
- First, the promotion item data (database table WAKP) and the material to store assignments of the promotion (database table WALE) are read.
- If there are no entries in the database table WAKP, the system does not process the promotion in question any further.
- If there are entries in database table WALE, time-dependent promotion data on level 3 is processed for the promotion in question. No time-dependent promotion data on level 1 and level 2 is created.
- If there are no entries in database table WALE, the import parameter I_ONLY_ACTIVATED_PROMO determines what the system does next:
- If the import parameter I_ONLY_ACTIVATED_PROMO is selected (meaning that default values are assigned to activated promotions only), the promotion is not processed any further.
- If the import parameter I_ONLY_ACTIVATED_PROMO is not selected, time-dependent promotion data on level 2 is processed.
When assigning default values to time-dependent promotion data, the system always checks a) whether time-dependent promotion data for the level in question already exists and b) whether default values already exist.
If no default values exist, the system raises a message that no time-dependent promotion data can be processed.
Otherwise, the system creates new time-dependent promotion data or updates the existing data if it has not yet been manually created or changed.
Time-dependent promotion data on level 2 is processed for all materials of the promotion.
Time-dependent promotion data on level 3 is processed for all combinations of material and supplying plant and material and supplied plant of the promotion. If a plant is both supplying and supplied, the system processes the time-dependent promotion data for the supplying plant, since this has a higher priority.
For level 2, the system assigns all default values to the time-dependent promotion data without validity periods.
For time-dependent promotion data on level 3, the system enters validity periods.
For both levels, the system enters the value 1: Automatically Createdin the field DISPRO_SOURCEand sets all Sendflags to initial.
Before the time-dependent promotion data is stored to the database, the BAdI methods DELETE_BEFORE_SAVEand CHANGE_BEFORE_SAVE of the BAdI Change Time-Dependent Data for Promotions are called. Within these methods, users can delete or change some of the time-dependent promotion data before it is stored to the database.
The system inserts or updates all processed time-dependent promotion data in the database table WRF_DISPRO_TD.
The export parameters ET_DISPRO_TD_INS and ET_DISPRO_TD_UPD are filled with this data.
All error messages are written in the parameter CT_MESSAGES.
Example
Notes
Further information
Parameters
ET_DISPRO_TD_INSET_DISPRO_TD_UPD
ET_MESSAGES
IT_AKTNR
IT_DISPRO_DF_Q
IT_WAKH
I_ONLY_ACTIVATED_PROMO
I_TIMESTAMP
Exceptions
DATA_LOCKEDNO_DATA
Function Group
WRF_MAINT_DISPRO_DEFAULTAddresses (Business Address Services) ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 6950 Date: 20240605 Time: 181046 sap01-206 ( 108 ms )