Application Development and Automation 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: 
Read only

Difference between source file and source structure

Former Member
0 Likes
546

Hello,

I have a source file with around 60 fields. But I need to upload only 5 fields. I defined a source structure in LSMW with 5 fields and specified the file with 60 fields as the source file. But when the data is read, only 2 out of 5 fields are read. What should I do?

Thank you

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
484

Hi !!

In case you are selecting only limited fields form a file with more fields in LSMW . Please apply following consideration :

1. Add a dummy field in your source structure to make the whole structure size equal to the total width of all fields in the source file. This is because in LSMW the file is read for the length of the SOURCE STRUCTURE width only . So if i want to read only field3 in following example i still need toa dda dummy field to ensure LSMW reads a total width of source file as the FIELD3 is at absolute end of the source file from length 40 to 60 only .

For example :

if my source file ahs following firve fields : FIELD1 (10) , FIELD2(30),FIELD3 (20) .

Declare your source structure as : FIELD3 (20),FIELD_DUMMY (40) .

2. When you deifne the source file in LSMW step 7 take care to notify whether you have field names at start of file or the field order is same as

source structure .

This should close your issue or get in touch for more here buddy

3 REPLIES 3
Read only

Former Member
0 Likes
485

Hi !!

In case you are selecting only limited fields form a file with more fields in LSMW . Please apply following consideration :

1. Add a dummy field in your source structure to make the whole structure size equal to the total width of all fields in the source file. This is because in LSMW the file is read for the length of the SOURCE STRUCTURE width only . So if i want to read only field3 in following example i still need toa dda dummy field to ensure LSMW reads a total width of source file as the FIELD3 is at absolute end of the source file from length 40 to 60 only .

For example :

if my source file ahs following firve fields : FIELD1 (10) , FIELD2(30),FIELD3 (20) .

Declare your source structure as : FIELD3 (20),FIELD_DUMMY (40) .

2. When you deifne the source file in LSMW step 7 take care to notify whether you have field names at start of file or the field order is same as

source structure .

This should close your issue or get in touch for more here buddy

Read only

0 Likes
484

Milind, that fixed the problem. Thank you.

Read only

0 Likes
484

Welcome buddy !!