Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9129

Re: SAP Cloud SDK : Create Entry from ABSL (Root and Node Level) in Custom BO

$
0
0

Hello Mithun,

 

Your code may look like this

 

// create the node instance for activities with data

var nodeIns = this.Cust_Act_send.Create(noderef);

 

// TextCollection myNode is empty as this is newly created

// copy from PhoneActivity

foreach( var originalText in Phactivity.TextCollection) {

 

  // new TextCollection, link to BOCustomActivity is set via path "this...."

  var newText = this.Cust_Act_send.myNode.Create();

 

  // copy values

  newText.TypeCode.content = originalText.TypeCode.content;

  newText.LanguageCode = originalText.LanguageCode;

 

  // do not copy empty text

  if (originalText.TextContent.IsSet()) {

    newText.TextContent.Create();

    newText.TextContent.Text.content = originalText.TextContent.Text.content;

    }

  }

 

Maybe the biggest difficulty is that a Dependent Object "knows"  from the creation path to which instance of which BO it belongs to.

Therefore there is not direct assignment to the "myNode" .

 

HTH,

     Horst


Viewing all articles
Browse latest Browse all 9129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>