Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

LSMW File Read

Former Member
0 Kudos

Hi friends ,

please consider this as very urgent ...have go live on monday ...

I have a lsmw project in which to the existing source structure i added one new field . Specified the file path and read the file in dev and everything looked fine so transported it to prd.

In PRD ...the same file , same path ....when read ....doesnt read all the the columns in the file ....very strange ....that it works absoultely fine in dev but not in prd ...

How can i resolve this , pls help very critical ....



Former Member
0 Kudos

which method of lsmw ur fallowing first of all

and did u check the source structure wheather all the fileds r properly mapped or not?

and check ur flat flle also one again ......


0 Kudos

Hi ,

I am using the BAPI Method . the mapping of structure is done ...and also the source structure has the newly added field ( step 3 - Maintain Source field ) .

When i execute the step : Read File and then I display Read data ...that is where i see that the fields are not getting the proper values ....

eg : Field 'Auth' is 5th field in the structure and Field 'Desc' is the 6th field in the structure as well as the flat file . After Read step , the field 'Auth' gets the 'desc' from the flat file and the field 'desc' doesnt get any value from the flat file.

Whereas in Dev , all the fields get their proper value ....


0 Kudos

That means fields r not properly mapped, do one thing take two records try to increase the space before the auth field in the flat file for those two records

here check one more things also, wheather the auth filed value is going to the previous filed while reading the data and the desc field value is coming to auth filed

check it out once and let me know

0 Kudos


50000 HH2 JONESG
corp-nas\plmteam$\Norwich_PDF\500\50000.PDF F 24081 VIEW "FLIPOVER ASSY,RAMP,36"""

I increased one Tab space before the auth "VIEW" it goes to the AUTH Field as required....but Still the Description "FLIPOVER..." doesnt go into the DESC field , that field stays blank ....

0 Kudos

hi ,

help me out guys ....:( cant get over the problem ....its very critical ....


0 Kudos

yes got the point

then increase the space after the before the field DESC.

Actually for each n every field u have to maintain so many charecters in the flat file also like if u have a filed of length 8 char n if the value in the flat file is up to 5 chars then u have to maintain 3 charecters blank space after that

this way i will work out


0 Kudos

hi navin ....

first of all thanks a lot for walking me through this ...

I increased the space for DESC but it doesnt work , it works perfectly fine in dev ....thats one thing i cant understand why it is working fine in dev with the same files ...

but , yes i increased the space before DESC with one tab , still it doesnt read it

Thanks ,

0 Kudos

and fyi ....the Auth Field is 4 char long and desc in 40 char long ....

0 Kudos

What setting are you using for reading the file?

For the step 'specify file', are you using "Field names at start of file"

or "Field name matches source structure definition"?

I've had some problems before using field names at start of file, and changing to field name matches source structure definition fixed the problem - not sure if it applies in your case. I would give it a try if you haven't yet. Also, if you are using excel then saving as a tab delimited file, verify the formatting is set to 'text' for all the cells in Excel.

It is strange it works in dev and not so in prd, if nothing has changed. Also, in the lsmw user menu, add 'display conversion program' if it isn't already shown and use this to compare these between dev and prd. This way you can narrow down if the problem lies with the generated program, or with the source data.