Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How trigger IDOC MBGMCR??

Former Member
0 Kudos

Hello Experts,

i need to send out an idoc for the good receipt and i have identified this one MBGMCR.

How can i trigger the idoc automatically when material document is saved.?

maybe with a msg output? but where i need to insert the link between msg output and idoc MBGMCR ?

thanks

Boris

6 REPLIES 6

former_member588853
Active Contributor
0 Kudos

Hi,

Create new Message Type

via <b>wedi</b> Development - Message Types or Transaction <b>WE81</b>.

• Display/Change and click on New Entries

• Create a new Message Type and Save.

Link Message Type to IDOC Type

via <b>wedi</b> Development - IDOC Type/Message or Transaction <b>WE82</b>.

• Display/Change and then click on New Entries.

• Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.

also see this link for outbound processing..

rewards if useful,

regards,

nazeer

Message was edited by:

nazeer shaik

gajendra_bhakuni
Active Participant
0 Kudos

Hello Boris,

The link between the msg output and IDoc is maintained in the partner profile settings (WE20 transaction) -> outbound parameters -> Message control table.

Check the following blog also for more details regarding message control:

<a href="/people/gajendra.bhakuni/blog/2007/03/13/message-control-output-control-for-ale Control</a>

Hope this helps.

Regards,

Gajendra.

Former Member
0 Kudos

hello Gajendra,

thanks for your msg customization guide...i have further question.

do i need to add a new outbound process code with function module ALE_GOODSMVT_CREATE and then in Partner profile insert my new msg output link with this process code?

is it correct? and function ALE_GOODSMVT_CREATE is correct?

0 Kudos

Hello Boris,

Yes you need to create a new outbound process code with the function module.

Check if a process code already exists (in transaction WE41) for the function module (you can reuse that process code in case you are not creating a Z-custom version of the function module).

Yes I believe the function module (ALE_GOODSMVT_CREATE) if fine.

I went inside the function module - there I got some hints also the fm description says so.

Hope this is useful.

Regards,

Gajendra.

Former Member
0 Kudos

Hi,

i add new outbound process code for function ALE_GOODSMVT_CREATE then add in partner profile under msg output the link between process , msg output.

Now the problem is when i save the material document, the output message goes in dump in program RSNASTED in FORM NEW_DYN_PERFORM

here there is an error in parameters:

CALL FUNCTION TEDE1-ROUTID

EXPORTING

CONTROL_RECORD_IN = EDIDC

OBJECT = NAST

IMPORTING

CONTROL_RECORD_OUT = EDIDC

OBJECT_TYPE = HELP_OBJECT_TYPE

TABLES

INT_EDIDD = INT_EDIDD

EXCEPTIONS

DATA_NOT_RELEVANT_FOR_SENDING = 01

OTHERS = 04.

as you can see it calls this function but this has a different interface respect to ALE_GOODSMVT_CREATE and this is the problem.

I don't know why, maybe becouse i'm using a BAPI interface and this means that i don't need to add in partner profile entry in msg output tab??

please let me know

thanks

Boris

0 Kudos

Hi Boris,

Yes you are right. This function module will not work directly.

For message control the function module interface is a standardized one (like IDOC_OUTPUT_ORDERS etc).

You can create a new function module with this standardized interface.

The call the Function module ALE_IDOCS_CREATE to create the Idoc.

You can pick some stuff from ALE_GOODSMVT_CREATE. I know this is very crude but I was not able to find any standard SAP function module with the standardized interface (for good movement) which can be used directly.

One more thing....can we avoid message control? We can find the user-exit (if any provided) which is called when saving the Goods movement.

Within the user exit if all the required application data is available we can fill the Idoc an call the IDoc generation function module.

Sorry I am not able to help much.

Regards,

Gajendra.