Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: Write into SAP B1 tables for Article and BusinessPartner

$
0
0

Hi Mark,

This simple and minimum code should add item and BP, provided all the necessary GL Account determination has been setup. Otherwise you might need to provide more information before adding.

 

            SAPbobsCOM.Items oITM = eCommon.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems) as SAPbobsCOM.Items;            oITM.ItemCode = "ABC";            oITM.ItemName = "My Item Description";            int iErr = oITM.Add();            if (iErr != 0)                throw new Exception(eCommon.oCompany.GetLastErrorDescription());            SAPbobsCOM.BusinessPartners oCRD = eCommon.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners) as SAPbobsCOM.BusinessPartners;            oCRD.CardCode = "ABC";            oCRD.CardName = "My Customer Name";            int iErr = oCRD.Add();            if (iErr != 0)                throw new Exception(eCommon.oCompany.GetLastErrorDescription());

Regards
Edy


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>