You need to update thousands of objects (material, vendor, equipment, BOM, … ), but you are not sure if some field should be updated or not. So, my tip is: leave the decision to your source file.
(if you don´t know how to use LSMW, please check the post LSMW – tutorial)
There is a checkbox in SAP LSMW program that can be useful in this situation: it allows the LSMW to choose to update the field if the source field is not empty (or “initial”, according to ABAP syntax).
Please check it at: LSMW > Maintain Field Mapping and Conversion Rules.
Select a field and click on “Rule” button:
Choose “Transfer (MOVE)” and flag “Only if Source Field Not Initial”:
LSMW will create an ABAP code for you:
Now, when you run the LSWM to update your objects, this field will be updated only if the field in your Excel file (or text file) is not blank.
Again: now who “controls” the LSWM is the Excel (source) file:
You can change the ABAP code suggested by the LSMW:
In the given example, the LSMW program would:
- If the source field has some content, it will update the SAP field
- If the source field is empty, it will update the SAP field with “blank”
- If the source field has “DONTUPDATE”, then LSMW will not update the SAP field.