on 02-11-2011 10:01 AM
Hi, all
I want to log NC by using API. but can't complet succsessful .
please help me check the following source code.
thanks.
NCProductionServiceInterface ncPSI = Services.getService("com.sap.me.nonconformance", "NCProductionService");
CreateNCRequest ncRequest = new CreateNCRequest();
//NC500_part: copy from NC500,and ALLOW_PARTIAL=YES
ncRequest.setActivity("NC500_part");
ncRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
ncRequest.setValidateNCCodeOperation(true);
// defined NCCODE: NCJPN1
ncRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
ncRequest.setDefectCount(new BigDecimal("3"));
CreateNCResponse ncResponse = ncPSI.createNC(ncRequest);
DispositionRequest disRequest = new DispositionRequest();
disRequest.setActivity("NC500_part"); //what can be set for this Activity, NC500_part is OK?
disRequest.setSfcRef(new SFCBOHandle(site, sfc).toString());
ProductionContext productionCtx = new ProductionContext();
productionCtx.setResourceRef(new ResourceBOHandle(site, "COIL").toString());
disRequest.setProdCtx(productionCtx);
DispositionSelection disSelection = new DispositionSelection();
//DispositionSelection is must need, but what shuold be set?
disSelection.setXXXX();
disRequest.setDispositionSelection(disSelection);
disRequest.setNcCodeRef(new NCCodeBOHandle(site,"NCJPN1").toString());
disRequest.setTotalDefectCount(new BigDecimal("3"));
// DispositionNC
DispositionResponse disResponse = ncPSI.disposition(disRequest);
resolved by oss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Who knows it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.