Skip to Content
avatar image
Former Member

hold sfc by using API, ERROR has happened.

I want to hold sfc by using API, but the NullPointerException has pappened. the source code is following:

SFCBOHandle sfcHandle = new SFCBOHandle(site,sfc);

HoldServiceInterface sfcHoldSvc = Services.getService("com.sap.me.production", "HoldService");

PlaceImmediateHoldGroupRequest holdGroupRequest = new PlaceImmediateHoldGroupRequest();

List sfcList = new ArrayList();

sfcList.add(sfcHandle);

holdGroupRequest.setSfcList(sfcList);

holdGroupRequest.setComments("test comment");

//List reasonCodeList = new ArrayList();

//reasonCodeList.add(new ReasonCodeBOHandle(site, "DEF_IMMED_RC", "H"));

//holdGroupRequest.setReasonCodeList(reasonCodeList);

sfcHoldSvc.placeSfcOnImmediateHold(holdGroupRequest);

the error log is following:

Caused by: java.lang.NullPointerException

at com.sap.me.production.HoldSOBean.holdObjects(HoldSOBean.java:1019)

at com.sap.me.production.HoldSOBean.immediateHold(HoldSOBean.java:139)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)

... 61 more

how can I hold SFC by coding.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jul 05, 2012 at 10:39 AM

    Have you found the solution already? If so, please, share it with the community and close this thread.

    Add comment
    10|10000 characters needed characters exceeded