Hi Shiva,
in VBFA table have the two fields - VBTYP_N and VBTYP_V
VBTYP_N = subsequent document
VBTYP_V = preceding document.
In your case credit memo is the subsequent document and inovice is the preceding document.
So your VBFA selection would be as below.
In this case you will get the credit memo reference for each billing document and position.