‎2011 Apr 27 6:22 AM
Hi,
I have a program which is running slow in the foreground. The transaction has two buttons - Save and Continue. If i choose some entry and click on the save
button it works fine but the problem is with the continue button.IF i choose some entry and click on the continue button it should give me an alv output but instead
it gets timed out. Is it possible to schedule background job for the COntinue button alone? IF so, can you please tell me how.
Thanks,
Prem
Moderator message: please use more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Apr 27, 2011 3:35 PM
‎2011 Apr 27 7:28 AM
Hi,
Using ABAP runtime analysis (SE30), try to find out the piece of code which is consuming more time. Try to correct the particular code and execute the transaction in foreground itself.
Otherwise using the transaction input scenarios, create a report program to display the ALV output and schedule this report program in the background.
Or else try by developing a BDC program for your transaction with the CONTINUE button and schedule this BDC program in the background to get the report output.
Thanks & Regards,
Harish
‎2011 Apr 27 7:40 AM
Hi,
Try to improve the performance of the report.
regards,
Sakshi
‎2011 Apr 27 8:01 AM
Thanks for your inputs. Can you please tell me how to create background job for the CONTINUE button. Like isn't there a way by which all the set of statements that gets executed on clicking the CONTINUE button should be done in background
‎2011 Apr 27 8:21 AM
Hi,
When you press the CONTINUE Button you can use the Function Modules JOB_OPEN & JOB_CLOSE.
DATA: w_jobacount TYPE tbtcjob-jobcount,
w_jobname TYPE tbtcjob-jobname.
w_jobname = 'jobname'.
*$ Creates Job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_jobacount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
" Your Processing
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobacount
jobname = w_jobname
strtimmed = c_x "Immediate start.
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Ernesto.
‎2011 Apr 27 11:22 AM
Hi Prem,
Instead of Scheduling BG Job Try this FM 'SAPGUI_PROGRESS_INDICATOR'
Eg :
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 30
TEXT = 'please wait data extracting '.
Regards
Rajashiva Ramalingam
‎2011 Apr 27 2:55 PM
Hi premkumarwow
create a batch-input session for this, run as job. Use transaction SHDB to create program.
Regards,
Clemens