有时候我会有好几个系统
开发机,测试机,正式系统,学习系统
偶尔用下别的系统,来回登陆太麻烦
所以在开发机上写了如下程序,用来多系统切换
REPORT ZLM_CROSS_CLIENT.
*&---------------------------------------------------------------------*
*&宏定义
*&---------------------------------------------------------------------*
DEFINE select_client.
if &1 is not initial.
call function 'TH_REMOTE_TRANSACTION'
exporting
tcode = &2
"需要另外一个client的tcode
dest = &3.
"sm59配的登陆地址
endif.
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*&屏幕定义
*&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_code TYPE SM04DIC-TCODE1.
PARAMETERS:
p_210 RADIOBUTTON GROUP g1,
p_230 RADIOBUTTON GROUP g1,
p_510 RADIOBUTTON GROUP g1,
p_555 RADIOBUTTON GROUP g1,
p_800 RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b1.
*&---------------------------------------------------------------------*
*&逻辑区
*&---------------------------------------------------------------------*
select_clientp_210 p_code '210DEV'.
select_clientp_230 p_code 'DEVCLNT230'.
"sm59内配的
select_clientp_510 p_code 'T0510'.
select_clientp_555 p_code 'T0555'.
select_clientp_800 p_code 'T0800'.
*&宏定义
*&---------------------------------------------------------------------*
DEFINE
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*&屏幕定义
*&---------------------------------------------------------------------*
SELECTION-SCREEN
PARAMETERS:
PARAMETERS:
SELECTION-SCREEN
*&---------------------------------------------------------------------*
*&逻辑区
*&---------------------------------------------------------------------*
select_client
select_client
select_client
select_client
select_client
代码很简单
比如我在开发机210上想登陆测试环境510,看看某个表的数据
直接执行就行了
需要说明的是:
sm59配的链接,最好用你自己的用户而且保存密码,这样切换的时候不再提示你输入密码了