Skip to Content
Technical Articles

Change in Custom BO cardinality Data Workbench interpretation

Hi Together,

 

with the recent release 1908 SAP changed it’s Data Workbench intepretation of custom BO subnode cardinality.

Bevore the release 1908 the cardinality of this BO definition would be interpreted as 0:n as default.

businessobject Test {
  element ID:BusinessPartnerInternalID;

  node ListEntry{
    element Column1:LANGUAGEINDEPENDENT_LONG_Description;
    element Column2:Indicator;
  }
}

With the new release the Data Workbench defaults the cardinality as 0:1.

 

If you are not using the Data Workbench, the BODL above and the coding below still works perfectly fine.

var check:Indicator=true;
var counter = 0;

var newEntry : elementsof Test.ListEntry;

while(check)
{
  newEntry.Column1 = "Test entry: " + Numeric.RoundToString(counter);
  newEntry.Column2 = check;
 
  this.ListEntry.Create(newEntry);

  counter = counter + 1;

  if(counter == 14)
  {
    check = false;
  }
}

This is still able to create 14 entries without defining the cardinality.

But if you want to upload nodes via the Data Workbench you now need to define how the cardinality is from object root to node like this.

businessobject Test {
  element ID:BusinessPartnerInternalID;

  node ListEntry[0,n]{
    element Column1:LANGUAGEINDEPENDENT_LONG_Description;
    element Column2:Indicator;
  }
}

Here you could alos set a minimum and maximum  (e.g. [2,5]) entries for your node list.

 

As a summary you could say that a cardinality definition is not necessary, but if you want to use the full functionality it is needed.

The best way to go should be to just directly give it a 0:n cardinality.

 

Kind Regards,

Johannes

 

 

1 Comment
You must be Logged on to comment or reply to a post.