Skip to Content
0
Jul 26, 2007 at 03:08 PM

doubt in update function module

23 Views

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