cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up distribution model for IDoc MBGMCR03

former_member267458
Discoverer
0 Kudos
1,343

Hi All,

We are using IDoc of type MBGMCR03 for sending material documents to external system.

In order to use MBGMCR03 as outbound IDoc, we are using the function module MASTER_IDOC_DISTRIBUTE to manually trigger the IDoc creation while posting Goods movement using MIGO transaction.

The function module MASTER_IDOC_DISTRIBUTE is called in below BADI implementation:

BADI: MB_DOCUMENT_BADI

Method: MB_DOCUMENT_UPDATE


In this BADI implementation, we are preparing the IDOC structure in ABAP and passing it to the function module for IDOC generation.

In this code, one of the fields is partner number which determines the receiver system for this IDOC.

If the partner number is hard-coded in the code, the IDOC is generated and successfully sent to the partner system. But, if the partner number system is left blank, the system is unable to determine the partner and IDOC transmission fails.

Note: We've maintained partner profile containing outbound parameters with message type MBGMCR.

Since this implementation will be delivered to customers, they should be able to easily configure the partner system details for this IDOC type so that whenever IDOC of type MBGMCR03 is created, the partner details should be automatically determined as per the configuration.

For this, we tried to setup distribution model in transaction BD64, where we are getting below error while adding the message type.

Even after adding it as BAPI, the partner details are not determined automatically.

Can somebody help us with how partner details can be determined automatically as per the configuration while triggering IDOC of type MBGMCR03 ?

Thanks & regards

Accepted Solutions (0)

Answers (0)