i have one DBTAB table with the following entry
FIELD1
-Field2
Field3
--Field4
R--
R--
S--
1
S--
1
S--
2
S--
2
S--
1
S--
2
The field4 is the rule which i must retreive first as per condition field2 and field 3.
for each comnination of field2 and field3 there exit only one field4
then i must retreive the sequence number(field3) that is assign to each rule
depending on the rule i have retreive above
here is the two select statement:
Select single FIELD4 from DBTAB into V_rule where field1 = R(rule) field2 = importparameter1 field3 = importparameter2 select field1 field2 field 3 field 4 form DBTAB where field1 = S(sequence number) field2 = V_rule
example i must be able to retreive all sequence number if v_rule = A
S--
1
S--
1
S--
2
S--
2
Note that i must so another select in the same table DBTAB for other condition.
I need your advise in terms of performance do you think i can to that in a more simpler way
by doing only a
select all with condition where field1 = "R" or "S"
then do a read to in the internal table to retreive the rule then do a loop in the internal table to transfer all the sequence for that particular rule
please advise which solution is best in terms of performance issue since several other select need to be done in the sale database table