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: 

Condition based COMMIT of IDocs

Former Member
0 Kudos

Dear All,

I am creating ALEAUD Idocs from an incoming CONTRL or BANSTA file. This incoming file can have multiple BANSTA/CONTRL messages, for which I need to create atleast one ALEAUD(maybe multiple) per BANSTA/CONTRL message. The requirement here is that the IDocs be committed only when all the IDocs corresponding to the incoming message are successfully created i.e. if the incoming file has 10 messages, then 10 IDocs have to be created, but committed only when all these 10 are successfully created.

I tried using the FM 'IDOC_INBOUND_SINGLE' by setting the error flag and do_commit parameter but it works only when there is an error in the header of the IDoc and cannot be created. It does not work in case the IDoc is created but with in an error status.

Can anyone please suggest what else are the possibilities ?

Thanks in advance,

Archana.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Yes you can , say post idoc's collectively after say N number or post idoc's at the end of each day .

5 REPLIES 5

Former Member
0 Kudos

Yes you can , say post idoc's collectively after say N number or post idoc's at the end of each day .

0 Kudos

Hi Karthik,

How can this be done. Is there some FM that I can use ?

Can you guide me to some example.

0 Kudos

Hi

Check the last reply

Regards

Pavan

0 Kudos

Hi Pavan,

Thanks for your reply.

I could not really understand the relevance of that post with my question. Could you please explain a little more.

0 Kudos

Hi,

I finally managed to handle this situation using FM 'IDOC_INBOUND_SINGLE'. I realised there is a message statement after this FM, and if that is executed the rollback is not successful, hence just removed the message statement and it works as desired. Still in case anybody has any other suggestions please let me know. They are always welcome.

Thank you all for your attention.