cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger an Event in PI when IDOC is created

Former Member
0 Kudos

Hi Expert ,

I am working on a inbound scenario where multiple IDOC is created from one XML file . When the IDOC is getting posted in ECC then its taking time to get processed . IDOC is getting processed by a batch job RBDAPPO1 and it is scheduled after every 30 min so IDOC processing is delayed for 30 min if it is getting posted just after the completion Job . We can't increase the frequency of job at its taking lot of resource .

So is it possible to create an event when IDOC arrives in ECC which will run the job program i.e instead of running the background job at scheduled time is it possible to raise an event while posting IDOC so RBDAPP01 can be run just after the IDOC is received in ECC.

There is an option of Process IDOC immediately in parter profile but we don't have to go for that as at one time lots of IDOC is being posted in ECC.

Regards,

Saurabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It seems ABAP enhancement needed.

You need fot find out the what function module for the IDOC posting, and enhance the function module by executing the job.

Regards

Liang

Former Member
0 Kudos

HI Liang,

Thanks for your reply but I have an another concern . The job and the program RBDAPP01 are fine and running well only problem is that RBDAPP01 runs on a schedule time ( say after 30 min) but I want to get it run when I post IDOC to ECC. We can write new job and call RBDAPP01 program to post IDOC but we don't want to schedule the new job for any timeperiod but want to raise it by any event or some other method when IDOC is posted in ECC .So want to understand that whether this is possible or not ?

Regards,

Saurabh

Former Member
0 Kudos

In my opinon, you even do not need to create new job.You current job should execute corresponding ABAP report,saying MYREPORT, then in your enhancement, you can call the ABAP report MYREPORT directly.

Regards

Liang

Former Member
0 Kudos

HI Liang ,

can you tell me in detail what do you mean by enhancement ..do you want me to create any enhancement in IDOC ?

Kindly clarify probably I have not got you enhancement part correctly.

Regards,

Saurabh

Former Member
0 Kudos

Hi, Saurabh:

You can start with this blog:

Beginners journey into Enhancement Framework

/people/michelle.crapo2/blog/2008/11/05/beginners-journey-into-enhancement-framework

then you know what is ABAP Enhancement and Modification, SAP used user exit previously, user can only program inside SAP function, new enhancement allow user to put customized code anywhere on the start and end of the function.

BADI is another enhancement tech for ABAP OO class

The SAP course is: BC425 Enhancements and Modifications

After you are familiar with the concepts, you can search ABAP general forum, then you can find a lot of relevant.

Or if there is ABAPer in your project team, you can let them to explore this for you.

Regards

Liang

Former Member
0 Kudos

Hi,

The reason why RBDAPP01 runs in 30mins intervel is that the ABAPers (or the BASIS - whoever is responsible for scheduling batch job) have scheduled the program to run so. You have to talk to them and ask them to remove that schedule and make them modify the job to be triggered at the event (of getting an IDOC)

Thanks,

Shiny

Satyagadadas
Active Participant
0 Kudos

Hi,

We came across similar case, we have built one dummy idoc in the mapping along with actual idocs. Then set "maintain order at runtime" in interface determiition. When ever the system gets dummy idoc, it will trigger the required program to process already reached idocs.

Please let us know if it works for you.

Regards,

Satya.

Former Member
0 Kudos

HI Jhon ,

as per your reply " modify the job to be triggered at the event (of getting an IDOC)"

Basis is ready to modify the job but question is how event is created when IDOC is received in ECC ? here only we are getting struck that other than scheduling the Job we are not getting any other option to trigger the Job which contains the program RBDAPP01 .

Regards,

Saurabh

Former Member
0 Kudos

Hi Sathya ,

Thanks for your reply . I think dummy IDOC logic can work but want to understand When the system gets dummy idochow it will trigger the required program to process already reached idocs? basically from PI point of vie I can ensure that one dummy IODC will be posted to ECC with the end of current list of IDOC but then how this dummy IDOC will call the PROGRAM can you throw some light on this aspect ..

Regards,

Saurabh

Former Member
0 Kudos

Hi,

interesting topic !

I add two info:

1. By using a dummy idoc or a proxy call (interesting idea) to trigger a job, be careful of one point: in PI, when idocs will be sent to ECC... well... PI will use different queues (SMQ2)... And so maybe your dummy idoc will use a "faster" queue and will arrive before all the other idocs. and the result will be not this one that you want !

Solution: EOIO by specifying a unique queue... but in that case, if there is a pb between PI and ECC, it's ALL the next exchanged of this interface which will be in status "wait inside the queue"... until you solve the first error.

2. with you dummy idoc, How to trigger a job to run your idocs... it's "easy", it's just in the function module linked to your dummy Idoc, that either you run directly RBDAPP01 with your specific Message Type, idoc type, parter, date, etc... (*) or your program create a job which to the same (personally I prefer this solution).

(*) as suggest by another guy, do a generic "dummy idoc".

Regards.

Mickael

Former Member
0 Kudos

Hi Mickael,

Thanks for showing your interest in this discussion. The part 2 which you mentioned is completed i.e dummy IDOC has been created and its function module we are writing code to raise an event which runs the RBDAPP01 program However I am facing a problem in posting all those IDOC in ECC..As per my requirement the dummy IDOC should come at last so in receiver IDOC Communication channel queue processing is enabled .This is working correct and dummy IDOC is coming in ECC in last but in Status 75 . Basically all the idoc which has been processed by queue processing are in status 75 and waiting in inbound queue. I can see them in WEINBQUEUE .Activation of queue is also not working .

So if any body has any idea that how to process the IDOC of status 75 then please share with me

Regards,

Saurabh

Former Member
0 Kudos

Thanks all problem resolved .Points awarded .

Dummy IDOC working in interface determination we have to use EOIO (No need to use queue processing in IDOC CC)and dummy IDOC will get posted in last .

the FM assoiated with Dummy IDOC will call the RBDAPP01 program .

Regards,

Saurabh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

We had a similar issue. You can write a abap report which will trigger the RBDAPP01 posting program.We had scheduled the job to run our custom IDOC posting program to run every 15 mins posing only 100 IDOCS everytime.

Thanks,

Sonalisa

Former Member
0 Kudos

Hi,

Along with Idoc message interface, use another interface at inbound. The interface structure may like as Trigger_Event, Trigger_Date and Trigger_Time.

You can map CONSTANT value to field Event and system Date & Time to other two fields in your message mapping. Generate Inbound proxy and write the logic here,to raise an event to execute a batch job RBDAPP01.

By doing this whenever XML file getting processed it will post an Idocs to ECC and your inbound proxy will trigger EVENT to execute the job. If there are any timing problems in process of Idocs and event triggering of job, you can put some delay time in proxy before raising an event. This delay time is useful to ensure all posted IDocs are getting processed.

Still if there are any unprocessed Idocs seen on ECC, you can keep the job whcih is triggering for every 30 minutes of time.

Hope it will helps to you.

Cheers

Veera

Former Member
0 Kudos

Thanks veera for your reply so you are suggesting that in file to IDOC scenario I shoud use it as file to IDOC and Proxy .

i.e I should use two interface as inbound interface one IDOC and other Inbound interface which will trigger proxy , and in interface determination I should add the additional inbound interface and the IM which wil carry the date and time and then proxy will be trigerred at ECC. this proxy will run the report RBADPP01 which will post the IDOC at same time when they will arrive .

Regards,

Saurabh