SAP Knowledge Base Article - Public

3614306 - Custom instance created on EC when Inport is blank

Symptom

You have embedded an EC in a standard UI as per SAP guidance and noticed that the Inport is fired even if a blank value is being passed as an Outport and this is causing inconsistent behavior.

Environment

  • SAP Business ByDesign
  • SAP Cloud Applciations Studio
  • SAP Cloud for Customer

Cause

This is expected as Outports are allowed to pass a blank value.

Resolution

In case you do not want EventHandlers triggered when the Inport is blank, please consider creating a EventHandler with a Script Operation that prevents execution of other events when the Inport is not filled.

Example, below UI script will only trigger EventHandler "ReadOrCreate" if UUID is filled:

unless($controller.Utils.IsInitial($data.Inport.UUID)
  $controller.HandleEvent("ReadOrCreate") 
end

See Also

Blog: https://community.sap.com/t5/technology-blog-posts-by-sap/embedded-component-as-a-facet-in-the-standard-ui/ba-p/13319690

Help Portal: https://help.sap.com/docs/SAP_CLOUD_APPLICATIONS_STUDIO/cbcebe3cfb1647a8b0322c18dbb0b481/73ccdef973e21014bfe3f653bddf06bf.html

Keywords

PDI, SDK, UI Designer, Read, Create, Embedded Component, AlternativeKey, missing, embed, Event Handler, BOOperation, Key, Parameter , KBA , AP-RC-UIF-DT , UI Framework Designtime , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions ; SAP Cloud for Customer add-ins all versions ; SAP Cloud for Customer core applications all versions