cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member465537
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Answers (1)

Answers (1)

former_member465537
Participant
0 Kudos

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

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

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