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.
cancel
Showing results for 
Search instead for 
Did you mean: 

IA05 LSMW

former_member581430
Participant
0 Kudos
519

hi everybody

I al doing the LSMW for IA05

i created 3 files

header

operation

materials

the file header and operation has a common field 'ID'

the files operation and materials have a common field 'ID2'

i am specifying the files as well, however when reading the files, its only the header files thats being read, the operation and materials file are not read and hence not written

the file structure for header

ID

PLNNR

PLNAL

KTEXT

ARBPL

WERKS

STRAT

the file structure for operation

ID

VORNR

STEUS

WERKS

ARBPL

ISTRU

ID2

file structure for materials

ID2

IDNRK

MENGE

MEINS

is there anything wrong in the structures?

thanks for your help

12 REPLIES 12

JL23
Active Contributor
0 Kudos
421

can you give some details of your LSMW step 2 and 7

madhu_vadlamani
Active Contributor
0 Kudos
421

Hi Prema,

Are you trying with batch input method.Give me some more details.

Regards,

Madhu.

0 Kudos
421

Hi Jurgen

step 2

task

operation( is lower level of task)

materials( is lower level of task)

step 7

i am specifying files for task, operation and materials

the delimiter is tab and the data is for one source structure

if you need more details, let me know

0 Kudos
421

hi Madhurao

yea i am trying with batch input

can you specify more details that you need to analyse?

thanks

0 Kudos
421

so you have 3 seperate entries for your different source files in step 7.

What about step 8, does any of your source structure have an assignment to the source files from step 7?

0 Kudos
421

yes, of course

0 Kudos
421

remove the file assignments except of one in step 8, and see if it gets read.

then remove this one and assign another one to the relevant structre and try again if it gets read.

do the same for the third file.

Let me know if the files can be read individually.

0 Kudos
421

hi Jurgen

For the header, its read properly

But for operation and materials file, they are not read

0 Kudos
421

can it be that the files are empty?

Could you try the header file that worked, on the alternative sturctures in step 8.

I know this does not make sense, but it could help to determine if the error is in the source file or in your LSMW definitions

Edited by: Jürgen L. on Jan 12, 2012 9:15 PM

0 Kudos
421

Hi Jurgen

it didnt work

is it possible that I am wrongly linking the files?

for the header, im using group and counter as key

for operation, im using group, counter and operation

for material, im using group, counter, operation and material as key

is it ok?

thanks for your help

0 Kudos
421

Info to all: I saw the files and the LSMW defintion.

there is almost everything that need to be optimized

a) the source structure is well defined

b) the source field definition .

- does not not match with the data in the source,

- are in a different sequence

- number of fields is different in defintion to number of fields available in the source

- has different field names

-and the the defined length does not match with the length in the source file.

all of this is not really forbidden, but it makes life not easy.

as you define the source fields yourself, usually from the source you have, it is not understandable why source fields are defined in different order, with different names etc.

field name ID as a first field in a text file creates certain problems in Microsoft software. Microsoft has problems opening such files. (but this is Microsoft specifc, SAP has no issue)

However, this field is defined with a length of 4 character, while in the source file the records have a ID number which is mlch longer than 4.

the PLNNR field is not like metnioned here in the thread. it is named PLNNR in the task but PLNNR2 in the Operation, so SAP does not identify this as equal and cannot link them together.

the ID2 field from operation does not have any value in the source file.

hence the materials cannot be linked and not written to SAP.

c) structure relation ship is well defined

d) the file definition is wrong because of the facts said under b)

if you have the fields in the source file in a different order than in your defnitions, then you must indicate this in the file definitions. you must not flag the box for "Field order matches source stucture definition", then sAP uses the names to read the data to the defined fields. But then you have to make sure that the field names are included in the source file and written equally to your definition (which is not the case for all the fields)

LSMW did read all 3 files, but it did not write data for the material file because of the missing ID2 in the operation file.

the read data step tells you how much was read and how much was written.

if you see a number in read colulum, then you can know that SAP has read the file but could not work with the data.

0 Kudos
421

HI Jurgen

I think i gave you the wrong lsmw or the wrong files

actually i made 2 LSMW because neither of them were working and i kept on manipulating

then it turned into havoc