‎2009 Jan 16 1:49 PM
We have a RFC having bdc code ( with call transaction) for transaction IW22 ( Process Notification) . This BDC code is processing one notification at a time.
In Online, the RFC is working obsolutely fine. But In background, when the RFC is called multiple times in a loop to process multiple notification , bdc in RFC is working fine for first time then giving an error with code 344 for second notification onwards.
Could anybody help/suggest us how we can fix this problem.
Many Thanks,
Rohit
Edited by: Rohit Kumar on Jan 16, 2009 4:13 PM
‎2009 Jan 16 3:17 PM
what is "code 344"
first thought: CALL TRANSACTION UPDATE should be 'S' (probably it is set to 'A' now)
‎2009 Jan 16 3:17 PM
what is "code 344"
first thought: CALL TRANSACTION UPDATE should be 'S' (probably it is set to 'A' now)
‎2009 Jan 16 6:04 PM
It is set to 'S' .
Still not working.
Portal application is calling the RFC( having this bdc code) like below---
Loop ...n times
call function 'RFC_NAME' ...
endloop.
********************
For the first call, RFC is working as expected but at the second time bdc fails....
Please suggest
‎2009 Jan 16 6:38 PM
Hi Rohit,
Are you refreshing all the internal tables, variables (used in the RFC) before the call in the loop?
Thanks!
‎2009 Jan 16 6:54 PM
Recheck the BDC, you have written with atleast 2-3 test cases. Code 344 if I remember correctly will come when the BDC hits a screen/screen field not expected by the program.
‎2009 Jan 16 7:22 PM
The BDC program is in R/3.
External system Portal is calling the RFC ( with bdc code).
I am unable to debug the BDC ( mode 'A') during external debugging.
What is our observation is -
The BDC is doing fine when called once.
BDC worked fine always for the first call in the multiple RFC calls( within loop in portal side code) .
Do we need to do something related to user session/ bdc session etc.
Please suggest.
Edited by: Rohit Kumar on Jan 17, 2009 1:06 PM
‎2009 Jan 17 1:22 PM
The problem is probably that memory is not reset after the first call, and the second call takes it into account.
As it is a call transaction, it means that there is probably a SET/GET parameter done by IW22.
It means that the problem does not come from RFC, so you may reproduce in normal mode, and use the normal debug.
Another way, that would be more simple and fast, is to compare the SET/GET parameter before and after the first call transaction. You do this by log out and log in the system (to reset all memories for simulating the RFC call), add breakpoints before and after the call transaction. At the breakpoint, in the old debugger, you will see set/get parameter memories via menu goto, system areas, abap memory.
In your RFC function module, reset these memories (SET PARAMETER ID ... FIELD space) before call transaction.
It should work.
Otherwise, debug it (in normal debug as I said)
‎2009 Jan 17 1:56 PM
EASIER : Another possibility is to close the RFC session in the calling program, after each CALL FUNCTION 'RFC_FUNC', so that the memories are cleared.
To do that, if the calling program is an ABAP program (?), you may close the connection explicitly by calling function module RFC_CONNECTION_CLOSE
‎2009 Jan 19 9:59 AM
I am unable to find the below navigation as suggested by you during debugging...
set/get parameter memories via menu goto, system areas, abap memory.
Could you please come again, It will be much helpful for us.
‎2009 Jan 19 11:25 AM
it's probably because you are in the new debugger.
You must switch to the classic debugger (there is an option in the new debugger menu)
‎2009 Jan 19 11:45 AM
We tried to do the same and also tried to use the 'SET PARAMETER' etc.
We debugged the BDC and found that the control of BDC get diverted to an 'information pop up window' which says 'error calculating cost
SAP somehow manage to do process the first notification and create order against the notification but it seems that BDC looses the flow for second notificatin , after lossing it's control in the first one.
There is no screen number of that information pop up window.
could you please suggest if there is any way to surpass the warning messages...
‎2009 Jan 19 12:32 PM
Thanks a lot for taking so much interest into our problem.
In BDC Code, bdcdata is not refreshed after processing a notification. After we added code to refresh bdcdata after processing the notification, the RFC is working for multiple notification.
Thanks again to all you for all your support and help.
‎2009 Jan 19 2:28 PM
Thx a lot Rohit for the feedback. Btw (now I remember) I already saw this problem for internal tables and RFC, where internal table was kept in memory (either client or server I don't know) between 2 calls and I had to empty. So I think the problem is not related to BDC, but RFC.
<hardcoding_of_the_rules_removed_by_moderator>
Edited by: Julius Bussche on Jan 21, 2009 1:03 AM
‎2009 Jan 20 3:52 PM
Thanks. you deserve more than just points...already given points to you
You are the people in sdn which making a lot of help to other developers.
Thank you again