Skip to Content
author's profile photo Former Member
Former Member

LSMW - Legacy Data on the R/3 server (application server)

Hello,

I defined 2 LSMW for tcode F150. With the first one I define de parameters for F150 and with the second one I run the tcode F150.

For the both LSMW I want to read the data from the application server because after that I want to run them as a periodic background job.

If I run the LSMWs and I read data from the PC they both work fine.

If I run the LSMWs and I read data from the application server, for the first LSMW no data is read, and for the second one I get the message "Unable to read file F150_2.txt".

Could someone give me a piece of advice?

For more info:

I defined the menu paths and the files with TCode FILE and I uploaded the text files with TCode CG3Z.

If I check in AL11 I can see that the files contain the right data, except that there are some special characters "#" .

In the FILE TCode:

File 1:

Logical path Z_F150_1

Name Parametrii Somatiii F150

Syntax group WINDOWS NT Microsoft Windows NT

Physical path /Z_F150_1/<FILENAME>

Logical file F150_1

Name Parametrii Somatiii F150

Physical file F150_1.txt

Data format ASC

Applicat.area BC

Logical path Z_F150_1

File 2:

Logical path Z_F150_2

Name Rulare Somatii - F150

Syntax group WINDOWS NT Microsoft Windows NT

Physical path /Z_F150_2/<FILENAME>

Logical file F150_2

Name Rulare Somatii - F150

Physical file F150_2.txt

Data format ASC

Applicat.area BC

Logical path Z_F150_2

In the AL11 TCode in the directory DIR_TEMP I can see the files with the correct data (except the "#" mark):

Directory: .

Name: Z_F150_1

DATA1#ID#DATA2#DATA3#ZONA

#ID5###MOL

#ID6###MUN

Directory: .

Name: Z_F150_2

DATA1#ID#DATA2#ID2#DATA3

#ID5##ID5#

#ID6##ID6#

And for eg. for the secon LSMW in the "Specify Files" step I defined the "Legacy Data" like this:

"Files

Legacy Data On the PC (Frontend)

Legacy Data On the R/3 server (application server)

F150_2 F150_2.txt

Data for One Source Structure (Table)

Separator Tabulator

Field Names at Start of File

Field Order Matches Source Structure Definition

With Record End Indicator (Text File)

Code Page 4110

Imported Data File for Imported Data (Application Server)

Imported Data Z_F150_RULARE.lsmw.read

Converted Data File for Converted Data (Application Server)

Converted Data Z_F150_RULARE.lsmw.conv

Wildcard Value Value for Wildcard '*' in File Name

"

Thank you!

Daniela

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 06, 2012 at 12:02 PM

    Hi,

    .txt should work for you. What I think you are missing the complete path of your file in the specify file step. In the file field specify the full path e.g. /tmp/<file>.txt. When you run AL11 and open the file in the folder you can see the entire path(Directory) in the top left hand corner. Just copy and paste that and add the file name in your specify file section. It should work.

    Regards,

    R

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Jürgen Lins

      Hello all,

      Thank you all for your answers.

      The main problem was the path of the file.

      For the second LSMW it was my mistake. Instead of specifying the logical file D:\usr\sap\DEV\DVEBMGS00\work\Z_F150_2 I specified the physical file F150_2.txt.

      Thank you again.

      Daniela

  • Posted on Nov 06, 2012 at 11:15 AM

    Hello Daniel,

    I might completely be wrong in this - but once I had same issue.

    I was also trying to get the file from APP server and file was containing the # characters, though I was never had a file with those damn # characters.

    So I did lot of searching for non-unicode format, codepage, upload, application server file stuff and all, it was damn hectic.

    I just tried using .DAT file and it worked. I still don't know how it worked but instead of .TXT I took .DAT.

    I don't know may be you could try the same thing, hope could work for you.

    + If you get any solution please post it back that how you solved it. Everyone out there facing same problem will get an aid from your answer. 😊

    Thanks.

    Ravindra Sonar.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Ravindra,

      I have changed the file format in the FILE tcode and I have uploade the .dat file in the CG3Z tcode.

      But after that, in the "Specify Files" step, when I changed the file to .dat I got the message:

      "Warning: Unable to read file 'F150_1.dat'.

      Operating system message: No such file or directory."

      Also, if I check the files in AL11 I still see "#" characters.

      If I get any solution for this issue I will post it back.

      Thank you!

      Daniela

  • Posted on Nov 07, 2012 at 07:32 PM

    I believe either you have a wrong pathname or you have no authorization to read the files from that directory (it's not SAP authorization, it's access on server level). A Basis admin should be able to help in both cases.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.