cancel
Showing results for 
Search instead for 
Did you mean: 

block payment for rejection

former_member416927
Participant
0 Kudos

Hi All,

I have one requirement.

I have one inspection lot for 10 qty, during usage decision 7 qty is put in unrestricted stock and 3 qty rejected and put "in new material" and moved to rejection location. As we can mot make partila UD fo one lot, i have made UD as accepted under minor concession. Now requirment is that during paymenent to vendor system should not allow to do for 10 qty, it should allow for 7 qty as it is moved to unrestricted. How can I do this?

Plz advice.

Thanks,

Regards,

Mayur Patil

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184536
Active Contributor
0 Kudos

Hi

Use user exit LMR1M001---ZXM08U16 and put the following mentioned. This will prevent invoice booking before the qty is not cleared from quality and do Miro only for that qty which is posted to unrestricted.

*& Include ZXM08U16

&----

Declaration of variables

DATA: w_prueflos TYPE qamb-prueflos,

w_lmenge TYPE qals-lmenge01.(unrestricted qty)

Declaration of Internal Tables

DATA: itab LIKE qals OCCURS 0 WITH HEADER LINE.

LOOP AT e_tdrseg WHERE selkz EQ 'X'.

Checking whether the document require Inspection

CLEAR: w_prueflos.

SELECT SINGLE prueflos

INTO w_prueflos

FROM qamb

WHERE mblnr = e_tdrseg-lfbnr(reference document number)

AND zeile(Materail dodument item) = e_tdrseg-lfpos.(reference document item)

IF sy-subrc EQ 0.

CLEAR: itab[], itab.

SELECT SINGLE * INTO CORRESPONDING FIELDS OF itab

FROM qals

WHERE prueflos = w_prueflos

AND stat35 = 'X'.

IF sy-subrc EQ 0.

READ TABLE itab INDEX 1.

CLEAR: w_lmenge.

Sum of quantity (Excludes Block stock)

w_lmenge = itab-lmenge01.

IF e_tdrseg-menge GT w_lmenge.

MESSAGE ID 'ZMM' TYPE 'E' NUMBER '004' WITH w_lmenge e_tdrseg-lfbnr.

ENDIF.

ELSE.

MESSAGE ID 'ZMM' TYPE 'E' NUMBER '005' WITH e_tdrseg-lfbnr.

ENDIF.

ENDIF.

ENDLOOP.

Regards

Manish

kaushik_choudhury2
Active Contributor
0 Kudos

Hello,

Check my article on 'Quality Based Invoice' . It is on similar lines where it is explained how we can implement the invoicing based on the quality with UD follow-up functionality.

http://scn.sap.com/docs/DOC-1848

Hope it helps

Cheers

Kaushik

former_member184536
Active Contributor
0 Kudos

Dear Kaushik

I have gone through your document. Its really valuable.Some few things i have to clear.

We have to make condition type for each char.for maintaining in Info. Record. and have to include in Pricing Procedure and have to create separate unit for each char.

And please also tell what would happen if quantity is received in partial deliveries. Each time price would be same.  I think it would be applicable if whole qty is received in one shot.

regards

Manish

kaushik_choudhury2
Active Contributor
0 Kudos

Hello Manish,

In case the quantity is received in partial deliveries then price will be calculated for each time GR qty based on the UD, as the price calculation is in the follow-up action of the UD.

We need to ensure that 'Control insLot' for the inspection type is set to 'For each material document item'  to ensure that separate QM lot is created for each partial delivery GR against which the UD can be taken .

Regards

Kaushik

former_member184536
Active Contributor
0 Kudos

Dear SAP PP

Use this exit and put your logic

LMR1M001---ZXM08U16

Use user exit LMR1M001---ZXM08U16 and put the following mentioned. This will prevent invoice booking before the qty is not cleared from quality and do Miro only for that qty which is posted to unrestricted.

*& Include ZXM08U16

&----

Declaration of variables

DATA: w_prueflos TYPE qamb-prueflos,

w_lmenge TYPE qals-lmenge01.(unrestricted qty)

Declaration of Internal Tables

DATA: itab LIKE qals OCCURS 0 WITH HEADER LINE.

LOOP AT e_tdrseg WHERE selkz EQ 'X'.

Checking whether the document require Inspection

CLEAR: w_prueflos.

SELECT SINGLE prueflos

INTO w_prueflos

FROM qamb

WHERE mblnr = e_tdrseg-lfbnr(reference document number)

AND zeile(Materail dodument item) = e_tdrseg-lfpos.(reference document item)

IF sy-subrc EQ 0.

CLEAR: itab[], itab.

SELECT SINGLE * INTO CORRESPONDING FIELDS OF itab

FROM qals

WHERE prueflos = w_prueflos

AND stat35 = 'X'.

IF sy-subrc EQ 0.

READ TABLE itab INDEX 1.

CLEAR: w_lmenge.

Sum of quantity (Excludes Block stock)

w_lmenge = itab-lmenge01.

IF e_tdrseg-menge GT w_lmenge.

MESSAGE ID 'ZMM' TYPE 'E' NUMBER '004' WITH w_lmenge e_tdrseg-lfbnr.

ENDIF.

ELSE.

MESSAGE ID 'ZMM' TYPE 'E' NUMBER '005' WITH e_tdrseg-lfbnr.

ENDIF.

ENDIF.

ENDLOOP.

With regards

Manish

Message was edited by: MANISH NEGI

Former Member
0 Kudos

Use QM control key in QM view - This will block payment if UD is not done or partial possting is done

use the following badi to have a control on the above issue. Please take a help of your ABAP and use BADI invoice_update

Method: Change_at_save. Pls Implement the same with reqd. logic, This will not allow to do MIRO for QTY which is in rejected/new material/ block stock.