Tuesday, August 2, 2016

-8006 : Resource error in SAP Business One

Suddenly I received with (-8006) from the DI API. This was my request sent and the response received.

Request :
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<?xml version=\"1.0\" encoding=\"UTF-16\"?>
<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">
  <env:Body>
    <dis:Login xmlns:dis=\"http://www.sap.com/SBO/DIS\">
      <DatabaseServer>xxxx</DatabaseServer>
      <DatabaseName>SBODEMOUS</DatabaseName>
      <DatabaseType>dst_MSSQL2012</DatabaseType>
      <DatabaseUsername>xx</DatabaseUsername>
      <DatabasePassword>xxxxxxx</DatabasePassword>
      <CompanyUsername>manager</CompanyUsername>
      <CompanyPassword>manager</CompanyPassword>
      <Language>ln_English</Language>
      <LicenseServer>xxxxx</LicenseServer>
    </dis:Login>
  </env:Body>
</env:Envelope>

Response :
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  <?xml version="1.0" ?> 
 <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
 <env:Body>
 <env:Fault>
 <env:Code>
  <env:Value>env:Receiver</env:Value> 
 <env:Subcode>
  <env:Value>-8006</env:Value> 
  </env:Subcode>
  </env:Code>
 <env:Reason>
  <env:Text xml:lang="en">Resource error</env:Text> 
  </env:Reason>
 <env:Detail>
  <Command>Login</Command> 
  </env:Detail>
  </env:Fault>
  </env:Body>
  </env:Envelope>

When I look for a solution in SAP community, Many experts have advised to remove the  SM_OBS_DLL folder from the temporary folder, stop the SBO DI Server from SAP Business One Service Manager and then reinstall the DI API. 

I did the first step of removing the SM_OBS_DLL  folder from my %temp% path. Then I restarted my workstation and checked whether all my services are running normally or not. Especially the SQL server instance. The real reason was my SQL server service had not been started with the startup. So the DI server cannot access the database.

So I prepared a batch file to start/stop the SQL and SAP-related services, which might also rescue you in such situations.

Stop Services.bat : 
net stop MSSQLSERVER
net stop TAO_NT_Naming_Service
net stop SLD
net stop B1LicenseService
net stop SBODI_Server
net stop SBOWFDataAccess
net stop SBOWorkflowEngine
@PAUSE


Start Services.bat :
net start MSSQLSERVER
net start TAO_NT_Naming_Service
net start SLD
net start B1LicenseService
net start SBODI_Server
net start SBOWFDataAccess
net start SBOWorkflowEngine
@PAUSE

Monday, August 1, 2016

Install SAP Business One License

To generate a licence file for SAP Business one, you are required to submit the below details.

- SAP Business One version and the Patch Level
If you are not sure about what SAP Business One version level you have installed or updated patch level, Go to About -> About SAP Business One.

If your license is expired, you will not be able to access any of the screens.

- Hardware key
You can retrieve it from SAP Business One Service Manager as below.


Click on Settings :

When you got the valid license use the General Settings of the License Manager (above the window) to apply the license key. Browse the license file and click on "Import License File".



Then open up SAP Business One with the Manager user (or using an account that has user management privileges) and go to Administration > Licence Administration. Select the user account that you need to assign permissions to (in my case it was 'Manager') and select the required license type to apply for the licence.



Click on Update to finish the process.