on 10-08-2020 7:14 AM
I am using SAP B1 9.2 PL:08. I am using this code for updating the pan no. of business partner.
objSAPBP = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
objSAPBP.CardCode = txtCode.Text
If objSAPBP.GetByKey(txtCode.Text) = True Then
For intM = 0 To objSAPBP.FiscalTaxID.Count - 1
objSAPBP.FiscalTaxID.SetCurrentLine(intM)
If objSAPBP.FiscalTaxID.AddrType = SAPbobsCOM.BoAddressType.bo_ShipTo Then
objSAPBP.FiscalTaxID.TaxId0 = Trim(txtPanNo.Text)
objSAPBP.FiscalTaxID.TaxId12 = Trim(txtCode.Text)
End If
Next
lngStatus = objSAPBP.Update
If lngStatus = 0 Then
lblStatus.Visible = True
lblStatus.CssClass = "MsgStatusBlk"
lblStatus.Text = "PAN No. updated successfully"
btnSave.Text = "OK"
End If
If objCompany.GetLastErrorDescription.Length > 0 Then
lblStatus.Visible = True
lblStatus.CssClass = "MsgStatusRed"
lblStatus.Text = objCompany.GetLastErrorDescription
End If
End If
I can update the pan no. using the above code.But it creates problem for some business partners. Some pan no.'s are not getting updated using the above code. So I update the pan no. manually through SAP client. For such business partners new entry is added in CRD7 table which is not linked to shipping address i.e. Address field is blank. For some business partners , I can find different pan no's in the CRD7 table.
Is this correct code for updating pan no. ?
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
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.