SAP Sales and Distribution

Please feel free to add your own topics and tips.

Useful transactions

VA01, VA02, VA03 Create/Change/Display Sales Order
VA05N
VL01N, VL02N, VL03N Create/Change/Display Delivery
VF01, VF02, VF03 Create/Change/Display Billing Document
VKM1 Blocked SD Document (i.e., Credit Hold)
MASS Mass change - master data
VOFM Maintain Requirements and Functions (output requirements, pricing formulas, etc)

Pricing

VOK0 Maintain Pricing (faster than drilling around in SPRO, etc)
VOFM Maintain Requirements and Functions (output requirements, pricing formulas, etc)
V/03 Condition Tables - Create
V/04 Condition Tables - Change
V/05 Condition tables - Display
V/06 Condition Types
V/07 Access Sequences
V/08 Pricing Procedures
OVKK Procedure Determination
OV31 Condition Exclusion - Define
OV32 Condition Exclusion - Assign Cond Types
VOK8 Condition Exclusion - Assign Procedure
VK11 Condition Record - Create
VK12 Condition Record - Change
VK13 Condition Record - Display

Pricing Formula Variables

Within your alternative base value calculations and alternative calculation types (defined via VOFM), many variables are available for your use, but no documentation is available to help you in this area. Here is a handy reference, although not a complete list.
xkomv
itab
Work area concerning conditions. The header record is for the current condition.
komk
structure
Comm structure for the sales document header.
komp
structure
Comm structure for the sales document item
komv
structure
Comm structure for the current condition. Relevant only if the condition has an access sequence.
komt1
ittab
Comm structure for pricing procedure. Populated in all cases.
komt2
ittab
Comm structure for access sequence. Relevant only if the condition has an access sequence.
gkomv
structure
Comm structure for group conditions
y_
fields
Internally maintained by SAP across all conditions. Especially influenced by the rules described in note 201830, these fields influence how net price and other values are presented and processed. Additionally, they are generally set by price conditions -- not surcharges, discounts, etc. Thus, if you do not have a base price condition or the condition is not populated, your first price may be cost, which may result in unexpected "per" values or price UOMs.

The critical fields to update if you want to emulate a price record are:
ykmein, ykpein, ykumza, ykumne, ykbetr

These fields can be dangerous, so be sure you know what you are doing.
xkwert
field
Within an alternative calculation formula: the condition value
Within an alternative base value calculation: the condition base value
xwork_
field
Subtotal. "_" corresponds with the subtotal id. Subtotals are accumulated during condition processing and some are saved to VBAP for later use in forms, etc.

Notes:
  1. Some helpful SAP Notes in this area: 854978, 201830, 900089, 133313.
  2. Subtotals in VBAP are copied from item subtotals determined during pricing.
  3. To mark pricing as incomplete, clear komp-prsok in your formula
  4. Summary of SAP-delivered pricing formulas at sap4u.org
  5. Specifying a condition base value on a subtotal has no effect. It will execute, but any changes it makes are discarded.

Condition Tables

A_ Pricing Condition table (points to KONH via KNUMH)
B_ Output Condition table (points to KONH via KNUMH)
KONH Conditions Header
KONV Transaction condition data (i.e., conditions for an SD document item; see KNUMH on relevant business document table ala VBAK)
KONM Quantity Scales (1 dimension)
KONP Document item condition information

In Pricing how can I change the rate of a subtotal?

You have limited control over the rate displayed in a subtotal. If the subtotal value matches the value of the last active, non-statistical price, then the rate is copied from the price condition into the subtotal. If the values are different, then SAP back-calculates the subtotal rate by dividing the subtotal value by quantity to determine an approximate rate. You will occasionally see inaccuracies in a calculated rate.

This calculation occurs after any alternate calculation formula runs, so there is no fair opportunity to override SAP's rate calculation. See Note 791944 for further details on this subject.

Does R/3 support "in-transit" inventory for Consignment Fill-up?

No. After posting goods issue on the Consignment Fill-up delivery, goods move directly to the customer's restricted consignment stock. Unfortunately, in-transit inventory is supported for stock transport orders but not for consignment fill-ups. SAP says this is as-designed.

Enabling US APO addresses

Transaction: OVK2
Add region "AP" to country code US. Generally use APO as the city when loading master records.

Problem: Mysterious text is copied to new sales order in VA01

Transaction: SA38
When mysterious text is copied into a new sales order and the text is not defined on the customer master, you have a problem. This text may or may not "go away" when you save the sales order. SAP has a standard program to fix the problem, RVTEXTE. Run for table VBBK for header text, VBBP for line item text. For help see this step-by-step procedure:


Problem: Sales Order Status is incorrect

Transaction: SA38, program SDVBUK00
If SAP gets "confused" about the status of an order, just run this SAP standard utility to redetermine its status. It has a simulation mode so you can check its output in advance. Note that the status change is generally not written to the change log, but the user running this program may end up in the change log if saving the order causes other changes.

Returning variant config material

Variant config items (not material variant) delivered and then returned will be returned as sales order stock against the original sales order for which the goods were delivered. A material variant, on the other hand, will be returned to stock using the normal process.

Problem: I transported a new requirement, but it isn't working. I can't even set a breakpoint in it.

Run standard report RV80HGEN to activate all 'active' requirements on the target system. See note#22808 for how to do this automatically in your transports.

Info: I want to see the text in the text table for my documents, but it's gibberish.

Tables STXH (header text) and STXL (line level text) hold the text info. If you look in the tables using SE16, search for TDNAME with *ordnum* (name for sales documents is 10 digit sales order number + 6 digit line number - pad with leading zeros). You can also limit the search to specific TDID or text ID. Gather the ID, name, language, and object. Go to SE37, run READ_TEXT. Fill in the data with the data that you have gathered, then execute. You can then read the text in the results area in SAPSCRIPT format.

Problem: Deliveries that are PGI'd are still showing up in CO09 as demand, causing new orders to not be able to ATP to the selected batch.

Run standard report SDRQCR21 to regenerate the table entries. This corrects the status in VBBE, and removes the demand from CO09. This can be run per material/plant/document, or per material/plant.