SAP SD / Order-to-Cash (OTC)
Key Function Modules & Technical Reference Guide
Prepared by: Satyendra Mittapalli | SAP SD Lead Consultant | 14 Years in Leading SAP SD/OTC projects & transformations
Covers: Implementation | Rollouts | AMS (Application Management Services)
- Sales Order Management (VA01 / VA02 / VA03)
Sales Order Management is the core of SAP SD. It covers the entire lifecycle of a customer order from creation to delivery trigger. Key function modules used in implementations and AMS support:
Function Module | Description | Used In |
SD_SALESDOCUMENT_CREATE | Create sales orders / quotations / contracts programmatically | Implementation, Interfaces |
SD_SALESDOCUMENT_CHANGE | Modify existing sales document fields via BAPI wrapper | AMS, Enhancements |
BAPI_SALESORDER_CREATEFROMDAT2 | Most common BAPI to create sales orders with full data | Rollouts, Interfaces |
BAPI_SALESORDER_CHANGE | Update quantity, dates, item data in existing orders | AMS, Workflow |
BAPI_SALESORDER_GETLIST | Retrieve list of sales orders by customer/date range | Reporting, Interfaces |
SD_SALESDOCUMENT_CHECK | Perform checks on sales document (pricing, ATP, credit) | Enhancements |
RV_PRICE_PRINT_HEAD | Read pricing header data for sales document | Smartforms, Reports |
RV_PRICE_PRINT_ITEM | Read pricing item-level data for conditions | Smartforms, Reports |
Key Tables (Sales Order)
Table | Description |
VBAK | Sales Document Header |
VBAP | Sales Document Item |
VBEP | Sales Document Schedule Line |
VBKD | Business Data (Incoterms, Payment Terms) |
VBPA | Partners (Sold-to, Ship-to, Bill-to, Payer) |
VBUV | Incompletion Log for Sales Documents |
- Pricing & Condition Techniques (VK11 / VK12 / V/06)
Pricing is one of the most complex areas of SAP SD. It uses a condition technique — condition types, access sequences, condition tables, and pricing procedures — to determine net value.
Function Module | Description | Used In |
PRICING | Core pricing function module — triggers full pricing on document | Enhancements, BAdIs |
RV_PRICE_PRINT_ITEM | Reads condition records for output/reporting | Smartforms, ALV |
BAPI_PRICES_CONDITIONS | Read pricing conditions from condition records | Interfaces, Reports |
SD_COND_ACCESS | Access condition records via access sequence | Custom Pricing Logic |
CONDITION_RECORD_READ | Read a single condition record | Debugging, Reports |
PRICING_CHECK | Validate pricing before document save | User Exits |
RV_CONDITION_COPY | Copy conditions from source to target doc | Rollouts |
CKMVFM_CREATE_ITEM | Create material ledger items for pricing | CO-PC Integration |
Key Configuration Objects
Object | Transaction | Purpose |
Condition Type | V/06 | Define pricing element (PR00, K004, MWST, etc.) |
Access Sequence | V/07 | Determine search strategy for condition records |
Condition Table | V/03 | Define key combination for condition records |
Pricing Procedure | V/08 | Sequence of condition types with step/counter/requirements |
Pricing Procedure Determination | OVKK | Assign pricing procedure to sales area + doc pricing proc + cust pp |
Condition Records | VK11/VK12 | Maintain actual prices, discounts, surcharges |
- Availability Check & ATP (Available-to-Promise)
ATP checks ensure product availability before confirming delivery dates. In implementations, this is heavily configured per plant, checking rule, and MRP type.
Function Module | Description | Used In |
AVAILABILITY_CHECK | Core ATP check for sales order items | Order Creation/Change |
MD_AVAILABILITY_CHECK_CUST | Customer-specific ATP check call | Custom Enhancements |
BAPI_MATERIAL_AVAILABILITY | Check material availability via BAPI | Interfaces, APO |
CO_ZF_AVAILABILITY_CHECK | Extended ATP check with scope of check | Implementation |
SD_DELIVERY_BACKORDER_PROC | Process backorder situations in delivery | AMS, Batch Jobs |
ATPQ_ATP_QUANTITY_COMPUTE | Compute ATP quantity for a material | Reporting, Custom Tools |
Key Configuration: Availability Check
- Checking Group: Assigned in Material Master (MRP 3 tab) — 01 (Daily), 02 (Individual)
- Checking Rule: Assigned per sales document type — controls which stock types are considered
- Scope of Check (OVZ9): Defines which elements (open orders, deliveries, GI, GR) are included
- Plant Determination: Drives from item category + schedule line category configuration
- Backorder Processing: Transaction V_V2 for rescheduling and realignment
- Shipping & Delivery Processing (VL01N / VL02N / VL10)
Delivery processing converts confirmed sales orders into outbound deliveries, handles pick/pack operations, and triggers goods issue (GI) — the key inventory and revenue recognition event.
Function Module | Description | Used In |
WS_DELIVERY_CREATE | Create outbound delivery from sales order | Background Jobs, Interfaces |
BAPI_OUTB_DELIVERY_CREATE_SLS | BAPI for creating outbound delivery from sales order | Implementation, Interfaces |
BAPI_OUTB_DELIVERY_CONFIRM_DEC | Confirm decentralized goods issue | WM Integration |
BAPI_OUTB_DELIVERY_CHANGE | Change delivery header/item data | AMS, Enhancements |
BAPI_GOODSMVT_CREATE | Post goods movement (GI = Movement Type 601) | GI Posting |
WM_TRORDER_CREATE | Create transfer order for WM picking | WM/EWM Integration |
SD_DELIVERY_UPDATE_PICKING | Update picking qty in delivery after WM confirmation | WM BDE Integration |
RV_DELIVERY_PRINT_VIEW | Prepare data for delivery output (packing list, BOL) | Smartforms, Output |
Key Tables (Delivery)
Table | Description |
LIKP | Delivery Header |
LIPS | Delivery Item |
VTTP | Shipment Item |
VTTK | Shipment Header |
NSDM_V_LIPS | View: Delivery Items with Stock Info |
- Billing & Invoice Processing (VF01 / VF02 / VF04)
Billing is the revenue recognition step in OTC. It draws from deliveries (or orders) to create invoices, debit/credit memos, and pro-forma invoices. Integration with FI is critical.
Function Module | Description | Used In |
RV_BILLING_CREATE | Core FM to create billing documents (used by VF01/VF04) | Background Jobs, Custom |
BAPI_BILLINGDOC_CREATE | BAPI to create billing documents | Interfaces, EDI |
BAPI_BILLINGDOC_CREATEFROMDATA | Create billing with full data input | Rollouts, Implementation |
BAPI_BILLINGDOC_CANCEL | Cancel a billing document | AMS, Reversal Process |
SD_BILLING_BLOCK_SET | Set billing block on sales order | Credit Management |
BILLING_SCHEDULE_CREATE | Create milestone billing plan entries | Project / Contract Billing |
FI_DOCUMENT_POST | Post FI document from SD billing | FI-SD Integration |
BAPI_ACC_DOCUMENT_POST | Post accounting document via BAPI | Revenue Account Determination |
Revenue Account Determination (VKOA)
- Account Key: Links condition type to GL account (e.g., ERL = Revenue, ERS = Sales Deductions)
- Chart of Accounts + Sales Org + AcctAssGrp Material + AcctAssGrp Customer: Access sequence for GL
- Condition Table T030: Maps account keys to GL accounts
- VKOA Transaction: Maintain revenue account determination
- Integration: Billing posts to FI as an accounting document (BKPF/BSEG tables)
- Credit Management (FD32 / VKM1 / UKM_MY_ACCOUNTS)
Credit Management integrates SD with FI-AR to control order acceptance based on customer creditworthiness. Classic Credit Management (FI-AR) and the newer SAP Credit Management (FSCM-CR) are both used in enterprise rollouts.
Function Module | Description | Used In |
SD_ORDER_CREDIT_CHECK | Perform credit check on sales order | Order Creation BAdI |
BAPI_CREDITCHECK_EXECUTE | Execute credit check via BAPI | Interface, Workflow |
UKM_CREDIT_EXPOSURE_GET | Get credit exposure for FSCM credit management | FSCM Integration |
FI_CREDIT_MGMT_POSTING | Post credit data to credit management | FI Integration |
CM_CREDIT_ACCOUNT_GETDETAIL | Get credit account details | Reports, Monitoring |
RV_CREDIT_BLOCK_SET | Set/release credit block on document | Workflow, AMS |
Credit Check Configuration Points
Config Step | Transaction | Purpose |
Credit Control Area | OB45 | Organizational unit for credit management |
Risk Category | OVA8/UKM_CASE | Defines check type: static, dynamic, doc. value |
Credit Group | OVAK | Groups doc types for credit check (01=Orders, 02=Deliveries) |
Credit Limit | FD32 | Maintain customer credit limit and exposure |
Automatic Credit Control | OVA8 | Define credit check behavior per risk category |
Workflow for Release | VKM1/VKM3 | Release blocked orders / deliveries |
- Output Determination & Message Control (NACE)
Output determination controls document outputs: order confirmations, delivery notes, invoices, packing lists, and EDI messages. It uses condition technique-based output control.
Function Module | Description | Used In |
RSNAST00 | Process output messages (batch-compatible) | Background Jobs |
NAST_CREATE | Create output message record for a document | Enhancements |
NAST_SEND | Trigger sending of output message | Enhancements, Workflow |
RV_MESSAGES_MAINTAIN | Update output records on sales document | Custom Output Trigger |
SO_DOCUMENT_SEND_API1 | Send email output via SAP Business Workplace | Email Output |
OPEN_FORM / CLOSE_FORM | SAPscript form open/close (legacy output) | Legacy Systems |
SSF_FUNCTION_MODULE_NAME | Get function module name for a SmartForm | SmartForms Output |
FP_FUNCTION_MODULE_NAME | Get function module name for Adobe Form | AdobeForms Output |
- Partner Determination & Customer Master
Partner determination assigns the correct partner roles to sales documents. This is critical in implementations — wrong partner determination causes downstream failures in billing and shipping.
Partner Function | Description | Key Table |
SP (Sold-to Party) | Customer placing the order — main account | KNA1, KNVV |
SH (Ship-to Party) | Location receiving the goods | KNA1, KNVV |
BP (Bill-to Party) | Party receiving the invoice | KNA1, KNVV |
PY (Payer) | Party responsible for payment | KNA1, KNVV |
PE (Person Responsible) | Sales rep / contact person | KNVP |
WE (Goods Recipient) | Alternative ship-to at item level | KNA1 |
RE (Invoice Recipient) | Alternative bill-to at item level | KNA1 |
VE (Sales Employee) | Internal sales employee | PA0001 (HR) |
Key Function Modules — Partner & Customer
Function Module | Description | Used In |
BAPI_CUSTOMER_GETLIST | Get list of customers with filter criteria | Reports, Migration |
BAPI_CUSTOMER_GET_DETAIL | Get customer master detail (all views) | Interfaces, Validation |
BAPI_CUSTOMER_CREATEFROMDATA1 | Create customer master via BAPI | Migration, Interfaces |
BAPI_CUSTOMER_CHANGE | Change customer master data | Mass Change Tools |
SD_PARTNER_DETERMINE | Determine partners for sales document | Enhancements, BAdIs |
READ_KNVV | Read customer sales data (KNVV) | Reports, Pricing |
- Material Determination, Listing & Exclusion
Material determination allows automatic substitution of materials based on conditions. Listing and exclusion control which products a customer can order from specific sales areas.
Function Module | Description | Used In |
SD_MATERIAL_DETERMINE | Execute material determination check | Order Entry Enhancement |
SD_COND_PRODUCT_SELECT | Select product substitutes from condition records | Substitution Logic |
MD_MATERIAL_LISTING_CHECK | Check material listing/exclusion for customer | Order Entry |
BAPI_MATERIAL_GET_DETAIL | Get material master data for SD relevant fields | Interfaces, Reports |
MARA_READ_SINGLE | Read single material master record (MARA) | Reports, Validations |
SD_MVKE_READ | Read material sales data (MVKE — per sales org/DC) | Pricing, ATP |
- Returns, Complaints & Credit/Debit Memo Processing
Returns management (RE orders) and credit/debit memo processing are key AMS and rollout scenarios. Returns integrate with QM for inspection and MM for goods receipt.
Function Module | Description | Used In |
BAPI_SALESORDER_CREATEFROMDAT2 | Create returns order (order type RE) via BAPI | Interfaces, Tools |
BAPI_GOODSMVT_CREATE | Post goods receipt for returns (Mvt Type 651/653) | Returns Processing |
SD_RETURNS_PROCESS | Process return delivery and stock posting | AMS Enhancement |
BAPI_BILLINGDOC_CREATE | Create credit memo from credit memo request | Complaints Process |
QA01_INSPECTION_LOT_CREATE | Create QM inspection lot for returned goods | QM Integration |
CREDITCHECK_AFTER_RETURN | Re-check credit exposure after return credit | FI Integration |
Returns Process Flow
Step | Document | Transaction | Movement |
1. Create Returns Order | RE (Sales Order) | VA01 | — |
2. Create Returns Delivery | LR (Inbound Delivery) | VL01N | — |
3. Post Goods Receipt | Material Doc | VL02N / MIGO | 651 / 653 |
4. QM Inspection (if configured) | Inspection Lot | QA32 | — |
5. Credit Memo Request | G2 Request | VA01 | — |
6. Credit Memo | G2 Billing | VF01 | — |
- Inter-Company Sales & Third-Party Processing
These are advanced OTC scenarios common in global rollouts where multiple company codes, plants, or vendors are involved in fulfilling a customer order.
Inter-Company Sales (Order Type IV)
Step | Description | Doc Type |
Customer Order | Placed with selling company code (Company A) | OR |
PO to Delivering Company | Automatic PO creation to delivering plant (Company B) | NB (PO) |
Delivery & GI | Company B ships directly to customer | LF / Goods Issue |
Inter-Company Invoice | Company B invoices Company A (internal) | IV (Billing) |
Customer Invoice | Company A invoices end customer | F2 (Billing) |
Third-Party Processing (Order Type TAS)
Step | Description | Doc Type |
Customer Order | Item category TAS triggers purchase requisition | OR + TAS |
Purchase Requisition | Automatic PR created from sales order | PR (ME51) |
Purchase Order | Buyer converts PR to PO (vendor ships direct) | NB (PO) |
Goods Receipt / MIGO | Statistical GR or actual GR from vendor confirmation | MIGO / MIRO |
Customer Invoice | Billing triggered after GR or vendor invoice verification | F2 Billing |
- Key User Exits, BAdIs & Enhancement Spots
In all project types (implementation, rollout, AMS), enhancements are needed to meet business requirements beyond standard SAP. Below are the most frequently used SD enhancement points:
Enhancement / BAdI | Type | Purpose |
USEREXIT_PRICING_PREPARE_TKOMP | User Exit (MV45AFZZ) | Populate TKOMP fields for custom pricing conditions |
USEREXIT_SAVE_DOCUMENT_PREPARE | User Exit (MV45AFZZ) | Validations before saving a sales document |
USEREXIT_MOVE_FIELD_TO_VBAK | User Exit (MV45AFZZ) | Move custom fields to VBAK during order save |
USEREXIT_MOVE_FIELD_TO_VBAP | User Exit (MV45AFZZ) | Move custom fields to VBAP at item level |
BADI_SD_SALES_ITEM | BAdI | Item-level processing during sales order save |
BADI_PRICING_CUSTOMER | BAdI | Custom pricing logic — replace/enhance standard pricing |
SD_OUTPUT_DETERMINE | BAdI | Custom output determination logic |
BADI_SD_DELIVERY_PROC | BAdI | Delivery processing enhancements |
LE_SHP_GOODSMOVEMENT | BAdI | Goods issue / goods movement in delivery |
BILLING_DOCUMENT_CREATE | BAdI (SD_BILLING) | Enhancements during billing document creation |
USEREXIT_BILLING_DOCUMENT_CP | User Exit (RV60AFZC) | Change billing header before save |
TAXM1 (Condition Routines) | Formula Routines | Custom tax calculation, condition base value changes |
Enhancement Spot: ES_SD_ITEM | Enhancement Spot | New SD item-level enhancement points (ECC/S4) |
CRM_ORDER_MAINTAIN | BAdI (CRM/S4) | Order changes in SAP CRM / S/4 Sales integration |
- Essential Transaction Codes — Quick Reference
Area | Transaction | Purpose |
Sales | VA01 / VA02 / VA03 | Create / Change / Display Sales Order |
Sales | VA11 / VA21 / VA31 | Inquiry / Quotation / Scheduling Agreement |
Sales | VB01 / VB11 | Quantity Contract / Value Contract |
Pricing | VK11 / VK12 / VK13 | Create / Change / Display Condition Records |
Pricing | V/06 / V/07 / V/08 | Condition Type / Access Sequence / Pricing Procedure |
Pricing | OVKK | Pricing Procedure Determination |
Shipping | VL01N / VL02N | Create / Change Outbound Delivery |
Shipping | VL10A / VL10B | Collective Processing Deliveries |
Shipping | VT01N / VT02N | Create / Change Shipment |
Billing | VF01 / VF02 / VF03 | Create / Change / Display Billing Document |
Billing | VF04 | Billing Due List (Collective Billing) |
Credit | FD32 | Maintain Customer Credit Limit |
Credit | VKM1 / VKM3 | Blocked SD Documents — Credit Release |
Credit | UKM_MY_ACCOUNTS | FSCM Credit Management — My Accounts |
Output | NACE | Condition-Based Output — Configuration |
Output | VV11 / VV12 | Create / Change Output Condition Records |
Config | SPRO | SAP Project Reference Object (IMG) |
Config | VOV8 | Define Sales Document Types |
Config | VOV4 / VOV6 | Item Category / Schedule Line Category Assignment |
Config | OVAZ | Assignment of Delivery Types to Order Types |
Config | VTFL / VTFA | Copy Control: Delivery-to-Billing / Order-to-Billing |
Master Data | XD01 / XD02 | Create / Change Customer (All Views) |
Master Data | MM01 / MM02 | Create / Change Material Master |
Reporting | VA05 / VF05 | List of Sales Orders / Billing Documents |
Reporting | VL06O / VL06I | Monitor Outbound / Inbound Deliveries |
S/4 HANA | FIORI Apps | Manage Sales Orders / Billing — Fiori Launchpad |
- SAP S/4HANA SD — Key Changes & Simplifications
For S/4HANA rollouts and migrations, understanding the architectural changes in SD/OTC is critical. Below are the key differences from ECC that a Lead Consultant must know:
Area | ECC Behavior | S/4HANA Change |
Data Model | VBAK/VBAP as primary tables | CDS Views replace most direct table reads (I_SalesOrder, I_SalesOrderItem) |
Availability Check | ABAP-based ATP with BAPI_MATERIAL_AVAILABILITY | aATP (advanced ATP) in S/4 — uses SAP IBP or embedded ATP |
Credit Management | Classic: FD32 / RVKRED07 | FSCM-based UKM mandatory in S/4HANA — separate credit segment |
Pricing Engine | IPC (Internet Pricing Configurator) optional | Pricing Engine fully integrated — condition contract mgmt (MEI) |
Billing Output | NAST-based output / SmartForms | BRF+ and Adobe Forms preferred; Manage Output Types app |
Customer Master | XD01 with multiple reconciliation accts | Business Partner (BP) mandatory — BP replaces KNA1 as central entry |
Delivery Processing | VL01N / WM-based picking | EWM (Extended Warehouse Management) replaces classic WM |
Reporting | SE16 / SQ01 / custom ALV | Embedded Analytics with CDS, SAC integration, Fiori analytical apps |
Config Transaction | SPRO / IMG via GUI | Fiori-based Configuration apps for key areas + SPRO still available |
Enhancement | User Exits / BADIs | Enhancement Spots, BTP Extensions, Side-by-Side extensions via CPI |
- AMS (Application Management Services) — SD Best Practices
AMS engagements require rapid triage, root cause analysis, and minimal-risk fixes in production environments. As a Lead Consultant with 14 years of experience, these practices ensure SLA compliance and system stability.
Incident Classification & Triage
Priority | Scenario | Key Function Modules to Check |
P1 – Critical | Billing run failing / orders not saving | RV_BILLING_CREATE, SD_SALESDOCUMENT_CREATE — check dump in ST22 |
P1 – Critical | Deliveries cannot be posted (GI block) | BAPI_GOODSMVT_CREATE — check stock, movement type 601 config |
P2 – High | Pricing not determined on new orders | PRICING, RV_PRICE_PRINT_ITEM — check condition record validity dates |
P2 – High | Credit block not releasing | SD_ORDER_CREDIT_CHECK, FD32 — verify credit exposure, risk category |
P3 – Medium | Output not triggered for invoices | RSNAST00, NAST table — check output condition record, comm method |
P3 – Medium | Partner not determined correctly | SD_PARTNER_DETERMINE — check partner determination procedure |
P4 – Low | Custom field not populating on order | User exit MV45AFZZ — check USEREXIT_MOVE_FIELD_TO_VBAK/VBAP |
Key AMS Debugging Tools
Tool | Transaction | Purpose |
Short Dump Analysis | ST22 | Analyze ABAP runtime errors in production |
Application Log | SLG1 | Review logs from SD processes (delivery, billing) |
Condition Analysis | V/LD (in order) | Analyze why pricing condition was/wasn't found |
Incompletion Log | VA02 > Edit > Log | Check what fields are missing on sales document |
Delivery Monitor | VL06O | Monitor delivery status, identify bottlenecks |
Credit Worklist | VKM1 | Review and release credit-blocked documents |
Output Monitor | SOST / SP01 | Check sent/failed output messages |
Change Documents | VA02 > Environment > Changes | Audit trail for document changes |
Transport Log | STMS / SE10 | Verify config transports in rollout environments |
Background Job Monitor | SM37 | Check billing run / delivery creation jobs |
Document Summary
Module Area | Key Focus | Project Phase |
Sales Order Management | BAPI_SALESORDER_CREATEFROMDAT2, SD_SALESDOCUMENT_CREATE | All Phases |
Pricing & Conditions | PRICING FM, Condition Technique (V/06, V/08, OVKK) | Implementation |
Availability Check & ATP | AVAILABILITY_CHECK, OVZ9 Scope of Check | Implementation, Rollout |
Shipping & Delivery | WS_DELIVERY_CREATE, BAPI_GOODSMVT_CREATE (601) | All Phases |
Billing & Revenue | RV_BILLING_CREATE, Revenue Account Determination (VKOA) | All Phases |
Credit Management | OVA8, FD32, UKM (FSCM), VKM1 | Implementation, AMS |
Output Determination | NACE, RSNAST00, SmartForms/AdobeForms | All Phases |
Returns & Complaints | RE Order Type, 651 Movement, Credit Memo Process | AMS, Rollout |
Enhancements | MV45AFZZ User Exits, SD BAdIs, Enhancement Spots | All Phases |
S/4HANA Specifics | Business Partner, CDS Views, aATP, FSCM Credit | S/4 Rollouts |
AMS Best Practices | ST22, SLG1, VKM1, SM37, Condition Analysis | AMS |
Satyendra Mittapalli
SAP SD Lead Consultant | 14 Years in Leading SAP SD/OTC projects & transformations
Specialization: SAP SD/OTC | Implementation | Global Rollouts | AMS | S/4HANA Migration
#SAP #SAPSecurity #GRC #SAPTraining #Fiori #IAG #BTP #CloudIAM #S4HANA #CareerGrowth #SAPJobs #SAPSupport #SAPService #SAPAMC #SAPUpgradation #SAPMigration #ERPMemes #SAPMemes #FunnyMemes
#SAPTRAINING #SAPSD #SAPMM #SAPPP #SAPQM #SAPFICO
#SAP #AI #BusinessAI #Anthropic #ClaudeAI #SAPSapphire #EnterpriseAI #DigitalTransformation #Automation #S4HANA
Source link



