Difficulty: Easy
Correct Answer: When the dimension contains only a single characteristic that acts as a key, and you want to avoid generating a separate dimension table for it.
Explanation:
Introduction / Context:
Line item dimensions in SAP BW are a special type of InfoCube dimension used to simplify modelling when only one characteristic is required in that dimension. Instead of creating a separate dimension table with its own keys, the characteristic key is stored directly in the fact table. This can improve performance and reduce the number of joins during query execution. Certification questions commonly ask when it is appropriate to declare a dimension as a line item dimension.
Given Data / Assumptions:
Concept / Approach:
A line item dimension is defined when an InfoCube dimension contains only one characteristic and that characteristic is referenced directly in the fact table. In this case, there is no separate dimension table, and the characteristic key fields are stored with the fact table entry. This reduces the number of joins and can be more efficient, especially for characteristics like document number or sales order item, which uniquely identify rows. If you add more characteristics to the same dimension, it can no longer be a line item dimension.
Step-by-Step Solution:
Step 1: Identify whether the dimension contains exactly one characteristic and no additional fields.
Step 2: Consider whether that characteristic has a one to one relationship with each fact table entry, such as a document item number.
Step 3: Remember that line item dimensions store the characteristic key directly in the fact table, avoiding a separate dimension table.
Step 4: Review the options and select the one that describes a dimension that contains only a single characteristic and avoids a separate dimension table.
Step 5: Choose option a as the correct description of when to define a line item dimension.
Verification / Alternative check:
In a sales reporting cube, there may be a characteristic representing the sales document item that uniquely identifies each fact record. If you place only this characteristic in one dimension and mark it as a line item dimension, the system will store the document item key directly in the fact table. There is no need for a separate dimension table with a generated dimension key. Queries can then access the document item without an extra join. This behaviour illustrates the correct use of line item dimensions and supports the explanation in option a.
Why Other Options Are Wrong:
Option b is incorrect because line item dimensions do not apply when there are many characteristics; by definition, they hold only one characteristic. Option c misplaces key figures, which belong in the fact table, not in dimensions. Option d is wrong because line item dimensions do not store all master data attributes in the fact table; they only store the characteristic key. Option e is unrelated; joining InfoCubes is normally done with MultiProviders or CompositeProviders, not via line item dimensions.
Common Pitfalls:
A common mistake is to mark a dimension as a line item dimension even though it contains more than one characteristic, which is technically not allowed. Another pitfall is to overuse line item dimensions for characteristics that do not have a one to one relationship with fact rows, which can complicate reporting. For exams, remember that a line item dimension is appropriate only when there is a single characteristic in the dimension and you want to avoid an extra dimension table by storing its key directly in the fact table.
Final Answer:
A dimension should be defined as a line item dimension when it contains only a single characteristic that acts as a key, and you want to avoid generating a separate dimension table for that characteristic.
Discussion & Comments