cancel
Showing results for 
Search instead for 
Did you mean: 

Adjust done SFC qty

olivier_thiry
Participant
0 Kudos

hello,

Even if I'm pretty sure to know the answer, is there any way to adjust quantity on a "done" SFC (through SDK or whatever)

Thanks

Cheers

Olivier

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182330
Active Contributor
0 Kudos

Hi Olivier,

No, it's not possible. There is SFC Quantity Adjustment activity, but it doesn't allow modifying DONE SFCs.

Regards,

Konstantin

olivier_thiry
Participant
0 Kudos

ok, I was sure, but my boss asked a confirmation ;o)

And is it an option to set back the SFC status to "in queue" and then adjust qty/set back to "done" ? (using SFC API)

former_member182330
Active Contributor
0 Kudos

I think nothing can prevent you doing this in GUI. Can't advise on API part.

Konstantin

Former Member
0 Kudos

Hello,

This API should work: SfcStateServiceInterface.adjustSfcQuantity. And it actually should work on Done SFC as well.

Thanks,

Bakhtiyar

olivier_thiry
Participant
0 Kudos

Thanks for tip, I tried to use this service, but got a business exception, here is a part of the stacktrace :

com.sap.me.frame.transitionutils.Exceptions$LegacyBusinessException

at com.sap.me.frame.transitionutils.Exceptions.convert(Exceptions.java:47)

at com.sap.me.production.impl.SfcStateService.convertAdjustSfcException(SfcStateService.java:990)

at com.sap.me.production.impl.SfcStateService.adjustSfcQuantity(SfcStateService.java:817)

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

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

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

....

at com.sap.me.demand.ShopOrderBOBean.qtyAdjust(ShopOrderBOBean.java:3904)

So seems to me that the function failed when trying to update shop order qty...

Any idea what could be wrong ?

Here is an extract of my code :


		BigDecimal qty = new BigDecimal(0);
		req.setSfcRef("SFCBO:" + request.getSite() + ","
				+ request.getSfc());
		
		try {
			qty = BigDecimal.valueOf(Double.valueOf(request.getNewQty()));
		} catch (NumberFormatException e) {
			InputMessageValidationFault f = new InputMessageValidationFault();
			f.setMessage(e.getMessage());
			throw new InputFault("Error parsing the qty", f);
		}
		req.setNewSfcQuantity(qty);
		if (!(null == request.getOperation() || request.getOperation().equals(""))) {
			req.setOperationRef(request.getOperation());
			
		}
		if (!(null == request.getResource() || request.getResource().equals(""))) {
			req.setResourceRef(request.getResource());
			
		}
		
		Collection<AdjustSfcQuantityRequest> reqCol = new ArrayList<AdjustSfcQuantityRequest>();
	                     reqCol.add(req);
		try {
			Collection<AdjustSfcQuantityResponse> respCol = sfcInterface.adjustSfcQuantity(reqCol);
			resp.setMessage("Done");

		} catch (SfcAdjustmentQuantityLessThanZeroException e) {
...

Former Member
0 Kudos

Hello,

When you adjust quantity of SFC, make sure that adjusted quantity will fit into "Quantity To Build" of shop order, i.e. "Quantity To Release" + adjusted quantity must be less than "Quantity To Build".

Thanks,

Bakhtiyar

olivier_thiry
Participant
0 Kudos

Hi,

Unfortunately, the quantity matches, but I was thinking also about the lot size, as by default it's 1 and I tried to update to 2. I changed the lot size, but now I still get a dump, and I can see somewhere "SITE is missing", even if I pass the site correctly...

Does anybody already used this API ? Can anybody paste a part of his code so I can see if I miss something ?

Thanks

Olivier