Hi Karthik, Hi Ramachandran,
not sure if selection via BSEG is a good idea. As far as I recall (correct me, if I am wrong) BSEG is a cluster table and as such cannot have secondary indexes... hence your selection might be quite slow.
Do you really need the single FI (and only FI) postings?
In general my approach would be to read WBS related FI/CO postings through tables COSP/COSS (or alternatively RPSCO).
If you need line items (which then should also have a link to the FI document), you can use COBK, COEP. The link to PRPS is always based on field OBJNR.
RSPCO will tell you which one is an Actual(CJI3) and which one is Commitment(CJI5).
Select all OBJNR from RSPCO where WRTTP equals 04 or 11.
SELECT objnr FROM rspco INTO TABLE gt_rspce FOR ALL ENTRIES IN gt_prps
WHERE objnr = gt_prps-objnr AND (wrttp = '04' OR wrttp = '11'.)
Now go to table COVP and get the document details from there by passing the OBJNR values.