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: 

Outbound IDOC not getting triggered while new master data is created

Former Member
0 Kudos

Hi Experts,

I am trying to trigger an outbound idoc for Cost Center master data when ever cost center is being created or cost center is being changed. (Usinf COSMAS)

I have successfully made use of change pointers and now able to trigger the idoc when ever Cost Center is getting changed. But while creating new Cost center, IDOC is not getting triggered.

I used the function module MASTERIDOC_CREATE_SMD_COSMAS for triggering the idoc.

Could one of you please let me what would have gone wrong? Since IDOC is getting triggered while changing the master data but not getting triggered while creating new master data.

Thanks in Advance,

Vinoth

8 REPLIES 8

Former Member
0 Kudos

Hi,

Try executing the T-code BD21 after creating the cost center.

Regards

Vinod

Former Member
0 Kudos

How you are creating idocs for changes ..are you using any background job?

--

Reddy

0 Kudos

Vinod - I did executed BD21. Only when changes are made to Cost Center idoc is getting triggered but while creating new Cost center it is not getting triggered.

Reddy - I used BD21 after changing the Cost center.

0 Kudos

Hi Vinoth,

Normally it should go. Can you try to send the cost centre which was created by you, through the trasaction BD16. Let us know it it's successfull.

--

Reddy

0 Kudos

Hi reddy - Thanks for your info. Now IDOC did got created when I executed BD16.

Below are my next set of questions,

1. So should we schedule two jobs for running BD16 & BD21 separately?

2. In BD16, Cost Center & Controlling area are mandatory input parameters. How can I trigger the IDOC automatically when ever Cost Center is created?

3. I need to add few validations before triggering the idoc. What would be best way to have these validations added in the Function module.

Thanks in Advance,

Vinoth

0 Kudos

Hello Experts,

I too have same requirement and i too have same set of questions as mentioned by Vinoth .

Is it possible to trigger the IDOC automatically when ever Cost Center is Created or Changed?

Is BD16 used for sending the created cost centers and BD21 for sending the changed cost centers?

Thanks in advance!

Regards,

Razia Shaheen.

0 Kudos

Hello,

when you activate BD21 for a message type, it creates a entry in the SAP tables. that these Cost Centers have been sent already and any susequent changes to this will trigger a IDoc.

As for BD16, scheduling it wont help as, you need to specify the selection criteria, and i do not see how you will be able to dynamically get the selection criteria.

Try BD95, and BD59 to create a change pointer for a field, so when ever this fields is modified (new/updated) an idoc will be triggered.

regards,

Abhishek

0 Kudos

It should work for both creation and change. No need to run BD16 if you want to send only changes. You can check BDCP2 table after creating Cost center.