on 10-19-2015 9:43 PM
Hi,
I didn't find any method in its DI object to allow me to create a BinLocation, just wondering does SAP DI expose the method?
My SAP DI version is 9.0, SAP B1 9.02.240 PL 14(32 bit).
Thanks,
Lan
Hi Lan,
The DI API exposes a service to manipulate the bin locations. You can try add new bin location with the following code:
SAPbobsCOM.CompanyService oCompanyService = null;
SAPbobsCOM.BinLocationsService oBinService = null;
SAPbobsCOM.BinLocation oBinLoc = null;
SAPbobsCOM.BinLocationParams oBinParams = null;
//Get the company Service
oCompanyService = oCompany.GetCompanyService();
//Get the service that Add Bin Location
oBinService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.BinLocationsService);
//Get the object of Bin Location
oBinLoc = (SAPbobsCOM.BinLocation)oBinService.GetDataInterface(SAPbobsCOM.BinLocationsServiceDataInterfaces.blcsBinLocation);
//Set the required properties
oBinLoc.Warehouse = "02";
oBinLoc.Sublevel1 = "SYSTEM-BIN-LOCATION-1";
//Add new location
oBinParams = oBinService.Add(oBinLoc);
MessageBox.Show("New Bin Location Created - AbsEntry: " + Convert.ToString(oBinParams.AbsEntry));
Hope it helps.
Regards,
Diego
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
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.