Set Dispatch Status to Dispatch OK
When an IDoc is passed to the communication layer it is assigned a globally unique transaction identification. If the IDoc has been successfully dispatched this information is not automatically passed to the ALE communication layer. So that ALE processing sets the IDoc status to Dispatch OK, you should compare the transaction numbers in the communication layer and the ALE layer.
The program RBDMOIND checks that the IDocs passed to the transactional RFC have already been connected to the receiving R/3 System. If the connection worked the IDoc status is changed to "12", that is, Dispatch OK.
To set the IDoc dispatch status, run the program RBDOIND after the IDocs have been passed to the communication layer.