1

What is the best way to create an interface to the BaaN MRP system?

I'm looking for a way to use C# to create an interface to update the inventory at the ERP.

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Arturo
  • 1,123
  • 3
  • 19
  • 33
  • 1
    Contact the vendor for support. – Hans Passant Feb 11 '11 at 16:19
  • Looks like BaaN is not officially supported anymore. The system is now owned by a different company and it's dead now. – Arturo Feb 11 '11 at 16:58
  • 6
    That is definitely not true, the product is not dead. The Baan Company has merged (via Invensys) into SSA Global and that into [Infor](http://www.infor.com). The BaaN product has been rebranded into [Infor ERP LN](http://www.infor.com/product_summary/erp/ln/). Infor ERP LN is a major product line of Infor, and is still being sold, supported, and enhanced as we speak. – MarnixKlooster ReinstateMonica Mar 10 '11 at 21:36

2 Answers2

1

You need to add a com reference to /baan/bin/bw.tlb
(Ole Automation Baan Type Library)

roeland
  • 6,058
  • 7
  • 50
  • 67
0
object Baan = null ;
Type t;
t = Type.GetTypeFromProgID("Baan4.Application.someuser");
Baan = Activator.CreateInstance(t);
object[] Parameters = new Object[1];
Parameters[0] = 3600;

//Baan.Timeout = 3600;
Baan.GetType().InvokeMember("Timeout", 
                            BindingFlags.SetProperty, 
                            null, 
                            Baan, 
                            Parameters
);

Parameters = new Object[2];
Parameters[0] = "otccomdll...";
Parameters[1] = "function.name...";
Baan.GetType().InvokeMember("ParseExecFunction", 
                             BindingFlags.InvokeMethod, 
                             null, 
                             Baan, 
                             Parameters
);
//your code here    
//Baan.Quit();
Baan.GetType().InvokeMember("Quit", BindingFlags.InvokeMethod, null, Baan, null);
George Stocker
  • 57,289
  • 29
  • 176
  • 237
Jaime Oro
  • 9,899
  • 8
  • 31
  • 39