on 06-13-2012 1:43 PM
Hi Experts,
We are migrating our SAP e-sourcing ver 5.0 to 7.0. In the previous version we have an outbound script for the master agreement.
To get the plant name and price unit of line item we were using the following code
import com.sap.eso.api.contracts.ContractIBeanHomeIfc;
agreementBean = doc.getRootParentIBean();
contractHome=IBeanHomeLocator.lookup(session,ContractIBeanHomeIfc.sHOME_NAME);
// To get the agreemnet id
agreement_id_str = doc.getDocumentId();
lineItemCollection = agreementBean.getLineItems();
collectionsize = lineItemCollection.size();
//getting the line items for a master agreement
for(i=0;i<collectionsize;i++){
list_item_str = "";
collectionbean = lineItemCollection.get(i);
plant_str= collectionbean.getExtensionField("PLANT").get().getDisplayNameId(session);
price_unit_int = collectionbean.getExtensionField("PRICE_UNIT").get().intValue();
}
but when we try the same in 7.0 the following lines give error
plant_str=collectionbean.getExtensionField("PLANT").get().getDisplayNameId(session);
price_unit_int = collectionbean.getExtensionField("PRICE_UNIT").get().intValue();
please suggest how to modify these line to make it running in version 7.0
Regards,
Swastik
Hi Swastik,
It appears that the two fields in question are Extension Fields, i.e. they are not standard fields.
I would begin by confirming if these fields exist in the Extension Defintion. Please see if these fields were migrated correctly and still have the same name.
Also, if you could mention the error message encountered it would be easier for us.
Thanks
Devesh
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.