Skip to Content
0

SAP BUSINESS ONE 9.2 PL 08 Does not support items update for gst relevant in india localization

Jun 20, 2017 at 07:05 AM

186

avatar image

Dear Sir,

I am trying to Update My Item With Di api in sap business one PL 08.

At time when i press button in which item update code is write it stop running.

please Help me regarding this.

Code:

SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);

oItem.GetByKey('ABC');

oItem.Excisable = SAPbobsCOM.BoYesNoEnum.tNO;

try

{

oItem.GSTRelevnt = SAPbobsCOM.BoYesNoEnum.tYES;

}

catch (Exception em1) { }

int k = oItem.Add(); if (k != 0)

{ /// ErrorMsg = ErrorMsg + "\r\n " + oCompany.GetLastErrorDescription(); }

Thnak and Regards

Veer Mistry

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
ANKIT CHAUHAN
Jun 20, 2017 at 09:57 AM
0

Hi Veer,

Below code is working for me:

SAPbobsCOM.Items oItem = (SAPbobsCOM.Items)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
oItem.GetByKey("TEST");
try
{
    oItem.GSTRelevnt = SAPbobsCOM.BoYesNoEnum.tYES;
    oItem.GSTTaxCategory = SAPbobsCOM.GSTTaxCategoryEnum.gtc_Regular;
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message.ToString());
}
finally
{
    int UP = oItem.Update();
    if (UP != 0)
    {
        MessageBox.Show(oCompany.GetLastErrorDescription());
    }
}

Put your item ABC under double quotes "ABC" . Also try to debug your code and tell us on which line does it give you the error.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Share
10 |10000 characters needed characters left characters exceeded
Veer Mistry Jun 20, 2017 at 12:05 PM
0

Hi Sir,

Thank you for replay.

This code is work when i used SAPbobsCOM Library but when i used SAPBusinessOneSDK library its stop my add on.

Thnaks and Regards,

Veer Mistry

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Veer,

Surely, you are referring to the old SAPbobsCOM references. Check this link to verify whether you are having the same case:

SAPBusinessOneSDK.dll

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0