cancel
Showing results for 
Search instead for 
Did you mean: 

Production confirmation cancel through QM

Former Member
0 Kudos

Dear Sir/Mam

In our scenario when production order is confirmed we get inspection lot with inspection lot origin 04,if material is accepted i post the stock in unrestricted which acceptable by the user,but if the material has to be rejected we do not want put the stock in blocked.We required that if material is rejected its production confirmation should be reversed means its last operation should be cancalled that means mvt type 102.Please guide

regards

kunal

Accepted Solutions (1)

Accepted Solutions (1)

former_member186399
Active Contributor
0 Kudos

Dear Kunal

1) Assign the notification type in the inspection SPRO > Quality Management >Quality Inspection>Inspection Lot Creation>Maintain Inspection Types>04> F3

2) Create a task code through QS41.

3) Create a the follow up action (SPRO > Quality Management>Quality Notifications> Notification Processing>Additional Notification Functions> Define Follow-Up Actions for Tasks.

and tick the after posting and synchronous update and assign the same to the task code in QS41

4) when you do the RR, do the defect recording generate the notification assign the task and save

Kunal i have not implemented this before. Im just sharing my views. Please read out the text for follow up action available in the config . Please try the same and let me know your feedback

Regards

Gajesh

Former Member
0 Kudos

Dear Sir

I did as per your comment but sir no outcome its as it is.No change

regards

kunal

Answers (8)

Answers (8)

former_member186399
Active Contributor
0 Kudos

Dear Kunal

Good to hear that.

Well done

Regards

Gajesh

former_member186399
Active Contributor
0 Kudos

Dear Kunal,

I think you have auto GR for your last operation. My recommendation will be

1) To activate 03 inspection for the last operation. if in the last operation you have found that the product is to be rejected do not confirm . The production order stands unconfirmed and only do confirmation when the product is ok

2) If still if you want to go with the same solution for 04 inspection. Then create a notification and assign a task which has a follow up action that you have created. Rather attaching the follow up action to the UD task option will be better. You may also need to tick the after psoting and synchronous update in the follow up action

please check and let me know your feedback

Regards

gajesh

former_member186399
Active Contributor
0 Kudos

Dear Kunal

You want the last operation cancelation to be done or you need the whole production order to be cancelled

Regards

gajesh

Former Member
0 Kudos

Dear Sir

Last Operation to be cancelled.

regards

kunal

Former Member
0 Kudos

Dear Sir

You mean to say In Quality notification task right.Inspection lot will be created with 04,if i want to reject it i will trigger Defect tab from that lot through that i will be going to notification which will be F3 type,i saw that field in gray.How to assign can you give me the detail structure i would be highly obliged.

Regards

kunal

Former Member
0 Kudos

Dear Sir

Function Module was created again and now the problem has solved thanks a million

regards

kunal

former_member186399
Active Contributor
0 Kudos

Dear Kunal

Ask the ABAPer to commit while running the bapi. Use this BAPI for commit BAPI_TRANSACTION_COMMIT

Regards

gajesh

Former Member
0 Kudos

Dear Sir

i will check and get back to you

regards

kunal

Former Member
0 Kudos

Dear Sir

Function module done and assigned to Follow up action of Manual and even assigned to catalog 3 in inspection lot orgin 04 in that rejected(R) selected and that follow up is assigned.

In qa32 when i m going to usage decision selecting 04, R-Rejected I can see follow up action but Function module is not triggered and where the stock to posted should it to be remained in quality.Can this function module can used for the lot whose stock is posted to unrestricted.Awaiting for your valuable answer.

Please go through below code

Let me know the changes if any.

FUNCTION ZQM_BAPI_PROD_ORDER.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_QALS) LIKE QALS STRUCTURE QALS OPTIONAL

*" VALUE(I_QAVE) LIKE QAVE STRUCTURE QAVE OPTIONAL

*" VALUE(I_QAPO) TYPE QAPO OPTIONAL

*" EXPORTING

*" VALUE(E_SUBRC) LIKE SY-SUBRC

*" TABLES

*" E_PROTOCOL STRUCTURE RQEVP OPTIONAL

*" EXCEPTIONS

*" NOT_FOUND

*" INVALID

*"----


**" REFERENCE(PRUEFLOS) TYPE QPLOS

*" REFERENCE(I_QALS) LIKE QALS STRUCTURE QALS OPTIONAL

*" REFERENCE(I_QAVE) LIKE QAVE STRUCTURE QAVE OPTIONAL

*" REFERENCE(I_QAPO) TYPE QAPO OPTIONAL

*" EXPORTING

*" VALUE(E_SUBRC) LIKE SY-SUBRC

*" TABLES

*" E_PROTOCOL STRUCTURE RQEVP OPTIONAL

*" EXCEPTIONS

*" NOT_FOUND

*" INVALID

*"----


DATA : CONFIR LIKE BAPI_PP_CONF_KEY-CONF_NO,

CONFCOU LIKE BAPI_PP_CONF_KEY-CONF_CNT,

RETURN LIKE BAPIRET1 ,

LOCKED LIKE BAPI_CORU_PARAM-LOCKED,

CREATED_CONF_NO LIKE BAPI_PP_CONF_KEY-CONF_NO,

CREATED_CONF_COUNT LIKE BAPI_PP_CONF_KEY-CONF_CNT.

DATA: P_RUECK TYPE AFRC-RUECK,

P_RMZHL TYPE AFRC-RMZHL.

DATA: BEGIN OF IT_QALS OCCURS 0.

INCLUDE STRUCTURE QALS.

DATA END OF IT_QALS.

DATA: BEGIN OF IT_AFRC OCCURS 0,

AUFNR TYPE AFRC-AUFNR,

RUECK TYPE AFRC-RUECK,

RMZHL TYPE AFRC-RMZHL,

END OF IT_AFRC.

break abap-core.

*START-OF-SELECTION.

SELECT single *

FROM QALS

INTO IT_QALS

WHERE PRUEFLOS = I_QALS-PRUEFLOS.

IF IT_QALS[] IS NOT INITIAL.

SELECT AUFNR

RUECK

RMZHL

FROM AFRC

INTO TABLE IT_AFRC

FOR ALL ENTRIES IN IT_QALS

WHERE AUFNR = IT_QALS-AUFNR.

ENDIF.

READ TABLE IT_AFRC INDEX 1.

MOVE : IT_AFRC-RUECK TO P_RUECK,

IT_AFRC-RMZHL TO P_RMZHL.

IF SY-SUBRC NE 0.

MESSAGE 'Value Not Found' TYPE 'I'.

ENDIF.

CALL FUNCTION 'BAPI_PRODORDCONF_CANCEL'

EXPORTING

CONFIRMATION = P_RUECK "CONFIR

CONFIRMATIONCOUNTER = P_RMZHL "CONFCOU

  • POSTG_DATE =

  • CONF_TEXT =

IMPORTING

RETURN = RETURN

LOCKED = LOCKED

CREATED_CONF_NO = CREATED_CONF_NO

CREATED_CONF_COUNT = CREATED_CONF_COUNT .

COMMIT WORK.

IF SY-SUBRC EQ 0.

WRITE 'PO Canceled'.

ENDIF.

ENDFUNCTION.

regards,

Kunal.

former_member186399
Active Contributor
0 Kudos

Dear Kunal

1) First create Function module which picks up production order from QALS table for the inspection lot and does the canceling of the production order.You can make use of the BAPI i have mentioned for cancelling the production order. Take the help of ABAP for this

2) Attach this FM to the follow up action in config

SPRO>QM>Quality Inspection>Inspection Lot Completion>Define Follow-Up Actions> Make use of MANUAL follow up action.

3) Attach this follow up action in the selected sets QS51 against the rejected UD code

let me know if any issue comes up

Regards

gajesh

Former Member
0 Kudos

Dear Sir

Thank you, i will be doing this activity as per your guidance and i will get back to you.

regards

kunal

former_member186399
Active Contributor
0 Kudos

Dear Kunal

I think you can do it with follow up action. Fucntion module and attach it to one of the followup action and then attach it to the UD code for which you need to cancel the confirmation.

BAPI_PRODORDCONF_CANCEL you can use this BAPI for production order cancel

Regards

gajesh

Former Member
0 Kudos

Dear Sir

I understood what you trying to explain through follow up action can you guide in detail.

regards

kunal

Former Member
0 Kudos

Dear Sir

I check with the abaper the BAPI is not working for the cancellation of confirmation.sir can guide the procedure.Awaiting for highly aapreciated answer.

regards

kunal

Former Member
0 Kudos

Dear Mr. Joshi,

If the material is posted to quality through 04 lot origin and results are not recorded, then based on the control key defined in the routing you may adopt the following option.

if the control key is not PP03 (auto gr) then you may get the 101 document from the respective order (documented goods movement) and using the option cancellation of material document in MIGO, you may reverse the movement

If the control key is PP03 then you will have to check for any further confirmation has happened for the operation and cancel it in CO13.

Hope this helps you.

Regards,

M.M

Former Member
0 Kudos

Dear Sir

It was really a valuable answer but i want your input whether cancellation cna be done through my usage decision screen

regards

kunal

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

If you have Auto GR then you can cancel it directly through CO13.

If not then MB31 102 movement then CO13 for confirmation cancellation.

After that you will get status for lot as LTCA :- lot canceled

Hope clear to you.

Regads,

R.Brahmankar

Former Member
0 Kudos

Dear Sir

It was really a valuable answer but i want your input whether cancellation cna be done through my usage decision screen

regards

kunal