Since the idea is to generate a url that you want to use as the destination of your submit action, take a look at this post which has some code to do the job that you can attach to a button you have placed on the form using infopath. In your submit options, it has you place a "dummy url" that the code will replace with your dynamically built url.
I don't think you can do this without using custom code.
Look at this threadthis thread and this thread, too, about submitting to the form's own library for some details about getting custom code to work. There isn't much difference between using the form's own library than building a dynamic URL.