on 11-10-2014 6:27 PM
Experts-
I'd like to update the owner on Contract Generation Templates (Templates, Sections, & Clauses) and Master Agreement Templates.
Looking at the IAPI docs, I'm not sure which IBeam interface these are exposed in. I don't necessarily need code samples or anything, just a little guidance.. My questions are in blue.
Some possibilities I found:
The method: setOwnerObjRef(ObjectReferenceIfc value) of these objects:
com.sap.eso.api.contractgen
TemplateContractIBeanIfc
- Is this just for Contract Gen "templates"? If so, how do you get or can you also access Sections and Clauses too?
I'm thinking may have to check the parent doc on the ClauseIBeanIfc and SectionIBeanIfc.
ClauseIBeanIfc
SectionIBeanIfc
com.sap.eso.api.contracts
ContractIBeanIfc
- This has a field called isTemplate. What does it mean when this is TRUE? That it's a Master Agreement Template?
Or perhaps you know of a better way?
Thanks in advance!
Mike
PS
I started thinking about this after seeing Joerg Lippmann's blog post: and the discussion he references in the article.
Hello Michael,
For setting the Contract document template owner you can use the below Script.
Also if you are the owner of Contract document Template obviously you will be having access to the Sections and clauses.
//for setting the Owner of the Contract document templates ( ex:- CD Temp 1)
import com.sap.eso.api.contractgen.TemplateContractIBeanIfc;
import com.sap.odp.api.common.platform.IapiAccountIfc;
import com.sap.odp.api.common.platform.IapiSessionContextIfc;
//getting the user reference
userObj= session.getAccount().getAccountObjectReference();
//Setting the Owner with above reference
doc.setDocumentOwnerUserReference(userObj);
If you want to replace for the clauses and sections in CD Temp , then create home for the respective clauses and sections and then use below script
//For Sections and Clauses
import com.sap.eso.api.contractgen.SectionIBeanIfc;
//Setting the Owner with above reference
doc.setOwnerObjRef(userObj);
For Setting the Master Agreement Template Owner it is same as Master Agreement since they are of same class 1004
//for master agreement templates
import com.sap.eso.api.contracts.ContractIBeanIfc;
//Setting the Owner with above reference
doc.setDocumentOwnerUserReference(userObj);
Note: If you are writing Script in the respective class, then Doc can be referred as bean otherwise Home has to be created for the class and then you have to access the methods from respective Bean
Hope this helps!
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.