SD Program Custom development Enhancement

Dealer Campaign, Promotion and Payment Plan Calculation Enhancement

Short answer: A custom enhancement that automatically applies the discount, free goods and campaign-linked payment terms of dealer-group campaigns to the sales order. Basket conditions (minimum quantity or value, product group mix) and the campaign budget are checked, and a usage report shows how much each dealer has benefited from a campaign.

Estimated effort
L · 12–18 working days
System
ECC and S/4HANA
Tables
10
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

In the standard, discounts are kept as condition records (VK11), free goods with VBN1 and sales deals with VB21; each works on its own. Tiered campaigns based on the basket total, campaign-specific payment terms and instalment plans, a campaign budget per dealer and a warning when the budget is exceeded do not exist together in the standard. Order entry therefore applies campaigns manually, and errors are noticed only after invoicing.

Who uses it? Dealer channel sales managers, marketing and campaign teams, order entry teams and finance.

Closest standard alternatives

  • VB21 Create Sales Deal. Maintains sales deals and linked condition records; no basket condition, campaign payment terms or budget check.
  • VBN1 Create Free Goods. Maintains free goods rules; does not work together with discount and payment terms as one campaign.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
KONHConditions (Header)Header of campaign condition records and linked sales dealReadECC + S/4
KONPConditions (Item)Campaign discount rates and amountsReadECC + S/4
KNVVCustomer Master Sales DataDealer's customer group and sales areaReadECC + S/4
VBAKSales Document HeaderSales order header: dealer, date, order typeReadECC + S/4
VBAPSales Document ItemOrder items: material, quantity, free-of-charge itemWriteECC + S/4
VBKDSales Document: Business DataCampaign payment terms and fixed value dateWriteECC + S/4
KONVConditions (Transaction Data)Campaign condition lines added to the order; budget consumption (ECC)Read / writeECC only
PRCD_ELEMENTSPricing Elements (Document Conditions)Campaign condition lines added to the order; budget consumption (S/4HANA)Read / writeS/4HANA only
T052Terms of PaymentCampaign payment terms and instalment definitionReadECC + S/4
KNA1Customer Master (General Section)Dealer nameReadECC + S/4

S/4HANA notes

  • KONV → PRCD_ELEMENTS: In S/4HANA document conditions are stored in PRCD_ELEMENTS; custom code reading KONV must be adapted.

BAPIs and functions used

  • BAPI_SALESORDER_SIMULATESimulate Sales Order. Calculates the campaign price in the portal and quotation screen without creating an order
  • PRICINGPricing. Runs standard pricing after the campaign condition is added

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_KNUMACampaign (sales deal)Range / multipleKONH-KNUMA_AGNo0000004012
S_VKORGSales organizationRange / multipleVBAK-VKORGYes1000
S_KDGRPDealer group (customer group)Range / multipleKNVV-KDGRPNoB1
S_KUNNRDealerRange / multipleVBAK-KUNNRNo200510
S_AUDATOrder dateRange / multipleVBAK-AUDATYes01.11.2026 – 30.11.2026
P_BLOCKSave the order with a delivery block when the budget is exceededCheckbox—No—

Result list columns

#ColumnSource
1CampaignKONH-KNUMA_AG
2DealerVBAK-KUNNR
3Dealer nameKNA1-NAME1
4OrdersCalculated Number of orders carrying the campaign condition
5Campaign order valueCalculated Σ VBAP-NETWR (campaign items)
6Discount grantedCalculated Σ campaign condition line KWERT
7Free quantityCalculated Σ quantity of free-of-charge items
8Payment termsVBKD-ZTERM
9Remaining budgetCalculated Campaign budget − Σ discount granted
10CurrencyVBAK-WAERK

Sample result list

CampaignDealerDealer nameOrdersCampaign order valueDiscount grantedFree quantityPayment termsRemaining budgetCurrency
0000004012200510Örnek Bayi Ltd. Şti.7412,80041,28024K090158,720TRY
0000004012200534Marmara Dağıtım A.Ş.3186,45018,64512K090140,075TRY
0000004015200510Örnek Bayi Ltd. Şti.296,0004,8000K3T25,200TRY
0000004015200588Ege Bayi Ticaret A.Ş.5238,90011,9450K3T-1,745TRY
A view built with fictional sample data; not real system data.

How does the program work?

  1. The campaign is created as a standard sales deal (VB21); the campaign condition records are linked to the deal (KONH-KNUMA_AG). Extra rules such as dealer group, validity, basket conditions, free goods rule, payment terms and budget are kept per campaign number in a rule table created during installation.
  2. During order entry (VA01 or the portal) the sales order user exits (MV45AFZZ) and a pricing requirement routine run: valid campaigns are found with the dealer’s customer group (KNVV-KDGRP) and the order date, and if the basket condition is met the campaign condition is applied to the items.
  3. If the free goods rule is met, a free-of-charge item is added; for tiered campaigns the correct tier is chosen from the basket total.
  4. The campaign’s payment terms (ZTERM) and fixed value date are written to the order’s business data (VBKD); if instalment payment terms are used, the payment plan is split into instalments on the invoice.
  5. Budget check: the discount granted by the campaign so far is totalled from the campaign condition lines of open and billed orders (KONV, PRCD_ELEMENTS in S/4HANA). If the budget is exceeded, the rule either issues a warning or saves the order with a delivery block.
  6. The campaign usage report shows per dealer the campaign order value, the discount granted, the free quantity and the remaining budget. The portal or quotation screen calculates the campaign price before creating an order with BAPI_SALESORDER_SIMULATE.

Performance notes

Buffer the campaign rule table once at the start of order processing; avoid database reads per item. Instead of re-totalling budget consumption on every order, read it from a subtotal kept per campaign and reconcile it with a nightly job.

Features

  • ALV list (sort, filter, subtotals)
  • Double-click drill-down to the document From a report row the user opens the list of campaign orders and VA03.
  • Export to Excel
  • Delivered as a transport request User exit and pricing routine changes are moved from test to production with a transport request.

Authorization objects

  • V_KONH_VKOCampaign condition maintenance authorization by sales organization
  • V_VBAK_AATOrder creation authorization by order type
  • V_VBAK_VKOAuthorization to display the usage report by sales organization

Frequently asked questions

How does this differ from the standard sales deal and promotion?

The campaign's discount records still sit in the standard sales deal. The enhancement adds the basket condition, tier selection, free goods, campaign payment terms and budget check on top, so existing pricing and reporting are not disturbed.

How is the campaign budget tracked?

The budget is defined per campaign and compared with the total campaign discount in open and billed orders. Rejected items and returns are deducted from the total; the remaining budget appears in the usage report.

Does it also work for orders coming from the portal?

Yes. Because the rules run while the order is saved, they apply in the same way to orders created in VA01, by mass upload or from the portal through a BAPI.

Related reports

Let us build this program for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Dealer Campaign, Promotion and Payment Plan Calculation Enhancement