Skip to Content

OPEN DATASET reading file from network causing 6 minute delay

We have a function module that is called 3,000+ times a day. It usually take 3-5 seconds but sporadically about a dozen times a day it takes 6 minutes and it's always 6 minutes. We have narrowed down the offending logic to

OPEN DATASET p_pathfile FOR INPUT IN BINARY MODE.

READ DATASET p_pathfile INTO gt_bitmap-orblk LENGTH g_len.

CLOSE DATASET p_pathfile.

p_pathfile is a BMP file located on our network. The size of the file is always the same. The 6 minute delay is never the same time of day or during any common processing.

Anybody have any ideas???

We are stumped...

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jul 05, 2016 at 05:46 PM

    Hi Chad,

    I am not sure if this one will help but when it comes to reading file there's a new FM called GUI_UPLOAD that reads the data from a file. I am not sure if this is an option for you but this will help you read your data easily without the need to commit and open and close.

    If it is possible to rewrite or replace the OPEN DATASET, please do so as this is the new means of reading the file without hassle especially in basic reading of files.


    Hope this helps,


    Regards,
    Ryann

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 01, 2016 at 01:51 PM

    Network problems during the read may be the issue. Solution may be to redesign this function module to get the BMP file from local drive.

    And then, design a separate report job, to periodically check the update timestamp of BMP file on the network server, and if changed, then copy that file onto the local drive.

    Thanks,

    Juwin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 01, 2016 at 03:07 PM

    If your function module is started from within a job, do you see a delayed start in SM37? Maybe the job cannot start immediately (no BGD workprocess available at the second it is launched, and you have a delay of 300 seconds in the profile parameter rdisp/btctime?

    Add a comment
    10|10000 characters needed characters exceeded

    • The function module starts when expected. We added logging (writing entries into custom logs) within the function module to pinpoint exactly what code is causing the issue. We moved the logging around until we were able to figure out what commands were causing the delay. We were able to pin point these commands because we wrote a START log message prior to the OPEN DATASET and an END log message after the CLOSE DATASET command and the difference in times was the mysterious 6 minute delay.

  • Posted on Jul 01, 2016 at 06:24 PM

    You should post your question to the Administration forum. You should also give the details of your landscape (network, OS, application servers), file systems, and so on.

    By the way, could it be possible that you have several application servers, and only one have a problem? (in the trace, retrieve the current AS)

    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.