cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the supplier contact from a toolbar script in the contract document

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Swastik ,

If I correctly understand , you want to retrieve the field "Primary Contact Email" in Supplier tab in Master Agreement .

Based on the above requirement , I did a quick try and found a way to retrieve supplier email contact.

Please let know if it helps you

Regards

Sudipta Mondal