Skip to Content
0
Former Member
Mar 18, 2009 at 05:06 PM

FM with ON UPDATE TASK not working

1054 Views

All,

I am not getting an entry into a custom database table.

Here is the calling program:

-


DATA: wa_zshopmonitor TYPE zshopmonitor.

*

  • it_sm-mandt = sy-mandt.

wa_zshopmonitor-shoprunid = '1234567890'.

wa_zshopmonitor-class = 'DATE DETERMINATION'.

wa_zshopmonitor-sub_class = '0'. "DUMMY VALUE CAUSE SAYS ALL FIELDS ARE REQUIRED

wa_zshopmonitor-zcluster = '0001'.

wa_zshopmonitor-datetime_start = 1.

wa_zshopmonitor-datetime_end = 2.

wa_zshopmonitor-runtime_msn = 1.

CALL FUNCTION 'ZMM_SHOP_LOGIC_MONITOR' IN UPDATE TASK

EXPORTING

shop_monitor_input = wa_zshopmonitor.

IF sy-subrc NE 0.

COMMIT WORK.

ENDIF.

-


The FM code is below - and yes the attributes have this defined as an UPDATE MODULE, start Immed.

The table I am trying to populate is a transparent table (ZSHOPMONITOR).

-


FUNCTION zmm_shop_logic_monitor.

*"----


""Update function module:

*"

""Local interface:

*" IMPORTING

*" VALUE(SHOP_MONITOR_INPUT) TYPE ZSHOPMONITOR STRUCTURE

*" ZSHOPMONITOR

*"----


INSERT INTO zshopmonitor VALUES shop_monitor_input.

IF sy-subrc NE 0.

  • error message here

WRITE: /'shop table not created'.

ENDIF.

ENDFUNCTION.

-


Thanks.

Scott