2013-06-04

vim下选择文本

有人在superuser问,如何在vim下实现sublime text的Expand selection to scope功能,http://superuser.com/questions/586076/vi-vim-alternative-to-sublimetexts-expand-selection-to-scope。运用vim下的text objects可以很轻松地实现这种功能。不过在这个帖子的回复中学了一招,如何选择当前文字所在的标签文本及其父标签。vat会选择光标所在文字和标签,v2at则会选择包括父标签在内的文本,依此类推。

vaw means a word
vas means a sentence
vap means a paragraph
va< means a <> block
va' means a single-quoted string
va" means a double-quoted string
vat means a tag

2013-05-21

SAP PI post installation steps

After a PI installation you have to configure your system. This is a mandatory post installation step called "Running the Configuration Wizard".

Before running the Wizard, it is recommended to update the following Java Software Components (SCs) to the highest available Support Package and Patch Level:

Life Cycle Management:

    LM CONFIGURATION (LMCFG)

    LM CONFIGURATION WIZARD (LMCTC)


Process Integration:

    MESSAGING SYSTEM SERVICE (MESSAGING)

    XI ADAPTER FRAMEWORK (SAPXIAF)

    XI TOOLS (SAPXITOOL)

    PI GUI (SAPXIGUI, only 7.11)

    PI GUILIB (SAPXIGUILIB, since 7.30)

    ESR (SAPXIESR)


The ABAP stack must have the same Support Package level as Java.

This Wizard Template is available since Release 7.10.

A prerequisite to run the Wizard is that the system was installed with the PI Installer (SAPInst). All PI services must be up and running.

For further information about the Configuration Wizard, see the following collective notes:

    SAP note 0923359 - Collective Note: Configuration Wizard (Release 7.0x)

    SAP note 1107808 - Collective Note: Configuration Wizard (Release 7.1x)

    SAP note 1362909 - Collective Note: Configuration Wizard (Release 7.3x)

    SAP note 1286428 - Configuration Wizard: PI Wizard Templates overview (Releases 7.1 and higher).

Solution

To run the CTC Wizard, start the SAP NetWeaver Administrator and navigate to "Configuration Management --> Scenarios --> Configuration Wizard". Depending on your release do the following:
Releases 7.10 / 7.11:

Select in the drop down list "Initial Configuration" or "All Configuration tasks -> NetWeaver initial setup".
Releases 7.30 / 7.31 and higher:

Click on link "Functional Unit Configuration UI". Select Functional Unit "SAP NetWeaver Process Integration (PI)". All required Functional Units are selected automatically. Press button "Enable automatically" to start the CTC Wizard. Pay attention to FAQ 1e and 1f.

FAQs:



Questions and Answers


Question 1: It is a prerequisite that 'all PI services must be up and running'. How can I check this?

Answer: Log on to NetWeaver Administrator and navigate to "Operation Management -> Systems -> Start and Stop" and select "Java JEE Services". Filter for Services with name "XPI". All of them must be started.


Question 1a: How can I check whether installation and configuration was successful?

Answer: With 7.10 SP7 and higher you can execute the "PI Self Test for NetWeaver" CTC Wizard template. See note 1286149 how to do that.


Question 1b: Can I execute the configuration steps manually? Where is this described?

Answer: Yes. This is described in the online documentation. For <your release> select "PI/Mobile/IdM 7.1" or "7.0(2004s)" or "2004".

http://help.sap.com/
-> SAP NetWeaver
-> SAP NetWeaver <your release>
-> <your language>
-> SAP NetWeaver Process Integration Library
-> Administrator's Guide
-> Configuration of SAP NetWeaver
-> Configuration Wizard
-> Wizard-Based Configuration
-> Usage Type Process Integration (PI)

For Release 7.3:
http://help.sap.com/saphelp_nw73/helpdata/en/57/f47fd4fe534a1a948476afb65dd983/content.htm

Question 1c: Where do I find the log files?

Answer: Start the NetWeaver Administrator and navigate to "Configuration Management --> Scenarios --> Configuration Wizard" and select in the drop down list "History of executed configuration tasks". You can download the protocol there. Attach this zip file an OSS ticket in case of deeper problems.


Question 1d: Is it mandatory to apply the highest available Support Package after a new installation (before running the CTC Wizard)?

Answer: Yes. Typically the installation is shipped with SP0. Before running any CTC configuration task, you have to update to the latest (currently) available Support Package. Especially in Release 7.3 this can lead to problems.


Question 1e: How can I restart the CTC Setup from the Functional Unit UI?

Answer: Select Functional Unit "SAP NetWeaver Process Integration (PI)" and press "Disable". Refresh the screen after that. Select the Functional Unit again and press "Enable automatically". Pay attention to FAQ 3.

Question 1f: Functional Unit "SAP NetWeaver Process Integration (PI)" has status "Running" and cannot be changed. What can I do?

Answer: Select in the drop-down menu of the Configuration Wizard UI (NWA --> Configuration Management --> Scenarios --> Configuration Wizard) entry 'Running Configuration Tasks'. Check whether another session is already running. Cancel or take over this session. If there is no entry, disable Function Unit "SAP NetWeaver Process Integration (PI)" directly in the Function Unit UI by pressing the "Disable" button. Restart from there.


Question 2: Does CTC support the usage of a remote SLD?

Answer: Yes, a remote SLD is supported. See note 954820 regarding the supported release dependencies. Pay attention to questions (2a)-(2d).


Question 2a: Do I have to execute any manual steps to run my PI system against a remote (central) SLD?

Answer: Yes. You have to create the PI Service users PIAFUSER, PIRWBUSER, PIISUSER, PIDIRUSER, PIREPUSER and PIAPPLUSER on the remote SLD manually and assign role/group SAP_SLD_CONFIGURATOR to them. To make the names unique, it is recommended to add the SID of the system, which connects, to the user name, e.g. PIAFUSER<SID>. Note that length of user names is restricted to 12 characters for an ABAP UME. Therefore you may also use the following short user names (which are also used as default names since 7.30):

    PIAF<SID>, PIRWB<SID>, PIIS<SID>, PIDIR<SID>, PIREP<SID> and PIAPPL<SID>


See notes 768148 and 939592 for further information (e.g. LDAP) and question (2b). For security reasons remote SLD user creation is on purpose not automated via the PI CTC Wizard.


Question 2b: I want to connect several PI systems to a central SLD. Must all PI service users have same name/password?

Answer: No. It is recommended to change the usernames of the PI service users in a way that they are unique in the landscape, e.g. by adding the SAP system ID (SID). See note 999962 how to do that.


Question 2c: During setup of the remote SLD I am asked for the password of users SLD_DS_<SID> and SLD_CL_<SID>, where SID is my local SID and not the one of the remote system. What do I have to enter here?

Answer: You have to change the user name into SLD_DS_<SID_remoteSLD> and SLD_CL_<SID_remoteSLD>. The input screen displays the local SID as default value, which is not correct in this context. You have to enter the SID of the remote SLD. The Wizard checks the user credentials when you press 'next'. Pay attention that for SLD Host and Port also the remote SLD's values have to be entered. See question (2d) regarding the Gateway configuration.


Question 2d: During setup of the remote SLD I am asked for the "Bridge Gateway Instance ID". What do I have to enter here?

Answer: You have to enter the 2-digit instance number of the gateway instance. It is assumed that it runs on the remote SLD host. The Gateway is used by the SLD Data Supplier Configuration (RZ70). Pay attention to note 1172161 how your SLD Gateway must be configured, especially if your SLD runs on WebAS Java (without ABAP stack). On plain AS Java systems the Gateway runs on the SCS instance whereas on double stack systems usually the central instance (CI) is used.

Example: SLD on double stack C11 with CI on 00 and SCS on 01

        SLD HTTP Host = <hostname>

        SLD HTTP Host = 50000

        Bridge Gateway InstanceID = 00

        Data Supplier User = SLD_DS_C11

        SLD Client User = SLD_CL_C11



Example: SLD on WebAS Java C11 with CI on 00 and SCS instance on 01.

        SLD HTTP Host = <hostname>

        SLD HTTP Host = 50000

        Bridge Gateway InstanceID = 01

        Data Supplier User = SLD_DS_C11

        SLD Client User = SLD_CL_C11



Question 2e: How can I check whether the SLD Self Registration of the PI components was successful?

Answer: Start the SLD, navigate to "Technical Systems" and select in the drop down list "Process Integration". There must be 6 entries for your new PI system. On a central SLD you may filter for the DB Host name:

    Adapter Engine on <db_host>

    Domain <db_host>

    Integration Directory on <db_host>

    Integration Repository on <db_host>

    Integration Server on <db_host>

    RWB on <db_host>



Question 2f: I am running NetWeaver PI 7.1. Can I connect it to a SLD with Release 7.0?

Answer: Yes. See SAP note 954820 regarding SLD compatibility and known incompatibilities. Note that you have to update your SLD "Component Repository Content" (CR Content), which is release independent. See SAP note 669669 for details.


Question 2g: My local SLD is not using the default HTTP port. The initial setup fails. What can I do?

Answer: Select "remote" SLD during the initial setup of the functional unit SLD and enter the respective port.


Question 3: Can I re-execute the "NetWeaver initial setup" template?

Answer: Yes. Pay attention that not all configuration steps are really re-executed in this case, for example the SLD and ESR Content import. If you have already done manual configuration changes, be aware that they might be overwritten.


Question 3a: I cannot execute the "NetWeaver initial setup" template on a Business by Design (ByD) system. When I select the drop down list 'All configuration tasks', a task "NetWeaver initial setup" is not displayed. Is this correct?

Answer: Yes. The "NetWeaver initial setup" template is only executed on NetWeaver systems. ByD systems have own configuration templates, which call the PI initial configuration on their own.


Question 4: I want to run my Integration Server not in the default client 001, but in a different one. Is this automated?

Answer: Yes. Since Release / Support Package

    SAP NetWeaver 7.10 SP08

    SAP NetWeaver 7.11 SP01, Patch Level 02 of Software Component "LM CONFIGURATION" (LMCFG01P Patch 02)

    SAP NetWeaver 7.30


this is fully automated. Prerequisite is that you have manually performed a client copy and changed the ABAP UME to the new client. This must have been done before (!) the CTC Wizard is executed. See questions (4a) and (4b) how to do that. For lower Support Packages this is different: There you have to execute first the CTC Wizard on default client 001 and after that the client copy. Further manual steps are required. See note 1115280 how to proceed in that case.


Question 4a: How can I change the UME Client in a 7.1 System?

Answer: Please refer to the online documentation:
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03e11edc6a6e99e10000000a11466f/frameset.htm


Question 4b: Which source client and profile do I have to use for a client copy?

Answer: You have two options:

    copy client 001 (transaction SCCL) and use profile "SAP_UCUS"

    copy client 000 with profile "SAP_UCUS" and after that client 001 with profile "SAP_USER". The later is required to insure that j2ee_admin and SAPJSF user have correct role assignment in the new client.


Further details about the copy process are described in the installation guide (post installation step "Performing the Client Copy").


Question 4c: Can I change the Integration Server client for a PI system that already runs on client 001?

Answer: For already running, productive systems this is not supported. On freshly installed systems you can change the default client. This is also possible if you have already executed the PI initial setup Wizards accidentally on client 001. To do so the following steps have to be executed:

    Make a client copy (see FAQ 4b).

    Change the UME client (see FAQ 4a).

    On the old client (001): Start transaction 'SXMB_ADM --> Integration Engine Configuration' and change the 'Role of Business System' back to 'Application System' or 'Not Yet Configured'.

    Logon to the SLD (can be remote or local). Navigate to 'Technical Systems --> Technical System Types' and delete the respective 'AS Java' and 'AS ABAP' entities.

           Navigate to 'Technical Systems --> Process Integration' and delete the respective XI domain.

           Navigate from the SLD start page to 'Business Systems' and delete Business System INTEGRATION_SERVER_<SID>.

    Reboot the double stack system.

    Execute the Initial Setup again.

Question 5: Are there additional steps required to configure a "High Availability" setup?

Answer: Yes. See note 1052984 how to do that.

Question 6: Are there Demo Scenarios available for PI?

Answer: Yes, there are "Simple Use Case" and "Demo Example" scenarios for PI available in SDN:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/
b030691f-8b8b-2a10-5d94-8dd064dc2aa7
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/
00de46da-8b8b-2a10-a1a0-c328b2034b5e

Question 7: Do you provide a "Trouble Shooting Guide" for PI?

Answer: Yes. See note 1060264 how to find this guide.

Question 8: The Configuration steps

    'Configures the Product of the Technical System in the SLD' (sub step 'Configure product and component SAP_BASIS')

    'Configures the Integration Server in the SLD'

fail with error message:
"Error: ABAP technical system '<SID> on <DB host>\<SID>' not found."
This happens on a Microsoft SQL Server.

Answer: This problem is described in note 1237816. Please adjust the "j2ee/dbhost" profile parameter as described there and restart the CTC Wizard.

Question 9: I want to connect a Business Suite system with an XI/PI system. Are there any configuration templates available?

Answer: Yes, please refer to note 1178800.

Question 10: On "Business By Design" (ByD) Systems the PI CTC Wizard creates a Logical Web Service Port. How can I check whether the creation was successful?

Answer: Logon to clients 001 and 002 and start transaction SRT_TOOLS. Select "Display Web Service Runtime Configuration in Current Client" and mark the radio button "Web Service Consumer". In section "Search by Proxy Name and Logical Port" search with input field "Proxy Name" for "CO_THIRDPARTY_INT_SCNRIO_OUT".

Question 11: After the initial setup I receive the error message "Unable to log on to system xxx in language yyy with user PIRWBUSER" in the Runtime Workbench (RWB). Why this?

Answer: The logon language yyy is not activated in the ABAP system. Start transaction I18N and activate the language. Language activation is a separate post installation task that should have been executed before the CTC initial setup.

Question 12: I execute the "PI initial setup" CTC Wizard and get an error in step "Create Company Address in client 000". What to do?

Answer: See SAP note 1476425. Very likely your ABAP Administrator doesn't exist in client 000, has a different password or is locked.


Question 13: Why does the PI Initial Setup not set fully qualified host names (FQHN) by default?

Answer: This is implemented with Release 7.30 SP1 and higher. See SAP note 1476359 for further information. For lower Releases you can use the PI Full Qualified Host Name CTC Wizard (see SAP note 1320707) to set FQHN afterwards.


Question 14: Does the PI Initial Setup configure SSO?

Answer: It configures "Java --> Java" SSO, but not "Java --> ABAP" and "ABAP --> Java" SSO. The latter is required if you e.g. call ABAP transaction SXMB_IFR. To configure these directions between the stacks you have to execute Configuration Task "PI SSO Configuration". See SAP note 1473556 for details about this CTC Template.


Question 15: I install my PI system in a federated landscape. Are there any release dependencies?

Answer: Yes. The general rule is that your PI hub should have the highest release. See SAP note 1043047 for details.


Question 16: Does the PI NetWeaver Initial Setup configure SSL/HTTPS?


Answer: No. Your AS Java system must first be configured to support HTTPS/SSL. After that Exchange Profile property

    com.sap.aii.connect.secure_connections = messaging


has to be set. For further information access the SAP Library:

Release 7.10:
http://help.sap.com/saphelp_nwpi71/helpdata/en/e8/1f1041a0f6f16fe10000000a1550b0/frameset.htm

Release 7.11:
http://help.sap.com/saphelp_nwpi711/helpdata/en/48/a9bb457e28674be10000000a421937/frameset.htm

Release 7.30
http://help.sap.com/saphelp_nw73/helpdata/en/48/a9bb457e28674be10000000a421937/frameset.htm


Question 17: Step "Executing BAPI SWF_XI_BPM_AUTO_CUSTOMIZE" fails with message: "Error: BAPIRET2 SWF_XI_ADAPTER Error 203 Error  in BPM-Autocustomizing". What can I do?

Answer: See SAP note 1580460.

Question 18: Step "Imports the master XML" fails with message "Error: Profile locked by another local session, please retry later". What can I do?

Answer: See SAP note 1602945. You have to to deploy the latest available Patches of the Software Components:

    J2EE ENGINE LM-CORE (LM-CORE)

    MESSAGING SYSTEM SERVICE (MESSAGING)

    XI TOOLS (SAPXITOOL)

    XI ADAPTER FRAMEWORK (SAPXIAF)

    ESR (SAPXIESR)

Question 19: Can I execute the "PI Initial Setup" after a System Copy?

Answer: Yes. If you work with Release 7.3 you have to use the "Functional Unit UI" (http://<host>:<port>/sld/fun). Pay in that case attention to 'disable' the following FUNs before enabling "SAP NetWeaver Process Integration (PI)" again:

    "System Landscape Directory"

    "Java Foundation"

    "SAP NetWeaver Process Integration (PI)"

All three Functional Units have to be enabled from scratch.

2013-03-02

女儿23个月

女儿满23个月了,身高89厘米,体重12.5公斤,U7安排在了4月份。

2012-12-25

2012年的工作

2012年快结束了,回过头来一看一年功夫上了三个不同的项目。一月和二月休假中,从2月27日到5月18在Bad Homburg,之后一直休息到7月30日。从7月31日到8月31日在Nürberg工作一个月,然后从9月24日到12月21日在柏林。初略一算有4个半月在休假中。
27.02.2012    18.05.2012    60
31.07.2012    31.08.2012    24
24.09.2012    21.12.2012    65

实际工作应该不超过149天。黑森州2012年的工作日是252 - 9 = 243天,也就是说一年当中有超过一半的时间在休息中。

2012-12-21

更新Nexus 7

在把Nexus 7从4.1.2升级到4.2时,自动更新失败。更新程序会检查系统文件是否被修改过,如果发现被修改过,则终止更新程序报错,并给出被修改过文件的信息。如果修改过的文件么没有备份,那么只好去下载Google官方的相同Build号的镜像文件,从镜像文件提取出所需的文件覆盖Nexus 7上的修改过的文件。这个过程表述很简单,不过多少体现了google的工程师文化。详细过程如下:

  1. 从Nexus 7上找到Build-Number,从https://developers.google.com/android/nexus/ 下载相应设备的对应的编译版本,如takju-jzo54k-factory-92830c0b.tgz,解压缩得到system.img文件
  2. 从http://forum.xda-developers.com/showpost.php?p=15333542&postcount=135 下载sgs2toext4.zip,一个把img转为ext4.img的工具,得到system.ext4.img文件>
  3. 下载Linux_reader.exe,http://www.diskinternals.com/files/Linux_Reader.exe,mount上一步得到的文件
  4. 从mount的文件里复制所有的文件到本地电脑的一个目录备用
  5. 用Nexus 7更新时出错的文件信息在这个目录里查找到原来的文件版本,mount Nexus的/system为可写,把文件复制到相应的目录
  6. 再下载新版本的Image复制到Nexus,然后进入recovery模式,重新手动更新

2012-12-18

为robocopy添加图形界面

robocopy是微软提供的一个很好的命令行备份工具,功能强大,参数选项也很多。如果不习惯命令行界面也可以用带GUI界面的程序,RoboMirror和RichCopy。两个工具都是免费的。

SAP PI 下复制同名design obejcts

当在同一个Software component下,从一个版本向另一个版本拷贝同名的design objects时, SAP PI会提示你使用 Release transfer function。这个功能在Repository /ESR的 Tools菜单下,旧一点的版本称为release transfer,7.1以后改名为transfer design objects。

2012-12-13

PI support package stacks and guide

You want to import an SP Stack and search for the necessary archives and the guide on the service marketplace.

XI 3.0

The archives and the Support Package Stack Guide can be found on the SAP Service Marketplace:
http://service.sap.com/nw04 --> Support Package Stacks Information

***********************************************************************
XI 7.0

The archives and the Support Package Stack Guide can be found on the SAP Service Marketplace:
http://service.sap.com/nw2004s --> Support Package Stacks Information

***********************************************************************
PI 7.10

The archives and the Support Package Stack Guide can be found on the SAP Service Marketplace:
http://service.sap.com/netweaver --> SAP NetWeaver Process Integration 7.1 - Release-Specific Inf --> Support Package Stacks Information -->
7.1: SAP NetWeaver Process Integration 7.1
EhP1: SAP enhancement package 1 for SAP NetWeaver Process Integration 7.1

***********************************************************************
PI 7.3

The archives and the Support Package Stack Guide can be found on the SAP Service Marketplace:
http://service.sap.com/sp-stacks --> SP Stack Information --> SAP NetWeaver 7.3

***********************************************************************

Please note that only the latest patch will be available on the service marketplace for a support package. This patch will contain all lower patches as well.

2012-12-12

用windows自带计算器计算日期

计算时期时通常都用Office里Excel的关于日期的函数。其实Windows自带的计算器Calc.exe程序就可以完成日期相关的计算。只需在视图(View)里选择“日期计算”(Date calculation)。

SOAP receiver adapter response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION



A synchronous business scenarios, SAP CE call web service on SFDC.

SAP CE发出请求后没有收到回复,查看SOAP receiver adapter的audit log发现下面的错误:
Error Adapter Framework caught exception: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
Error MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
Error SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error

用SOAP UI模拟PI的SOAP request得到下面的回复:
<?xml version="1.0"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>soapenv:Client</faultcode>
      <faultstring>System.NullPointerException: Attempt to de-reference a null object
Class.CCWSOrderCreateFromExternal.prepareTransmitRetValue: line 1211, column 1
Class.CCWSOrderCreateFromExternal.transmit: line 53, column 1</faultstring>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>

为什么这样的回复会导致adapter framework抛出异常? SAP Note 1533195解释道:

After Note 1109648:
The received SOAP faults are treated as adapter framework internal errors and again treated further as HTTP 500 "Internal Server Error". No payload follows to this message, as it is treated as unsuccessful in the Adapter Framework.

Before Note 1109648:
The received SOAP faults are treated further as HTTP 500 Internal Server Error and sent to Integration Engine. The payload with the fault XML follows. The message is successful in the Adapter Framewrok.

To get the behavior vor note 1109648:
for the default module sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean,set
Module Key  =  soap
Parameter Name  =  noSOAPMakeSysErrFromResponseFault
Parameter Value  =  false  (default value is true)
**************************************************************
The HTTP status code check for the no-soap mode of the SOAP receiver adapter can be disabled by the following module parameter for the SOAP adapter module

parameter name: XMBWS.NoSOAPIgnoreStatusCode
parameter value: true or false (default is false)

Setting the above parameter to true will configure the SOAP receiver adapter to ignore the HTTP status code.


2012-12-09

MS Word的常用快捷键

ctrl + F1:显示和隐藏菜单栏
shift + F1:显示和隐藏选中文字的格式化信息
ctrl + shift + 8:显示和隐藏格式化字符(formatting marks),如空格,制表符,换行等

2012-11-13

multi mapping and split message with XSLT in SAP PI

应用场景是主数据的复制,从SAP到Salesforce,即:
SAP --RFC--> PI --SOAP-->Salesforce

在调用Salesforce的upsert时,一次最多只能包含200个对象,所以当PI接收到超过200个对象的数据时,需要把一个message分成多个messages,即1 --> n。Operation Mapping包括三个步骤:
  1. message mapping,从源数据结构映射到Salesforce的upsert结构
  2. Java mapping,从value mapping中取出有效的sessionID和serverURL,在dynamic configuration里设置相应的值
  3. XSLT mapping,生成多个SOAP request,每个request里的upsert包括最多200个objects,其中要注意output的结构和正确的namespace
在第三步要注意ouput的正确结构为
<message>
 <message1>
  <soapenv:Envelope>
   ...
  </soapenv:Envelope>
  <soapenv:Envelope>
   ...
  </soapenv:Envelope>
  </message1>
<message>

 上面的例子会被adapter正确的解释成2个messages。

如果XSLT生成的结构像下面这样:

<message>
 <message1>
  <soapenv:Envelope>
  ...
  </soapenv:Envelope>
 </message1>
  <message1>
  <soapenv:Envelope>
   ...
  </soapenv:Envelope>
  </message1>
<message>

那么在monitoring里会得到下面的错误:

<SAP:Category>XIServer</SAP:Category>
  <SAP:Code area="MAPPING">MISSING_INTERFACE</SAP:Code>
  <SAP:P1>2</SAP:P1>
  <SAP:P2 />
  <SAP:P3 />
  <SAP:P4 />
  <SAP:AdditionalText />
  <SAP:Stack>No interface specified for parameter 2</SAP:Stack>


在测试时还需注意,如果是在Repository(design time)里测试operation mapping或message mapping,source input里需要构造
<message> <message1> ...</message1><message>这样的结构,但是在directory里或RWB(runtime)里测试时,payload里都不应该出现<message> <message1> ...</message1></message>这样的结构,否则会得到类似下面的错误:
sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:Messages. Values missing in queue context.
第3步的XSLT:

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://pi.cceag.de/SFDC" xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <xsl:output indent="yes" method="xml"/>
    <xsl:template match="/">
        <ns0:Messages>
        <ns0:Message1>
            <xsl:for-each select="//sObjects[position() mod 200 = 1]">
                    <soapenv:Envelope>
                        <xsl:call-template name="header"/>
                        <soapenv:Body>
                            <urn:upsert>
                                <externalIDFieldName>
                                    <xsl:value-of select="//upsert/externalIDFieldName"/>
                                </externalIDFieldName>
                                <xsl:for-each select=". | following-sibling::sObjects[position() &lt; 200]">
                                    <xsl:call-template name="sObjects" />
                                </xsl:for-each>
                            </urn:upsert>
                        </soapenv:Body>
                    </soapenv:Envelope>
            </xsl:for-each>
         </ns0:Message1>       
        </ns0:Messages>
    </xsl:template>

    <xsl:template match="soapenv:Header" name="header">
        <xsl:copy-of select="/soapenv:Envelope/soapenv:Header"/>
    </xsl:template>

    <xsl:template match="sObjects" name="sObjects">
        <urn:sObjects xsi:type="Account">
        <xsl:for-each select="./*">
            <xsl:element name="{local-name()}">
                <xsl:value-of select="./text()" />
            </xsl:element>
         </xsl:for-each>
         </urn:sObjects>
    </xsl:template>
</xsl:stylesheet>

使用PI 7.1生成WSDL

在SOAP2IDOC场景下,发送方的adaper为SOAP,PI能为调用web service的第三方提供WSDL。生成WSDL有两种方式,一种是通过Sender Agreement,另一种是通过Integration Repository –> Tools -> Display WSDL菜单。其中前者要求调用者提供访问PI的用户名和密码,而后者则无需提供。

Recently I had a requirement from third party system, to send message to PI without user name and password.

We having the scenario SOAP to IDOC. In sender side SOAP adapter and in IDOC as the receiver. I have developed the Interface and tested using SOAP test tool. After my testing I had send the WSDL to the thirdparty SaaS system. They told that they can't use this WSDL and use the URL end point instead. But here is the problem. Their Even Brocker system can't call the PI webservice with User ID and Password. They want webservice URL which should not have any user credential requirement.

As the SOAP adapter in PI requires the user ID and password to send message to PI. The normal way of extracting WSDL at the Sender Agreement level (Display WSDL) use Adapter Engine to send message and it requires user credentials.

Solution

Go to

Integration Repository –> Tools -> Display WSDL

This will popup another window.

Press the continue button and click on the button propose URL.

http://<server>:<port>/sap/xi/engine?type=entry

Then click continue and specify Interface and Specify Sender and finally save the WSDL to your computer.

2012-11-12

动态设定SAP PI SOAP Receiver的目的地

一些主数据需要从SAP发到Salesforce,receiver channel使用SOAP adapter。因为Salesforce的loadbalancer,调用Salesforce web service的URL有可能变动,所以不能在receiver channel里静态设定目的地URL,而需要在dynamic configuration里动态设定key为TServerLocation的值。要使动态设定的值生效,需要两点:
  • 如果channel里给定的URL是一个有效的URL,那么这个静态的URL会被adapter使用,而不是dynamic configuration里的值
  • 如果dynamic configuration里的URL使用HTTP协议,那么channel里的相应设定必须为http://,如果动态设定的URL为HTTPS,那么channel里相应的设置为https://.
在message mapping中可以使用下面的UDF来设定。
public String setSoapURL(String url, Container container) throws StreamTransformationException{
        String namespace = "http://sap.com/xi/XI/System/SOAP";
        String parameterKey = "TServerLocation";
        DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(    StreamTransformationConstants.DYNAMIC_CONFIGURATION);
        DynamicConfigurationKey key = DynamicConfigurationKey.create(namespace, parameterKey);
        if (conf != null) {
            conf.put(key, url);           
        }
        return ""; 
  }

2012-11-03

卸载Adobe Acrobat出错



卸载Adobe Acrobat X程序时,总是报错1324,说Path Contains an Invalid Character(路径中包含无效字符)或multifonction.sequ。
日志报告显示错误来自于Mircrosoft的MsiInstaller
Event Type:       Error
Event Source:   MsiInstaller
Event Category:               None
Event ID:             11324

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 7b 41 43 37 36 42 41 38   {AC76BA8
0008: 36 2d 31 30 33 33 2d 46   6-1033-F
0010: 34 30 30 2d 37 37 36 30   400-7760
0018: 2d 30 30 30 30 30 30 30   -0000000
0020: 30 30 30 30 35 7d         00005} 

发现这个键值{AC76BA86-1033-F400-7760-000000000005}正好是Acrobat安装路径下Setup Files下文件夹的名字,里面有Acrobat 10的完整安装文件。
微软早期曾提供一个名为Windows Installer CleanUp utility的小工具来解决安装或卸载程序时出现的问题,不过现在被名为program install und uninstall troubleshooter(http://support.microsoft.com/mats/Program_Install_and_Uninstall )的工具所替代。网上下载之后运行了估计约一刻钟才显示修复了卸载问题。不过原来的程序文件并未被移除,只是在安装的程序列表里没有了。

2012-10-29

德国的增值税能简单些吗

德国的增值税通常为19%,有一些商品和服务享受减免的增值税7%(verminderte Mehrwertsteuersatz),如酒店的住宿前两年就从19%下调到7%。不过今天在火车上看报纸读到了一些关于增值税的例外条款,不得不说德国人就爱把条款搞的负责些。

如,Fisch und Krebstiere, Weichtiere und andere wirbellose Wassertiere享受减免增值税额7%,但是 Zierfisch, Langusten, Hummer, Austern und Schnecken却被排除在外。

如,在Reihen和Mosel河上乘船旅游同样是7%的增值税,但是如果行船超过50公里就不在此列。

如,牛奶和牛奶制品,鸟蛋和蛋黄(Milch und Milcherzeugnisse, Vogeleier und Eigelb)同样是7%的增值税,但是ungenießbare Eier ohne Schale und ungenißbares Eigelb和天然蜂蜜(natürlicher Honig)却是19%。

这样的例子简直太多了。制订一个统一的增值税额不更简单吗?也省得ERP软件在此费一番功夫来解决各种税额的问题。


2012-10-17

看懂Android的Build number

先前一直觉得很奇怪,为什么Android的各个版本代号为什么会起那么些奇怪的名字,什么Froyo (2.2),Gingerbread(2.3),Ice Cream Sandwich(4.0),Jelly Bean (4.1)。原来基本按着代号的第一个单词的首字母的顺序来的。最初的代号从D (Donut)开始,当然中间也有些跳跃,比如H就没有出现。
要读懂Buildnumber也得掌握google的命令规则才行。
  • First letter = release family, e.g. F is Froyo
  • Second letter = branch code that allows Google to identify the exact code branch that the build was made from, and R is by convention the primary release branch
  • Third letter and the two numbers = date code. The letter counts quarters, with A being Q1 2009. Therefore, F is Q2 2010. The two digits count days within the quarter, so F85 is June 24 2010. 
  • Last letter = individual versions related to the same date code, sequentially starting with A; A is actually implicit and usually omitted for brevity.
更多细节:http://source.android.com/source/build-numbers.html 

2012-10-15

无题

早上在去柏林的火车上翻阅Bild报纸,看到上面一条关于前德国一台(ARD)新闻节目Tagesschau主持人Eva Herman破产的消息。今年57岁的Eva Hermann曾在德国一台主持了17年的新闻节目,如今因为无法偿还银行贷款和律师费用和法庭费用被迫宣布破产。她在1995年为了省税花50万欧元在德国东部的莱比锡投资了3处房地产用于出租,但因为租金收益预先估计过高导致收益并不如预期的高,不过好在以前在电视台工作,收入稳定而且颇为丰厚,尚能定期偿还银行的贷款。2006年此人因为写了一本书Das Eva-Prinzip,被认为赞同Nationalsozialismus的关于家庭的政策而激起舆论巨大的讨论。为此她丢掉了电视台的工作,尔后在与前雇主德国一台的法律诉讼中又输了官司。这样她的事业就走到了谷底。
这条新闻告诉我:
1. 不要试图挑战公众认可的观点
2. 买房投资用于出租,租金收入不可过于乐观,最好还贷的数额 << 保守的租金收入
3. 与国家机构打官司不要指望能赢

2012-10-12

再次遭遇Java程序在扩展显示器上的问题

因为前几天都一直接了一个外接显示器作为扩展显示器,今天在家上班直接在笔记本上,没有连扩展显示器,问题就来了。Java程序是通过Citrix client运行的一个远程的SAP enterprise service builder,当要在一些弹出窗口中的列表中选择一些值时,如创建一个message type时,按F4去选择一个data type,这时这个列表在笔记本窗口中不会显示,给用户的假象是,这个session已经死掉了,点击什么都没有反应,其实是因为当前焦点在弹出窗口上,而弹出窗口又没有出现在用户可见的界面上。重新连接Citirx server,重新登录Windows,重启Windows都没解决问题,最后没办法只好连到一个外接显示器上,把那个弹出窗口拖到笔记本的显示器上,问题才算解决。
如果手头没有第二个显示器,如在火车上,这种问题如何解决?

2012-10-10

Firefox在扩展显示器上的显示问题

最近在客户那里把笔记本(Windows 7 Enterprise,64bit)连接到了一个外接的显示器(显示设置为extended display),Firefox 15 在这个扩展显示器上有问题。当点击Firefox的菜单时,菜单闪现一下然后很快就变成一块空白矩形了,当把鼠标移动到空白区域时,菜单内容又显现出来。网上查到2006年就有人报告这个bug,不理解为什么现在这个版本还会出现这个问题。记得以前的版本在扩展显示器没有出现这个问题。刚升级到Firefox 16,问题还是存在。

网上有人给出的解决方法是取消硬件加速,测试了一下可行。

Go to the Firefox Options –> Advanced tab –> General tab. In the “Browsing” section uncheck the box marked “Use hardware acceleration when available”