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:
Tip #2:
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.
Great information. Thank you so much
sap fico online training in usa
LikeLike
Great information, but for example I need to populate one field (requisitioner field) in a list of orders that already exist in SAP (2,000 orders) but we don’t know which of this have that field empty, is there a way using that SAP skip all the orders that already have data in that field and just update the ones that are empty?
LikeLike
Yes, but the simplest way to do that is to filter out the ones that are already empty, in your Excel file.
LikeLike