Application Development and Automation 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: 
Read only

Idoc sequencing

Former Member
0 Likes
3,869

Hi All,

I am looking for solution to the following issue

The scenario is: Sender is sap hr which sends hr data of various info type based on change pointers (we have program RBDMIDOC scheduled every 20 mins to create idoc), the receiver is oracle IAM system which needs this hr data. We donu2019t have XI involved in between itu2019s just the case of sending idoc to IAM system via TRFC ports, now sometimes when system is down these idocs gets queued up and then later on when we execute LUWs(SM58) then there is no guarantee of FIFO (first in first out), now I wanted to know if there is any way to have some sequencing so that idoc goes in sequence because the receiving system doesnu2019t have capability to sequence it . It just takes the idocs as it comes. I have checked ALE/IDOC serialization but I guess for this both system should have capability of handling queues (like R3 to R3 or R3 to XI). Would be really grateful if you could help in this.

One solution that I can think of is to suspend the RBDMIDOC job so that it doesnu2019t create more idocs if connection is down but this solution is not that clean. Sequencing would have been a better approach.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,273

You're looking for outbound qRFC, which basically ensures that everything is processed in the correct order. For IDocs you can use outbound qRFC since web application server 6.20 and you configure this in the partner profile (transaction WE20). Just check the field Queue processing and enter a rule for your queue name. The rules for queue names can be configured via transaction WE85 (e.g. in your case you could start off with rule FIRST_16_OF_MESTYP, which will prefix your message type with SAP_ALE_.

So if for some reason an outbound IDoc with activated Queue processing cannot be sent, this IDoc along with all following IDocs of same message type and receiving partner will be stuck in the outbound qRFC queue (you can check this via SMQ1).

P.S.: Please refrain from posting multiple messages for the same topic, i.e. you have two other posts for this problem:

<ol>

<li>: </li>

<li>: </li>

</ol>

6 REPLIES 6
Read only

Former Member
0 Likes
2,274

You're looking for outbound qRFC, which basically ensures that everything is processed in the correct order. For IDocs you can use outbound qRFC since web application server 6.20 and you configure this in the partner profile (transaction WE20). Just check the field Queue processing and enter a rule for your queue name. The rules for queue names can be configured via transaction WE85 (e.g. in your case you could start off with rule FIRST_16_OF_MESTYP, which will prefix your message type with SAP_ALE_.

So if for some reason an outbound IDoc with activated Queue processing cannot be sent, this IDoc along with all following IDocs of same message type and receiving partner will be stuck in the outbound qRFC queue (you can check this via SMQ1).

P.S.: Please refrain from posting multiple messages for the same topic, i.e. you have two other posts for this problem:

<ol>

<li>: </li>

<li>: </li>

</ol>

Read only

0 Likes
2,273

Hi Harald,

Thanks for yor reply can you please help me in this .....in we85 for rule FIRST_16_OF_MESTYP what function module i should specify and later on how should i use that FM.

Read only

0 Likes
2,273

Judging by your answer it sounds like you're pretty lost. Thus I'd recommend to read up first on [Queued Remote Function Call (qRFC)|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/47/cd32ee1e123c84e10000000a42189c/frameset.htm].

Once you have the basic knowledge about what qRFC is, go back to your IDoc scenario. Via the partner profile you can configure your IDocs to go into a specific queue. Basically anything that is posted to a queue with the same name is executed in strict sequential order. Thus you have to pick a queue name that fits your requirements.

There is absolutely no need to configure anything in WE85, if you're happy with the queue names that SAP provides. E.g. if you need to serialize all messages for a given message type use FIRST_16_OF_MESTYP.

So in the partner profile you reference a rule for specifying a queue name. In WE85 the rules are linked to a ABAP function module that has as input parameters the IDoc content information (control record and data records) and returns a queue name for that IDoc. Very simple, there's not much to explain (but make sure you understand what qRFC is).

Cheers, harald

Read only

0 Likes
2,273

Hi Harlad,

Thnks for reply, i created outbound queue in partner profile, but i wanted to know if reciever(non sap system) doesnt have capability of queue(EOIO) it just takes the idoc as it comes , then will the outbound queue on the sender side gurantee that the idoc received are in sequence.

suppose if system is down for long period and BD21 runs multiple time during that period then there might be case that there are multiple idoc for same employee, so these idocs should go in FIFO manner to the receiving system . will having only outbound queue be sufficient in this case.

Read only

0 Likes
2,273

Thanks for reply, i created outbound queue in partner profile, but i wanted to know if receiver(non sap system) doesn't have capability of queue(EOIO) it just takes the idoc as it comes , then will the outbound queue on the sender side guarantee that the idoc received are in sequence.

I can only repeat my advise that you really should read up on [qRFC|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/47/cd32ee1e123c84e10000000a42189c/frameset.htm]. If you'd follow the link that I'd already given you in the previous posting you'll see as the first subtopic [qRFC Communication Model|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/e7/555e3c0f51a830e10000000a114084/frameset.htm], which states this:

Case 2: qRFC Outbound Queue

In this scenario the sender system uses an outbound queue to serialize the data to be sent, that is, function calls that depend upon each other are put in the outbound queue of the sender system and transferred to the target system in Exactly Once In Order - EOIO. The called system (server) has no knowledge of the outbound queue in the sender system (client). This send process is intended in particular for communicating between an SAP system and a non-SAP system.

Note: The coding of an external server need not be adapted specially to use qRFC. However, it must be tRFC enabled.

I doubt that anybody can explain this more clearly, not to mention the fact that it's always better to rely on the official SAP documentation than possibly questionable advice by some stranger...

Read only

Former Member
0 Likes
2,273

--

Reddy