14: -- chop the message to 77 long
15: l_length := length(msg);
16: WHILE l_length > 77 LOOP
17: l_substring := substr(msg, l_start, 77);
18: FND_FILE.PUT_LINE(FND_FILE.LOG, l_substring);
19: l_start := l_start + 77;
20: l_length := l_length - 77;
21: END LOOP;
22: l_substring := substr(msg, l_start);
19: l_start := l_start + 77;
20: l_length := l_length - 77;
21: END LOOP;
22: l_substring := substr(msg, l_start);
23: FND_FILE.PUT_LINE(FND_FILE.LOG, l_substring);
24: END IF;
25: EXCEPTION
26: WHEN others THEN
27: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Exception: others in Write_Log');
23: FND_FILE.PUT_LINE(FND_FILE.LOG, l_substring);
24: END IF;
25: EXCEPTION
26: WHEN others THEN
27: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Exception: others in Write_Log');
28: FND_FILE.PUT_LINE(FND_FILE.LOG,
29: 'SQLCODE ' || to_char(SQLCODE) ||
30: ' SQLERRM ' || substr(SQLERRM, 1, 100));
31: END Write_Log;
24: END IF;
25: EXCEPTION
26: WHEN others THEN
27: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Exception: others in Write_Log');
28: FND_FILE.PUT_LINE(FND_FILE.LOG,
29: 'SQLCODE ' || to_char(SQLCODE) ||
30: ' SQLERRM ' || substr(SQLERRM, 1, 100));
31: END Write_Log;
32: