Ansicht
Dokumentation

CPF_BBI_FORM - Define Formulas for Flexible Billing of Batch Items

CPF_BBI_FORM - Define Formulas for Flexible Billing of Batch Items

Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Create and maintain configurable formulas that the system uses to determine the correct variant for the billing of batch-managed outbound delivery items.

In this configuration activity, you can create configurable formulas for the flexible billing of batch items. A batch item is any item in an outbound delivery that represents a batch-managed product (that is, batch-managed material).

At the time when the sales document (for example, a sales order) that precedes an outbound delivery is saved, the system uses the currently active formula to dynamically determine the appropriate variant for billing the batch items in the outbound delivery. Later, when the corresponding billing document is created, the system applies the determined variant to the billing document items representing the batch-managed products.

Note that in the case of outbound deliveries without a preceding sales document (known as deliveries without reference), the system determines the variant based on the attributes of the outbound delivery itself, when the delivery is saved.

The batch item billing variant controls whether it's the delivery's batch main items or batch subitems that are billed, and how they are represented on the resulting billing document. That is, the variant specifies whether it's the billing document's batch main items or batch subitemsthat carry the quantities to be billed. This in turn also determines whether the item net values are calculated and displayed at main item or subitem level.

The system offers the following two variants for overriding the default system behavior for batch item billing, which bills batch items in deliveries according to their item category and the related copying control settings:

  • Variant A prescribes that the batch main items carry the quantities and net values to be billed, while the batch subitems only carry the associated costs. This equates to the standard system behavior used for most standard sales scenarios by default.
  • Variant B prescribes that the batch subitems carry the quantities and net values to be billed, as well as the associated costs. The main items don't carry any of this information, but are still displayed on the billing document. This equates to the standard system behavior that is applied for intercompany billing and some other processes.

Note that in the context of intercompany billing, the system always creates intercompany invoices (billing type IV or IV2), according to variant B, and that you cannot change this behavior using a formula.

To tell the system for which items of the billing document you want to apply which variant, you must create at least one formula. A formula consists of the combination of relevant parameters (specific header fields of the sales document or outbound delivery without reference, and item fields of its batch main items) and a decision table.

When you save a new or changed sales document (or delivery without reference) containing batch-relevant items and your formula is active, the system applies the rules in the formula's decision table to evaluate the parameter values representing the header and item fields of the sales document (or delivery without reference). The result of the evaluation determines the batch item billing variant that is applied for each batch main item and its subitems in the resulting billing document.

Note that while you can create multiple formulas, only one formula can be the active formula at any given time. The active formula is the formula that the system applies when a new or changed sales document (or delivery without reference) containing batch-managed products is saved.

For more information about the flexible billing of batch items, including examples and important constraints, see Flexible Billing of Batch Items on SAP Help Portal.

You create and maintain your formulas by moving through the dialog structure of the configuration activity from top to bottom. The following is a description of each dialog step.

  1. Define Formulas
    In this first step, you create a formula by providing a unique formula identifier (ID) and a corresponding description, then saving. Each formula can contain one decision table. To continue after creating at least one formula, select the formula and double-click the next node in the dialog structure.
Note that on each dialog, you can only delete entries if no settings exist on a lower structure level that are dependent on that entry.

While you can create multiple formulas, only one formula can be the active formula at any given time. You can change the currently active formula at any time by selecting the corresponding checkbox in the Active column.
  1. Assign Formula Parameters
    In this step, you select the input parameters that you want the formula to evaluate via the decision table that you specify in the final step.

    The result parameter BATCHBILLINGOPTIONRESULT is included by default. It represents the batch item billing variant to be determined. The formula determines the value (A, B, or '' [empty/blank]) of this result parameter by comparing the input parameters (header or item fields of the sales document or outbound delivery without reference) to the values that you maintain in the decision table in a subsequent step.

    The 'blank' variant represents the default system behavior, which means that the item category and the related copying control settings determine whether the quantities and values are carried by the batch main items or subitems.

    To view and add additional input parameters from the parameter catalog, choose New Entries and select the input help. After adding the parameters of your choice, save your changes.
    To view the complete list of available parameters, see the configuration help of the preceding configuration activity Edit Parameter Descriptions for Flexible Billing of Batch Items.
  2. Formula Tasks
    Select the usage task SET_BATCH_BIL_OPTION so you can progress to the next step in the dialog structure.
  3. Assign Parameter Priority
    Assign each parameter that you want to use in the decision table to a priority level. A value of 1 is the highest priority, a value of 2 is the second highest, and so on. The parameter priorities determine the order of the decision table columns, which in turn dictates the priority that the system assigns to them when it evaluates the rules in the decision table.
  4. Define Decision Table
    In the final step, create your decision table by creating one row per rule that you want the system to evaluate based on the input parameter values. Through the parameters, the system compares specific header or item fields of the sales document preceding the outbound delivery (or of the delivery without reference itself) to the values you have maintained in the decision table. The decision table is evaluated once per item, so that each item can be assigned to an appropriate variant. For each parameter, you can specify an operator as follows:
  • Operator = (Equal to): If this operator is set, the system considers the corresponding parameter as a hit if the parameter value provided by the document's field is equal to the value you have specified in the corresponding column of the decision table. If every parameter in a row provides a hit, the rule represented by the row is applied and the batch item billing variant specified in that row is selected.

  • „No Operator" (Ignore): If the operator cell is left empty (‘blank/space’), the corresponding parameter is ignored during the evaluation of that row, that is, the parameter cell is treated as a wildcard. This setting is useful when you want to treat a parameter for which ‘blank/space’ is a valid value as a wildcard.

After you have entered the rows representing the rules that you want to evaluate, the system automatically orders them based on the priority that you have assigned to each parameter in the previous step. For more information about the sort logic, see Configuring the Flexible Billing of Batch Items on SAP Help Portal.

When a batch-relevant sales document (or outbound delivery without reference) is saved, the system sequentially processes the decision table by comparing the supplied input parameters against the conditions defined in the table rows, starting with the first row and ending with the first hit. A hit is defined as follows:

  • All cells are evaluated by checking the column value against the corresponding parameter value.
  • For each cell, a boolean (TRUE/FALSE) result is returned. If all cells in a row are evaluated as true, this counts as a hit. The evaluation stops and the system returns the result parameter BATCHBILLINGOPTIONRESULT as specified for the current row. The batch main item currently under evaluation is assigned to the variant specified in that row.
  • Otherwise, processing continues with the next table row until either a matching set of conditions is found or the end of the table is reached.

If there is no hit, processing ends at the last row without any rule being applied. In this case, the default system behavior for batch item billing is applied, meaning that the item category of the billed delivery main item and the related copying control settings determine whether the billing document main items or subitems carry the quantities and net values.

For example, you could fill a row in such a way that for any batch-relevant item with sales organization 1010 (using operator =) and material group L003 (using operator =), the system selects variant B. The next row, however, specifies that for batch-relevant items with sales organization 1010 (operator =) of any material group (Operator ''), the system selects variant A. If no rule is satisfied and the end of the table is reached, the standard system behavior is applied, meaning that the item category of the main item and the related copying control settings determine whether the billing document's batch main items or subitems carry the quantities and net values.

Note that you can also manually assign this "default system behavior variant" to a given row of the decision table by simply leaving the variant column empty (blank) for that row.

Remember: Whenever a variant is selected for a batch main item, that variant is also applied to all of its subitems in the resulting billing document.

For more information about creating decision tables and other important information, see Configuring the Flexible Billing of Batch Items on SAP Help Portal.

If you want to use custom descriptions for the parameters in your formula, you can edit these descriptions in the preceding configuration activity Edit Parameter Descriptions for Flexible Billing of Batch Items.

A simple example formula containing an example decision table is provided. Please ensure that you only use it if the implemented parameter is relevant to your business requirements.

  1. Decide whether your business requires the use of specific batch item billing variants for batch items in outbound deliveries with specific attributes (that is, specific values in certain header or item fields).
  2. If yes, create at least one formula according to the instructions above.
  3. Ensure that the formula that you want the system to use is set as the active formula by selecting the corresponding checkbox on the initial dialog screen.





TXBHW - Original Tax Base Amount in Local Currency   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 13215 Date: 20240523 Time: 173719     sap01-206 ( 337 ms )