Hello Guy,
I used the IDOCs as the vehicle to trigger the writing of the flat files. There is probably a way to avoid using IDOCs. But since IDOCs respond so well to change pointers it seemed like the cleanest way.
I needed to write and send out a flat file of certain A/P vendor details, but only when the vendor was added to a new company code.
The change pointer to trigger IDOC was only on the company code field, as this was the only time we wanted a flat file.
I created custom reduced IDOC with only vendor number and company code (the key fields needed by the custom flat file program to read the database), also a few other fields in the IDOC of no interest but required by ECC.
The IDOC was created when the vendor was added to a new company code. The IDOC in turn ran the custom program, which read the database vendor master and wrote all data needed to the flat file.
Oh, and an archiving and delete job ran every night to remove all of these "temporary" IDOCs once they reached a few days old. This kept the database from filling up with these IDOCs yet still left a few day's worth behind in case of troubleshooting.
~~Sue Morton