简体   繁体   中英

Trigger IDoc or web service after creation of purchase requisition

I have this integration scenario from ECC to SAP PI 7.0: when a Purchase Requisition is created by the MRP process, the PR data should be sent automatically to other party through a web service or IDoc.

1) What would be the ideal scenario for this integration, I mean IDoc to SOAP, RFC to SOAP, etc.?

2) When the PR is created in ECC, how can it be pushed automatically to SAP XI/PI?

1) What would be the ideal scenario for this integration, I mean IDoc to SOAP, RFC to SOAP, etc.?

Between ECC to PI :

You can use IDOC s:

  • There is a standard ability of resend the data.
  • IDOC sending is asynchronous.

A simpler way (less customization) would be to use RFC call.

  • There isn't a standard way of resend the data.
  • The call could be synchronous/asynchronous

As response to comment, here are general instructions for RFC alternative:

  1. Create remote enabled function in SE37 .
  2. import it once to PI.
  3. Use it in the mapping.
  4. The call from ECC is performed with the syntax: CALL FUNCTION 'your_function_name' DESTINATION 'your_defined_destination' .

Between PI to external system:

In PI mapping, after data arrived from RFC / IDOC call the webservice ( SOAP ).

2) When the PR is created in ECC, how can it be pushed automatically to SAP XI/PI?

In ECC , identify a creation of PR from MRP through a BADI like this . Send IDOC / Call the RFC inside the BADI you chose.

I'm absolutely not expert in the domain, but googling the web (answers come almost exclusively from SCN ) made me think that no IDoc can be automatically generated at creation time. Consequently, the workaround is to:

  • Implement a user exit triggered when the purchase requisition is created. Maybe the MD_* ( MD_PURREQ_POST ?) BAdIs mentioned by Dorad are sufficient, or maybe the exit EXIT_SAPLMEREQ_008 of the enhancement MEREQ001 (via a project in transaction CMOD ), or maybe the BAdI ME_PROCESS_REQ_CUST .
  • In this user exit, call the function module ALE_PR_CREATE to create the IDoc (message type PREQCR1 ).
  • Create an IDoc partner agreement in transaction WE20 so that the IDoc is sent when it's created, or postponed for later sending (job at regular intervals). The port can be tRFC, XML HTTP, etc.

You can find more details for each step by searching the web.

PS: your other question "what is the ideal scenario" cannot be answered without knowing your exact context, like quantity of PRs created during each MRP process, preferences in your company for technical solutions, near-zero custom development, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM