In case if default.lgf fails to run, then how can we know programmatically?
For example, we are calling a BADI in a script which is called from default.lgf.
Inside the BADI we have some data manipulation done. before hitting the default.lgf, we are creating some flag records in the DB and using those flag records, manipulation is done in the custom BADI and flag records are cleared. In case if the default.lgf fails, then custom badi is not started. In that case, the flag records remain as is in the DB and for the next run, the data will be messed up because those flag records will be processed as well which are old.
We want to somehow avoid this situation. How can I interpret programmatically default.lgf failed and at the same place, I want to clear the flags?
Thx
Ravi