Site icon SAP Human Resources Experts And Solutions

How to load multiple files in SAP LSMW

<p>Here is a trick&period; Some time ago I found how to load hierarchical structures in <a href&equals;"http&colon;&sol;&sol;saphcmsolutions&period;com&sol;advanced-lsmw&sol;">LSMW<&sol;a> from one file&period; We need to create a file in a special way so that structure record is repeated&period; These files are hard to create in legacy system particularly when there are no local developers who support the system&period; That&&num;8217&semi;s why we prefer to work with flat simple files where one file is a single table&period; But&comma; let me show you how to load multiple files in SAP LSMW tool with ease&period;<&sol;p>&NewLine;<p>Couple days ago I was loading payroll wage types into SAP with a standard BUS7023 ManagerExtPayroll object&period; In the output&comma; there is an IDOC which is stored in T558&ast; tables for payroll migration&period; IDOC structure is a hierarchy itself&comma; where on the top there is an employee&comma; periods are below&comma; and wage types are on the bottom line&period;<&sol;p>&NewLine;<h2>Loading multiple files in SAP LSMW<&sol;h2>&NewLine;<p>To simplify I decided to create three files&colon;<&sol;p>&NewLine;<ul>&NewLine;<li>Employees<&sol;li>&NewLine;<li>Periods<&sol;li>&NewLine;<li>Wage types<&sol;li>&NewLine;<&sol;ul>&NewLine;<p>Every other file contains a reference to the previous one&period; Look what I&&num;8217&semi;ve got&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;0&period;png"><img class&equals;"alignnone size-full wp-image-1977" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;0&period;png" alt&equals;"lsmw&lowbar;py&lowbar;0" width&equals;"614" height&equals;"502" &sol;><&sol;a><&sol;p>&NewLine;<p><&excl;--more--><&sol;p>&NewLine;<p>Let&&num;8217&semi;s define LSMW source structures which are related to each other in a file hierarchy&period; This hierarchy represents our data files we want to load at once&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;1&period;png"><img class&equals;"alignnone size-full wp-image-1978" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;1&period;png" alt&equals;"lsmw&lowbar;py&lowbar;1" width&equals;"502" height&equals;"243" &sol;><&sol;a><&sol;p>&NewLine;<p>Then we need to create source fields for our LSMW source structures&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;2&period;png"><img class&equals;"alignnone size-full wp-image-1979" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;2&period;png" alt&equals;"lsmw&lowbar;py&lowbar;2" width&equals;"807" height&equals;"479" &sol;><&sol;a><&sol;p>&NewLine;<p>Remember&comma; our relations in this scenario are one to one&period; One file from our multiple file list connects to one source structure&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;3&period;png"><img class&equals;"alignnone size-full wp-image-1980" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;3&period;png" alt&equals;"lsmw&lowbar;py&lowbar;3" width&equals;"923" height&equals;"216" &sol;><&sol;a><&sol;p>&NewLine;<p>Finally&comma; we need to do the field-based mapping connecting the source and destination fields per data file&period;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<p>&nbsp&semi;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;4&period;png"><img class&equals;"alignnone size-full wp-image-1981" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;4&period;png" alt&equals;"lsmw&lowbar;py&lowbar;4" width&equals;"841" height&equals;"683" &sol;><&sol;a><&sol;p>&NewLine;<p>Define the file location for every logical file&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;5&period;png"><img class&equals;"alignnone size-full wp-image-1982" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;5&period;png" alt&equals;"lsmw&lowbar;py&lowbar;5" width&equals;"776" height&equals;"648" &sol;><&sol;a><&sol;p>&NewLine;<p>And connect source structures to logical files&period; We&&num;8217&semi;re done with setting LSMW project to load multiple files in one batch&period;<&sol;p>&NewLine;<p><a href&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;6&period;png"><img class&equals;"alignnone size-full wp-image-1983" src&equals;"http&colon;&sol;&sol;saphr&period;ru&sol;wp-content&sol;uploads&sol;lsmw&lowbar;py&lowbar;6&period;png" alt&equals;"lsmw&lowbar;py&lowbar;6" width&equals;"536" height&equals;"291" &sol;><&sol;a><&sol;p>&NewLine;

Exit mobile version