Hi all
My search criteria is to select a row from the table when the user give one mandatory input field and, optionally, any other fields.
Totally 1 mandatory field And 10 optionally fields.
I have used BETWEEN clause for the optional fields but I feel performance will be very bad.
Pls find sample code below
IF OPT-FLD1 = SPACES
MOVE LOW-VALUES TO WS-OPT-FID1-FROM
MOVE HIGH-VALUES TO WS-OPT-FID1-TO
ELSE
MOVE OPT-FLD1 TO WS-OPT-FID1-FROM
WS-OPT-FID1-TO
END-IF
WHERE MAN_FLD = WS-MAN-FLD
AND
WHERE OPT_FLD1
BETWEEN :WS-OPT-FID1-FROM AND :WS-OPT-FID1-TO
AND OPT_FLD2
BETWEEN :WS-OPT-FID2-FROM AND :WS-OPT-FID2-TO
AND OPT_FLD3
BETWEEN :WS-OPT-FID3-FROM AND :WS-OPT-FID3-TO
AND OPT_FLD4
BETWEEN :WS-OPT-FID4-FROM AND :WS-OPT-FID4-TO
AND OPT_FLD5
BETWEEN :WS-OPT-FID5-FROM AND :WS-OPT-FID5-TO
.
.
.
AND OPT_FLD10
BETWEEN :WS-OPT-FID10-FROM AND :WS-OPT-FID10-TO
Please let me know if they are any other ways to handle.
Thanks
Chandra N