A good way to set the concurrent program status:
fnd_concurrent.set_completion_status
Example:
IF (g_import_request_id = 0) THEN
fnd_file.put_line(FND_FILE.Log, fnd_message.get);
GL_MESSAGE.WRITE_LOG('LEZS0001');
IF (fnd_concurrent.set_completion_status('ERROR', fnd_message.get)) THEN
null;
END IF;
ELSE
IF P_status = 'W' THEN
fnd_file.put_line(FND_FILE.Log, 'Journal Import program completed with Warning. Please fix error in interface and manually submit the journal import program!');
GL_MESSAGE.WRITE_LOG('LEZS0002');
IF (fnd_concurrent.set_completion_status('WARNING', 'Journal Import program completed with Warning. Please fix error in interface and manually submit the journal import program!')) THEN
null;
END IF;
ELSE
fnd_file.put_line(FND_FILE.output,' REQ_ID=' || TO_CHAR(g_import_request_id) || ' Job completed with status ' || s_dev_status || '. Message: ' || s_message);
GL_MESSAGE.WRITE_LOG('LEZS0000', 1, 'REQ_ID', TO_CHAR(g_import_request_id));
IF (fnd_concurrent.set_completion_status('NORMAL', NULL)) THEN
null;
END IF;
END IF;
END IF;