Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 20, 2017 at 09:57 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 20, 2017 at 12:05 PM

    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

    Add comment
    10|10000 characters needed characters exceeded