philippoommen1
Member
Hi,
I have situtation as follows,
RUN src/InvoicePost.p
(OUTPUT vErrorMsgCaused dueTo).
IF RETURN-VALUE = "ERROR" THEN DO:
UNDO trx-block , RETURN "ERROR".
END.
end. /* trx-block */
Run p_shootMessageCauseOfError.
If an error happens, I want to populate a record in the database with the value of 'vErrorMsgCaused dueTo' variable. What is happening now is it never excute the internal procedure p_shootMessageCauseOfError since there is a return. If I move up the excution of that internal procedure before undo, while undoing , it undo the DB record what I created in p_shootMessageCauseOfError .
How can I accomplish this.
TIA
Philip P Oommen
I have situtation as follows,
RUN src/InvoicePost.p
(OUTPUT vErrorMsgCaused dueTo).
IF RETURN-VALUE = "ERROR" THEN DO:
UNDO trx-block , RETURN "ERROR".
END.
end. /* trx-block */
Run p_shootMessageCauseOfError.
If an error happens, I want to populate a record in the database with the value of 'vErrorMsgCaused dueTo' variable. What is happening now is it never excute the internal procedure p_shootMessageCauseOfError since there is a return. If I move up the excution of that internal procedure before undo, while undoing , it undo the DB record what I created in p_shootMessageCauseOfError .
How can I accomplish this.
TIA
Philip P Oommen