cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC triggering with Even Linkage for IW32 & IW22

Former Member
0 Kudos

Hi All,

I have to trigger the IDOCs for message type IORDER whenever there is a change in Order (IW32) using the Event Linkage.

As there is no standard event in BUS2007 for change, i have delegated the BUS2007 with custom Event CHANGED with CHANGE method and few lines of code for IW32.

BEGIN_METHOD CHANGE CHANGING CONTAINER.

BREAK MANISH.

DATA: TCODE LIKE TSTC-TCODE.

*  SWC_GET_ELEMENT CONTAINER 'Transactioncode' TCODE.

   SWC_GET_ELEMENT CONTAINER 'TRANSACTIONCODE' TCODE.

   CALL TRANSACTION TCODE.

END_METHOD.


Now to trigger the Event on any change in IW32, I have configured the Event Linkage in SWE2 with following parameters:

Object Category: BO

Object Type: BUS2007

Event : Changed

Receiver type: 'test' (I assume it can be any text)

Receiver Call: Function Module

Receiver Function Module: ZTEST_FM (Template copy from SWE_TEMPLATE_REC_FB) No Code for now.

Destination of receiver: RFC created by Java developer with JCo path in RFC

Event Delivery: tRFC

Linked Activated : tick

I put my code in the RFC Enabled  Receiver Function Module "ZTEST_FM" to trigger the IDOC using the IDOC triggering Function module: "MASTER_IDOC_DISTRIBUTE" but I am not getting any IDOC in IW02.

When i put the External Breakpoint in custom FM, ZTEST_FM, it is not getting to it.

When i see the Event log in SWEL, i get the Trace Data as

Action : Receiver started correctly

RFC Status : The JCoServerFunctionHandlerFactory com.sap.conn.

I am not sure where i am wrong.

Need your Input to run this scenario.

Regards,

Manish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry i was on holidays with less internet access.

The Solution is as below:-

1) Created a Subtype BUS2007 with new event 'CHANGED' for Tcode IW32.

2) Configured it in SWEC with the new ZBUS2007 CHANGED event and change button selected.

3) Configured the ZBUS2007 event CHANGED in SWE2 with a receiver FM without any RFC rest is as mentioned in my thread.

The problem is you cannot debug the receiver FM, So what i did is i put the same code in another FM and put it in Check FM. That too you cannot debug with internal or external breakpoint. So i used infinite look debugging concept and debugged it using SM50. It then triggered my FM.

Regards,

Manish T

Answers (1)

Answers (1)

Former Member
0 Kudos

Still awaiting for your response/suggestions..

Regards,

Manish

Former Member
0 Kudos

Done it myself..

JL23
Active Contributor
0 Kudos

A forum is a place to exchange solutions, not just to drop questions. Share where the error was and what you did to solve it yourself, then nobody needs to ask in a few years "I have the same problem - How have you solved it"