cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong Quantity in VL31N for Subcontracting Components

bunyamin
Participant
0 Kudos

Hello Experts,

I have an issue regarding subcontracting.

Please find the details below.

1. I created a subcontract PO.

2. Then I edited the components by spliting in two batches. (Also I fixed the quantites)

3. Creating inbound delivery in VL31N, in this step quanties are correct.

4. I created batch subitem for delivery.

5. Now component quantites are wrong.

For subitem 900001 total should be 10000 PCs but in here it is 10001 PCs

For subitem 900002 total should be 12000 PCs but in here it is 12001 PCs

In total we have 2 more PCs.

Is there anyway to fix this problem?

Thanks in advance.

Regards.

Bünyamin Atasoy

Accepted Solutions (1)

Accepted Solutions (1)

DominikTylczyn
Active Contributor

Hello bunyamin_atasoy

I've done a little code analysis for you. Subcontracting components of an inbound delivery are handled with the CL_SHP_LECOMP class. The correlation of a component quantity is calculated with the CORRELATE_COMPONENT method. Here, the method ROUND is used that rounds the results according to the unit of measure settings taking into account number of decimal places, which is 0 in case of PCS. That proves my earlier statement.

The CORRELATE_COMPONENT method calls the BAdI enhancement SHP_BADI_LECOMP_CORRELATE. It provides the method CORRELATE that you can use to implement your own correlation.

Best regards

Dominik Tylczynski

bunyamin
Participant

Thanks for help.

Regards.

Bünyamin Atasoy

Answers (1)

Answers (1)

DominikTylczyn
Active Contributor
0 Kudos

Hello

First see the note 1760723 - Fixed quantities are distributed to all batch split items that explains the logic of subcontracting components calculation in case of inbound delivery batch split items.

It seems that the quantities are rounded up to full PCS:

  • 22 = roundup( 48 / 22.000 * 10.000 )
  • 9979 = roundup( 21.952 / 22.000 * 10.000 )
  • 27 = roundup( 48 / 22.000 * 12.000 )
  • 11.974 = roundup( 21.952 / 22.000 * 12.000 )

Makes sense?

Best regards

Dominik Tylczynski

bunyamin
Participant
0 Kudos

Hello, thanks for response.

Actually it does make sense but how can we get the right quantity in total or is that a standart behave?

Regards.

Bünyamin Atasoy.