on 06-14-2011 10:44 PM
Does any know why there isn't a warehouse field on ProductTrees Object (BOM)?
This seems to be a missing field for a while now. I run into this every time import BOMs into sap. The warehouse can be set in the SAP client, just not through the DI-API.
It is important to set because this is where a production order to put the final product by default.
Marshall
nm
Edited by: Tjaard Du Plessis on Jun 22, 2011 12:26 PM
Edited by: Tjaard Du Plessis on Jun 22, 2011 12:26 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marshall,
If you use the XML interface in the DI API to load the ProductTrees object then you can set the warehouse when adding new BOMs but it doesn't work for updating existing BOMs.
SAPbobsCOM.ProductTrees bom = (SAPbobsCOM.ProductTrees)conn.SboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oProductTrees);
string fileName = @"C:\Temp\BOMImport1.xml";
bom = (SAPbobsCOM.ProductTrees)conn.SboCompany.GetBusinessObjectFromXML(fileName, 0);
if (bom.Add() != 0)
{
conn.SboApp.SetStatusBarMessage(conn.SboCompany.GetLastErrorDescription(), SAPbouiCOM.BoMessageTime.bmt_Medium, true);
}
<?xml version="1.0" encoding="UTF-16"?><BOM>
<BO>
<AdmInfo>
<Object>66</Object>
</AdmInfo>
<OITT>
<row>
<Code>BOMTEST1</Code>
<TreeType>P</TreeType>
<PriceList>1</PriceList>
<Qauntity>1.000000</Qauntity>
<UseFthrWhs>N</UseFthrWhs>
<CreateDate>20060102</CreateDate>
<UpdateDate>20060102</UpdateDate>
<Transfered>N</Transfered>
<DataSource>O</DataSource>
<UserSign>1</UserSign>
<SCNCounter>1</SCNCounter>
<ToWH>04</ToWH>
<Object>66</Object>
<UserSign2>1</UserSign2>
<HideComp>N</HideComp>
</row>
</OITT>
<ITT1>
<row>
<Father>BOMTEST1</Father>
<ChildNum>0</ChildNum>
<Code>COMPONENT1</Code>
<Quantity>1.000000</Quantity>
<Warehouse>01</Warehouse>
<Price>500.000000</Price>
<Currency>NZD</Currency>
<PriceList>1</PriceList>
<OrigPrice>500.000000</OrigPrice>
<OrigCurr>NZD</OrigCurr>
<IssueMthd>B</IssueMthd>
<Object>66</Object>
</row>
</ITT1>
</BO>
</BOM>
Kind Regards,
Owen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
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.