cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc to Replicate available Stock (from ERP to external system)

DennyO
Discoverer
0 Kudos
496

Dear SAP Community 🙂

Requirements: I need to replicate the stock from SAP ERP to SAP FSM via IDoc. The IDoc should include (at least) the following information:

  • Material No. (MATNR)
  • Plant (WERKS)
  • Storage Location (LGORT)
  • Available/Unrestricted Use Stock (MARD-LABST)

Moreover, the IDoc must be triggered automatically by the system, whenever there are any changes in the  stock (i.e., changes in the field LABST of the related table entry in MARD). 

Question: Which IDoc / Message Type do you recommend here (e.g., LOIMSO, COD_STOCK_REPLICATE, etc.)?  

Many thanks in advance for your feedback.

Best regards,
Denny 

Accepted Solutions (0)

Answers (1)

Answers (1)

DennyO
Discoverer

Hi Sbandara,

yes, my solution was to implemented a custom outbound IDoc "ZLOIMSO" (with NACE output determination) following the ususal procedure (Note: I did not perform every of the below mentioned steps):

  1. BD54 - Create Logical System
  2. SCC4 - Assign Logical System to Client
  3. SM59 - Create RFC Connection
  4. WE21 - Create Port
  5. WE31 - Create Custom IDoc Segments
  6. WE30 - Create Custom IDoc Type 
  7. WE81 - Create Custom Message Type
  8. WE82 - Assign Idoc Basic Type to Message Type
  9. SE37 - Create IDoc Outbound Processing Function Module
  10. WE57 - Assign Function Mopdule to Message Type / Basic Type
  11. WE41 - Create Custom Outbound Process Code
  12. WE20 - Create Partner Profile (incl. Outbound Parameters)
  13. BD59 - Create Message Type Filter (for Distribution Model)
  14. BD64 - Create Distribution Model
  15. NACE - Configure Outbound Determination

Additionally, I implemented some of the following IDoc BAdIs to realize all additional customer requirements:

  • IDOC_CREATION_CHECK
  • IDOC_DATA_INSERT
  • IDOC_DATA_MAPPER
  • etc.

This solution works perfect in my case. 🙂

Hopy this helps you.

Best regards,
Denny

sbandara
Explorer
0 Kudos
Thanks Danny for getting back to me with such a detailed response. I also ended up using the message LOIMSO. I developed a custom program to read the data from table MARD and create IDOCS. I borrowed some of the code from function module MASTER_IDOC_CREATE_LOIMSO. I did not use this as it create a IDOC for each material. Thanks gain for the response.