One issue I’ve found in SAP Service Management (Customer Service) is that most companies want to quote the repairs they perform in house. The problem is that the standard repair process doesn’t give a good alternative to handle this. You can only use the DP80 functionality if you use a service order that is non-revenue bearing, but you must use a revenue bearing service order to perform in-house repairs.
Up until now, I’ve always handled it manually. Simply creating a quotation with reference to the repair sales order. The problem is that the connection to the process is loose at best, and you cannot use the information from planned service order to automatically update the quote.
Recently I found the following OSS notes.
Note 153869 – Creation of quotation after goods receipt for repair
Note 204874 – Settled costs in resource-related billing
This OSS note maps out a process that uses the original repair sales order as both the quote and the order. Through the use of different item categories, we can use DP90 to perform quoting functions, as well as the actual billing. Now, several things needs to be taken into account for this process to work. The first is that you will need to add some addition item categories and item category usages.
I recommend you create Item category Usage, ZEIN & ZENI so you can control the quotation item categories. Then you can leave SEIN & SENI for use in the billing items. Be sure to add these new usages to the item category determination for your repair sales orders.
The next step is to properly setup the DIP profile in order to accommodate the new changes. What you need to do is change the billing portion of the profile to include the planned costs. This will allow DP90 to pull in all of the planned costs, which can be used for quoting.
The other thing you need to decide is if the quotation items will be statistical or not. This depends on if you want all of the items to be displayed to the customer on the quotation, or if you plan to simply roll the items up for easy calculation of your quotation price. The basic code provided by SAP assumes that quoting will be actual pricing, and billing will be statistical. In order to provide some additional flexibility in the solution provided by SAP, I included a check in the code to look at the materials of the quotation usage to determine if each was statistical or not.
In my code below, if the Material Determination for an item was set to C: Transfer qty only, then it was statistical. In all other options, it was normal pricing. This does require you to maintain the items in both the quotation and the invoicing portion of the DIP profile, but the flexibility was worth the one time maintenance.
Be sure to setup ODP4 to show the cost in the sales order. Be sure the condition you use (EK01 is recommended) is also a part of the pricing procedure for the repair.
Finally, the biggest thing to consider is the output changes that will be required for this process to work. I encourage you to create a new quotation Smartform. It can be similar to your current quote or order confirmation, but you will want to handle the item categories appropriately for your customers. For example, you may want to show the itemized quotation costs, but not show any of the repair process items like the inbound delivery. You will also need to setup the form to show your pricing at the appropriate level.
Here’s the code I used in the exit: V46H0001 ->EXIT_SAPLV46H_001
data: da_vbak like vbak.
data: da_vbkd like vbkd.
data: lv_quant type AD01INVQUA.
CHECK NOT I_VBAKKOM–VBELN IS INITIAL.
CALL FUNCTION ‘SD_VBAK_SELECT’
EXPORTING
I_DOCUMENT_NUMBER = I_VBAKKOM–VBELN
IMPORTING
E_VBAK = DA_VBAK
EXCEPTIONS
DOCUMENT_NOT_FOUND = 1.
CHECK SY–SUBRC = 0.
* only in repair environment
check da_vbak–vbklt ca ‘FG’.
* read billing form of repair main item
CALL FUNCTION ‘SD_VBKD_SELECT’
EXPORTING
I_DOCUMENT_NUMBER = I_VBAKKOM–VBELN
I_ITEM_NUMBER = C_VBAPKOM–UEPOS
IMPORTING
E_VBKD = da_VBKD.
CASE I_SDSM_DLI–WRTTP.
WHEN ’01’ or ”. “resource related quotation
CASE da_vbkd–FAKTF. “billing form
WHEN ’01’. “fixed rate
select SINGLE INV_QUANT from AD01C_MAT into lv_quant
where PROFNR = I_SDSM_DLI–FFPRF and
DPUS = ’11’ and ” quotation
INV_MAT = I_SDSM_DLI–SD_MATNR.
if sy–subrc <> 0.
select SINGLE INV_QUANT from AD01C_MAT into lv_quant
where PROFNR = I_SDSM_DLI–FFPRF and
DPUS = ’11’ and ” quotation
MAT_DIR = ‘X’.
endif.
case lv_quant.
when ‘C’.
C_VBAPKOM–VWPOS = ‘ZENI’. “statistical
when others.
C_VBAPKOM–VWPOS = ‘ZEIN’. “not statistical
endcase.
* C_VBAPKOM-VWPOS = ‘SEIN’. “not statistical
WHEN ’02’. “costs
* C_VBAPKOM-VWPOS = ‘SENI’. “statistical
C_VBAPKOM–VWPOS = ‘ZENI’. “statistical
ENDCASE.
WHEN ’04’. “resource related invoice
CASE da_vbkd–faktf.
WHEN ’01’. “fixes rate
C_VBAPKOM–VWPOS = ‘SENI’. “statistical
* when ’02’. “costs
* no change at the moment, because no change necessary
* – item with service product => SENI statistical
* – items from costs => SEIN non statistical
* c_vbapkom-vwpos = ‘SEIN’. “non statistical
ENDCASE.
ENDCASE.