Ansicht
Dokumentation
/SAPAPO/PROMOTION_BAPI - Function Module for BAPI Promotion
ABAP Short Reference RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
Functionality
This function module creates new promotions, changes existing promotions, or deletes promotions.
Promotions are only created or changed in one planning area in a version (IMPORTING parameters iv_pareaid and iv_vrsioid). When an existing promotion is changed, the promotion is first deleted and then recreated. Therefore, all the promotion parameters always have to be transferred. Active promotions are not changed. Promotions can be created in status 'Active'. To do this, the iv_flg_lc indicator has to be set to 'X'. Then, report /sapapo/promotion_update_30 is started in a background job to activate the promotions with status "Active". Only absolute promotions are created.
Cannibalization groups can be considered but they have to be created beforehand in Customizing.
Attributes can be included. The attribute types have to be created beforehand. New attribute values can be included. They are automatically extended in table /sapapo/promaval.
Notes can be included.
Promotions can be deleted in one planning area or in multiple planning areas simultaneously. If the iv_pareaid parameter is blank, promotions are in deleted in multiple planning areas. If table it_prdel is filled in when transferred, the module is in delete mode.
Example
In the example, an absolute promotion PROM1 is created over three months, starting from March 1, 2003. Only the author EXTERN is permitted to change the promotion. The promotion is created with status "active" in the TEST planning area in version 000. No cannibalization groups are taken into account. Two attribute types are transferred with values and a note. The promotion has two levels, location and product. Product is the promotion level. Products PROD1 and PROD2 are attached to location LOC1 and product PROD1 is attached to LOCATION LOC2. The time series with the promotion values are always only assigned to promotion level (in table "it_prbody" ). The names of the time series have to be unique in the transfer data record. When the promotion is created, unique internal names are generated (GUIDs). The "prposition" field in table "it_prbody" stands for the affected characteristic combination and "prlevel" stands for the affected level (in this instance, location or product). The "iobjnm" field stands for the technical name of the characteristic.
iv_pareaid = TEST
iv_vrsioid = 000
iv_flg_lc = 'X'
it_prhead
---------------------------------------
promid PROM1
prtext TEXT
plan_kennz 9ADFCST (name of planning key figure)
perkz M
periv
startdate 01.03.2003
pm_length 3
pm_type + (+ = absolute promotion)
pm_cannib (X = take into account cannibalization)
cbgp_id
pm_change X
pm_author EXTERN
pm_status A (A = active; D = draft)
ir_prbody
------------------------------------------
PROMID PRPOSITION PRLEVEL IOBJNM CHAVL TSID
PROM1 1 1 9ALOCNO LOC1
PROM1 1 2 9AMATNR PROD1 TIME1
PROM1 2 1 9ALOCNO LOC1
PROM1 2 2 9AMATNR PROD2 TIME2
PROM1 3 1 9ALOCNO LOC2
PROM1 3 2 9AMATNR PROD1 TIME3
ir_prts
------------------------------------------
TSID TSPOS TSVALUE
TIME1 00001 100
TIME1 00002 200
TIME1 00003 300
TIME2 00001 900
TIME2 00002 800
TIME2 00003 700
TIME3 00001 222
TIME3 00002 333
TIME3 00003 444
it_prattr
------------------------------------------
PROMID ATTR_TYPE ATTR_VALUE
PROM1 ADVERTISMENT COKE FOR ALL
PROM1 HALF PRICE COKE CHEAPER
it_prnotes
------------------------------------------
PROMID TEXT
PROM1 NOTES TEXT
Notes
Further information
Parameters
ET_RETURNIT_PRATTR
IT_PRBODY
IT_PRDEL
IT_PRHEAD
IT_PRNOTES
IT_PRTS
IV_COMMIT_CONTROL
IV_FLG_LC
IV_LANGUAGE
IV_PAREAID
IV_VRSIOID
Exceptions
Function Group
APO/SAPLPROMOTIONBAL_S_LOG - Application Log: Log header data ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 6481 Date: 20240425 Time: 041052 sap01-206 ( 109 ms )