Hi,
I've tried several FM's a couple of months ago, but none did the job. So eventually used a BDC, as Manu pointed out.
Check this article out: http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=243630173
Specially in the subroutine 'TRANSFER_FILE' line 580, those are the structures you need to create.
My experience is, that the FM's you mentioned, have some drawbacks, for example no history, the PIR is overwritten without any reference to the old PIR.
Have fun!