Please also have a look in our OnlineHelp for further information.
The example below shows a sample console program that sends a STATUS IDoc. This message type (STATUS) is designed for manipulating a status of another outbound IDoc. If an external application received an IDoc, it can use the STATUS IDoc to confirm the successful processing. STATUS is a very simple IDoc (which contains only one data record). We have kept the example simple here.
To begin, we open a client connection to the R/3 system with the help of R3Connection class. Then we use the CreateIdoc method to instance a valid IDoc object. SYSTAT01 is the IDoc type for the appropriate message type STATUS.
The next step is to provide various administrative information. Have a look at the source code to see how receiver and sender information is set.
Now we have to fill in some fields in segment E1STATS: the new status code (STATUS), date und time (LOGDAT, LOGTIM), and the IDoc number, which should be manipulated. Now is the ideal time to send the IDoc via the Send method.
The figures below show the sample program in action. The status code is increased from 3 (Data passed…) to 12 (Dispatch OK).