SAP Cloud for Customer里BusinessPartner, Customer和Employee这些BO的区别 (3)

读取当前employee的生日:

import ABSL; import AP.FO.BusinessPartner.Global; import AP.PC.IdentityManagement.Global; var qryIdentity_ROOT_QueryByElements; var selParamsIdentity_Root_QueryByElements; var colIdentity_Root; var qryEmployee_Root_QueryByIdentification; var selParamsEmployee_Root_QueryByIdentification; var colEmployee_Root; var attrIdentity_Root_UUID; var instIdentity_Root; // get UUID of current Identity attrIdentity_Root_UUID = Context.GetCurrentIdentityUUID(); // get instance of current identity if (this.birthday.IsInitial()) { qryIdentity_ROOT_QueryByElements = Identity.QueryByElements; selParamsIdentity_Root_QueryByElements = qryIdentity_ROOT_QueryByElements.CreateSelectionParams(); selParamsIdentity_Root_QueryByElements.Add(qryIdentity_ROOT_QueryByElements.UUID.content, "I", "EQ", attrIdentity_Root_UUID.content); colIdentity_Root = qryIdentity_ROOT_QueryByElements.Execute(selParamsIdentity_Root_QueryByElements); foreach (instIdentity_Root in colIdentity_Root) { break; } } // get employee instance and his birthday via identity instance unsing QueryByIdentification at the Root node if (instIdentity_Root.IsSet() ) { qryEmployee_Root_QueryByIdentification = Employee.QueryByIdentification; selParamsEmployee_Root_QueryByIdentification = qryEmployee_Root_QueryByIdentification.CreateSelectionParams(); selParamsEmployee_Root_QueryByIdentification.Add(qryEmployee_Root_QueryByIdentification.UUID.content, "I", "EQ", instIdentity_Root.BusinessPartnerUUID.content); colEmployee_Root = qryEmployee_Root_QueryByIdentification.Execute(selParamsEmployee_Root_QueryByIdentification); foreach (instEmployee_Root in colEmployee_Root) { this.birthday = instEmployee_Root.CurrentCommon.Person.BirthDate; break; // colEmployee_Root should contain exactly one employee } }

更多Jerry的原创文章,尽在:"汪子熙":

SAP Cloud for Customer里BusinessPartner, Customer和Employee这些BO的区别

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzfwxs.html