Hi,
This requirement you can achieve by using the structure RFPOSX/FAGLPOSE, Just check with your ABAPER, instead of BSEG and BKPF all the data you will get it from the above structures.
I done it some time back for our one of the client.
Regards,
Ravi