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: 

Avoid Time Out

Former Member
0 Kudos

Hi All,

I have created a report which is getting auto refresh every after 1 min. Now this report will be always open on one screen but nobody will work on this session, and this report should not be Timeout .

Can we avoid timeout for this report? Because ideal session will time out after some time .

With Regards

Jitendra

33 REPLIES 33

Former Member
0 Kudos

Every minute? Running indefinetely? Unless the time-out is completely removed i don't think that is possible.

Better try to schedule a job that does the trick.

Mind you: i have no clue what your report is supposed to do.

0 Kudos

actually this is plan vs production report which will be displayed on a big screen . there is very less amount of data .

Edited by: Jitendra Singh on Sep 27, 2011 2:17 PM

0 Kudos

Hi

You can call a COMMIT in order to reset the time

Max

0 Kudos

Hi Max,

thanks to reply .

Can you elaborate ?

Jitendra

0 Kudos

The statament COMMIT WORK can reset the time so the session shouldn't raise the dump for time out

So I don't know how you do the autorefresh, but I suppose you've a cycle, so you can insert that statament into the cycle:

Max

Former Member
0 Kudos

Hi,

Measure runtime and try using Commit work when the runtime exceeds the profile parameter for maximum runtime...if you donot have any database update activity in your program.

0 Kudos

Hi Srikanth,

Thanks for reply,

I used commit work statement but its not working .

Jitendra .

0 Kudos

Hi Jitendra,

Are you still getting time out dump after using commit work statement?

0 Kudos

Hi Srikanth ,

Yes i am still getting time out .

This this the sample code. Can you please suggest me where should use commit work statement. I am using this statement after write statement but I think its not working because session getting time out .

Here is sample code of my program .

report  zauto no standard page heading.


data: g_init_once,
      ok_code(20),
      g_ref_from_timer.

types: begin of t_ekko,
  ebeln type ekpo-ebeln,
  ebelp type ekpo-ebelp,
  statu type ekpo-statu,
  aedat type ekpo-aedat,
  matnr type ekpo-matnr,
  menge type ekpo-menge,
  meins type ekpo-meins,
  netpr type ekpo-netpr,
  peinh type ekpo-peinh,
 end of t_ekko.

data: it_ekko type standard table of t_ekko initial size 0,
      wa_ekko type t_ekko.


if g_init_once <> 'X'.
  g_init_once = 'X'.
  call function 'ZTEST_FM'
     starting new task 'WAIT'
     performing when_finished on end of task.

endif.

write:/ 'wait for 10 sec....'.

at user-command.
  case ok_code.
    when 'FCT_R'.
      select ebeln ebelp statu aedat matnr menge meins netpr peinh
       up to 10 rows
        from ekpo
        into table it_ekko.
      write:/ sy-uzeit. "Time



      loop at it_ekko into wa_ekko.
        write:/ wa_ekko-ebeln, wa_ekko-ebelp.
      endloop.
      sy-lsind = 0.
      if g_ref_from_timer = 'X'.

        call function 'ZTEST_FM'
          starting new task 'INFO'
          performing when_finished on end of task.

        g_ref_from_timer = ''.

        commit work .

      endif.
  endcase.


*---------------------------------------------------------------------*
*       FORM WHEN_FINISHED                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  TASKNAME                                                      *
*---------------------------------------------------------------------*
form when_finished using taskname.
  receive results from function 'ZTEST_FM'.

  g_ref_from_timer = 'X'.

* Trigger an event to run the at user-command
  set user-command 'FCT_R'.
  ok_code = 'FCT_R'.
  sy-ucomm = 'FCT_R'.

endform.                    " WHEN_FINISHED

Jitendra

0 Kudos

Hi Jitendra,

Yes...i have faced a similar problem while implementing the parallel processing technique for processiing huge data.....I guess the timeout error occurs inside the parallel task of 'ZTEST_FM'...checkout the place(source code) where the dump points to....Please ensure that you take care of the global variables while executing the program in parallel processing, since there exists a possibility that the global varaibles can be shared among the sessions....

0 Kudos

Hi Srikanth,

Only this the code inside this function .



function ztest_fm.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------

wait up to 10 seconds .


endfunction.

Jitendra

0 Kudos

I cannot beleive how long this thread is going on for.

I presume the issue you have is with the actual SAP sessions timing out, not with the report timing out (runtime...which commit work) woudl resolve.

I do not know what refreshes the session timing. As the report runs every minute and still you are getting a sessions timeout, I suspect it may be a key stroke that may 'reset' this clock on a SAP session.

Are my assumptions correct.

0 Kudos

Yes Martin, you are correct . I am talking about the session timing .

Jitendra

Edited by: Jitendra Singh on Sep 28, 2011 1:07 PM

0 Kudos

Hi

I've tryed to run your code and I've got no dump for timeout: the program has been working for about 1h...

I've checked the process in SM50 and the time is currectly reset as soon as the COMMIT WORK is called

Max

0 Kudos

He is not talking about the runtime timeout, he is talking about session timeout.

0 Kudos

Yes Martin, you are correct . I am talking about the session timing .

So this is not an ABAP question at all. Please mark this as closed but unanswered, talk to your basis administrator and if you still have questions, post in the correct forum. I would suggest Netweaver administrator.

Rob

0 Kudos

Ok

Sorry...so it's not an abap problem

Max

Former Member
0 Kudos

In every 10 minutes. submit a zdummy program and return before refresh.

Take care.

Çağatay

Former Member
0 Kudos

Trying to get around the timeout problem with things like COMMITs is a poor solution. The parameters are set for a reason. If a program runs indefinitely, it will tie up a process.

Rob

0 Kudos

Rob you're right

I can only suppose our friend Jitendra has to run a program online, and this program can take a long time...of course he needs to know the risk he can have if he reset the time of a process.

Max

0 Kudos

Rob,

With all my respect, could you please suggest a solution instead of calling poor to suggested one.

0 Kudos

Hi Rob,

Is there any other solution to do that ? In my program there will be 20-25 records at a time, so data amount is very less. I just want that session should not be log-out is idle condition also.

Jitendra

0 Kudos

Hi ,

Please check

PPCOCOMM SAP Report - Report to avoid timeout

PPCOCOMM is a standard ABAP report available within your SAP system (depending on your version and release level).

It does the same LIke Commit Work .

You can call This report in your report at the end .

regards

Deepak.

Edited by: Deepak Dhamat on Sep 28, 2011 9:06 AM

0 Kudos

Hi All ,

This this the sample code. Can anybody suggest me where should use commit work statement. I am using this statement after write statement but I think its not working because session getting time out .

Here is sample code of my program .

report  zauto no standard page heading.


data: g_init_once,
      ok_code(20),
      g_ref_from_timer.

types: begin of t_ekko,
  ebeln type ekpo-ebeln,
  ebelp type ekpo-ebelp,
  statu type ekpo-statu,
  aedat type ekpo-aedat,
  matnr type ekpo-matnr,
  menge type ekpo-menge,
  meins type ekpo-meins,
  netpr type ekpo-netpr,
  peinh type ekpo-peinh,
 end of t_ekko.

data: it_ekko type standard table of t_ekko initial size 0,
      wa_ekko type t_ekko.


if g_init_once <> 'X'.
  g_init_once = 'X'.
  call function 'ZTEST_FM'
     starting new task 'WAIT'
     performing when_finished on end of task.

endif.

write:/ 'wait for 10 sec....'.

at user-command.
  case ok_code.
    when 'FCT_R'.
      select ebeln ebelp statu aedat matnr menge meins netpr peinh
       up to 10 rows
        from ekpo
        into table it_ekko.
      write:/ sy-uzeit. "Time



      loop at it_ekko into wa_ekko.
        write:/ wa_ekko-ebeln, wa_ekko-ebelp.
      endloop.
      sy-lsind = 0.
      if g_ref_from_timer = 'X'.

        call function 'ZTEST_FM'
          starting new task 'INFO'
          performing when_finished on end of task.

        g_ref_from_timer = ''.

        commit work .

      submit ppcocomm and return .

      endif.
  endcase.


*---------------------------------------------------------------------*
*       FORM WHEN_FINISHED                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  TASKNAME                                                      *
*---------------------------------------------------------------------*
form when_finished using taskname.
  receive results from function 'ZTEST_FM'.

  g_ref_from_timer = 'X'.

* Trigger an event to run the at user-command
  set user-command 'FCT_R'.
  ok_code = 'FCT_R'.
  sy-ucomm = 'FCT_R'.

endform.                    " WHEN_FINISHED

Jitendra

0 Kudos

Hi All ,

This this the sample code. Can anybody suggest me where should use commit work statement. I am using this statement after write statement but I think its not working because session getting time out .

Here is sample code of my program .

report  zauto no standard page heading.


data: g_init_once,
      ok_code(20),
      g_ref_from_timer.

types: begin of t_ekko,
  ebeln type ekpo-ebeln,
  ebelp type ekpo-ebelp,
  statu type ekpo-statu,
  aedat type ekpo-aedat,
  matnr type ekpo-matnr,
  menge type ekpo-menge,
  meins type ekpo-meins,
  netpr type ekpo-netpr,
  peinh type ekpo-peinh,
 end of t_ekko.

data: it_ekko type standard table of t_ekko initial size 0,
      wa_ekko type t_ekko.


if g_init_once <> 'X'.
  g_init_once = 'X'.
  call function 'ZTEST_FM'
     starting new task 'WAIT'
     performing when_finished on end of task.

endif.

write:/ 'wait for 10 sec....'.

at user-command.
  case ok_code.
    when 'FCT_R'.
      select ebeln ebelp statu aedat matnr menge meins netpr peinh
       up to 10 rows
        from ekpo
        into table it_ekko.
      write:/ sy-uzeit. "Time



      loop at it_ekko into wa_ekko.
        write:/ wa_ekko-ebeln, wa_ekko-ebelp.
      endloop.
      sy-lsind = 0.
      if g_ref_from_timer = 'X'.

        call function 'ZTEST_FM'
          starting new task 'INFO'
          performing when_finished on end of task.

        g_ref_from_timer = ''.

        commit work .

      submit ppcocomm and return .

      endif.
  endcase.


*---------------------------------------------------------------------*
*       FORM WHEN_FINISHED                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  TASKNAME                                                      *
*---------------------------------------------------------------------*
form when_finished using taskname.
  receive results from function 'ZTEST_FM'.

  g_ref_from_timer = 'X'.

* Trigger an event to run the at user-command
  set user-command 'FCT_R'.
  ok_code = 'FCT_R'.
  sy-ucomm = 'FCT_R'.

endform.                    " WHEN_FINISHED

Jitendra

0 Kudos

Hi

Which session?

You 're running a function in a new session

Max

kesavadas_thekkillath
Active Contributor
0 Kudos

We did some thing similar to this long back,

Executed this program in background ( with some intervals set ) which generates (overwrite mode) a file in application server. And a third party system which access this file via RFC( used SAP DCOM ) and displays the values in LCD ( or what ever it is ). There was a delayed time for the output.

But executing the same program in a session conitnously sounds bad,instead you can go for Repeat execution in background job.

Keshav

0 Kudos

Hi Keshav ,

I think Repeating Execution in Background is Correct Option , so as to avoid Performance issue of the system .

But for His Requirment to Display that Refreshed Data Continously . WHat would be better Option ? .

IF Report is executed Background Then he will not be able to see Data on Screen .

@keshav : Please Throw some light on SAP DCOM

Regards

Deepak.

Edited by: Deepak Dhamat on Sep 28, 2011 9:24 AM

0 Kudos

IF Report is executed Background Then he will not be able to see Data on Screen .

Hi,

As said we did it using a third party software interaction with SAP & to be frank i dont have any idea how to display directly from SAP( I suppose OP is displaying the R/3 directly , But no idea how he is doing it).

SAP DCOM is a ancient method of calling a RFC from third party softwares . Dcomm generates a dll file( which is used in the ASP,dot net etc to invoke the RFC. Its has some steps which i forgot

0 Kudos

Possibly he is refreshing the data in an endless DO-ENDDO loop.

0 Kudos

Possibly he is refreshing the data in an endless DO-ENDDO loop.

Well if that is the case , the infinite processing would result in memory/storage..... limit some day

kesav

Former Member
0 Kudos

Hi,

Since your program execution time and amount of data to be displayed is very low. I suggest you to check below great article. This is very simple and easy to develop. The Google gedget will show data and can refresh automatically to a preset value. There is no time out issue..

Check the blog.. Its really interesting..

[Getting SAP to talk to Google Gadgets|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70ed80f3-5964-2e10-90b9-e833ade5e8c5]

Regards,

Ravi.

0 Kudos

I was also thinking this is a task for a Yahoo Widget. As SAP is not designed for this functionality.