Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Copy Custom collection from Master to Sub Agreement

$
0
0

Need help if any simple/direct out of box way is there to copy a Custom collection data to a Sub Agreement when it gets created from its Master.

 

Say we have Collection called Products

 

NameTypeDepartmentLocation

 

Whenever a Sub Agreement is created the data doesn't carry over automatically from its Master

 

We had to write code in POST_CREATE of Sub Agreement for this purpose, briefly as below

 

parent = doc.getParentIBean();

p_colln = parent.getExtenionCollection("products");

c_colln = doc.getExtensionCollection("products");

 

iter = p_colln.iterator();

while(iter.hasNext()){

    p_member = iter.next();

  

    c_member = c_colln.create();

    c_member.set("name", p_member.get("name"));

  }

  c_colln.add(c_member);

 

}

 

is there any out of box way of doing this?


Viewing all articles
Browse latest Browse all 1416

Trending Articles