- 浏览: 409937 次
- 性别:
- 来自: 上海
-
文章分类
最新评论
-
yiming163:
thank you!
eCATT, LSMW in detail -
泡泡蓝:
把WITH INCLUDES.改成 WITH ANALYSI ...
User Exits,Customer Exits,BAdI and BTE -
泡泡蓝:
王弈争 写道泡泡蓝 写道SCAN ABAP-SOURCE SO ...
User Exits,Customer Exits,BAdI and BTE -
王弈争:
泡泡蓝 写道SCAN ABAP-SOURCE SOURCETA ...
User Exits,Customer Exits,BAdI and BTE -
jgtang82:
泡泡,我没遇到你所说的问题呀
User Exits,Customer Exits,BAdI and BTE
安装 SAP ECC5/6 的时候,必须要输入一个 Solution Manager Key,这个号一般需要通过 SAP 提供的 Solution Manager 服务器来生成,但是很多时候我们不想安装这个庞大的系统(15G 左右)。用下面这个小小的 ABAP 程序,我们就可以快速生成 Solution Manager Key 了。
REPORT ZSLMKEY.
types: begin of dswpclientkey,
INSTNO type num10,
DBID(3),
BUNDLE_ID(8),
SERVICE_KEY(40),
end of dswpclientkey.
*data: dswpclientkey_w type standard table of dswpclientkey.
DATA: P_VALUE(10),
P_INSTNO(10).
PARAMETERS: P_SID(3),
P_SYSNO(2),
P_SERVER(15).
START-OF-SELECTION.
PERFORM GET_SP_VALUE USING P_SID
P_SYSNO
P_SERVER
P_INSTNO
CHANGING P_VALUE.
END-OF-SELECTION.
WRITE P_VALUE.
*&---------------------------------------------------------------------*
*& Form get_sp_value
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_PF_SID text
* -->P_PF_SYSNO text
* -->P_PF_SERVER text
* <--P_PF_VALUE text
*----------------------------------------------------------------------*
FORM get_sp_value USING P_PF_SID
P_PF_SYSNO
P_PF_SERVER
P_PF_INSTNO
CHANGING P_PF_VALUE.
CONSTANTS: lc_part_len TYPE i VALUE 5,
lc_pw_len TYPE i VALUE 10,
lc_allowed_chars(38) TYPE c VALUE
'-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_'.
data: lf_string(20) type c,
lf_key type i,
ls_key type dswpclientkey,
lf_part(lc_part_len) type c,
lf_finalf(lc_pw_len) type c,
lf_finalx type xstring,
lf_xbuffer type xstring,
lf_opf(10) type c,
lf_langu like sy-langu,
lf_subrc like sy-subrc,
lf_len type i,
lo_conv_to_x TYPE REF TO cl_abap_conv_out_ce.
clear: lf_string, lf_finalx, lf_opf.
concatenate p_pf_sid p_pf_sysno p_pf_server into lf_string.
* Large letters only
translate lf_string to upper case.
lf_langu = sy-langu.
SET LOCALE LANGUAGE 'E'.
lo_conv_to_x = cl_abap_conv_out_ce=>create( encoding = '1100' ).
lf_len = STRLEN( lf_string ).
IF lf_string(lf_len) CN lc_allowed_chars.
else.
* Fold the input string to a lc_part_len long string
WHILE lf_len > 0.
lf_part = lf_string(lc_part_len).
SHIFT lf_string BY lc_part_len PLACES.
lf_len = STRLEN( lf_string ).
CALL METHOD lo_conv_to_x->reset.
CALL METHOD lo_conv_to_x->write( data = lf_part n = -1 ).
lf_xbuffer = lo_conv_to_x->get_buffer( ).
lf_finalx = lf_finalx BIT-XOR lf_xbuffer.
ENDWHILE.
lf_key = 12.
PERFORM scramble USING lf_finalx
lf_key
lc_part_len
CHANGING lf_finalf
lf_subrc.
if not lf_finalf is initial.
p_pf_value = lf_finalf.
ls_key-dbid = p_pf_sid.
ls_key-instno = p_pf_instno.
ls_key-bundle_id = 'SM_KEY'.
ls_key-service_key = lf_finalf.
if not p_pf_instno is initial.
* insert dswpclientkey_w from ls_key.
if sy-subrc <> 0.
* update dswpclientkey_w from ls_key.
endif.
endif.
else.
clear p_pf_value.
endif.
endif.
ENDFORM. " get_sp_value
*&---------------------------------------------------------------------*
*& Form scramble
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_LF_FINALX text
* -->P_LF_KEY text
* -->P_LC_PART_LEN text
* <--P_LF_finalf text
* <--P_LF_SUBRC text
*----------------------------------------------------------------------*
FORM scramble USING iv_xstring TYPE xstring
iv_key TYPE i
iv_src_len TYPE i
CHANGING lf_finalf
lf_subrc LIKE sy-subrc.
CONSTANTS: lc_max_len TYPE i VALUE 20,
lc_mask(4) TYPE x VALUE '0000003F',
lc_random(64) TYPE x VALUE
'F0ED53B83244F1F876C67959FD4F13A2' &
'C15195EC5483C234774943A27DE26596' &
'5E5398789A17A33CD383A8B829FBDCA5' &
'55D702778413ACDDF9B83116610E6DFA'.
DATA: lv_key_index(4) TYPE x,
lv_rand_index(4) TYPE x,
lv_xkey(4) TYPE x,
lv_xkey_shl_1(4) TYPE x,
lv_xkey_shr_5(4) TYPE x,
lv_scramble_byte TYPE x,
lv_dest(lc_max_len) TYPE x,
lv_index TYPE i,
lv_len TYPE i.
CLEAR lf_subrc.
IF iv_src_len EQ 0. EXIT. ENDIF.
lv_len = XSTRLEN( iv_xstring ).
IF iv_src_len GT lc_max_len OR
iv_src_len GT lv_len.
lf_subrc = 2.
EXIT.
ENDIF.
lv_xkey = iv_key.
lv_xkey_shl_1 = iv_key * 2.
lv_xkey_shr_5 = iv_key DIV 32.
lv_rand_index = lv_xkey BIT-XOR lv_xkey_shr_5 BIT-XOR lv_xkey_shl_1.
lv_rand_index = lv_rand_index BIT-AND lc_mask.
lv_index = 0.
DO iv_src_len TIMES.
CATCH SYSTEM-EXCEPTIONS compute_int_times_overflow = 1.
lv_key_index = ( iv_key * lv_index * lv_index ) - lv_index.
ENDCATCH.
IF sy-subrc <> 0.
lf_subrc = 1.
EXIT.
ENDIF.
lv_scramble_byte = lc_random+lv_rand_index(1) BIT-XOR
lv_key_index+3(1).
lv_dest+lv_index(1) = iv_xstring+lv_index(1) BIT-XOR
lv_scramble_byte.
lv_index = lv_index + 1.
lv_rand_index = lv_rand_index + 1.
lv_rand_index = lv_rand_index BIT-AND lc_mask.
ENDDO.
IF lf_subrc <> 0.
EXIT.
ENDIF.
WRITE lv_dest(iv_src_len) TO lf_finalf.
ENDFORM. " scramble
发表评论
-
Sap Number Range Object (SNRO)
2010-12-21 16:11 1867Brief Example http://www.sapte ... -
SAP R/3 Security Tables
2010-12-09 15:27 1636Below the list of SAP R/3 Sec ... -
Class def & impl, Inherit & overwriting, interface & using it, event & handler
2010-12-08 10:05 1173Below codes is a simply and rou ... -
IDOC_INPUT_ORDERS with error msg RV45A-VBAP_SELKZ (2) is not input field
2010-11-08 14:51 2420[Issue] Hi I am creating a mul ... -
SAP ALV Trees
2010-11-05 14:07 2179BCALV_GRID_DND_TREE ALV Grid: D ... -
Creating a SAP shortcut for any transaction and sending it by mail
2010-11-02 11:12 2029Refer to SAP wiki: http://wiki. ... -
Note 573128 - Debugging programs in the background
2010-11-01 20:13 1197Note 573128 - Debugging program ... -
Function Module related on Date calculations (ZT)
2010-07-20 17:00 1719http://wiki.sdn.sap.com/wiki/di ... -
SAP SDN Interesting Topics
2010-06-29 09:48 1000Web Dynpro ABAP Performance Too ... -
SE16N &SAP_EDIT, ICON at Selection Screen
2010-06-12 17:35 1752摘录From blog of 翱翔云天 1. SE16N & ... -
Debug background processes, update/system code,model dialog...
2009-12-18 13:55 1215How do I debug running backgrou ... -
ABAP character variables vs. string variables
2009-11-16 11:23 2965Chinese Version: http://blog.cs ... -
ECC6 ALV Dump
2009-10-21 15:20 1050[Dump] 1. Use system reserved ... -
Simple Transfermation Program
2009-08-07 23:42 2009Have you been requested to gene ... -
eCATT, LSMW in detail
2009-02-15 10:14 3479eCATT : http://sap.iteye.com/bl ... -
Trigger ABAP program using UNIX script
2009-01-09 13:27 22621. Create a batch job in SM37 f ... -
How to cancel active job, del/change schedule job
2008-12-26 09:56 2318if the job is active and you wa ... -
How to Run UNIX script from ABAP?
2008-12-19 12:52 2545Look at SM69, SM49 and Functio ... -
REUSE_ALV_GRID_DISPLAY事件子过程和cl_gui_grid类的事件对应关系
2008-12-04 18:46 3866一、SLIS定义的ALV的事件名称* Eventsslis_e ... -
DDIC info related tables
2008-12-03 09:58 1962Data elementsDD04L Data elem ...
相关推荐
如果有SAP系统,在安装新的系统是可以使用该ABAP程式生成Solution Manager Key,本人测试可用,仅供大家学习交流,请勿用于商业用途
根据给定的信息,本文将详细解释“生成Solution Manager Key的ABAP程序”的相关内容,包括Solution Manager Key的作用、生成Solution Manager Key的背景需求以及具体的ABAP程序实现细节。 ### Solution Manager Key...
根据提供的文件信息,我们可以深入探讨SAP系统中的Solution Manager Key(SLM Key)生成代码的知识点。这将涉及ABAP编程语言以及SAP系统中特定的功能实现方式。 ### SLM Key概念 在SAP系统中,SLM Key是用于识别和...
根据提供的文件信息,我们可以推断出这是一段ABAP编程代码,主要功能是计算Solution Manager Key(SMK),即一种用于验证SAP Solution Manager合法性的密钥。此报告(Report ZSLMKEY)的主要目的是根据输入参数计算...
7.2.3 SAP PI Central Monitoring with SAP Solution Manager 7.2.4 Message Retention 7.2.5 User-Defined Message Search 7.3 Troubleshooting 7.3.1 Configuring Log and Traces 7.3.2 Using the Log Viewer...
SAP solution Manager4.0服务器版本安装,安装盘6张DVD,配Oracle 10g,MS- SQL2005或IBM的DB6数据库 6, ECC6 安装或虚拟机,安装盘8张DVD,配Oracle 10g,MS-SQL2005或IBM的DB6数据库 7, BW7(BI)安装和虚拟机,...
SAP solution Manager4.0服务器版本安装,安装盘6张DVD,配Oracle 10g,MS- SQL2005或IBM的DB6数据库 6, ECC6 安装或虚拟机,安装盘8张DVD,配Oracle 10g,MS-SQL2005或IBM的DB6数据库 7, BW7(BI)安装和虚拟机,...
6. **输入Solution Manager Key**,点击继续按钮。 7. **安装完成**:整个安装过程大约需要10个小时。 #### 四、后续配置与注意事项 - **中文设定**:通过修改Instance Profile和运行`RSCPINST`来设置语言。 - **...