Skip to Content
author's profile photo Former Member
Former Member

SUBROUTINE IN UPDATERULE

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jan 28, 2005 at 03:00 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2005 at 12:49 PM

    Hello Ravi,

    for maintenance and reusability reason

    I would prefer to use Function Modules.

    Kind regards

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 07:46 PM

    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.-

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 07:56 PM

    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.-

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.