2012 Apr 11 11:10 AM
Hello All,
I am suffering with a strange situation, that as per my requirement.
Scenerio is like.
We need to modify specific record of table /SAPSLL/CUIV in GTS, which get created via VF01 called from R/3, so we had placed the logic to call a new RFC in R/3, just after the Call FM 'RV_INVOICE_DOCUMENT_ADD', which create a new entry in GTS table.
So outr new RFC has the logic to update the table /SAPSLL/CUIV for newly created record.
Now when we run the VF01, its does everting but doesnt Update the Table record, unless we do a debugging in any side.
means if the execution is being stopped by debugger then only it updates the table in GTS, else it doesnt.
i have tried to use, Call RFC in backgroung,seperate task... also i have tried to use COMMIT work and wait, in GTS side FM.
Please suggest.
Regards,
Nitin
2012 Apr 13 10:22 AM
Commit and wait is the only possible soltuion.
Try varying wait time.
It may help
2012 Apr 13 9:56 AM
2012 Apr 13 10:20 AM
Hi Nitin
Check the Login Id credentials for the RFC in SM59 for your target system.
The driver program should be executed using the same Login Id.
Regards,
Xineohpi.
2012 Apr 13 10:28 AM
Nitin,
Such thing occurs due to implicit commit which occurs by debugging. implicit commit is executed by the system at each step of debugging - when you enter the debugger, when you do f5 f6 f7 f8. Also while doing debugging you provide sufficient time for commit to save the data to db.
I would suggest
1) creat a FM on r3 side. Put a logic say
do 10 times.
* check if the vf01 data is saved to data base by doing select signle
* if it has saved then call you rfc fm on the other sid and exit.
* if not then wait say 2 seconds?
endo.
2) Call this FM in background task.
3) put proper commit in your RFC fm on GTS side.
See if it helps
2012 Apr 13 10:32 AM
yes User name you asked for RFC is different, but in this case how its working in Debugger, and how previous std RFC is creating an entry in GTS side with different names.
2012 Apr 13 11:01 AM
Hi Gaurav,
i have some query over your suggestions that
1. you said to check the VF01 data in R/3 database..why we need this, i am putting my RFC call when the Billing Documnet is just created in R/3 and Updated in GTS as well.
2. doing that in Loop with waiting for seconds... wont it effect the current execution time of VF01 ?, which will definately not acceptable by business.
I did the things with call rfc in background task as seperate unit..with proper commit work and wait in GTS side..but its not working.
2012 Apr 13 11:16 AM
What credentials are passed to the std RFC?
Can you pass the same credentials of the RFC and check if your update is working and revert.
2012 Apr 13 11:28 AM
1. I said to check the entry because if further down the vf01 program call if some problem occurs then the update is terminated then even after that you will will end up updating in GTS. You would not like to do that
2) No it won't affect the VF01 processing. Background task runs in separate task.
Did you do a commit work in r/3 side? it is required to trigger the RFC FM.
2012 Apr 13 10:20 AM
Hi,
You create a separate FM and call the required FM in new task. inside the Fm after your required FM you can use commit work. It should work. If still it is not working then go for a BDC (if possible) instead of calling the required function module.
One thing you need to make sure is don't write commit work in the enhancement point , you write it as i said above then there won't be any issue of LUW.
Regards,
Nagaraj
2012 Apr 13 10:52 AM
Hi Nagaraj,
i tried as u said... i.e created a seperate FM in R/3 and then in that Fm , i called the RFC to GTS, then used the COMMIT WORK AND WAIT at both GTS and and in R/3(after rfc call in the same FM)...but nothing worked...
Also now the debugger is also not updating the table.
2012 Apr 13 11:57 AM
Hi,
Just a thought, i might be wrong.. after the invoice created in R/3 , don't call anything.. On the other hand in GTS write a program in which call the RFC function module using destinatoion destination name .. Now in R/3 side create a RFC function module and they to pass the invoice details.Now when you call R/3 from RFC function module in GTS using destinantion destination name, you will get the details.. Now update the table with the require information.. However you need to schedule job for the program in GTS .Hope you got my point.
Regards,
Nagaraj
2012 Apr 13 10:22 AM
Commit and wait is the only possible soltuion.
Try varying wait time.
It may help