on 05-03-2012 5:39 PM
Hi Experts,
I am trying to LogNC in an activity hook at POST_START hook point. I am trying as follows. I need to set Site,Sfc,UserId etc. However I could not find those methods in "CreateNCRequest" class.Suggest me the direction.
NCProductionServiceInterface ncProductionServiceInterface = Services.getService("com.sap.me.nonconformance","NCProductionService");
CreateNCRequest createNCRequest = new CreateNCRequest();
createNCRequest.setSfcRef("");
createNCRequest.setQty(new BigDecimal("1.0"));
createNCRequest.setComments("");
createNCRequest.setFailureId("");
createNCRequest.setNcCodeRef("");
nCProductionService.createNC(createNCRequest);
If I try the abve code I am getting the following messages in NW trace.
com.sap.me.frame.domain.RequiredValueValidationException: class com.sap.me.nonconformance.NCRequestactivity.
at com.sap.me.frame.domain.XmlElementValidator.validate(XmlElementValidator.java:34)
at com.sap.me.frame.domain.GenericSchemaValidator.validateObjectAgainstClassFields(GenericSchemaValidator.java:79)
Thanks.
sfcRef is required and "" is not going to be a valid SFC Ref. NcCodeRef is not required, but "" will not work as that's not a valid reference. Either don't call setNcCodeRef() or set it to null.
-tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.