Posted By

syedhussim on 09/04/17


Tagged


Versions (?)

Updating Currency Rates In SAP Business One


 / Published in: C#
 

URL: http://www.saphanadev.net/sap-b1/updating-currency-rates.html

Update exchange rates in SAP Business One

  1. SAPbobsCOM.Company company = new SAPbobsCOM.Company();
  2. company.Server = "server ip";
  3. company.CompanyDB = "company db";
  4. company.DbUserName = "db username";
  5. company.DbPassword = "db password";
  6. company.UserName = "sap user";
  7. company.Password = "sap password";
  8. company.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_HANADB;
  9. int result = company.Connect();
  10. if (result == 0)
  11. {
  12. SAPbobsCOM.SBObob bo = company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
  13. bo.SetCurrencyRate("USD", DateTime.Now, rates["USD"], true);
  14. company.Disconnect();
  15. }
  16. else
  17. {
  18. Console.WriteLine(company.GetLastErrorDescription());
  19. }

Report this snippet  

You need to login to post a comment.