Skip to Content
avatar image
Former Member

Gross Amount in Freight Charges is reset to zero after update the SO address table via DI

Hi,


Recently I noticed that when I update a sales order address table (RDR12 table via DI object (AddressExtension), for unknown reason, the Gross Amount in it Freight Charges was reset to zero. Below is my code snip. Any idea?

Lan

doc = (SAPbobsCOM.Documents)company.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);

if (doc.GetByKey(doc_entry))

{

string bp_code = doc.CardCode;

string address_id = addr_type == "S" ? doc.ShipToCode : doc.PayToCode;

BP bp = newBP();

BPAddress addr = bp.GetBpAddress(company, bp_code, address_id, addr_type);

SAPbobsCOM.AddressExtension ae = doc.AddressExtension;

if (addr_type == "B")

{

ae.BillToBlock = addr.Block;

ae.BillToBuilding = string.Empty; // not used

ae.BillToCity = addr.City;

ae.BillToCountry = addr.Country;

ae.BillToCounty = addr.County;

ae.BillToState = addr.State;

ae.BillToStreet = addr.Street;

ae.BillToStreetNo = addr.StreetNo;

ae.BillToZipCode = addr.ZipCode;

ae.BillToAddressType = "BillToAddressTypeU";

}

else

{

ae.ShipToBlock = addr.Block;

ae.ShipToBuilding = string.Empty; // not used

ae.ShipToCity = addr.City;

ae.ShipToCountry = addr.Country;

ae.ShipToCounty = addr.County;

ae.ShipToState = addr.State;

ae.ShipToStreet = addr.Street;

ae.ShipToStreetNo = addr.StreetNo;

ae.ShipToZipCode = addr.ZipCode;

ae.ShipToAddressType = "ShipToZipCodeU";

}

ii = doc.Update();

sapscreen.jpg (138.8 kB)
sapscreen2.jpg (147.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers