2706273_E_20240926
2706273_E_20240926
2706273_E_20240926
Symptom
This SAP Note describes how the quantity and the unit of measure are updated in FI for postings from SD Billing.
Other Terms
MENGE, MEINS, FKIMG, FKLMG, VRKME, SD, billing, VBRK, XMFRW, BSEG-MENGE, BSEG-MEINS, ACCIT-MENGE,
ACCIT-MEINS, ACCIT-XMFRW
Solution
1) Which quantity and unit of measure are updated in FI?
Multiple quantity specifications are managed in SD Billing. In the standard system, the actually billed quantity (FKIMG) and
the corresponding sales unit (VRKME) are derived in FI and updated in the document. If, however, you want to post the
billed quantity in a base unit of measure or stockkeeping unit (FKLMG) in FI, you can set the switch GD_QUANTITY_SD in
the module AC_DOCUMENT_QUANTITY_GET in accordance with the instructions contained in SAP Note 118125.
If you want to manage a completely different quantity value or unit of measure in FI, you must use a corresponding user exit
in SD Billing to derive the quantity itself. For more information, see Section 4.
The plus/minus sign for the quantity is derived as follows:
- for normal revenue accounting items
+ for returns items
0 indicates an undefined status whereby the quantity is derived but no corresponding plus/minus sign was determined.
In the standard system, a plus/minus sign should not be derived for 0. This is often caused by the fact that, in SD Billing, the
quantity in a user exit is set for an item for which the quantity is not update-relevant.
2) For which lines is the quantity updated in FI?
When you transfer a billing document to accounting, SD Billing transfers a line item to the Accounting Interface for each
condition managed in SD. Since a billing item generally contains multiple conditions that are relevant for FI, the quantity is
update-relevant only for the first non-statistical condition, thus preventing the quantity of a billing item from being posted
multiple times in FI. Consequently, the quantity in FI is generally filled only for the first G/L account item that belongs to a
billing item. An exception to this are non-statistical transfer price conditions for which the quantity is also update-relevant.
3) Does the quantity update change in FI after a system upgrade?
The quantity is updated in the FI document only as of the correction contained in SAP Note 1477363. The logic described in
Section 1 is then used to derive the quantity from the function module AC_DOCUMENT_QUANTITY_GET.
SAP Note 2185343 also derived the plus/minus sign for the quantity from this module and updated it in the new field SQUAN
in the table BSEG in FI. Prior to this correction, the plus/minus sign in the quantity specification in the document display in
FI was derived solely from the debit/credit indicator for the relevant line item.
As a result of the correction contained in SAP Note 2472957, the unit of measure is now also correctly derived for all line
items in SD. Prior to the correction contained in SAP Note 2472957, an existing unit of measure in the line item was simply
transferred. Since, however, SD Billing transfers a unit of measure for all line items irrespective of whether the quantity is
filled at all or whether the quantity for this line item is update-relevant, the unit of measure may have been incorrect in FI
prior to this correction and not consistently updated to other accounting documents. Note that, after you implement the
correction contained in SAP Note 2472957, only the standard logic for SD Billing is mapped correctly in FI. If you use a user
exit in SD Billing to fill the quantity in line items for which the quantity is not update-relevant, the quantity itself is filled in
this line, but the unit of measure is not filled. For information about a solution to this behavior, see Section 4.
4) How can the quantity and the unit of measure be updated in all line items in FI?
As already mentioned, in the standard system, the quantity and the unit of measure are updated only for line items that are
flagged as relevant for a quantity update. From a technical point of view, the indicator XMFRW in the structure ACCIT is used
for this purpose. Therefore, if you want to update the quantity and the unit of measure for other revenue accounting items in
FI, you can use a user exit in SD Billing (for example, EXIT_SAPLV60B_004) to set the quantity or the unit of measure
(fields MENGE and MEINS in the structure ACCIT) and the indicator XMFRW accordingly.
Note here that the quantity (that is, the field MENGE) is not derived again in FI if you have already filled the field in a user
exit in SD. However, this does not apply to the unit of measure (that is, the field MEINS). Since, in the standard system, the
field MEINS is already always filled from SD Billing, it is not possible in FI to determine whether the default SD value is
contained here or whether the unit was filled using a customer-specific logic. For this reason, the unit of measure in the field
MEINS is always derived from the function module AC_DOCUMENT_QUANTITY_GET in accordance with the logic, and it
is filled in FI only for line items for which the indicator XMFRW is set. If you therefore use a user exit in SD to fill the quantity
in the field MENGE, and you obtain the error at the end of Section 3 after a system upgrade, you must correct your user exit
implementation and either fill the field MENGE only for line items for which the indicator XMFRW was set from SD or you
must fill the field XMFRW in your user exit implementation if you want the quantity to be filled for additional line items in FI.
In the case of tax items, you should not set the quantity, the unit of measure or the flag XMFRW in a user exit. In FI, tax items
are generally summarized and any quantity or unit of measure transferred from SD is also deleted. If, however, another value
was transferred by means of a user exit, this may result in deviations within accounting. To avoid this, the quantity
specification for tax items should not be changed in SD by means of a customer-specific logic.
If you want to derive the quantity, the unit of measure, and the plus/minus sign for the quantity again centrally in accounting,
the BAdI AC_QUANTITY_GET is also available. This BAdI is processed in the module AC_DOCUMENT_QUANTITY_GET,
which means that the changes made here are also transferred to all accounting components that derive the quantity from this
module. However, note also that the quantity and the unit of measure are updated consistently only for line items for which
the quantity is flagged as update-relevant.
Before you implement a user exit or BAdI, note that these specifications are merely recommendations for a possible
customer-specific update logic and are not an approach supported by SAP. The use of a customer-specific update logic for the
quantity, either by means of a user exit in SD or a BAdI in accounting, is always regarded as a deviation from the standard
SAP system. Therefore, any update or reporting errors are a matter for SAP Consulting, not SAP Support. If you have
questions regarding the user exits or if you require support during their implementation, contact your SAP consultant
directly.
Attributes
Key Value
Other Components Sales and Distribution > Billing > Processing Billing Documents (SD-BIL-IV)
2185343 FI-GL-GL-J Accounting Interface: Update of plus/minus sign of quantity in entry view of FI document