Skip to Content
avatar image
Former Member

Fetch Values of Organizational Unit using Script

Hello Experts,

I am new to CLM. I am working on a requirement where the system should read the values present in the Organization Unit. If it finds certain values, the system should if an extension field (boolean is true). If it matches with one of the values from the organization unit and the boolean field is false, the system should throw a warning message. I have written the code below, however, i get an error message stating getDisplayName(); cant be found. I am stuck and unable to proceed further. Please help me

orgBeanHome = IBeanHomeLocator.lookup(session, com.sap.odp.api.doccommon.masterdata.purchasing.BusinessUnitIBeanHomeIfc.sHOME_NAME);

OrgUnitRef = orgBeanHome.getOrganizationalUnitRef(); OrgUnitHome = IBeanHomeLocator.lookup(session,OrgUnitRef );

OrgUnit = OrgUnitHome.find(OrgUnitRef);

if(OrgUnit.getDisplayName().equals("ABC") @or orgUnit.getDisplayName().equals("XYZ") {

if(!hasValue(doc.getExtensionField("ma_approval").get()))

{ throw new ApplicationException(session, "Approve the MA");

}

}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers