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

Error reading file with function module RZL_READ_DIR_LOCAL

Former Member
0 Likes
2,795

Hi,

I'm having a problem reading files from the application server using function module RZL_READ_DIR_LOCAL. The function module returns the exception NOT_FOUND when I call it to read a file that I known is on the server at the path specified. I traced the problem to system function call - ALERTS in the function module. Your help will be appreciated.

Thanks

8 REPLIES 8
Read only

Former Member
0 Likes
1,905

Works fine for me. make sure you have access to that directory.

directory path should be as follows:


wlappserver\directory\

Where directory is a share created on the app Server. I assume SAPSERVICE user should have access to this directory as well.

A

Read only

Former Member
1,905

Are you calling it from SE37 or a custom program? It doesn't seem to work from SE37.

(Yes it does - you have to check "case sensitivity".)

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
1,905

Rob.

Thank you so much. It solved my problem.

Regards.

Read only

Former Member
0 Likes
1,905

Hi,

Thanks for the suggestions. I checked the function module again and it seems that it is returning the data from the file via the table parameter even though the exception NOT_FOUND is thrown. Is this normal for this function module?

Read only

0 Likes
1,905

Normal? I don't think it's possible. Please re-check your analysis.

Rob

Read only

0 Likes
1,905

OK - you sent me an e-mail with a screen shot showing what you described.

1) I guess it is possible - this FM is not released for customer use, so you use it at your own peril. Maybe ALERTS doesn't return a non-zero return code if it doesn't find anything.

2) You hadn't selected upper/lower case like I first suggested. Unix files are case sensitive.

3) There must be somnething else going on here:

  call 'ALERTS'  id 'ADMODE'       field ad_rzl
                 id 'OPCODE'       field rzl_op_rd_dir
                 id 'FILE_NAME'    field full_name
                 id 'DIR_TBL'      field line_tbl-*sys*.

  case sy-subrc.
    when 0.   loop at line_tbl.
                file_tbl-size = line_tbl(11).
                file_tbl-name = line_tbl+12.
                append file_tbl.
              endloop.
    when others.  raise not_found.
  endcase.

I think file_tbl is somehow retaining entries from a previous execution.

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
1,905

Hi

I have an issue reading file using the function module RZL_READ_FILE

the function module is not reading the complete file. it reads only 10,000 lines in to the internal table

any idea on this issue ?

thanks in advance

Read only

0 Likes
1,905

This message was moderated.