I have a program which creates inbound IDOCs and is run as a batch job. I have a requirement to figure out how many IDOCs were created after each run. The scenario is that I cannot make any changes into the existing batch job to count the number of IDOCs being created. I have to write an additional program which I can run back to back with my IDOC generating program as a batch job and get the number of IDOCs generated by the previous job.
One way I proposed is to read the spool and calculate the number of IDOCs which were pushed in the spool. But this wasn't accepted the other I proposed is to read the time stamp from EDIDC and EDIDS tables before the batch job is run and again read the time stamp after the job is completed and fetch the number of IDOCs generated during this time. The only glitch with this scenario is that there might be other batch jobs which may be using the same Message type and if run during the same time period, may not give me the accurate result.
Can somebody hint me some other better approach ?