Define Fields in LSMW Structures Using Source Data
It is a rare occasion when data is produced to fit an LSMW object. Usually, LSMW objects are produced to fit around source data. Manually typing each field into SAP takes a lot of time and increases the chance for error. Making this process a semi-automated task greatly reduces the time spent and nearly eliminates the chance for errors caused by manual keying.
Start with the data in an Excel spreadsheet. If the header contains field lengths and data types then the process is simplified even further. If the field sizes are not included then some manual keying is in order to specify field length. A default data type of "C" will ensure that the data is passed through the import process without undue transformation on the part of SAP. Select the header row and copy it into the clipboard.
Right-click on an empty cell in the spreadsheet and choose Paste Special. When the Paste Special window appears, tick the Transpose checkbox and then click OK.
The data, once pasted into Excel, will look like this. If the source data has no field lengths or types, then that will be missing from the pasted data. Copy this data into the clipboard and open the LSMW object to be created.
In the Change Source Fields section of LSMW select the structure to be populated and then click the "Table Maintenance" button.
Paste the field information from Excel into the structure fields by pressing Ctrl-V. This will populate the fields with the desired field names verbatim from the source data. Click the "Save" button.
Back out to the previous screen and ensure that the fields have been accurately. The fields should appear under the structure exactly as they appear in the source data now.
- Log in to post comments