Exercise 1.4 - Create Child Business Object CardStatus with Initial Mapping

Modified on Fri, 13 Oct 2023 at 06:22 PM

In this exercise, you are going to define a Business Object called CardStatus as a child to Business Object Card, including Interface Fields and adding Target Objects. Like the previous exercise, you are also going to map some of the Target Fields, the easy ones.


What is the rationale behind creating Business Object CardStatus as a child of Card? Why not just continue on Card itself? There can be many different reasons, but the most common ones are:

  • There can be several CardStatus for each Card
  • Sometimes a CardStatus must be created, sometimes not

Create child Business Object CardStatus as a child to Card

  • Open Business Object Card on the Document canvas
  • Go to Children tab
  • Click the Add button, in the dialog
    • Supply the name of the new Child Business Object: CardStatus
    • Check Save Business Object to save the Card parent Business Object after save
    • Check Open child to open the new child Business Object immediately
  • The new child Business Object opens on the Document canvas and is already name CardStatus
    • Provide a description: List of status on a Card
    • Select the Interface tab to create CardStatus Interface Fields, and now - because this is a Child Business Object - a cardinality to define the number of occurrences allowed of the child, for instance
      • 0 : * - there can be 0 to infinity occurrences
      • 1 : 1 - there must be 1 and only 1 occurrence
      • 0 : 2 - there can be from 0 up to 2 occurrences
    • In this case leave it at the default: 0 : *
  • Type in the Interface Fields listed below

  • Save (Ctrl-s)


No Partition Field but Cardinality instead?

In the last exercise, Studio automatically added the PartitionId Interface Field on the Card Business Object.  Why not a PartitionId here on CardStatus


The new CardStatus Business Object is a child of Card - it is not a root Business Object. A Partition Field is only relevant for root Business Objects. On a child Business Object, Studio instead asks you for Cardinality: How many child Business Objects within the parent Business Object.


Add Target Object Tgt.Card_Status


  • Open child Business Obejct CardStatus (if not open)
  • Go to the Target tab
  • Click the Add button, in the dialog
    • Leave the Meata data drop down on Target [Tgt]
    • Select the Card_Status metadata structure from the list (if Card_Status do not appear, check if you did Exercise 1.2 – Import Target Structures correctly?
    • Leave the Name blank
    • Check Save Business Object to save the Card parent Business Object after save
    • Check Open Target Object to open the new Target Object immediately


Map part of Target Object Tgt.Card_Status


Now you are going to map the easy part of the Target Fields in Target Object Tgt.Card_Status.


  • Tgt.Card_Statusshould be open on the Document canvas after the last step 
    • If not: Open Tgt.CardStatus, either from Project Explorer (Business Object Card > Business Object CardStatus > Tgt.CardStatus), or from Business Object CardStatus by double-clicking the Tgt.Card_Status row on the Target tab
  • On Tgt.Card_Status, select the Target tab
  • Map the following fields using value Interface
    • Target Field StatusSeqNo to CardStatus Interface Field CardStatusSeqNo
    • Target Field StatusStartDate to CardStatus Interface Field StatusStartDate
    • Target Field StatusEndDate to CardStatus Fnterface Field StatusEndDate
  • Target Field CrudStatus to value Literal C
  • Map the following fields using value Target. The value type Target means that you pick up the value of another Target Field, whose value has already been assigned
    • Target Field BankId to Target Field BankId in Tgt.Card on Business Object Card
      • Select BankId field
      • Select Target from Value drop down
      • Tab right (or click in the Content cell)                 
      • Select Business Object Card from Business Object drop down. Note that you can chose your current Business Object (which is CardStatus) or any of its ancestors (in this case Card)
      • Select Tgt.Card from the Target Object drop down
      • Select BankId from the Field drop down
      • Then Ok       
    • Target Field CardId to Target Field CardId in Tgt.Card on Business Object Card
    • Target Field CreatedBy to Target field CreatedBy in Tgt.Card on Business Object Card



What happened here?


You are proceeding in your instructions to Hopp on how to create the Target data for the Card Business Object. You have extended the Card Business Object by adding the child Business Object CardStatus.


Furthermore, you have told Hopp to deliver a row to the structure in the Target system called Card_Status, by creating the Target Object Tgt.Card_Status on the child Business Object CardStatus.


If you have a look at the Project Explorer treeview, this is quite easy to see the structure you have created in this and the previous exercise:



You have also extended your arsenal of Value types with a new one:

  • Interface
  • Literal
  • Target, to pick up a value from another Target Field


Of course, when you use the value of another Target Field, it is rather important that this value has already been assigned. This is why you can change the calculation sequence of the Target Fields by moving them up or down in the list using the 2 buttons on the right.

Note that moving the Target Fields like this only affects the sequence of the value assignments. Regardless of this, in the migration result the Target Fields will always be delivered by Hopp in the sequence they are defined in the metadata.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article