For the Url passing please try as below it works, I had a same problem where transaction used to give xml fine on browser and not from the code of ajax call.
Below is two option to help you, The first when u want want to directly pass the values to Trx call without any variable.(Dont use quotes it wont work)
1. var urlPath="http://"+location.host+"/XMII/Runner?Transaction=YDM/AjaxProject/Dialogs/Logic/WorkCenterValuesTrx&TRXID=1&OutputParameter=Results&Content-Type=text/xml";
$.ajax({
type : "POST",
url : urlPath,
datatype : "xml",
cache: false,
async: false,
beforeSend: function()
{
},
error: function()
{
alert('Error');
},
2. var urlPath="http://"+location.host+"/XMII/Runner?Transaction=YDM/AjaxProject/Dialogs/Logic/WorkCenterValuesTrx&Var1="+Val1+"&Var2="+Val2+"&OutputParameter=Results&Content-Type=text/xml";
The above second option is , you are assigning the variable values to transaction parameters.
Hope it works. Good Luck