cancel
Showing results for 
Search instead for 
Did you mean: 

Production Order - Delivered Quantity Change identification

getnikhilk
Employee
Employee
0 Kudos

Hello All,

For the PRoduction order created via CO01 , there could be multiple transaction from where GR Can happen or Production order Quantity can be changed. For example:

'CO01' 'CO02' 'COHV' 'CO40' 'CO15' 'CO11N'

EWM Scenario like: /SCWM/RFUI

PK13N Kanban Board - This has further lot of sub processes.

COWBHUWE Goods receipt HU

MIGO

And also other possible Transaction. . .

I am working on a scenario where i need to commonly identify Production Order 'Order Quantity' or 'Delivered Quantity' Or 'Dates' Change and Need to Trigger a IDOC .

I have Logic to trigger Production Order (RCCLORD standard Report), but not getting a single place from where this idoc can be triggered for the Tcodes(Processes) listed above. Can anyone suggest if there is any common place to do enhancement ?

Following Enhancement Points are already checked.

WORKORDER_UPDATE BADI

PPCO0007 Exit when saving production order - User Exit

PPCO0012 Production Order: Display/Change Order Header Data - User Exit.

EXIT_SAPLLOI1_002

https://blogs.sap.com/2017/04/29/automation-of-loipro-outbound-idocs./ is also checked. This is not a common solution too.

More DEtails: The Tcode Listed above are from Cross Modules like PP , MM , EWM Etc.. System is Hana 1909 system and EWM is not a seperate system.

Regards,

Nikhil Kulkarni

Accepted Solutions (1)

Accepted Solutions (1)

DominikTylczyn
Active Contributor

Hello getnikhilk

I could actually see two requirements here:

  1. Send an IDoc after goods receipt (receipt cancellation) against a production order i.e. change to delivered quantity. Here you can use an output determination of material documents to trigger an IDoc. You'd need to customize a new output type, trigger it from 101/102 postings against a production order and call RCCLORD report from the output type processing program.
  2. Send an IDoc after production order data change i.e. change to production order quantity or production order dates. These are real production order data changes. You can catch them with an enhancement PPCO0007 as described in the support note: 390635 - Change documents for production and process order

Best regards

Dominik Tylczynski

Answers (7)

Answers (7)

getnikhilk
Employee
Employee

@3a9e4ce873a94034b33dc62b0ce600ee : Thank you for your suggestions. Output type on Material document creation using production order took care of 'Delivered Quantity' value changes. I have handled below scenarios and triggering Production Order Outbound IDOC from S4 . Production Order Change IDOC I am triggering from Workorder Badi using RFC Function module in Background task destination NONE.

Regards,

Nikhil Kulkarni

DominikTylczyn
Active Contributor

Hello getnikhilk

Can you share the steps to configure Output determination for this scenario.

See note 411013 - Additional documentation on output determination in MM-IM and the PDF attachment to the note. It provides very useful on output determination from material documents.


How can i control it only for 101 or 102 movement type material document ?

You can control that with condition technique. You can customize an access sequence so that the output type is only picked up for 101 and 102 movement types.


and also how can i configure a program via which i can trigger IDOC .

You need to have at least some basic ABAP skills. An output processing program is attached to the output type. Typically the program calls printout form, but you can basically do whatever you wish in that program, e.g. generate and IDoc, start a workflow, post subsequent documents etc.


WHen this output determination program configured is called, will i get production order number used in GR Process, Production order number i will require to trigger IDOC using RCCLORD Standard report.

You will get the material document number. Then you need to read all required data e.g. production order number from the material document.

Best regards

Dominik Tylczynski

getnikhilk
Employee
Employee
0 Kudos

Hello 3a9e4ce873a94034b33dc62b0ce600ee,

I have followed below steps and its working in case of MIGO Transaction. If my Print Option is selected , and when i am posting Goods Receipt using Production Order, i am able to trigger a Output type and Able to trigger Production order Outbound IDOC.

As i mentioned earlier, this process only works in case of MIGO and not in other scenarios like SCWM/RFUI, PK13N Kanban Board ,COWBHUWE etc..

I have followed below steps. Please correct if these steps are correct. This will only work in case of GR done on Production order using MIGO and Print button should be checked.

Created a new output type as shown below.

image 1.

Configured MBGMCR Message type and configured Output type. Created a New Process Code and handling Triggering of Production Order IDOC inside Process code's Function module.

image 2

But the issue is, this will only trigger if Material document is posted with Print button checked.

image 3

is it not possible to configure triggering of Program in all the cases where Material document is posted ? irrespective of Transaction codes like SCWM/RFUI, PK13N Kanban Board ,COWBHUWE , MIGO ?

Regards,

Nikhil Kulkarni

Ajit_Routray
Active Contributor

Hi getnikhilk,

Screen shots are not visible. Please attach again.

I guess you might need to change below dispatch time and a new routine for validation.

Routine: IDOC should trigger or not as per complex condition e.g., specif order order type, material type.....etc

Kind Regards,

Ajit

Ajit_Routray
Active Contributor

Hi getnikhilk

Completely agree with 3a9e4ce873a94034b33dc62b0ce600ee.

My understanding: This should do in inventory management with new output type with your IDOC so it would not impact the other processes.

Additionally, Requirement Routine also available to check or validate, the new output type would trigger or not.

Please check the below blogs for initial understanding.

https://blogs.sap.com/2013/04/28/configuring-output-device-for-good-receipt-slip-on-migo/

Please let us know if you have further questions.

Kind Regards,

Ajit

getnikhilk
Employee
Employee
0 Kudos

Hi Ajit,

My requirement is to trigger IDOC when ever Production order - Delivered Quantity is changed (Or some of header fields are changed or Producton order is created newly). I have listed various Tcodes from where its currently changed/Changed(From Various Modules like PP, MM,EWM) . is there a common enhancement available to handle all these Change and Create scenarios ? My findings are below.

I have followed below blog to trigger Production Order IDOCS..

https://blogs.sap.com/2017/04/29/automation-of-loipro-outbound-idocs./

Regards,

Nikhil Kulkarni

DominikTylczyn
Active Contributor
0 Kudos

Hello getnikhilk

See my answer where I gave you two ways to catch the changes, also pointing to the support note.

The bottom line:

  1. Catch the change of "delivered quantity" with material document output type or MB_MIGO_BADI. I'd recommend output type as easier to trace.
  2. Catch the changes to any other product order fields with PPCO0007.

What else do you need?

BR

Dominik Tylczynski

Ajit_Routray
Active Contributor
0 Kudos

Hi NikhilPrateek Kulkarni

BADI is already present there in the below link and you can compare -HEADER and HEADER_OLD. I think this BADI would work for all transactions.

https://blogs.sap.com/2017/04/29/automation-of-loipro-outbound-idocs./

Kind Regards,

Ajit

DominikTylczyn
Active Contributor

Hello getnikhilk

Let's narrow down your original questions to "delivered quantity" field changes.

My line of though is the following. "Delivered quantity" field of a production order gets updated when a goods receipt or goods receipt cancellation is posted. No matter what scenario or transaction you use, the field is updated from goods receipt. That's movement type 101 or 102.

So instead of trying to pin point all the spots / transactions that might trigger receipt posting, you could target just the material documents with movements 101 or 102. You can customize output determination in such a way that once 101 or 102 movement type material document is posted the output is triggered. Just don't get confused here, output determination doesn't imply printing!! With output determination you can trigger basically any processing you want, including calling RCCLORD report or sending an IDoc any other way.

This way you don't have to worry about multiple points that trigger update of "delivered quantity", about multiple enhancements, about CO_WEMNG data element definition.

Why don't you want to implement the requirement this way?

Best regards

Dominik Tylczynski

getnikhilk
Employee
Employee

Hello Dominik,

Thanks for your Reply.

Overall requirement is around Production Order - 'Delivered Quantity' Field value change. Whenever this Value is changing , i need to trigger Outbound LIOPRO IDOC.

/SCWM/RFUI Transaction is EWM Scenario where Inbound processing is performed using Production order number. When Saved successfully, Production Order - Delivered Quantity Changes. During that time PPC00007 enhancement is not triggered or WORKORDER_UPDATE Badi which is usually triggered during Create & Change Production order via CO01 and CO02.

When MIGO is performed using Production Order , again Delivered Quantity changes, PPC00007 enhancement is not triggered. Neither WORKORDER_UPDATE BADI is triggered.


Delivered Quantity (AFPO-WEMNG) gets updated via multiple transaction like PK13N , COWBHUWE and many more ..

I check AFPO-WEMNG 's Data Element, Change Document option is Disabled.

Is there any single place where enhancement can done and this IDOC Can be triggered ?

Regards,

Nikhil Kulkarni

getnikhilk
Employee
Employee
0 Kudos

Hello 3a9e4ce873a94034b33dc62b0ce600ee

Can you share the steps to configure Output determination for this scenario. How can i control it only for 101 or 102 movement type material document ? and also how can i configure a program via which i can trigger IDOC . WHen this output determination program configured is called, will i get production order number used in GR Process, Production order number i will require to trigger IDOC using RCCLORD Standard report.

Regards,

Nikhil

DominikTylczyn
Active Contributor
0 Kudos

Hello getnikhilk

Let me say that once again. You need to catch two kinds of changes:

  1. Changes to a production order fields. All those changes can be caught with either user exit PPCO0007 or BADI WORKORDER_UPDATE. Refer to note 390635 - Change documents for production and process order for a sample solution to get production order changes with PPCO0007. "Delivered quantity" is not a change to a production order!!! It's just a mere reflection of quantities being received against a production order.
  2. "Delivered quantity" fields gets its value from material documents i.e. receipts and cancellations of receipts posted against a production order. As such you can't count them as changes to a production order. Whatever you do, which ever process you follow - just inventory management, with or without WM or EWM, automatic goods receipt posting from production order confirmation - to register production result, you'll always end up with a material document, i.e. goods receipt from a production order. That's your common denominator of all possible process variants and that's what updates "delivered quantity" field. Therefore you need to implement IDoc generation here, during material document posting. You can do that either:
  • With output determination
  • MB_DOCUMENT_BADI enhancement
  • MB_CF001 user exit

Either one of them will work with any process variant of receipt from production. However due to visibility I recommend output determination.

You should not try to use /SPE_BADI_ENRICH_ASN as this is for inbound deliveries not material documents.

Hope this is clear now

Best regards

Dominik Tylczynski

getnikhilk
Employee
Employee
0 Kudos

@3a9e4ce873a94034b33dc62b0ce600ee

What else do you need?

Hello Dominik,

MIGO BADI or PPCO0007 or WORKORDER_UPDATE BADI is not triggered in case of /SCWM/RFUI Using Production order..

I found /SPE/BADI_ENRICH_ASN , through which i am triggering IDOC in case of /SCWM/RFUI.

In future, there could be some other Tcode which may be not working as the solution i have built is not generic.

Is there any one single place to handle all scenarios and trigger IDOC Centrally was my Question. I am finding solution individually whenever i am coming across new Transaction codes from where Production order - Delivered Quantity is reduced.

. Sorry if i confused earlier.

Regards,

Nikhil Kulkanri

Ajit_Routray
Active Contributor
0 Kudos

Hi getnikhilk

I guess the below would be single where you can get compare the fields value with current and before and it runs via update mode.

Enhancement Spot/Badi : WORKORDER_UPDATE/WORKORDER_UPDATE

Method: IN_UPDATE (preference) or BEFORE_UPDATE

Please try this.

Kind Regards,

Ajit

getnikhilk
Employee
Employee
0 Kudos

Hi ajit.routray.ewm

I have posted my answer. Thanks for your Inputs.

Regards,

Nikhil Kulkarni