Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Trigger workflow when a record is created in a database table .

TSG
Participant
0 Likes
774

I am try to completed following tutorial in sap technical .com

http://saptechnical.com/Tutorials/Workflow/Table/events.htm.

but when i try to insert new entry in to table ZEMPDETAIL saving time it will pop up

following error Description. (attached Error.txt)


then I checked and all re activated all subroutine, include and functional groups. this error popup

inside the  UPDATE_TAB subroutine following statement.


IF x_header-frm_on_new NE space.

   PERFORM (x_header-frm_on_new) IN PROGRAM.             "Zp 05

ENDIF.




3 REPLIES 3
Read only

arindam_m
Active Contributor
0 Likes
544

Hi,

Check the value in variable x_header-frm_on_new that should have a valid name of a perform and also you need the program name in which the perform exist after IN PROGRAM. The general call pattern is

PERFORM (<fsubr>)[IN PROGRAM (<fprog>)][USING   ... <pi>... ]  
                                       [CHANGING... <pi>... ] 
                                       [IF FOUND].

Cheers,

Arindam

Read only

0 Likes
544

Hi Arindam.

Thanks your  reply,

value variable is pass the  correct subroutine. but this subroutine running on different include rather than perform statement execute include, But this include are in same program.

I think this is can't be problem.

Read only

arindam_m
Active Contributor
0 Likes
544

Hi,

Got a bit confused

What is include for

but this subroutine running on different include

and whats the include for

perform statement execute include

Please note when you are calling the subroutine via perform ion the main program the include in which  the subroutine exist should either be included with an INCLUDE <include_prog> statement or called as stated before.

Cheers,

Arindam