© 2005 sapficoconsultant.com All rights reserved. No part of this material should be reproduced or transmitted in any form, or by any means, electronic or mechanical including photocopying, recording or by any information storage retrieval system without permission in writing from www.sapficoconsultant.com “SAP” is a trademark of SAP AG, Neurottstrasse 16, 69190 Walldorf, Germany. SAP AG is not the publisher of this material and is not responsible for it under any aspect. Warning and Disclaimer This product is sold as is, without warranty of any kind, either express or implied. While every precaution has been taken in the preparation of this material, www.sapficoconsultant.com assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information or instructions contained herein. It is further stated that the publisher is not responsible for any damage or loss to your data or your equipment that results directly or indirectly from your use of this product. www.sapficoconsultant.com Page 2 of 89 TABLE OF CONTENT INTRODUCTION .................................................................................................. 4 1. Create a project, sub project and object ......................................................... 5 2. Maintain object attributes ............................................................................. 10 3. Maintain Source Structure ............................................................................ 15 4. Maintain source fields ................................................................................... 20 5. Maintain Structure relations .......................................................................... 27 6. Maintain field mapping and conversion rules ............................................... 31 7. Specify file for upload and create a file for upload ........................................ 56 8. Assign files ................................................................................................... 68 9. Read data (Import data) ............................................................................... 69 10. Display Imported data ............................................................................... 71 11. Convert data ............................................................................................. 74 12. Display converted data.............................................................................. 77 13. Create Batch input session ....................................................................... 80 14. Run Batch input session ........................................................................... 83 www.sapficoconsultant.com Page 3 of 89 INTRODUCTION LSMW an abbreviation for Legacy System Migration Workbench is a tool in SAP used to migrate Legacy data into SAP. Here we show how to create an FI document upload program using LSMW. www.sapficoconsultant.com Page 4 of 89 1. Create a project, sub project and object Type LSMW in the command field Click to continue www.sapficoconsultant.com Page 5 of 89 Click on to create a new project Update the following fields: www.sapficoconsultant.com Page 6 of 89 Click Create a subproject www.sapficoconsultant.com Page 7 of 89 Click Create an object description www.sapficoconsultant.com Page 8 of 89 Click www.sapficoconsultant.com Page 9 of 89 2. Maintain object attributes Click Here we maintain the attributes of the object www.sapficoconsultant.com Page 10 of 89 Click www.sapficoconsultant.com Page 11 of 89 Click Take a drop down in www.sapficoconsultant.com Page 12 of 89 Double click Financial documents as shown below:- Take a drop down in Select program RFBIBL00 by Double Click www.sapficoconsultant.com Page 13 of 89 Click Click www.sapficoconsultant.com Page 14 of 89 3. Maintain Source Structure Notice that the radio button has automatically moved to the next step Maintain source structures. Each time you perform a transaction the radio button moves to the next step automatically. Also notice on the extreme right hand side under the column Last action (date, time, and user). This is updated with information each time the transaction is performed. Here we maintain the source structure for the LSMW. www.sapficoconsultant.com Page 15 of 89 Click www.sapficoconsultant.com Page 16 of 89 Click www.sapficoconsultant.com Page 17 of 89 Click Update the following:- www.sapficoconsultant.com Page 18 of 89 Click www.sapficoconsultant.com Page 19 of 89 Click Click 4. Maintain source fields Here we maintain the source fields which are to be updated with the data. www.sapficoconsultant.com Page 20 of 89 Click www.sapficoconsultant.com Page 21 of 89 Click www.sapficoconsultant.com Page 22 of 89 Position the cursor on Click www.sapficoconsultant.com Page 23 of 89 Now we need to update the fields which we want to upload in the FI document. www.sapficoconsultant.com Page 24 of 89 Here you update the field description, the type of field whether C (Character, alphanumeric) or N (Numeric) and the length of the field After updating all the fields Click Click Click www.sapficoconsultant.com Page 25 of 89 Click Click www.sapficoconsultant.com Page 26 of 89 5. Maintain Structure relations . Click Click www.sapficoconsultant.com Page 27 of 89 Click Click www.sapficoconsultant.com Page 28 of 89 Click Click www.sapficoconsultant.com Page 29 of 89 Click Click www.sapficoconsultant.com Page 30 of 89 Click Click 6. Maintain field mapping and conversion rules Here we create a link between the system fields and the source fields maintained in the earlier step. www.sapficoconsultant.com Page 31 of 89 Click www.sapficoconsultant.com Page 32 of 89 Click www.sapficoconsultant.com Page 33 of 89 Click www.sapficoconsultant.com Page 34 of 89 Click www.sapficoconsultant.com Page 35 of 89 www.sapficoconsultant.com Page 36 of 89 www.sapficoconsultant.com Page 37 of 89 Position the cursor on www.sapficoconsultant.com and click Page 38 of 89 www.sapficoconsultant.com Page 39 of 89 Click Click www.sapficoconsultant.com Page 40 of 89 Double click www.sapficoconsultant.com Page 41 of 89 Position the cursor on www.sapficoconsultant.com and click Page 42 of 89 Double click www.sapficoconsultant.com Page 43 of 89 Similarly map all the fields BUDAT WAERS XBLNR BKTXT www.sapficoconsultant.com Page 44 of 89 Add an abap condition in the field SENDE Click on Click www.sapficoconsultant.com Page 45 of 89 Select www.sapficoconsultant.com Page 46 of 89 Click Click 5 times www.sapficoconsultant.com Page 47 of 89 Add the following code www.sapficoconsultant.com Page 48 of 89 Click on Click www.sapficoconsultant.com Page 49 of 89 Now click on Click www.sapficoconsultant.com Page 50 of 89 Double Click www.sapficoconsultant.com Page 51 of 89 Click Click www.sapficoconsultant.com Page 52 of 89 Double Click www.sapficoconsultant.com Page 53 of 89 Similarly map the remaining fields NEWUM WRBTR KOSTL www.sapficoconsultant.com Page 54 of 89 Sometime you get a message as shown below. This is because you have maintained the length of the field which is more than the target field. If the source field is longer than the target field the text such as name, address could get truncated. Currently you can ignore it. After linking all the fields. www.sapficoconsultant.com Page 55 of 89 Click Click Click 7. Specify file for upload and create a file for upload Here you attach the text file for upload. www.sapficoconsultant.com Page 56 of 89 Skip the Step Maintain fixed values, translations, user defined routines Click Click www.sapficoconsultant.com Page 57 of 89 Before we attach the file for upload, we must create this the file. This should be created in the same order as are the fields in our source fields www.sapficoconsultant.com Page 58 of 89 Save this file as an excel template for upload of FI document. Thereafter delete the header row. www.sapficoconsultant.com Page 59 of 89 Now click on File Save as Click www.sapficoconsultant.com Page 60 of 89 Click Click Click to close the file Click Go to the LSMW screen in SAP www.sapficoconsultant.com Page 61 of 89 Click www.sapficoconsultant.com Page 62 of 89 Double click www.sapficoconsultant.com Page 63 of 89 Take a drop down in the field file www.sapficoconsultant.com Page 64 of 89 Click www.sapficoconsultant.com Page 65 of 89 Update the following:- Click www.sapficoconsultant.com Page 66 of 89 Click Click www.sapficoconsultant.com Page 67 of 89 8. Assign files We just click on change button and save the assignment. Click Click www.sapficoconsultant.com Page 68 of 89 Click Click 9. Read data (Import data) By executing this step the system actually reads the data from the upload file. www.sapficoconsultant.com Page 69 of 89 Click Click www.sapficoconsultant.com Page 70 of 89 It shows the number of transactions read, written and not written. Click 10. twice Display Imported data This step is very important. Here you come to know whether there are any errors. Whether the data passed on from the file is mapped to correct field. So you should see a few records to see whether it is correct. www.sapficoconsultant.com Page 71 of 89 Click Click www.sapficoconsultant.com Page 72 of 89 Double click www.sapficoconsultant.com Page 73 of 89 Click Similarly check other line items 11. Convert data In this step the read data is converted. www.sapficoconsultant.com Page 74 of 89 Click www.sapficoconsultant.com Page 75 of 89 Click www.sapficoconsultant.com Page 76 of 89 Click 12. twice Display converted data In this step we display the converted data. Again you should see one or 2 records to see that they are converted correctly. www.sapficoconsultant.com Page 77 of 89 Click www.sapficoconsultant.com Page 78 of 89 Double click on www.sapficoconsultant.com Page 79 of 89 Click Similarly check other line items to see that the data is correctly populated against each field. 13. Create Batch input session In this step we create the Batch input session for the upload data. The data is not updated when you create Batch input session. www.sapficoconsultant.com Page 80 of 89 Click www.sapficoconsultant.com Page 81 of 89 Click Click www.sapficoconsultant.com Page 82 of 89 14. Run Batch input session In this step, we execute the Batch input session. Data is actually updated here. Update /nSM35 www.sapficoconsultant.com Page 83 of 89 Select FIDOCUPLOAD Click www.sapficoconsultant.com Page 84 of 89 www.sapficoconsultant.com Page 85 of 89 Click www.sapficoconsultant.com Page 86 of 89 www.sapficoconsultant.com Page 87 of 89 www.sapficoconsultant.com Page 88 of 89 You probably might get some warnings like field missing. Keep Pressing enter till the session gets completed. The FI transaction data is successfully uploaded. www.sapficoconsultant.com Page 89 of 89