on 04-10-2013 10:40 AM
Hi Experts,
I have created a toolbar script on the Contract document for sending a notification to the supplier contact from the contract documnet. I am not finding a way to retrieve the Supplier contact.
I am able to retrieve the contract document by the following codes, to move further I need the Supplier contact so that I can mail the Contract document to the Supplier contact by the toolbar script.
import java.io.*;
import java.text.*;
import java.util.*;
import com.sap.odp.api.doccommon.masterdata.VendorIBeanHomeIfc;
import com.sap.eso.api.contracts.ContractIBeanHomeIfc;
import com.sap.eso.api.doccommon.doc.contract.DocumentVersionIBeanIfc;
import com.sap.odp.api.common.types.AttachmentIfc;
import com.sap.odp.api.util.NotificationUtil;
contractBean = doc.getRootParentIBean();
DocumentVersionIBeanIfc docVersionBean = doc.getDocVersions().get(0);
AttachmentIfc attachment = docVersionBean.getDoc();
File file = attachment.getFileData(session);
Please suggest a solution for this.
Thanks
Swastik
Hi Swastik,
You can try this:
import com.sap.eso.api.contracts.ContractIBeanIfc;
import com.sap.odp.api.common.types.ObjectReferenceIfc;
ContractIBeanIfc doc=(ContractIBeanIfc)doc;
//will give supplier primary contact
ObjectReferenceIfc MASupplierPrimaryContact =(ObjectReferenceIfc)doc.getContactRef();
ObjectReferenceIfc masuppliers = doc.getVendorRef();
//will give supplier contact no
String MASupplierACCnumber = doc.getVendorAcctNum();
Hope this helps,
Kumud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.