Hi, I have a table Members with 2 keys Formid and Linenumber. My requirement is that I can create multiple members with same Formid. Since identical keys in same table is not allowed that is why i created addition field Linenumber.
Now I can create multiple Members with same Formid but different Linenumber, but my READ oData service always returns 1 record for the import Formid. My FM for reading is:
DATA: latest_version TYPE zhrec_version.
IF ( iv_formid IS NOT INITIAL ).
CALL FUNCTION 'ZASD_GET_LATEST_VERSION'
EXPORTING
im_formid = iv_formid
IMPORTING
ev_version = latest_version.
IF ( iv_linenumber IS NOT INITIAL ).
SELECT * FROM zhrec_it0021 INTO TABLE et_familymembers
WHERE formid = iv_formid AND linenumber = iv_linenumber AND version = latest_version.
ELSE.
SELECT * FROM zhrec_it0021 INTO TABLE et_familymembers
WHERE formid = iv_formid AND version = latest_version.
ENDIF.
ENDIF.
How can I achieve getting multiple records with same Formid?