Hi Sunil,
thank you for your support.
I checked better the Public Solution Model for release 1505, and it seems that I cannot add new addresses to the Customer by ABSL Code.
After debugging and displaying the information contained in the Business Object Customer, the right node to create should be under Root.AddressInformation. Nevertheless, if I check the Repository documentation, it seem to be a read only node:
And actually, if I try to use the auto-completion for checking the available actions and methods, my list does not display the Create() method:
It seems that my address manipulating options are limited just on changing and maintaining the current Address, via the following code (which does work instead):
/*
Add your SAP Business ByDesign scripting language implementation for:
Business Object: AddressSelector_BO
Node: Root
Action: WriteNewAddress
Note:
- To access the elements of the business object node,
use path expressions, for example, this.<element name>.
- To use code completion, press CTRL+J.
*/
importABSL;
importAP.Common.GDT;
importAP.FO.BusinessPartner.Global;
importAP.FO.Address.Global;
varbp;
varaddressInfo;
varaddressNode:
elementsofBusinessPartner.AddressInformation.Address.PostalAddress;
varaddressObject:
BusinessObject::BusinessPartner.AddressInformation.Address.PostalAddress;
bp = BusinessPartner.Retrieve(this.BusinessPartnerID);
if (bp.IsSet()) {
if (bp.CurrentDefaultAddressInformation.IsSet()) {
if (bp.CurrentDefaultAddressInformation.Address.IsSet()) {
if (bp.CurrentDefaultAddressInformation
.Address
.DefaultPostalAddressRepresentation
.IsSet()) {
var postalAddress = bp
.CurrentDefaultAddressInformation
.Address
.DefaultPostalAddressRepresentation;
postalAddress.CountryCode = this.Country;
postalAddress.StreetName = this.StreetName;
postalAddress.CityName = this.City;
postalAddress.HouseID = this.HouseNumber;
postalAddress.StreetPostalCode = this.Postcode;
}
}
}
}
Can anyone provide any feedback on my statements and observations?
Thanks a lot,
Davide

