on 07-07-2013 12:28 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
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.