Skip to Content
avatar image
Former Member

Sap sourcing master agreement status update

Dear all,

            When I update the master agreement status, it works fine,but the status is blank.

            But when i leave it to the outside,it can show the status.

               Code is as follows:

    ValueListValueIBeanHomeIfc valueListHome = IBeanHomeLocator.lookup(session,doc.getStatusRef());       doc.getIBeanHomeIfc().upgradeToEdit(doc);    ValueListValueIBeanIfc valueList = valueListHome.findUniqueByNameType("Executed Agreement",1);    doc.setStatusRef(valueList.getLocalizedObjectReference());    doc.getIBeanHomeIfc().save(doc);    doc.getIBeanHomeIfc().downgradeToView(doc);

              I don't know what the reason is,please help me ,thank you very much.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 26, 2015 at 05:36 AM

    Hi Jin bin,

    Presuming that you are writing Document Life cycle Script of MA.

    Try the below code and check if it works for you.

    import com.sap.odp.api.doccommon.masterdata.ValueListValueIBeanHomeIfc;

    valueListHome = IBeanHomeLocator.lookup(session,ValueListValueIBeanHomeIfc.sHOME_NAME); 

       valueList = valueListHome.findUniqueByNameType("Executed Agreement",1);

      

      doc.setStatusRef(valueList.getLocalizedObjectReference());

    Hope it helps!

    Best,

    Kushagra A

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi kushagra,

      I have tried to use the code you recommended,but it still doesn't work.

      Anyway, thank you.

      best regards

      Jinbin Sun