Skip to Content
Technical Articles
Author's profile photo Jerry Wang

Create Mass Service document in S/4HANA for Customer Management

In my previous blog Create Mass Products by code in S4HANA for Customer Management I mentioned that we have created a high volume of test data for performance measurement before S/4HANA for Customer Management is released. In that blog I explain how to create mass Products via ABAP code, and this blog is for Service document like Service Order and Service Request.
The source code of report could be found from my github.
An example of report input:
See a subset of created Service Orders below:
The created service order contains a random number of products with random amount of quantity:
For Sales Organization and Service Organization, I read all available one in current system and assign them to each order randomly as well.
The order creation is achieved by CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE whose usage is exactly the same as in SAP CRM:
For Service Request creation(source code here), I have performed a little enhancement compared with Service Order creation: an additional parameter “Schema ID” could be specified:
This schema ID is used to create the subject data displayed in Service Request header region, whose creation detail is introduced in my blog How to create Service Request subject data by code.
In my blog CRM One Order Model Redesign in S/4HANA for Customer Management 1.0 – Part 1 I have introduced how one order read API works under new persistence model. In my next blog I will introduce the write scenario ( create & update ).

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hey Jerry!

      It's me again. When you write "a high volume" could share some numbers? How many and how does it perform?

      I know using SAP BAPI funtion modules are designated to be used for extension scenarios. In many cases however we used direct SELECTS and UPDATES on the CRM databases. What would be the "best practice" on S4? Use CRM_ORDER_READ and CRM_ORDER_MAINTAIN to update large number of transactions or directly in CDS Views? What is fast enough from a business perspective?

      cheers Carsten

      Author's profile photo Vinay Kumawat
      Vinay Kumawat

      Thanks Jerry for such detailed blogs, I really like your in-depth research and way of explaining in very simple ways.

      I cannot access the github links

      https://github.com/i042416/KnowlegeRepository/blob/master/ABAP/S4/ZCRMS4_HOME_CREATE_ORDER_LOOP.abap

      and

      https://github.com/i042416/KnowlegeRepository/blob/master/ABAP/S4/ZCRMS4_CREATE_MATERIAL_OPT.abap

      Please share these codes. And looking for more such interesting blogs, please keep on writing.

      Regards,

      Vinay