2007 Jul 26 5:09 PM
Hi All,
I have written a subroutine and inside that I am calling a FM In Update Task.Control is going to the Subroutine but not into the FM In Update Task,but the SY-SUBRC = 0.
The Code is like this :
PERFORM sub_post_data.
FORM sub_post_data .
*----- Post through the FM in UPDATE TASK
CALL FUNCTION 'Z_MB1A_POST'
IN UPDATE TASK
EXPORTING
gm_header = gm_header
gm_code = gm_code
TABLES
gm_item = gm_item
t_return = gm_return.
ENDFORM.
The Processing type of the FM is selected as UPDATE MODULE and START IMMED.
Can anyone please tell me why the control is not going into the Update TASK FM?
Thx in Adv.
- Raj
Hi All,
I have written a subroutine and inside that I am calling a FM In Update Task.Control is going to the Subroutine but not into the FM In Update Task,but the SY-SUBRC = 0.
The Code is like this :
PERFORM sub_post_data.
FORM sub_post_data .
*----- Post through the FM in UPDATE TASK
CALL FUNCTION 'Z_MB1A_POST'
IN UPDATE TASK
EXPORTING
gm_header = gm_header
gm_code = gm_code
TABLES
gm_item = gm_item
t_return = gm_return.
ENDFORM.
The Processing type of the FM is selected as UPDATE MODULE and START IMMED.
Can anyone please tell me why the control is not going into the Update TASK FM?
Thx in Adv.
- Raj
2007 Jul 26 5:24 PM
Hi Rajarshi,
When you call an FM in update task, it doesn't get executed until the system encounters a commit statement later in its flow.
This is what the sap help says:
<b>"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."</b>
Regards,
Ravi
2007 Jul 26 5:28 PM
Thx Ravi.
I need to Create the Goods Mvt. step by step using a BAPI.Say there are 3 sets of data,if the first one is OK but second one is with error I want to Rollback the first also.
If this is the case what I need to do?
Thx again.
2007 Jul 26 5:55 PM
HI,
The function modules called in update task are executed at the end of the transaction .. if you want to look into the flow and debug in the update task.. while you are in the debugging mode place a break point at statment call function.. and go with f5 slowly u will get to the update funcation module at the end.
Thanks
Mahesh
2007 Jul 26 9:20 PM
if you want to debug the function module called in update task set the debugging setting as update debugging and put the break point inside the funtion module so it will stop at the funion
all the best .
rgds
srinu reddy
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |