cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member244307
Participant
0 Kudos

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();

Accepted Solutions (0)

Answers (0)