Fonction SAP BAPI_PROMO_CREATE - Create a Promotion

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
PROMOTION_HEADER BAPI1068I2 u 157 Promotion Header Data
PROMO_REF BAPI1068I3 u 52 X Interface Structure for Higher-Level Promotion
SOA_SERVICE XFELD C 1 ' ' X Checkbox

Paramètre Reférence Type Long. Description
PROMOTION BAPI1068I2-PROMOTION C 10 Promotion Number

Paramètre Reférence Long. Facultatif Description
DISCOUNTS BAPI1068T31 125 X Promotion Discounts
EXTENSIONIN BAPIPAREX 990 X Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
ITEMS BAPI1068T8 278 X Promotion Items
PLANTGROUPS BAPI1068T9 95 X Plant Groups
PLANTS BAPI1068T25 32 X Table Parameter: Plants (Changeable)
RETURN BAPIRET2 548 Messages
TEXTS BAPI1068T29 43 X Promotion Descriptions
THEMES BAPI1068T10 4 X Themes

Functionality
You use this method to create a promotion.
Promotions that were planned in another SAP system or a non-SAP systemcan be created in the system using this method.
In the SAP information system, for example, you can define an exceptionthat selects the articles and sites for a promotion. You can assign thisexception to a workflow task, which calls the method to create thepromotion. As of Release 4.6, workflow task 'PROMO_CREATE' is providedfor this.
In addition to header data for the promotion, you can create articledata, themes and site groups. You cannot use this method to createpromotion assortment modules and assign these to site groups. Also, youcannot carry out subsequent processing steps such as price activation orallocation table generation with this method.
You can perform a test run for the method, which means that no data issaved to the database.

Notes
The authorization for authorization object S_TCODE for transaction WAK1is checked.
The promotion type assigned to the promotion must be created inCustomizing for the promotion.
The method performs all the necessary consistency checks, and returnsall messages as a return table. The return values and their meanings canbe found in the parameter documentation.
The key fields used by the method are described in the parameters.

Description
Promotion: Promotion number

Description
Header data for the promotion.
For information on the meaning of the fields, see the relevant dataelement documentation.

Description
Table of promotion discounts.

Description
Table of promotion items.
For information on the meaning of the fields, see the relevant dataelement documentation.

Description
Table of plant groups.
For information on the meaning of the fields, see the relevant dataelement documentation.

Description
Error messages forthe method

Value range
If errors occur, the following error messages are issued:
TYPE ID Number Message
E WU 670 You do not have authorization for this transaction
E WU 194 Promotion type missing. Promotion cannot be created
E WU 247 Promotion type & is not defined
E WU 354 No number range interval is maintained for promotion
type &.
E WU 355 External number assignment not allowed for promotion
type &.
E WU 356 Internal number assignment not allowed for promotion
type &.
E WU 034 Promotion & already exists. Please choose another
nubmer.
E WU 032 Number range interval & does not exist
E WU 705 The promotion number must be in the interval & - &
W WU 357 Language code not found. Log-on language & used
instead.
E WU 358 Currency & (ISO: &) does not exist in system
W WU 280 Theme & does not exist. Assignment of material to
theme deleted
W WU 083 Aktionsthema & ist bereits erfaßt.
E WU 696 Error reading material master data
E WU 009 Material & does not exist
E WU 227 Material & does not have a sales unit, so cannot be
created
E WU 689 Unit of measure & does not exist in the system
E WU 718 Unit of measure & is not assigned to material &
E WU 688 No currency was entered in the header data for the
price.
E WU 693 No price unit was entered for the sales price
E WU 717 Price & is too high
E WU 224 No entry exists for plant & in the customer master
E WU 692 The calculated planned business volume &1 (&2 * &3/&
4) is too high
E WU 719 No unit of measure was entered for the purchase price
for material &
E WU 694 No price unit was entered for the purchase price
E WU 087 Promotion theme & is not assigned to the promotion
E WU 690 No unit of measure was entered for allocation
quantity
W WU 702 Material & with unit of measure & is already entered
E WU 702 Generic matl with units of measure as variants not
allowed in promotion
E WU 700 Generic material & and price-dependent variant
were added
E WU 701 Internal error reading the variants for the generic
article
E WU 703 Pricing reference material & of variant & is not in
promotion
E WU 704 Variant & of pricing reference material & is not in
the promotion
W WU 722 Material &: Sales price/price unit was adopted from
pricing reference material &
W WU 698 Planned sales quantity of generic matl & was adjusted
to variant total
W WU 699 Planned alloc. quantity of generic matl & wasadjusted
to variant total
E WU 720 The calulated planned sales & of generic material &is
too high
E WU 721 Generic material & and its variants were not assigned
to the promotion
E WU 707 Plant group & is incomplete: Plant group number or
class type missing
E WU 735 Class type & is not allowed in the promotion
E WU 729 Plant group & has not been created
W WU 049 Plant group & is already entered
W WU 644 Reference plant &1 does not exist
W WU 458 Distribution chain (DChannel, SOrg) incomplete
W WU 738 Sales organization & does not exist
W WU 643 Distribution chain &1 &2 does not exist
W WU 730 Price activation type & is not defined
I WU 030 Promotion & is created
E WU 706 DB error during creation of promotion &

Description
Table of promotion discriptions.

Description
Table of themes.
For information on the meaning of the fields, see the relevant dataelement documentation.