cancel
Showing results for 
Search instead for 
Did you mean: 

How to call RFC module in multithread mode from WDJ app?

former_member186148
Active Participant
0 Kudos

Hello All!

Our WDJ application uses RFC modules from SAP backend as Adaptive web services model. Because of big amount of data module which prepared it for WDJ run too much time and we decided to run this FM in background mode. So we need two FMs - FM1 will prepare data and FM2 will retrieve this data to WDJ when it will be prepared. Since there're big amount of data to be processed by FM1 we need to run FM1 in multithread mode to allow user to interact with our application. So the whole scheme is following: FM1 run in separate thread and prepares data. At the same time user can interact with app. When FM1 finished its work it should tell to WDJ app that the data is ready to use. After that FM2 should be executed and retrieve data to WDJ. After data is retrieved WDJ app enable functionality which required this data.

For multitread mode we used the following example: http://help.sap.com/saphelp_nwce711/helpdata/en/48/6437ccbdbc51eee10000000a421937/frameset.htm. But when we tried to execute our WDJ application we faced with following exception "java.lang.IllegalStateException: SessionReferenceProvider already registered"

Is there any other way to run module in multithread mode? Or to fix this error?

Regards,

Lev

Accepted Solutions (0)

Answers (1)

Answers (1)

Stefan-EA
Contributor
0 Kudos
former_member186148
Active Participant
0 Kudos

Hello Stefan.

Thank you for reply. But it seems that this varinat unfortunately ins't useful for me since there is no TaskBinder class in NW 7.3

I tried to call FM in parallel thread in WD application without using SessionProvider. This FM set context parameter (enbale property for some button) but I faced with problem that button didn't changed its enability. I think it happened since view layout rendered before parallel thread changed context attribute. Is there any way to actualize properties of view elements in such situatoins?

regards, Lev