fidley / falv

FALV - Fast ALV Grid
https://abapblog.com
GNU General Public License v3.0
141 stars 53 forks source link

Mass replacement #18

Closed VishnAndr closed 8 years ago

VishnAndr commented 8 years ago

There is an issue that FM RM_FREE_SESSION_CHECK, which is used in FM Z_FALV_MASS_REPLACE, might not exist in the system (NW 740 SP13, CRM 7.0 Ehp3 SP11). As a result 'mass replace' functionality end with a dump. It's better to use FM SPBT_INITIALIZE / SPBT_GET_CURR_RESOURCE_INFO to find free resources as per help documentation: https://help.sap.com/saphelp_nw70/helpdata/en/fa/096e92543b11d1898e0000e8322d00/content.htm

fidley commented 8 years ago

Thanks for pointing it out. Will update it soon.

fidley commented 8 years ago

Unfortunately this does not work correctly either. Seems like SPBT_INITIALIZE work for background processing and not for foreground. It always returns me a value of 2 free processes, even when all GUI sessions are free. What I can do is for sure to check if RM_FREE_SESSIONS exists in current system and then to call it to check free sessions. If FM is not available then I need to think about solution. SAP somehow checks the maximum of opened GUI so it must be possible also on other systems without FM RM_FREE_SESSSIONS.

VishnAndr commented 8 years ago

I found ERP system and looked into RM_FREE_SESSIONS. Not everybody would have a risk (management) in his system available, e.g. EA-FINSERV component :) Than TH_USER_INFO (which in fact is used inside RM_FREE_SESSIONS) will do the trick :) Parameters act_sessions and max_sessions respectively.

fidley commented 8 years ago

TH_USER_INFO did the trick. Will update nugg file soon. Thanks @VishnAndr !

VishnAndr commented 8 years ago

Great, thanks!!