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

CALL fucntion update task

why does it not allow me to set the import para for func module when atribute is set as update mode...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2005 at 06:25 PM

    Update functions are triggred by commit work and are executed in update task ( other than dialog task ) . It cannot and should not return a parameter to the calling program as the calling program has no no control on update task . Even if it allows it would have no meaning .

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2005 at 08:48 PM

    thanks i need to test how its would work....i need to call it in progream 3 times..and then commit and see if the simulataneous excution is done..can someone guide through the steps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      You can call it three times. It will be executed simultaneously ad the data which was there at the time of call will be visible in update task.

      For example

      CALL FUNCTION F1 IN UPDATE TASK

      EXPORTING

      P1 = W1.

      CALL FUNCTION F1 IN UPDATE TASK

      EXPORTING

      P1 = W2.

      CALL FUNCTION F1 IN UPDATE TASK

      EXPORTING

      P1 = W3.

      COMMIT WORK .

      It would execute 3 times in update task in the sequence above . You can even test in debugging - , put a break point on commit work. In debugging mode enable Update debugging in settings tab ( -> SAVE ) . Press F8 , another window of update task will open . Here BREAKPOINT -> AT FUNCTION -> <F1> . You will see that your code stops in the FM 3 times with different parameter values W1/W2/W3 .

      Cheers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2005 at 04:23 AM

    can u tell me about the steps creting f1 function as we need to set attributes to update module dont need to define any exportinbg para....then how do i use it u can take example of F1 calcuting sum of two numbers....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 04:32 PM

    if my function module populates a field and then after commit i need to write it...what shud the code look like...anything particular to be atken care of

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      As I said earlier update modules are run in update task and your dialog task has no control over it . Update modules should be used for updating database tables and not for any other purpose. Update modules are created only to bundle all database updates in one. You dialog program / application program does all the necessary validations and passes all the database updates to update module which is triggered at commit work . After this your dialog program has no control on update module , so neither it should return any value to calling program , nor write any list .

      You can use normal FM to write a list . Why are you using update module. Any specific requirement ..

      Cheers

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.