Package: CRMS4_TEST_DATA_GENERATION - Carsten's original report
(1) API: BAPI_MATERIAL_SAVEREPLICA
(2) BP report: CRMS4_HOME_CREATE_BPS
(3) Service Order: CRMS4_HOME_CREATE_ORDERS
涉及到的一些数据库表
(1) TVKOV: Org. Unit: Distribution Channels per Sales Organization (1) VKORG: Sales Organization (2) VTWEG: Distribution Channel
(2) T001: company code (1) BUKRS: SELECT FROM t001 FOR ALL ENTRIES IN lt_tvko WHERE bukrs = lt_tvko-bukrs (2) LAND1: country key
(3) TVKO: Organizational Unit: Sales Organizations (1) VKORG: Sales Organization (2) include SI_TVKO: Organizational Unit: Sales Organizations detail (3) bukrs: Company code of the sales organization
(4) T134: Material type (1) prod_type_code: determine material or service - 02
(5) TVTA: Organizational Unit: Sales Area(s)
(6) T137: Industries for materials
(7) TSTL: Taxes: Valid Tax Categories for Each Country (1) TALND: Country is relevant for taxes (2) TATYP: Tax category (sales tax, federal sales tax,...) char4
(8) MATERIAL_MAINTAIN_DARK (1) MAKT: long description (2) MARC: Plant Data for Material (3) MARD: Storage Location Data for Material (4) MFHM: Production Resource Tool (PRT) Fields in the Material Master (5) MARM: Units of Measure for Material (6) MEAN: International Article Numbers (EANs) for Material (7) MBEW: Material Valuation (8) STEU: For Taxes: Data Transfer
# single order creation touched table:
(1) CRMS4D_BTX_H: shadow table containing guid, BUS type, object_id and process_type
(2) CRMS4D_SERV_H: Header of service transactions, a collection of many include structure for each extension / set
(3) CRMS4D_SCHEDLIN: Scheduled Lines Table
(4) CRMS4D_BTX_I: item shadow table
(5) CRMS4D_PARTNER: Customer Mgmt S4 DB Table for Business Partner Information
(6) CRMS4D_SERV_I: Items of service transactions
# Initial performance data QGP/504
(1) Create single service order with single line item: 0.5 ~ 1 seconds
(2) Create single service order with random number of line item between 1 and 30: 2 ~ 3 seconds
(3) Create 100 service order with single line item: 16 seconds
(4) Create 100 service order with random number of line item between 1 and 30: 150 ~ 156 seconds
# 2018-01-15 Sync after new year holiday
Latest data size till 2018-01-15:
Step1: eliminate out-of-memory runtime error
In the very beginning my mass data generation report could not be running for a long time, because as time goes by, the allocated memory increases and finally ends up with an "out-of-memory" runtime dump.
For example, I have totally 1000 service order to create, and the package size is 100. When I have finished the creation for the first 900 service orders, the internal buffer for these 900 service orders should be cleaned up, or else there might be no enough memory for the last 100 order creation.
The internal buffer needs to be cleanup includes:
(1) product API buffer
(2) organization unit buffer
(3) partner buffer
(4) pricing buffer
(5) one order API buffer
One example of pricing buffer could be found below:
It holds some internal buffer which will not be released so as time goes by, these two buffer table turns bigger and bigger and finally eat up all memory.
Unfortunately the pricing API does not have any method currently to cleanup these two buffer table, so I have to use a workaround in QGP:
buffer cleanup:
Step2: figure out where the drop down list entries for Subject come from?
Step3: figure out subject data storage design
Suppose a given Service request has maintained this kind of category data, what exactly data is stored in database table?
# 2018-01-30 A very draft performance measurement
Scenario: search by header description
REPORT zorder_query.
PARAMETERS: descr TYPE crmd_orderadm_h-description OBLIGATORY DEFAULT 'Jerry',
conta TYPE char1 AS CHECKBOX DEFAULT abap_false,
ttype Type crmd_orderadm_h-process_type DEFAULT 'SRVO',
ctype type char1 AS CHECKBOX DEFAULT abap_false.
DATA: lt_selection_parameter TYPE genilt_selection_parameter_tab,
ls_query_parameters TYPE genilt_query_parameters,
ls_selection_parameter TYPE genilt_selection_parameter.
DATA(lo_core) = cl_crm_bol_core=>get_instance( ).
lo_core->load_component_set( 'ONEORDER' ).
IF conta = abap_true.
ls_selection_parameter = VALUE #( attr_name = 'DESCRIPTION' sign = 'I' option = 'CP'
low = |*{ descr }*| ).
ELSE.
ls_selection_parameter = VALUE #( attr_name = 'DESCRIPTION' sign = 'I' option = 'EQ'
low = descr ).
ENDIF.
APPEND ls_selection_parameter TO lt_selection_parameter.
IF ctype = abap_true.
ls_selection_parameter = VALUE #( attr_name = 'PROCESS_TYPE' sign = 'I' option = 'EQ' low = ttype ).
APPEND ls_selection_parameter TO lt_selection_parameter.
ENDIF.
ls_query_parameters-max_hits = 100.
cl_crm_order_timer_home=>start( ).
TRY.
DATA(lo_collection) = lo_core->dquery(
iv_query_name = 'BTQSrvOrd'
it_selection_parameters = lt_selection_parameter
is_query_parameters = ls_query_parameters ).
CATCH cx_root INTO DATA(cx_root).
WRITE:/ cx_root->get_text( ).
RETURN.
ENDTRY.
cl_crm_order_timer_home=>stop( 'Search by Description' ).
WRITE:/ |Number of Service Orders found: { lo_collection->size( ) }| COLOR COL_NEGATIVE.
Result
around 16 seconds.
total records which match this criteria in DB: 65,660
DB data volume:
7.86 seconds for CDS view query:
CDS view: CRMS4_SERV_H_SEARCH
Test report used by Jerry in year 2017 for One order prototype performance test
You can find those report in QGS:ZCRMS4_ORDER_SEARCH_PARTY_NAME
Search service orders which contain specified business partner ID with given partner function
ZCRMS4_ORDER_SEARCH_PRODUCT_ID
Search service order which contain the line item product with given product id.
ZCRMS4_ORDER_SEARCH_PROD_SOLD
Search with combination of sold to party name and line item product id.
ZCRMS4_ORDER_SEARCH_SOLDTO_NAM
search by sold to party name.
Jerry will copy them to QGP soon.
Tip: Do SAT trace on applications which could not be launched by SAT
Extensible CDS view done by China team for reference
package and CDS view listed below:
I quickly go through your view CRMS4_SERV_H_SEARCH and it seems fine for me. I am not clear why it does not work for extensibility.
Please read this article knowledge article written by Jerry on 2016-12-8 to check whether it helps. Sorry for Chinese because it is written for colleagues in China. You can try to use Google translation.
Search criteria supported in prototype done in year 2017, for your reference
check area under BUS2000116 (CRMST_QUERY_SRVO_BTIL).
(1) The cell with green means those criteria is supported in our prototype.
(2) The cell with silver means in theory they will be very easy to be supported.
(3) The cell with red means they are not supported in prototype due to complexity.
2018-02-05 Sync about Order Header description field search performance issue
What Jerry has learned from HANA DB colleague
When I paste it and execute in HANA studio, it is executed statically. On the other hand when I execute my ABAP report, the SQL statement is executed dynamically. The word dynamically means the search parameter for SQL is not known by HANA engine until runtime.
and paste the statement arguments into HANA studio as well:
504,BUS2000116,BUS2000116,BUS2000140,BUS2000105,BUS2000137,BUS2000131,BUS2000146,BUS2000159,BUS2000153,BUS2000199,,Y,,%2017-12-21%,SRVO,100
this time we get the consistent performance result executed in HANA studio and in ABAP:
approach 1
What is SAP HANA Hint?
From SAP note 2142945
- Hints in the context of this SAP Note are instructions for the SAP HANA database server.
- Hints can influence the way how a database request is generated or processed.
- They don't change the result set of the database requests.
- Hints are typically used in order to optimize SAP HANA performance or memory consumption. They may be used temporarily for testing purposes or permanently.
before hint is applied
after hint is applied
Less than one second
What is hint no_cs_join?
Which problems and pitfalls exist in the area of hints?
Behavior in case of invalid hints
Fuzzy search in S4 Material search implementation
consumption view:
hint is also used in SADL query implementation.
incident 1880139488 is created for "SAP DBTech JDBC: [258]: insufficient privilege: Not authorized".
To discard Performance Project incidents from Rel1 Monitoring we approved in our today Product team meeting to enter in “Info” field of the incident: “S4CRM-200” please update this incident accordingly.
2018-02-13 sync meeting
Some test data:
- product id: SANSUMGC7PRO000000
- description: Jerry 2018-02-10 9:35PM
- sold to party id: VIP000001
- sold to past mc name1: Ali website 1 the involved CDS view is determined based on object type:
Search by product id
select from:
CRMS4_SERVHSRCH INNER JOIN CRMS4_SERVISRCH ON CRMS4_SERVISRCH~OBJECT_ID = CRMS4_SERVHSRCH~OBJECT_ID
where statement:
performance: 1.54 seconds
When I change to use another product id: ANDROID0000000001, Performance turns poor:
but only 0.2 second is spent on CDS view fetch?
Search by sold to party ID
select from:
CRMS4_SERVHSRCH INNER JOIN CRMS4D_PARTNER ON CRMS4D_PARTNER~OBJECT_ID = CRMS4_SERVHSRCH~OBJECT_ID
performance: 1.47 seconds
search by sold to party name
The second where - CRMS4_SERVHSRCH:
The third where - CRMS4_SERVISRCH:
One question here:
I have specified "Wang" as sold to party name, however according to the above screenshot, another String "HYBRIS" is used to fire the CDS view search.
till now the value is still "Wang":
pay attention to the parameter: iv_mc_name1
So HYBRIS is partner ID: finally the specified SOLD_TO_PARTY_NAME is converted to SOLD_TO_PARTY(ID) and searched against CRMS4_SERVISRCH.
performance: 1.28 seconds
Question from Harish
only 34 seconds are spent on DB?
For example, why crms4d_btx_h is called so many times?
check whether this get_category is really necessary if it is not made visible in UI configuration:
相关推荐
报告`ZPPR003`是一个用于批量撤销生产订单报工数据的SAP ABAP程序。这个程序设计用于处理流程订单(也可能是离散制造的生产订单,但需要通过不同的BAPI进行处理),它根据生产订单中的确认号(CONFIRMATION)和...
本文将对批量下载BOM到EXCEL的ABAP代码进行详细的解释和分析,以便于读者更好地理解该代码的功能和实现机制。 标题分析 标题“批量下载BOM到EXCEL-ABAP代码”表明该代码的主要功能是使用ABAP语言将物料清单(BOM)...
ABAP程序批量下载工具(原名:Mass download version 1.5.0)是一款专为SAP开发人员设计的实用工具,旨在帮助用户批量下载ABAP环境中的各种对象,如程序、函数、数据字典定义等至展示服务器上。该版本支持递归搜索...
SAP ABAP 代码备份下载到本地程序代码
它提供了丰富的功能,使得开发人员可以构建复杂的数据查询,而无需编写大量的 ABAP 代码。在本文中,我们将深入探讨 SAP ABAP Query 的高级特性。 首先,ABAP Query 允许用户添加自定义字段和计算字段。这些字段的...
在SAP系统中,ABAP(Advanced Business Application Programming)是一种编程语言,用于开发和定制企业级应用程序。在本例中,我们关注的是批量创建元素(数据元素)的程序,这通常是在进行数据模型设计或者系统配置...
为了提高ABAP程序的执行效率,确保系统响应时间和资源利用率达到最佳状态,制定一套有效的ABAP代码性能指导原则显得尤为重要。 #### 二、代码性能优化关键点 ##### 1. 使用FORALL ENTRIES与表驱动 - **确保驱动表...
- **原理**: ABAP批量打印程序通过智能表单结合数据循环处理,能够高效地生成大量定制化的文档,满足企业对于发票、订单、报告等批量打印需求。 - **应用场景**: - **财务部门**: 自动生成并打印大量发票、收据。 ...
本资料集主要探讨了ABAP性能优化的策略和技巧,适用于具有中等ABAP技能水平的开发者,以提升他们的代码效率,特别是在面对大数据量时,解决报表运行速度缓慢的问题。 1. **避免无谓的数据库访问**:数据库查询是...
2. **S_TABLE_CONTROL.txt**:表控制是ABAP中的一个重要概念,用于在用户界面中显示和编辑表格数据,包括排序、过滤和分页等功能。 3. **S_GUI_CONTROLS.txt**:GUI(图形用户界面)控件是指在SAP应用中显示的交互...
在 ABAP 中,颜色代码通常以 šestnaestkovo (hexadecimal) 编码表示,格式为 `#RRGGBB`,其中 `RR` 代表红色 (Red) 的十六进制代码,`GG` 代表绿色 (Green) 的十六进制代码,`BB` 代表蓝色 (Blue) 的十六进制代码。...
在处理XML数据时,ABAP提供了一个强大的库——IXML,用于创建、读取和操作XML文档。 ### 2. 创建IXML工厂对象 在ABAP程序中,首先需要创建一个IXML工厂对象。这一步是创建XML文档的基础。示例代码中通过`cl_ixml=>...
在SAP ABAP 1.4.4版本的代码下载中,我们可以深入探讨这个版本的特性和功能。 首先,SAP ABAP不仅是一种编程语言,还是一个完整的开发环境,它包含了编写、测试和调试代码的所有工具。在1.4.4这样的版本中,通常会...
在SAP系统中,ABAP(Advanced Business Application Programming)是一种编程语言,用于开发和定制企业级应用程序。ABAP数据表是SAP系统的核心组成部分,它们存储了系统的业务数据和配置信息。本资料集“SAP数据表...
ABAP 代码下载备份 1.5.1
ABAP调优是提高ABAP程序执行效率的关键技术,它涉及到代码...通过上述技巧,开发者可以显著提升ABAP程序的性能,确保程序在处理大量数据时依然运行流畅。同时,不断学习和实践ABAP的最佳实践,也是持续优化代码的关键。
该程序使用了ABAP语言的基本语法和数据类型,实现了下载ABAP程序源代码的功能。该程序包括以下几个部分: 第一部分是声明数据库表,使用TABLES语句声明了rs38m和trdir两个数据库表。 第二部分是内表结构类型的定义...
在这个“ABAP GIT 项目 AI SDK FOR ABAP 代码”中,我们将探讨如何在ABAP环境中集成人工智能(AI)功能,以及利用Git进行代码版本控制。 AI SDK for ABAP是SAP提供的一个软件开发工具包,它允许开发人员在ABAP平台...
在处理数据导出任务时,ABAP程序员有时需要将系统内的数据导出到Excel格式,以便用户进行进一步的数据分析或处理。在本场景中,我们将探讨如何通过OLE(Object Linking and Embedding)技术在ABAP中实现Excel数据...
在SAP ABAP编程中,动态内表的创建是实现灵活数据处理的重要手段,尤其是在处理大量数据或涉及多个系统表的场景下。本篇将详细解释如何动态地创建和使用内表,以及在进行动态更新时需要注意的关键点。 首先,让我们...