I have a database table with following fields and values:
Bukrs | Werks | Btrtl | Persg | Persk | value
1000 1000 1001 1 20 1,20
1000 1,10
And I am building the query with the following key:
SELECT
FROM dbtab
INTO lv_value
WHERE bukrs = bukrs
AND (
werks = werks
AND btrtl = btrtl
AND persg = persg
AND persk = persk
)
So for query with the exact condition condition match the value must be 1,20, and that is correct.
But for another condition without full match e.g. bukrs = 1000 werks = 1002 btrtl = 1003 persg = 2 persk = 27, it must be 1,10.
So everything which doesn't fit full key should fallback to default line with value 1,10. For example:
Andrew has the following Parameters
Bukrs = 1000
Werks = 1000
Btrtl = 1001
Persg = 1
Persk = 20
Peter has the following Parameters
Bukrs = 1000
Werks = 1004
Btrtl = 1002
Persg = 1
Persk = 27
For Andrew 1,20 should be selected, for Peter it should be 1,10.
bukrsa person identifier? What are you matching these values against? Is it always a single person at a time? - shawnt00