Skip to Content
Author's profile photo Former Member

Updation of Service Order Type SM03 to new Order Type


This post is created for the benefit of SAP Consultant who work in Customer Service Module. There are many threads in SAP SCN as well as other SAP forums. This enhancement is possible using ABAP brain of Yogesh Shukla who also works with IBM & brings with 6+ years of experience. Rahul G Asai also works as a functional Logistics Consultant in IBM & has 7+ years of experience.

Typically when service orders are created from repair sales orders, to carry out service processing like component replacement, actual activity on work centres, the service order created is of the type SM03. This is standard SAP behaviour & can not be changed using customizing. New service order types are required in various cases like-

  1. Settlement of service cost is required on various settlement objects like on cost centres, WBS or Internal Order if the repaired component is In Warranty.
  2. Sales Order or Profitability Segment if the repaired component is not in Warranty.
  3. Any other reporting purpose.

Typically, these order types can be assigned to requirement class (which are assigned to requirement types) & can be derived within repair sales order. But, these service order types have to be of refurbishment type & gets created when service notifications are saved. This is not a desired functionality in many of the businesses and as they don’t want the service order immediately after the notification but rather after receiving returned material from the customer (through sales route using repair sales order).

Therefore, modification is recommended below which can be used to generate different service order types when they are created in the background automatically from repair sales order (once goods are received using returned delivery).

Below logic needs to be used in the function module given below at the enhancement points specified-

Function Module:          CO_ZV_ORDER_POST

Enhancement Point:      co_zv_order_post_07

Enhancement Spots:     es_saplcozv

Screenshot of the ABAP coding is given below as a quick reference.

T Code SE37, Function Module # CO_ZV_ORDER_POST


Actual Coding as below-

Coding 2.png

This program will be triggered automatically when business user tries to create service order from repair sales order.

Instead of Z Table, standard SAP functionality of variant maintenance would be used for this development. Screenshot taken from Transaction code STVARV-


Assigned Tags

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

      Thanks for bringing in this unanswered query of almost every SAP CS Consultant to end. Many forums are not able to resolve this predicament using standard functionality. This post has helped us save time in digging through ABAP exists & FMs and we have this ready solution from your post.

      Millions of thanks for valuable inputs.

      Author's profile photo Former Member
      Former Member

      Hi Rahul

      Thanks for sharing knowledge from your project experience.

      Regarding this particular article, I wasn't sure what you are trying to achieve. If you want to assign a different service order type, other than SM03 you can as well do that at the Requirement class level. I am kinda confused with what you are trying to do here.



      Author's profile photo Ramesh Babu Srikakollu
      Ramesh Babu Srikakollu


      After I implemented this enhancement for the same type of requirement, I am getting a runtime error duplicate record insertion in AFPO table.

      It is updating AFPO with temporary order number "%00000000001" for the first run and when we run the scenario for second time we get this runtime error.

      Also I would like to know where the data declaration for field symbol and that flag was done. Where that flag is getting cleared.