on 10-20-2010 10:50 AM
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.
Have you found the solution already? If so, please, share it with the community and close this thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.