on 04-23-2014 12:18 PM
Hi experts,
I'm using the DI Server and I need update a employee, for that, I need to get a specific employee and then modify him, but when I use the GetByKey method, it always returns "no record found". My code is the next one:
SBODI_Server.Node DISnode = new SBODI_Server.Node();
string sSOAPans = null;
XmlDocument xmlDoc = new XmlDocument();
string sCmd = <?xml version=""1.0"" encoding=""UTF-16""?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">
+ "<env:Header><SessionID>" + SessionID + "</SessionID></env:Header>"
+ @"<env:Body><dis:GetByKey xmlns:dis=""http://www.sap.com/SBO/DIS"">"
+ "<Object>oEmployeesInfo</Object><EmployeeID>" + empID + "</EmployeeID></dis:GetByKey></env:Body></env:Envelope>";
sSOAPans = DISnode.Interact(sCmd);
xmlDoc.LoadXml(sSOAPans);
I just have one employee in the data base, with empID = 1. I tried to view all employees with the next code:
string sCmd = <?xml version=""1.0"" encoding=""UTF-16""?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">
+ "<env:Header><SessionID>" + SessionID + "</SessionID></env:Header>"
+ @"<env:Body><dis:GetObjectKeyBySingleValue xmlns:dis=""http://www.sap.com/SBO/DIS"">"
+ "<ObjNum>oEmployeesInfo</ObjNum><PropName>Religion</PropName><Value>--</Value><Condition>bqc_NotEqual</Condition>"
+ "</dis:GetObjectKeyBySingleValue></env:Body></env:Envelope>";
And the EmployeeID 1 appears.
What am I doing wrong?
Regards,
Pedro
Ok, it's a SAP error in PL10. I've installed SBO9 PL11 and I can get the employee data.
regards,
Pedro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pedro,
your SOAP command is correct - i get the data for the employee with empID = 1.
Is it possible that your variable empID holds wrong data ?
Can you (again) verify that OHEM contains a record with empID 1.
works:
<?xml version=""1.0"" encoding=""UTF-16""?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">
<env:Header><SessionID>" + SessionID + "</SessionID></env:Header>
<env:Body><dis:GetByKey xmlns:dis=""http://www.sap.com/SBO/DIS"">
<Object>oEmployeesInfo</Object><EmployeeID>1</EmployeeID></dis:GetByKey></env:Body></env:Envelope>
regards,
Maik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maik,
I tried your code
<?xml version=""1.0"" encoding=""UTF-16""?><env:Envelope xmlns:env=""http://schemas.xmlsoap.org/soap/envelope/"">
<env:Header><SessionID>" + SessionID + "</SessionID></env:Header>
<env:Body><dis:GetByKey xmlns:dis=""http://www.sap.com/SBO/DIS"">
<Object>oEmployeesInfo</Object><EmployeeID>1</EmployeeID></dis:GetByKey></env:Body></env:Envelope>
But I have the same response:
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body></env:Subcode>
</env:Code>
</env:Reason>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>
The second message of original post returns this list:
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<GetObjectKeyBySingleValueResponse xmlns="http://www.sap.com/SBO/DIS">
<BOM>
<BO>
<AdmInfo>
<Object>oRecordset</Object>
</AdmInfo>
<EmployeesInfo>
<row>
<EmployeeID>1</EmployeeID>
</row>
</EmployeesInfo>
</BO>
</BOM>
</GetObjectKeyBySingleValueResponse>
</env:Body>
</env:Envelope>
I'm using SAPBO 9 PL10 HF1.
Regards,
Pedro
Hi Maik,
I looked the database and there are an employee with empID=1.
The employee has not another data, so HEM1-7 tables are empty and I don't see strange data in CUFD.
I tried the same code in other machine, with SAP BO 9 PL 9 HF1, with the same database, and returns the employee correctly. For that, I think that the issue is a bug in PL10.
I will update to PL11 the next week and then I'll try again. I hope it finally works
Thanks for respond
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.