问题显示在OVS字段上的描述

2020-09-08 23:44发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)嗨,我正在尝试获取OVS字段以显...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


嗨,我正在尝试获取OVS字段以显示所选值的描述而不是ID,我试图遵循此处写的内容,但是没有运气:

https://answers.sap.com/questions/251038/how-to-make-association-to-bo-material-to-get-the.html

这是我的代码:

将AP.Common.GDT导入为apCommonGDT;


 [DeploymentUnit(CustomerRelationshipManagement)] [ChangeHistory] ​​[WithAdministrativeData(IncludeSubnodes)]业务对象SampleDv
 {


 [DependentObject(TextCollection)]节点TextCollection;
 [DependentObject(AttachmentFolder)]节点AttachmentFolder;


  //节点根的元素
   [Label(" Name")]元素名称[0,1]:AP.Common.GDT:LANGUAGEINDEPENDENT_MEDIUM_Description;
   [Label(" ID Sample")]元素IDSample [0,1]:ID;
   [Label("产品日期")]元素DateofProduct [0,1]:AP.Common.GDT:Date;
   [Label("产品到期日期")]元素ProductExpirationDate [0,1]:AP.Common.GDT:Date;
   [Label(" Use")]元素Use [0,1]:AP.Common.GDT:LANGUAGEINDEPENDENT_MEDIUM_Description;
   [Label(" Amount")]元素数量[0,1]:AP.Common.GDT:Amount;
   [Label(" Cantidad Inicial")]元素CantInicial [0,1]:AP.Common.GDT:Quantity;
   [Label(" Centidad Entregada")]元素CantEntreg [0,1]:AP.Common.GDT:Quantity;
   [Label(" Cantidad Actual")元素CantActual [0,1]:AP.Common.GDT:Quantity;
   [Label(" Delivery Date")]元素DeliveryDate [0,1]:AP.Common.GDT:Date;
   [Label(" Movement Status")]元素MovementStatus [1,1]:MoveStatusCodesCode;
   元素CheckIfNew:指示器;


  //节点根的关联
   
   
   


    [Label(" ID Proveedor")]元素ProviderID:ID;
    元素ProviderName:LANGUAGEINDEPENDENT_MEDIUM_Name;
    将ToProvider关联到Provider;
   
    [Label(" ID Cliente")]元素AccountID:ID;
    元素AccountName:LANGUAGEINDEPENDENT_MEDIUM_Name;
    使用UUID将ToAccount [0,1]关联到AP.FO.BusinessPartner.Global:Customer.Root;
    [Label(" ID Empleado")]元素EmployeeID:ID;
    元素EmployeeName:LANGUAGEINDEPENDENT_MEDIUM_Name;
    使用UUID将ToEmployee [0,1]关联到AP.FO.BusinessPartner.Global:Employee.Root;
    [Label(" ID Oportunidad")]元素OpportunityID:ID;
    元素OpportunityName:LANGUAGEINDEPENDENT_MEDIUM_Name;
    使用UUID将ToOpportunity [0,1]与AP.CRM.Global:Opportunity.Root关联;
    [Label(" ID Producto")]元素ProductID:ID;
    元素ProductName:LANGUAGEINDEPENDENT_MEDIUM_Name;
    使用UUID将ToProduct [0,1]关联到AP.FO.ProductDataMaintenance.Global:Material.Root;
   
  //节点根的动作
   动作副本;
 }
 

Event-AfterModify.absl

导入ABSL;
 导入AP.FO.BusinessPartner.Global;
 导入AP.FO.ProductDataMaintenance.Global;


 if(this.CantInicial.content> 0 && this.CantEntreg.content> = 0)
 {
     this.CantEntreg.unitCode = this.CantInicial.unitCode;
     this.CantActual.unitCode = this.CantInicial.unitCode;
 this.CantActual.content = this.CantInicial.content-this.CantEntreg.content;
 }


 var employeeidentification = Employee.Identification.Retrieve(this.EmployeeID);
 如果(employeeidentification.IsSet())
 {
 this.EmployeeName = employeeidentification.ToParent.CurrentCommon.Person.Name.GivenName;
 }其他
 {
 this.EmployeeName.Clear();
 }


 返回;
 

我遇到的问题是这样:

有什么建议吗?,谢谢。

(42.6 kB)