LSMW For Uploading BOM: Purpose

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

Former Member

August 13, 2013 2 minute read

LSMW for uploading BOM


FollowRSS feedLike
25 Likes 15,931 Views 30 Comments

Purpose

This document will briefly discuss LSMW for uploading Bill of Material using Direct Input Method.

Prepare LSMW

Project      : As name describes, I mention the name of the project.


Subproject : I usually maintain the module for which we are preparing.

Object       : It is the business object, in this case I mention as BOM

Here I mention LSMW as

One advantage of this kind of naming is, we can see all objects created under one project – under one
subproject.

Procedure

Step 1 : Maintain Object Attributes


Step 2 : Maintain Source Structures

Create two structures, second structure as lower level.

Step 3 : Maintain Source Fields


Here we maintain two structures – one for header level data and second one for item data. Header Material
number (MATNR) is the common field connecting these two structures.
Step 4 : Maintain Structure Relations

Step 5 : Maintain Field Mapping and Conversion Rules

Maintain fields for both the two structures.


Step 6 : Prepare Excel File.

Prepare both header and item file separately.

Step 7 : Specify Files

Item file should be created under the Header file.


Logical File path must be created in transaction FILE.

Step 8: Assign Files

Step 9 : Read Data


Step 10 : Display Read Data

Step 11 : Convert Data

Step 12 : Display Converted Data

Step 13 : Create Batch Input Session

Click Display Errors Only

Following screen appears .

Now the BOM is created for material.


I am Uploading BOM through LSMW by Direct Input method. I am having the following queries,
1. In that BOM I have Header data and Item data. While doing the Step 7(specify file) it accept the text file
only not the Excel file. If I assign the Excel file means while executing the Step 9(Read Data). It gives error
message, file and source structure have no fields.
So I came back to Step 7 and assign the Text file then it is accepting. What is the reason?
2. Even though It will allow to execute the Read Data steps I am getting the Header data only not getting
the BOM Components data. Results data as follows,
LSM Workbench: Import Data For BOM, BOM, BOM
19.02.2010 - 14:45:57
File(s) Read: C:\Documents and Settings\Administrator\Desktop\BOM Header.txt
C:\Documents and Settings\Administrator\Desktop\BOM ITEM.txt
File Written: BOM_BOM_BOM.lsmw.read
Source Structure Read Written Not Written
BOMHEADER 2 2 0
BOMITEM 2 0 2
Transactions Read: 2
Records Read: 2
Transactions Written: 2
Records Written: 2
1. LSMW does not support direct reading of microsoft Excel files. When the documentation speaks of
'spreadsheet', they mean SAP generic spreadsheet format, which in the PC world, it is pretty much the
same a the so-called 'tab-delimited' format.
If you are using Excel, your best bet is to save your spreadsheets as CSV or Tab delimited (if CSV, make
sure you use the same character (such as comma ',') as a delimiter in both Excel and in the LSMW file
definition).
2. I can't tell your problem from your info. There can be many many reasons. I can say that creating BOMs
using the direct input method is by far the best method. I will admit that it is tricky. Since you are new at
this, I recommend that you just use one input file, which includes both header and item data for a single-
level-single item list of BOMs. Once you have overcome the normal initial problems, you can then expand
to more complex boms. Only use multiple input files when you fully understand what they do and how
LSMW treats them.
All master data (and most transactional data) can be input with LSMW. As mentioned by one of the other
readers, some companies create custom BDCs instead. Unfortunately, these companies usually have to at
some point engage a programmer with each client. With LSMW, a functional analyst can create LSMW
projects that can be carried from client to client, Once you become expert in LSMW, no other Legacy data
translation tool is needed.
I would suggest you to develop a simple BDC for BOM recording than LSMW,since it involves a sub screen
data for the item
details LSMW is not widely used for uploading purpose.
Do the recording through T Code SHDB and create a program using SE38 and a T Code can be created
for the same.
Check and revert back.
I found New kind of error in above process.
I kept my structure same as describe above.
For Header;
DUMMY (Dummy) 0001
MATNR (Material) XXXX
WERKS (Plant) 1010
STLAN (BOM Usage) 1
STLAL (Alternative BOM) 1
BMENG (Confirm Quantity) 1
DATUV (Valid From) MM/DD/YYYY
For Item;
DUMMY; MATNR; POSNR; IDNRK; MENGE
0001; XXXX; 0010; aaaa; 3
0001; XXXX; 0020; bbbb; 4
In display converted data, I can see all data load correctly.
But when I run batch input session, it will upload HEADER file correctly and in ITEM file, its upload only
second material. Uploading start from "0020; bbbb; with quantity 4.
I tried with different material with Three Item but it takes third one.
It means, it takes only last item not the first one. If its two Item than it takes second one. If its three Item
than it takes third one.
What is the problem behind it? Can anybody help me ? I tried above format in two different SAP server but
it works same. Its upload second item material only.
Hope to hear soon from some lSMW BOM expert.
maintain the structure as -
Source Structures
LOAD_TABLE_HEADER Load table_header
LOAD_TABLE_ITEMS Load table Items
and the relations as -
Structure Relations
BGR00 Batch Input Structure for Session Data <<<< LOAD_TABLE_HEADER Load table_header
Select Target Structure BGR00 .
BICSK Batch Input Structure for BOM Header Data <<<< LOAD_TABLE_HEADER Load table_header
Select Target Structure BICSK .
BICSP Batch Input Structure for BOM Item Data <<<< LOAD_TABLE_ITEMS Load table Items
Select Target Structure BICSP .
BICSU Batch Input Structure for BOM Sub-Item Data
and create 2 text files -
1 for header and the second for the items..

LSMW For BOM WITH TWO FLAT FILES


(header & item).
Nov 27, 2015 at 12:44 PM | 292 Views
Hi:
I'm working with LSMW @ specify files i got the following error :
LOGICAL FILE "ZFILE1" IS NOT ASSIGNED WITH PHYSICAL FILE "CS01_CS01_CS01.lsmw.conv"
OS IS "WINDOWS".
Pls help to fill the field in Tcode FILE for defining Logical Path & File.
screen shots are below:
Thanks With Regards,
1,
Standard batch input is the best method for uploading boms.
use this in method in LSMW
Object 0030 Material BOM
Method 0001 Create
Program Name RCSBI010
Program Type B Batch Input
2, Yes, but item level should not be in same level as header level.Item level should be child of the header
level.
3, You need to have common fileds in header and itam strucutre that will releate corresponding header with
item
eg
MATNR
WERKS
STLAN
STALT
Above four fields should be common in both header and item file.
4, You can have two seprate file of header and item.
Header strucure sample:
MATNR
WERKS
STLAN
AENNR
STALT
DATUV
EXSTL
ZTEXT
STKTX
BMENG
STLST
LOSVN
LOSBS
STLBE
Item strucute Sample.
YSYS
YSOUKEY
WERKS
STLAN
STALT
POSTP
IDNRK
MENGE_C
AUSCH
AVOAU
NETAU
FMENG
KZKUP
SCHGT
BEIKZ
LGORT
ITSOB
UPOSZ
EBORT
UPMNG_C
UPTXT
NFEAG
NFGRP
POSNR
SORTF
DSPST
SANKA
DATUV_ITEM
DATUB_ITEM
MEINS

Uploading BOM for Materials , EQ …. are general requirements for any type of project. Creating a
LSMW by recording will be difficult and will not work for complicated data upload requirements.
This is due to the fact that the structure of BOM is broken down to Header , Item and Item details.

LSMW by direct input method is the easiest way to upload mass data with ease.BDC processing
might work but I personally prefer LSMW.
Note :

1. The Header and item structure should be defined in hierarchy.

2. A common reference field should be defined in both the structures for linking header with items.

1. Create a new project , sub project using TCode : LSMW


2.Select object and method for direct input
3. Maintain source structure
Create structure in the following hierarchy
4. Maintain Source fields
Maintain fields as required for the upload.

Note: The first column in both the structures should be the same.
 

5. Maintain Structure Relations

6. Maintain field Mapping


Note : Maintain Tcode as required. T Code defines the BOM as a Material , Functional location or a
equipment BOM.Assign other fields as required for the upload

7. Prepare 2 upload files , 1 for header with header field structure and 2
for item with the field structure defined.
8. Assign files
9 Other steps are the same as any LSMW process.
 

Attachments:
BOM Upload Instructions.pdf
BOM Upload Instructions.pdf
Sample Upload Files

You might also like