cancel
Showing results for 
Search instead for 
Did you mean: 

SUBROUTINE IN UPDATERULE

Former Member
0 Kudos

Hi All of u,

I have issue in update rule, when i'm using code with subrotines getting error, we can't use subroutine with perform and form statements.

i would appriciate, anybody give reply.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

continuation :

Yuo can do the INCLUDE ... PERFORM en both of them

Obviusly is better, use a function group or a class y you are calling java procs.-

Former Member
0 Kudos

What do you want to do ???

To validate data in the update rule?

You can do it of two ways, field by field or in the star routine.-

the difference is, in the start routine you can add or delete data ( complete row ), from infoSource, and in de Field routine you can only change de information of this field in particular.-

Former Member
0 Kudos

Hello Ravi,

for maintenance and reusability reason

I would prefer to use Function Modules.

Kind regards

Michael

somnathkumar
Active Participant
0 Kudos

I do not think you can write subroutines like what you are trying to do in an update rule.

You could try putting all your code in an include and put the include in update rule. This might work.

Former Member
0 Kudos

Hi,

Than Q for quick response,

But i'm unable to write the routines inbetween form statemment, normally it won't allow to write subroutine

inbetween form routine, what is the procedure to wirte routines in update rules.

With Rehards,

Ravi.

Former Member
0 Kudos

Hi Ravi,

what you can do is, in the global part of your routine, put a statement like

INCLUDE Z_INCLUDE.

In this Z_INCLUDE, you can have lots of forms to be called in each routine of your update rules ( but navigation by clicking on the perform statement is not available for this). Another option is to call a fm or a method. But for the method I think you will have to do almost the same as for the subroutines.

One another option I can think of is doing a

PERFORM routine IN PROGRAM zabap IF FOUND.

As for a fm you need to pass all necessary parameters.

regards

Siggi