2007 Jul 26 4:08 PM
dear friends..
i have created an UPDATE function module with Processing type- Update Module, Start Immediate. i have handled the exceptions using Raise statement in the function module..
the call function looks as..
CALL FUNCTION 'ZFI_LCTXN_TABLES_UPDATE'
in update task
EXPORTING
ZLCTMB1 = p_lctmb1
NU_ENTRY = p_global-ins_zlctmb1
TABLES
UPD_PO = UPD_PO
UPD_SH = UPD_SH
EXCEPTIONS
ERROR = 1
OTHERS = 2.
p_subrc = sy-subrc.
commit work.
but if the update fails, and even though the RAISE ERROR works, and update termination message is registered in SM13, i dont get the value for sy-subrc as 1 .
is it the right way..if yes please tell me how to generate an error message within the transaction..so that the user knows the update has failed..
thank you for your time
Nivin
dear friends..
i have created an UPDATE function module with Processing type- Update Module, Start Immediate. i have handled the exceptions using Raise statement in the function module..
the call function looks as..
CALL FUNCTION 'ZFI_LCTXN_TABLES_UPDATE'
in update task
EXPORTING
ZLCTMB1 = p_lctmb1
NU_ENTRY = p_global-ins_zlctmb1
TABLES
UPD_PO = UPD_PO
UPD_SH = UPD_SH
EXCEPTIONS
ERROR = 1
OTHERS = 2.
p_subrc = sy-subrc.
commit work.
but if the update fails, and even though the RAISE ERROR works, and update termination message is registered in SM13, i dont get the value for sy-subrc as 1 .
is it the right way..if yes please tell me how to generate an error message within the transaction..so that the user knows the update has failed..
thank you for your time
Nivin
2007 Jul 26 4:17 PM
1. Call your Update FM.
2. If error occurs handle in the report like, if sy-subrc ne 0. message e00(002) 'Update terminate'. endif.
2007 Jul 26 4:28 PM
Hi,
Maybe it's usefull for you.
<b>
IF sy-subrc EQ 4.
MESSAGE e001 RAISING not_found.
ELSEIF sy-subrc EQ 8.
MESSAGE e002 RAISING not_found.
ELSE.
...
ENDIF.</b>
Using this to create a message and raise in the same time !
Regards.
Marcelo Ramos
2007 Jul 27 2:40 PM
thank you for the responses..
the problem is that ..even if an exception is triggered in the update function module, the value of sy-subrc is not set "not equal to zero" into the calling transaction..i mean..the sy-subrc after the update function call is not zet to "NON ZERO" even after an exception is raised..i hope u have got the problem now..
2008 Jan 14 6:00 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |