Import using dataports run from report

I have to run a dataport from a report. But I also have to send the location code to dataport before executing it.

I have written the below code:-

gdptAdvSalesTicketImp.SETTABLEVIEW(recGenJnlLine);
gdptAdvSalesTicketImp.fctGetLocation(Location.Code);
gdptAdvSalesTicketImp.RUN;

the location is send to the dataport but RUN does not work.

In my case RUNMODAL wld be more apt instead of RUN as i have to run 10 dataports to import data into the 81 table.

Please help. thanks.

what is the code in fctGetLocation function of dataport?

fctGetLocation(LocationCode : Code[20])
gcodeLocationCode:= LocationCode