SAP PI PO JDBC接口培训视频

news2024/9/25 15:21:52

SAP PI PO JDBC接口培训视频

XML Document Format for the Message Protocol XML SQL Format

SAP PI PO JDBC接口培训视频

 You can modify one or more database tables by means of a message. Depending on the content of the message, you can either insert (INSERT), update (UPDATE), or delete (DELETE) the data. Results from queries (SELECT) can also be included in the response in XML format for synchronous messages. The XML document must have the following schema in this case:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <StatementName1>
    <dbTableName action=”UPDATE” | “UPDATE_INSERT”>
      <table>
        realDbTableName
      </table>
      <access>
        <col1>val1</col1>
        <col2>val2new</col2>
      </access>
      <key1>
        <col2>val2old</col2>
        <col4>val4</col4>
      </key1>
      <key2>
        <col2>val2old2</col2>
      </key2>
    </dbTableName>
  </StatementName1>
  <StatementName2>
    <dbTableName action=”INSERT”>
      <table>
        realDbTableName
      </table>
      <access>
        <col1>val1</col1>
        <col2>val2</col2>
      </access>
      <access>
        <col1>val11</col1>
      </access>
    </dbTableName>
  </StatementName2>
  <StatementName3>
    <dbTableName action=”DELETE”>
      <key1>
        <col2>val2old</col2>
        <col4>val4</col4>
      </key1>
      <key2>
        <col2>val2old2</col2>
      </key2>
    </dbTableName>
  </StatementName3>
  <StatementName4>
    <dbTableName action=”SELECT”>
      <table>
        realDbTableName
      </table>
      <access>
        <col1/>
        <col2/>
        <col3/>
      </access>
      <key1>
        <col2>val2old</col2>
        <col4>val4</col4>
      </key1>
      <key2>
        <col2>val2old2</col2>
      </key2>
    </dbTableName>
  </StatementName4>
  <StatementName5>
    <storedProcedureName action=” EXECUTE”>
      <table>
        realStoredProcedureeName
      </table>
      <param1 [isInput=”true”] [isOutput=true] type=SQLDatatype>val1</param1>
    </storedProcedureName >
  </StatementName5>
  <StatementName6>
    <anyName action=” SQL_QUERY” | “SQL_DML”>
      <access>SQL-String with optional placeholder(s)</access>
      <key>
        <placeholder1>value1</placeholder1>
        <placeholder2>
        value2
        <placeholder2>
      </key>
    </anyName >
  </StatementName6>
</root>

Comments

The document contains a tag with the arbitrary name<root>. Within this tag there are one or more statement elements that also have arbitrary names. Each of these statements contains the description of a database action. With the exception of the execute description for a stored procedure (shown in the example under the element<StatementName5>), all statements have the same structure:

The name of the element beneath the statement element specifies the name of the database table and contains the attributeactionwith the valueINSERTUPDATEUPDATE_INSERTDELETE, orSELECT. If you use the optional<table>element, the value specified is used as a database table name. This enables you, for example, to define table names containing non-XML-compatible characters or characters that prevent them from being used in interface definitions in the Integration Builder. If specified,<table>must be the first element in the block within<dbTableName>

Within this element there is (except for in theDELETEaction) an element with the nameaccessand one or more elements with arbitrary names. In the above example, these elements are calledkeyN. Theaccesselement contains the table columns which are to be accessed. It must be specified as the first element. Thekeyelements describe a condition for access. If no such elements are specified, access proceeds without any conditions. In the case ofUPDATEandDELETE, this can lead to the entire table being updated or deleted respectively.

If you want to ensure this does not happen, select Key Tags Mandatory in the adapter configuration.

The response documents described below can only be evaluated by the Integration Server/PCK if the call is synchronous because the content of the response document is not accessible if the call is asynchronous. The response is put in a separate element< StatementName_response>for each statement element.

action= UPDATE

Statements with this action cause existing table values to be updated. Therefore, the statement corresponds to an SQL UPDATE statement.

The<access>block contains the new column values and a<key>element contains the columns whose values must be identical with the specified value to get the new column values. The name of the<key>element is arbitrary. Column values within a<key>element are combined with a logical AND; different<key>elements are combined with a logical OR.

A statement with the actionUPDATEmust have exactly one<access>element. The number of<key>elements with arbitrary names is not restricted.

The corresponding SQL statement forStatementName1in the example above is as follows:

UPDATE dbTableName SET col1=’val1’, col2=’val2new’ WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))

As in the other examples, the column typeStringis used for all columns. The character“may be missing in other column types.

The response document contains the following element as well as the number of updated table lines, including 0.

<update_count>count</update_count>

If there is no<key>element, or if there is a<key>element but it is empty, then no condition is specified and the entire table is to be updated. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.

action= INSERT

Statements with this action cause table values to be inserted. Therefore, the statement corresponds to an SQL INSERT statement.

The<access>block contains the new column values.

A statement with the actionINSERTmust have at least one<access>element. It cannot have a<key>element.

The corresponding SQL statement forStatementName2in the example above is as follows:

INSERT INTO dbTableName (col1, col2) VALUES(‘val1’, ‘val2’)

INSERT INTO dbTableName (col1) VALUES(‘val11’)

The response document contains the following element as well as the number of inserted table lines, including 0.

<insert_count>count</insert_count>

action= UPDATE_INSERT

The statement has the same format as for theUPDATEaction. Initially, the same action is executed as forUPDATE. If no update to the database table can be made for this action (the condition does not apply to any table entry), values of the table described in the <access> element are inserted in accordance with the description of the actionINSERT<key>elements are ignored in this case.

The response document has the following format; one of the two values is always 0 because either anUPDATEor anINSERTaction is always executed:

<update_count>count</update_count>

<insert_count>count</insert_count>

action= DELETE

Statements with this action cause existing table values to be deleted. One or more<key>elements formulate the condition for which table values are deleted. The names of<key>elements are arbitrary. Column values within a<key>element are combined with a logical AND; different<key>elements are combined with a logical OR.

The corresponding SQL statement forStatementName3in the example above is as follows:

DELETE FROM dbTableName WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))

The response document contains the following element:

<delete_count>count</delete_count>

If there is no<key>element, or if there is a<key>element but it is empty, then no condition is specified and the entire table is to be deleted. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.

action= SELECT

Statements with this action cause existing table values to be selected. Therefore, the statement corresponds to an SQL SELECT statement.

The<access>block contains the column names to be selected, a<key>element contains the columns whose values must be identical with the specified value to get the new column values. The name of the<key>element is arbitrary. Column values within a<key>element are combined with a logical AND; different<key>elements are combined with a logical OR.

A statement with the actionSELECTmust have exactly one<access>element. The number of<key>elements with arbitrary names is not restricted.

The corresponding SQL statement forStatementName4in the example above is as follows:

SELECT col1,col2,col3 FROM dbTableName WHERE ((col2=’val2old’ AND col4=’val4’) OR (col2=’val2old2’))

If there is no<key>element, or if there is a<key>element but it is empty, then no condition is specified and the entire table is to be selected. This may not be permitted by the configuration of the JDBC adapter for security reasons and will therefore result in an error during message processing and an appropriate error message.

The response document contains the result of the action in XML format as follows:

<row>

<column1>value11</column1>

<column2>value12</column2>

</row>

<row>

<column1>valueN1</column1>

<column2>valueN2</column2>

</row>

action= EXECUTE

Statements with this action result in a stored procedure being executed. The name of the element is interpreted as the name of the stored procedure in the database. If you use the optional <table> element, the value specified here is used as the stored procedure name. This enables you, for example, to define stored procedure names containing non-XML-compatible characters or characters that prevent them from being used in interface definitions in the Integration Builder/PCK. If specified, <table> must be the first element in the block within <dbTableName>.

The elements within the stored procedure are interpreted as parameters. They can optionally have the attribute isInput=“1“ (input parameter) or isOutput=“1“ (output parameter) or both (INOUT parameter). If both attributes are missing, the element is interpreted as an input parameter. The parameter names must be identical to those of the stored procedure definition.

The attributetype=<SQL-Datatype>, which describes the valid SQL data type, is mandatory for all parameter types (IN, OUT, INOUT).

The following SQL data types are supported:

INTEGER, BIT, TINYINT, SMALLINT, BIGINT, FLOAT,REAL, DOUBLE, NUMERIC, DECIMAL,CHAR, VARCHAR, STRING, LONGVARCHAR, DATE, TIME, TIMESTAMP, BINARY, VARBINARY, LONGVARBINARY, BLOB (input and output),CLOB (input and output), CURSOR (output; only in conjunction with the Oracle JDBC driver)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/367349.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java ”框架 = 注解 + 反射 + 设计模式“ 之 反射详解

Java ”框架 注解 反射 设计模式“ 之 反射详解 每博一文案 无论幸福还是苦难&#xff0c;无论光荣还是屈辱&#xff0c;你都要自己遭遇与承受。—————— 《平凡的世界》 孙少平多少美好的东西消失和毁灭了&#xff0c;世界还像什么事也没有发生&#xff0c;是的&#…

Head First设计模式---5.单例模式

2.2单例模式 单例模式运用的可能比其他几种简单&#xff0c;通俗点理解就是&#xff0c;我这个对象只能存在一个。 问题 保证一个类只有一个实例。 为什么会有人想要控制一个类所拥有的实例数量&#xff1f; 最常见的原因是控制某些共享资源 &#xff08;例如数据库或文件&am…

STL库实践

STL库实践1 写在最前面的话1.1 容器(container)1.2 算法(algorithm)1.3 迭代器(iterator)1.4 仿函数1.5 适配器1.6 空间配置器1.7 stl初试牛刀2 容器之 string2.1 string 构造函数2.2 string基本赋值操作2.3 string存取字符操作2.4 string拼接操作2.5 string查找和替换2.6 stri…

Windows安装 MySQL5.7(超详细)

Windows安装 MySQL5.7安装包下载安装步骤解压添加环境变量初始化MySQL初始登录MySQL并修改root密码注意&#xff0c;截至2023年2月23日&#xff0c;MySQL所有版本不提供ARM芯片架构的Windows版本(8.0.12开始支持Red Hat系统的ARM版本)&#xff0c;所以ARM架构的Windows无法安装…

什么是软件测试中的人工智能?

什么是软件测试中的人工智能&#xff1f;近日&#xff0c;由人工智能实验室OpenAI开发的全新“对话机器人”ChatGPT在各大中外媒体平台掀起了一阵狂热之风。从正式发布到风靡全球&#xff0c;不过100天&#xff0c;用户已突破1亿&#xff0c;成为史上用户增长最快的应用程序。C…

图解 | 工信部网络与数据安全57项“执法事项清单”来了

2023年2月&#xff0c;工业和信息化部根据《工业和信息化部全面推行行政执法公示制度执法全过程记录制度重大执法决定法制审核制度暂行实施方案》的相关要求&#xff0c;结合有关法律法规依据的修订情况及行政执法工作实际&#xff0c;编制发布了《工业和信息化部行政执法项目清…

高效制作知识库的软件工具,这6个都很不错哦!

任何工作流程都离不开文档管理&#xff0c;因此文档管理也是企业数字化转型中的重要环节。面对复杂的业务流程、频繁的文档编辑任务和跨区域的文件共享需求&#xff0c;优秀的文档管理体系能够帮助企业实现安全的文档存储&#xff0c;高效的文档搜索&#xff0c;便捷的文档协作…

CVE-2023-23752 Joomla未授权访问漏洞分析

漏洞概要 Joomla 在海外使用较多&#xff0c;是一套使用 PHP 和 MySQL 开发的开源、跨平台的内容管理系统(CMS)。 Joomla 4.0.0 至 4.2.7 版本中的 ApiRouter.php#parseApiRoute 在处理用户的 Get 请求时未对请求参数有效过滤&#xff0c;导致攻击者可向 Joomla 服务端点发送包…

大数据框架之Hadoop:MapReduce(三)MapReduce框架原理——MapTask工作机制

MapTask工作机制如下图所示。 &#xff08;1&#xff09;Read阶段&#xff1a;MapTask通过用户编写的RecordReader&#xff0c;从输入InputSplit中解析出一个个key/value。 &#xff08;2&#xff09;Map阶段&#xff1a;该节点主要是将解析出的key/value交给用户编写map()函数…

SDL2 简明教程(五):OpenGL 绘制

系列文章目录 SDL2 简明教程&#xff08;一&#xff09;&#xff1a;使用 Cmake 和 Conan 构建 SDL2 编程环境 SDL2 简明教程&#xff08;二&#xff09;&#xff1a;创建一个空的窗口 SDL2 简明教程&#xff08;三&#xff09;&#xff1a;显示图片 SDL2 简明教程&#xf…

DC220V冲击继电器RCJ-3

系列型号 RCJ-2型冲击继电器&#xff1b; RCJ-2/48VDC冲击继电器 RCJ-2/110VDC冲击继电器 RCJ-2/220VDC冲击继电器 RCJ-2/100VAC冲击继电器 RCJ-2/127VAC冲击继电器 RCJ-2/220VAC冲击继电器 RCJ-3/220VAC冲击继电器 RCJ-3型冲击继电器 RCJ-3/127VAC冲击继电器 RCJ-3/100VAC冲…

Jenkins集成Allure报告

Jenkins集成Allure报告 紧接上文&#xff1a;Jenkins部署及持续集成——傻瓜式教程 使用Allure报告 1、在插件库下载Allure插件Allure Jenkins Plugin 2、在构建后操作中加入allure执行的报告目录&#xff08;相对于项目的路径&#xff09; 3、run.py代码改成如下 import p…

2023年白酒行业研究报告

第一章 行业概况 白酒是中国传统的酿酒业之一&#xff0c;历史悠久&#xff0c;源远流长。白酒指以高粱等粮谷为主要原料&#xff0c;以大曲、小曲或麸曲及酒母等为糖化发酵剂&#xff0c;经蒸煮、糖化、发酵、蒸馏、陈酿、勾兑而制成的&#xff0c;酒精度(体积分数)在18%-68%…

【Spark分布式内存计算框架——离线综合实战】3. SparkSession 工具类、广告数据 ETL

SparkSession 工具类 在项目工程【cn.itcast.spark.utils】包下创建工具类&#xff1a;SparkUtils&#xff0c;专门构建SparkSession实例对象&#xff0c;具体步骤如下&#xff1a; 构建SparkConf对象、设置通用相关属性判断应用是否本地模式运行&#xff0c;如果是设置值mas…

04 DC-DC变换器(DCDC Converter / Switched-mode Power Supply)简介

文章目录0、DC-DC变换器概述1、DC-DC变换器的基本结构BuckBoostBuck-BoostBoost-Buck小结2、换流与特性分析分析Buck电路分析Boost电路分析Buck-Boost电路&#xff08;前级Buck后级Boost&#xff09;分析Cuk电路&#xff08;前级Boost后级Buck组合&#xff09;小结3、换流与特性…

OAuth2在项目的应用-扫码登录

业界提供了OAUTH的多种实现如PHP、JavaScript&#xff0c;Java&#xff0c;Ruby等各种语言开发包&#xff0c;Oauth协议目前发展到2.0版本&#xff0c;1.0版本过于复杂&#xff0c;2.0版本已得到广泛应用。参考&#xff1a;https://baike.baidu.com/item/oAuth/7153134?fralad…

2020蓝桥杯真题含2天数(填空题) C语言/C++

题目描述 本题为填空题&#xff0c;只需要算出结果后&#xff0c;在代码中使用输出语句将所填结果输出即可。 小蓝特别喜欢 2&#xff0c;今年是公元 2020 年&#xff0c;他特别高兴&#xff0c;因为每天日历上都可以看到 2。 如果日历中只显示年月日&#xff0c;请问从公元 …

转录组丨limma差异表达分析,绘制火山图和热图

limma差异表达分析 本篇笔记的内容是在R语言中利用limma包进行差异表达分析&#xff0c;主要针对转录组测序得到的基因表达数据进行下游分析&#xff0c;并将分析结果可视化&#xff0c;绘制火山图和热图 文章目录limma差异表达分析[toc]环境部署与安装输入数据准备差异表达分析…

java JMM 内存屏障

内存屏障的目的 每个CPU都会有自己的缓存&#xff08;有的甚至L1,L2,L3&#xff09;&#xff0c;缓存的目的就是为了提高性能&#xff0c;避免每次都要向内存取。但是这样的弊端也很明显&#xff1a;不能实时的和内存发生信息交换&#xff0c;分在不同CPU执行的不同线程对同一…

你真的需要文档管理软件吗?

什么是文档管理软件&#xff1f; 文档管理软件 (DMS) 是一种数字解决方案&#xff0c;可帮助组织处理、捕获、存储、管理和跟踪文档。 通过严格管理您的关键业务信息&#xff0c;您可以开发以稳定、可预测、可衡量的方式启动、执行和完成的流程。 如果没有功能齐全的文档管理软…