Application Development 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: 

Form Routine in User Exit

Former Member
0 Kudos

Hi

I would like to include a form routine in user exit inlcude ZXTXWU01 but I guess that is not possible, so I created a new include ZXTXWZZZ in which I have developed the code for the form routines...

But I still get the error in the main user exit ZXTXWU01 stating that the Form... End Form can be only after the End Function which obviously refers to the function module containing the main user exit..

Please let me know how to over come this ....

4 REPLIES 4

former_member194669
Active Contributor
0 Kudos

First comment all (Including INCLUDE) activate the main user exit, then uncomment INCLUDE and activate

Former Member
0 Kudos

Hi,

You cannot create another Form...EndForm if the first include ZXTXWU01 is already inside a Form..Endform.

Meaning following structure is invalid:

Form first_form.

.....

.....

Include zzzz

Endform.

In Include zzzz.

Form second_form.

.....

.....

Endform.

Instead of a Form..Endform subroutine...directly have the statements in the Include program and remove the Form..Endform.

Regards,

Subramanian

Former Member
0 Kudos

Hi,

If you have the new include called in the main include it would still be an issue it is basically based on where you want to call it if you want to call it in ZXTXWU01 just keep the perform there and then double click the perform for the subroutine it would let you create in a new include in the same function group so that the link is there or you can creat this in some other z program and the while calling just give the reference of the program like.

perform subroutine(zzprogram) using.......

or perform subroutine in zprorgam if found.

Regards,

Himanshu

0 Kudos

That worked thanks... perform routine(include name)

The structure was something like this

FUNCTION (USer Exit FM)

INCLUDE zxtxwu01.

ENDFUNCTION.

I was trying to include form routine directly in zxtxwu01...