Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with Update Function Module

Former Member
0 Likes
4,441

Hi All,

I have been using an update FM in an implicit enhancement for COR2. this FM will update the date of manufacturer for the process order header material batch. The processing type for this FM is "Update Module " ---> "Start Delayed" (V2). Here when this is called the date is getting updated after some time since i place "WAIT UP TO 10 SECONDS" as the first statement in this FM. I would like to update the date the moment the order is saved rather waiting for some time. "Start immed", definitely it won't work as per my implicit spot. Hence is there any approach to get it resolved. Please let me know. or is there any way to know all the V1 FMs are executed successfully, so that i can lock the order until the V1 are completed.

Regards

Mallikarjun Reddy G

4 REPLIES 4
Read only

paul_bakker2
Active Contributor
0 Likes
2,338

Hi,

I'm not sure I understand your question. If you want the update to occur immediately (in an update task), why not submit it as a V1 update?

Also, if you want it done ASAP, why don't your remove the 'wait up to 10 seconds'?

I feel like I'm just stating the obvious here.

cheers

Pau

Read only

Former Member
0 Likes
2,338

Hi Mallikarjun,

V2 update would happen after V1. Why dont you just remove the wait 10 sec statement and test your enhancement. Hopefully your update task would get executed after the SAVE and commit..

Regards,

Raju.

Read only

SwadhinGhatuary
Active Contributor
0 Likes
2,338

Hi ,

As per SAP doc V1 update is used for major updates and V2 is for minor one. again if any V1 or V2 is failed restart and impact on other Update method is different .

I think v2 is good and u can reduce 10 sec to 2-3 sec. so that cpu time and cost will considered.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,338

You should not use any delay in update FM, that may will trigger some performance bottlenecks as the update process(s) will be locked, think on hundredths of FM queuing with a wait of some seconds per execution...

  • You could use an update V1 FM as you don't generate "statistics data" (Also you will execute in same LUW so share some buffer with other update FMs) but insure it is executed after the standard ones (just insert the call it after the others or wrap in a form executed on commit, sso SAP call some update FM, execute COMMIT, the form is executed and add your FM after the standard ones, then update tasks start)
  • If you use V2, you will execute in another LUW not sharing data buffering and may got some problem with database delay to provide updated data.
  • If you want/require to ignore restrictions related to usage of update FM, you could also use RFC FM executed IN BACKGROUND TASK (won't use same process and will execute after update task FM)

Hint: If you actuallywant to play with update task FM sequence/status then get current update key with FM UPD_GET_KEY and status with UPD_GET_REQUEST_INFO, you can also read VBHDR, VBMOD and other associated table with select statements.

Regards,

Raymond