Action can have a object repository associated with it while a function can't. A function is just lines of code with some/none parameters and a single return value while an action can have more than one output parameters. ... Code specific to QTP can also be put into an function using DP.