In my recent project, my friend Dave found something new. If you assign an equipment record to a sales order as a technical object, then go back and change the serial number within the equipment record, the sale order doesn’t update. I know… what a mouthful, and an obscure situation. Now, this is probably not a real common thing, but if you need your serial number updated in existing documents, you need to do a little work for it.
First off, SAP covers a lot of this in note 94769. But Dave found an extra little piece that wasn’t orignally expected. If you want the documents to get updated, you need to add some code. When you make the changes the processing is executed by a case statement. Unfortunately, the case that is true for the new value of the variable contains no code.
WHEN mode_upd_user. “user defined update
WHEN mode_upd_none. “no update
WHEN OTHERS. “undefined
ENDCASE.
mode_upd_user is our new value. It does the same thing as mode_upd_none (nothing at all).
This change also disables the standard update (service contracts) that was happening in the portion of the case statement now deactivated.
In order to do what we need, we would have to copy the code in the case “WHEN mode_upd_serv. “update of service contracts”, insert it into the case mode_upd_user and modify it to select sales orders in addition to contracts. That is accomplished by changing this IF statement:
IF ( ser02-vorgang = ‘SDW1’ OR ser02-vbtyp = ‘G’ )
AND ( NOT ser02-sdaufnr IS INITIAL ).
To
IF ( ser02-vorgang = ‘SDW1’ OR ser02-vbtyp = ‘G’
OR ser02-vorgang = ‘SDAU’ OR ser02-vbtyp = ‘C’ ) “update of service orders NEW!
AND ( NOT ser02-sdaufnr IS INITIAL ).
So, use this if you ever need to make sure that your serial number is always in sync within your sales orders. Thanks Dave, and thanks for reading,
As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,Mike