‎2007 Mar 15 2:25 PM
I am using FM Moudle<b> I_CHANGE_STATUS</b> for chaning status with <b>Commit WORK</b> & <b>WAIT UP TO 2 SECONDS</b>..
Its updating status but run time its considering Sama status.
Could any body help me how to refresh it in run time.
Thanx & Regards
Vijay Maurya
‎2007 Mar 15 2:42 PM
Hi,
I had faced this and i got a solution ,
After using the FM
U are using Commit work
Then Wait up to 2 Seconds.
We don't know exactly how much time it takes so don't use 2 seconds
Just say WAIT surely it wil work.
since before the FM execution u are asking to COMMIT so it is not updating even when u ask to update this means the FM is not completely Executed with in 2 seconds.
Reward if found suggestive.
Regards,
Ravi Kumar
‎2007 Mar 15 2:27 PM
use COMMIT WORK AND WAIT without seconds. This will wait until LUW is completed
Also note that I_CHANGE_STATUS is a update module (Check SE37 attributes for this function), so an update module should be called using
CALL FUNCTION function IN UPDATE TASK
COMMIT WORK AND WAIT will then immediately trigger the update as a high priority because this a update task. Here is SAP documentation regarding calling functions in update tasks
Syntax
CALL FUNCTION update_function IN UPDATE TASK
[EXPORTING p1 = a1 p2 = a2 ...]
[TABLES t1 = itab1 t2 = itab2 ...].
Extras:
1. ... EXPORTING p1 = a1 p2 = a2 ...
2. ... TABLES t1 = itab1 t2 = itab2 ...
Effect
This statement registers the update function module specified in update_function. update_function must be a character-type field, which during execution of the statement contains the name of an update function module in uppercase letters.
An update function module is a function module, for which in the Function Builder the property update module is marked. The registration of an update function module is an essential part of the update task.
The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.
The actual execution is triggered by the statement COMMIT WORK. The formal parameters of the function module receive the values of the actual parameters from table VBLOG. A function module that is registered several times will also be excuted several times with the respective parameter values.
‎2007 Mar 15 2:42 PM
Hi,
I had faced this and i got a solution ,
After using the FM
U are using Commit work
Then Wait up to 2 Seconds.
We don't know exactly how much time it takes so don't use 2 seconds
Just say WAIT surely it wil work.
since before the FM execution u are asking to COMMIT so it is not updating even when u ask to update this means the FM is not completely Executed with in 2 seconds.
Reward if found suggestive.
Regards,
Ravi Kumar