In my project I need to create new service request by code with its subject data filled.
As a result I need to figure out how to fill the required data by calling function module CRM_ORDER_MAINTAIN. I share my code here in case you have the same requirement.
First of all you should already have a well-maintained Categorization Schema in Service Operation Work center:
In Application Areas assignment block, this schema must have corresponding combination of Transaction type and Catalog Category maintained.
In my example above, “Service Request / Defect Locations/Object Parts” just represents the following customizing:
Just specify the schema ID and category ID you would like to fill for the created Service Request:
We only need to specify a single category ID in our code, and all its parent node in the schema tree could automatically be filled as expected by WebUI.
Source code: