Hi,
in VBFA table mention delivery number as "Preceding Document-VBELV" and Subsequent document category as "M-Invoice-VBTYP_N"
execute ,you will get "follow on doc-VBELN" all corresponding billing document numbers .
in the same way second time put the same delivery document as "Follow on document-VBELN" and get
Preceding Doc-VBELV"
Regards,
Krishna.