Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

Prototype solution for processing different transfer services in ConnTrans.exe in a sequential order.

 The prototype solution has the below mentioned advantages.

  • Progress of data synchronization is visible to the user. It is not required to switch between the tabs for the progress information.
  • Success or failure message will be visible to the user and ConnTrans will not close if there are error messages.
  • Eg: in KBase, data import happens only if there are messages in the initial or delta tables. (Only if tables SMOSCEKBI or SMOSCEKBD have an entry).

 

ConnTrans is a utility that facilitates data transfer between the mobile client and the CRM Server (via the Communication Station).

The connection between the CRM Server and the mobile client is established via Dial-Up Networking (Remote Access Service).

You use ConnTrans to send and receive data from the mobile client. It starts the Message Transfer Service Client, which in turn takes the BDoc messages from the outbound queue of the mobile client and sends it to the Message Transfer Service Server that is located on the communication station.

A Transfer Service can be any third party component, which exchanges data with local or remote server. Such a Transfer Service would necessarily implement interface ITransferService and support callback interface ITransferServiceEvents, understood by ConnTrans framework.

Examples of transfer services are MSA, KBase, eMail and also can be any third party component.

 

In the example assume MSA and KBase as the 2 transfer services available.

SMO5TRNSRV table has the required entries and the same entries are available in the ConnTrans user interface on 2 different tabs.

Once synchronize button in the ConnTrans is pressed, data synchronization starts.

Data in MSA transfer service happens in 3 phases send, receive and import.

Data import in KBase happens and the progress bar is updated with the status of import.

However if there are any errors in any of the transfer services then user has to select each tab present in the ConnTrans user interface and check for the failure message.

Also if one transfer service say MSA runs without any error and KBase has error messages, the chances of user closing ConnTrans assuming success is high.

The prototype solution suggested below will enable only one tab (transfer service) at the

Time of execution. Also it will check if the KBase transfer needs to be run by checking the initial and delta tables. Only when the tables have data KBase service is triggered.

 

Solution: Copy the below contents to auto_Conntrans.bat file.

 

@echo OFF

CLS

@REM * Reading correct pathes </p><p>@SET MSA =%MOBILEROOTDIR%</p><p>@REM @echo Disabling KBase Import in ConnTrans GUI...</p><p>@SET Q2="Y"</p><p>@osql -U<DSN> -P<usrname> -d<password> -Q"delete from SMO5TRNSRV where TRSV_NAME='KBase'" > NUL:</p><p>@ECHO.</p><p>@ECHO Conntrans started...</p><p>@ECHO.</p><p>"%ProgramFiles%\sap\mobile\bin.net\ConnTrans.exe" /auto /close </p><p>@REM @echo Enabling KBase Import in ConnTrans GUI...</p><p>@osql -U<DSN> -P<usrname> -d<password> -Q"insert into SMO5TRNSRV (MANDT,SFATRNSRV,REC_PROP, TRSV_NAME,PROG_ID)VALUES ('000','6A78CE7014F811D390D700105A378AAA','S','KBase', 'KBASE.KBaseSync')" > NUL:</p><p>@ECHO Checking if knowledge base has arrived..</p><p>@ECHO Checking amount of init data..</p><p>@SET Q1="Y"</p><p>@FOR /F "tokens=1 delims= " %%A IN ('osql -U<DSN> -P<usrname> -d<password> -Q"select count() from smoscekbi"') DO if "%%A"=="0" SET Q1="N"