‎2005 Oct 20 9:52 AM
Hi folks,
What is the difference between
1. A function module calling in 'update task'( if attributes not set for update mode).
2.A function module's attributes set to update mode, but while calling not specified 'Update task'.
Please clarify this doubt.
Thanks in advance.
Bhavani
‎2005 Oct 20 9:55 AM
CALL FUNCTION func IN UPDATE TASK.
Additions:
1. ... EXPORTING p1 = f1 ... pn = fn
2. ... TABLES p1 = itab1 ... pn = itabn
Effect
Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder
The return value is not set.
Addition 1
... EXPORTING p1 = f1 ... pn = fn
Effect
Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module.
Addition 2
... TABLES p1 = itab1 ... pn = itabn
Effect
TABLES passes references to internal tables. All table parameters of the function module must have values.
Note
With update function modules, both import parameters and exceptions are ignored when the call is made.
Administration transaction
Related
COMMIT WORK, SET UPDATE TASK LOCAL
regards,
kartikey.
‎2005 Oct 20 9:59 AM
hi,
Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder
The return value is not set.
cheers,
sasi
‎2005 Oct 22 3:39 PM
hi
you cannot use a CALL FUNCTION in update task if
it not has the property attribute set.
if you do this when you'll try the generate the program
the system will return an error.
on the other side you can use a function module with the attibute in update task like a normal function module.
remember that all the parameters specified in the fm
that you want to use in update task must be flagged by reference and that a fm in update task cannot have parameters in exporting or trigger exceptions.
the function module in update task is triggered at the
first explicit commitwork by using the instruction COMMIT WORK.
note: you can specified the fm in update task in two ways. "start immediately" or "start delayed". the first indicate that your FM will be processed like an update type V1, the second that the FM will be processed in an update type V2.
note: all the fm in update task of type V1 will be processed into the same LUW, all the fm in update task of type V2 are processed in separated LUW.
note that you can have
‎2005 Oct 22 3:46 PM
note that you can have more fm in update task
into your programs of differents types.
but if the fm type V1 will get an error all the fm type V2
will NOT be executed and all the modification into V1 update are rollbacked, if the fm type V1 will be okay but an error occurs into one fm type V2 the modification into that fm will be rollbacked, but the others V2 update process are processed and the modifications executed by V1 update process are NOT rollbacked.
bye
‎2005 Oct 22 3:55 PM
Hi bhavani
-
-
To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to one of the following values:
Update with immediate start
Update w. imm. start, no restart
Update with delayed start
Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.
To display the attributes screen in the Function Builder, choose Goto ® Administration.
-
-
Difference Is:
In Update Mode:
else
Function modules that you call using CALL FUNCTION...In that case,
After the COMMIT WORK, the dialog process does not wait for these function modules to be executed . All of the function modules that you register in this way are executed together in a single database LUW. These updates are useful, for example, when you need to maintain identical data in more than one database.
-
-
Cheers,
Vijay Raheja