日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

如何用ABAP代码的方式在短时间内批量生成大量订单数据用于性能测试

發布時間:2023/12/19 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 如何用ABAP代码的方式在短时间内批量生成大量订单数据用于性能测试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

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:


要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的如何用ABAP代码的方式在短时间内批量生成大量订单数据用于性能测试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产精品zjzjzj在线观看 | 久久99精品久久久久久园产越南 | av二区在线 | 亚洲精品久久久久久久蜜桃臀 | 精品国产成人av | 夏晴子在线 | 在线免费看黄色片 | 色天天 | 美女爱爱爱| 欧美a级在线 | 亚洲精品99| 亚州色图欧美色图| 性xxxx欧美 | 羞羞的视频在线观看 | 人人模人人干 | 成人自拍视频在线 | 999精品在线观看 | 亚洲AV无码精品色 | 国产高清自拍一区 | 国产精品情侣呻吟对白视频 | julia一区二区三区在线观看 | 亚洲精品女人久久久 | 清清草免费视频 | 中文字幕亚洲综合 | 闷骚老干部cao个爽 av九九九 | 在线看av的网址 | 国产极品尤物 | 国产三级av在线 | 全部免费毛片在线播放高潮 | 国产视频精品一区二区三区 | 先锋影音在线 | 日韩欧美在线免费 | 在线免费看a | 国产中文欧美日韩在线 | 99精品视频播放 | 在线免费观看污网站 | 中文日韩 | 国产九色sp调教91 | 伊人福利视频 | 毛片网站网址 | 亚洲精品二 | 光溜溜视频素材大全美女 | 凹凸av在线 | 97免费在线观看 | 台湾佬中文在线 | sm调教羞耻姿势图片 | 伊人成年网 | 日韩综合av | 日本成人激情视频 | 成人黄色a级片 | 天天操天天操天天 | 青青草成人免费在线视频 | 国产三级在线观看 | 欧产日产国产精品 | 好吊视频一区二区三区 | 日本三级午夜理伦三级三 | 日韩精品视频免费在线观看 | 美国毛片av | 欧美中文字幕在线播放 | 五月伊人婷婷 | 日本精品一区二区三区四区 | 亚洲视频久久 | 亚洲天堂一区在线 | 欧洲亚洲激情 | 欧美日韩人妻精品一区在线 | 中文字幕一二三四 | 黑帮大佬和我的365日第二部 | 老汉av在线| 99超碰在线观看 | 免费爱爱视频 | 无遮挡无掩盖网站 | 99在线精品视频免费观看软件 | 免费黄色网址观看 | 免费看一级黄色大片 | 情欲少妇人妻100篇 黄色一级片欧美 | 狠狠干青青草 | 小sao货大ji巴cao死你 | 人人舔人人 | 少妇高潮一区二区三区喷水 | 奇米影视久久 | 一级片免费在线观看 | 蜜桃久久久aaaa成人网一区 | 青青草草| 国产我不卡| 久久艹国产 | 米奇影音| 玩日本老头很兴奋xxxx | 国产99色| 日韩av在线网址 | 手机av免费 | 亚洲熟妇无码一区二区三区导航 | 日韩黄色影视 | 91精品国产91综合久久蜜臀 | 日本性爱动漫 | 简单av网 | 精品国产一二三区 | 日本精品黄色 | 欧美日韩国产免费一区二区三区 | 成年人黄国产 |