Background processing thru submit
Dear All,
I am using Job_open, Submit <> via Jobname <> and job_close option. but still I am unable to execute the report in background as the same doesn't get schedule. I wanted to konw how the name of the job should be specified as it is not creating any job with the name i am providing.
regards
ag
Hello Friend,
Try this code for example.
Say you have two programs prog-1 and prog-2 may or may not have same selection-screen parameters. And you are calling prog-1 from prog-2.
Write the below code in prog-2.
Select-options:...................
DATA: jobnam TYPE btcjob value 'JOB1',
job_released TYPE c,
cnt LIKE tbtcjob-jobcount,
stpn LIKE tbtcjob-stepcount,
strim TYPE c VALUE 'X',
p_params like pri_params.
initialization.
start-of-selection.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = jobnam
SDLSTRTDT = sy-datum
SDLSTRTTM = sy-uzeit
JOBCLASS = 'A'
IMPORTING
JOBCOUNT = cnt
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
expiration = 8
immediately = ' '
new_list_id = 'X'
no_dialog = 'X'
release = 'X'
IMPORTING
out_parameters = p_params
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
SUBMIT prog-1 TO SAP-SPOOL
SPOOL PARAMETERS p_params
WITHOUT SPOOL DYNPRO
VIA selection-screen
USER sy-uname
VIA JOB jobnam NUMBER cnt AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = cnt
jobname = jobnam
strtimmed = 'X'
IMPORTING
job_was_released = job_released
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.
end-of-selection.
Hope this is helpful, if so reward.
Regards,
Vijay
Similar Messages
-
Force Background processing with SUBMIT and keeping results in memory
Hi Everyone
I have a very tricky issue that i need some help with.
I have a developed an RFC that allows a NON-SAP front-end to execute reports in the SAP backend the result of the report is saved in memory and formatted to XML and passed to the front-end where the report is displayed.
Therefore for this to work i have added the following code
g_guid = cl_salv_export_db_storage=>create_guid( ).
" Set ALV memory parameters
export l_mode = 'M' to memory id 'ALV_EXTRACT_MODE'.
export l_guid = g_guid to memory id 'ALV_EXTRACT_GUID'.
"Execute the selected report
SUBMIT (wlv_report_name)
USING SELECTION-SET wlv_variant_name
WITH PNPTIMED EQ ' '
WITH PNPBEGDA EQ im_begda
WITH PNPENDDA EQ im_endda
WITH PNPPERNR IN wlr_employee
AND RETURN.
data: l_xstring type xstring.
l_xstring = cl_salv_export_db_storage=>import_xmlstring(
guid = g_guid ).
This allows me to get the report results to be passed to the front-end.
This works quite good for most reports but in some cases the reports has a popup message. In this case the execution fails as the report is not executed as a background job (if the report is executed in the background then the popups are ignored).
The issue is that the reports cannot be executed in the background as the memory will then not contain the report results and secondly the client does not want to use the spool for the report results at all. The second constraint is that the client does not want to alter the reports in any form to remove the popups due to the large volumes of reports.
What i have noted is that if the report is executed and i set the SY-BATCH parameter to "X" then it works perfectly (via the debugger). I can change the SY-BATCH value in my code but obviously once the SUBMIT is executed the SY parameters are reset.
My question is: Is there a way to force the SY parameter values when i perform a SUBMIT? Or is there any other possible solution to this issue?If you want to go with the option of spool, then you can use the following addition
SUBMIT <reportname> to SAP-SPOOL
SPOOL PARAMETERS <print_parameters>
WITHOUT SPOOL DYNPRO and RETURN.
and then read the spool,
if you want to go with the option of a background job, then you can use the following addition
SUBMIT <reportname> VIA JOB <name> NUMBER <num> AND RETURN.
<name> and <num> are generated using FM JOB_OPEN, and then you have to close it using JOB_CLOSE.
Thanks. -
Submit Report (Regarding Background Processing)
Hi Guru's,
I want help regarding Background Processing.
I have developed a program which is running fine in forground but in Background mode no values are comming.
All values are becomig Zero.
Plz help.
*--- Submit Report for 'COGI' (Postprocessing of Error Records from Automatic Goods Movements)
SUBMIT coruaffw USING SELECTION-SCREEN '1000'
WITH r_cumul = 'X'
EXPORTING LIST TO MEMORY
AND RETURN.
*---- Get the List
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = it_list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
*--- Convert to Ascii
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listobject = it_list_tab
listasci = it_asci_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE i000 WITH 'Problem in converting LIST to ASCII'.
ENDIF.
DESCRIBE TABLE it_asci_tab LINES w_cogi.
w_cogi = w_cogi - 5.
CALL FUNCTION 'LIST_FREE_MEMORY'
TABLES
listobject = it_list_tab.Hi Arbind,
You have used return you need to add the addition with.Try this way hope it works
SUBMIT zreport EXPORTING LIST TO MEMORY
AND RETURN
WITH P_1 = P_1
WITH P_2 = P_2
WITH P_3 = P_3
WITH S_4 IN S_4
WITH S_5 IN S_5
WITH S_6 IN S_6. -
Connot submit batch - Unable to connect background process?
Trying to export 60 min high quality mpeg and get the following message: "Connot submit batch - Unable to connect background process"
I use FCP 4.5 HDYou don't give many details but Jon Chappell of DigitalRebellion has produced a free utility to help with Compressor problems.
He posted these details recently:-
"It seems like a number of people on this forum are having problems submitting batches from Compressor, so I created a utility to diagnose and fix some of those problems.
Compressor Repair will check all necessary files exist on your hard drive and that permissions are set correctly. It also resets Qmaster, trashes the Qmaster spool directory and launches qmasterd."
http://www.digitalrebellion.com/downloads/CompressorRepair.zip -
"cannot submit to background processing" while converting
Post Author: PAyalon
CA Forum: .NET
Hi.
In my web application I export reports to PDF, it's works fine on dev server, but throws exeption on IIS:
"Error in File C:\WINDOWS\TEMP\temp_0d804620-e578-40f0-947e-7bd11af7e3a4.rpt: The request could not be submitted for background processing."
I gave already all permissions to IIS_WPG and ASP.Net user but it still do not work.
On my develop machine (win Xp) both servers work fine.
My be I have a problem with license, course my test machine is server with 2 processors?Thanks, after a looooong night of re-installing
back from DVD to 10.4, then up to 10.43,
then re-installing FCP 4 and DVDSP 3, and doing all patches, both my Compressor 1.21 works great as before, and I got my printer settings back.
An added bonus: 10.4 dumped my "processor" control panel, but A.Pack is working fine now, with BOTH processors! I guess with Tiger, you
no longer need to utilize the "turning off of one processor fix" for A.Pack? -
Post Author: thecoffeemachine
CA Forum: .NET
I already posted this message in other Web sites, but I am almost getting crazy here and I need help:
HI:
The Web application I am testing was having several issues related to loading Crystal Reports. It was fixed and I do not know which of the 1000 things I did to fix it; but now it began, again, to have the same behavior after I had a conflict with another Web site that was in the same server.
The thing is that I had another virtual directory where resided a copy of the same Web app. for testing purposes/working with the Visual Studio. The reports were loading all fine, very fast, all perfect... And suddenly the assemblies of one Web site and the other began to "blend" together and..... well the same behaviors appeared again. I tried to copy the last stable backup and rebuild the Web app... but it did not work.
At the very first time that one requests the report, it shows without problem. At the second time it shows an error message related to "cannot submit to background processing", and sometimes "object not set to an instance.." ... and on the third time it just never shows up and the app. becomes unresponsive. I have to close the window and request the Web site again in another browser window. If I wish to see the report again I have to wait for hours until it shows it.
I am using Visual Studio 2003 and the Crystal Report version that was shipped with that Visual Studio version. I am working with Windows Server 2003 and SQL Server 2000. Below is the VB code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.SqlConnection1.Open()
Me.SqlSelectCommand1.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandReferences.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandTextbook.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandObjectives.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandTopicData.Parameters("@CourseCode").Value = Request.QueryString("CD") Me.SqlSelectCommandCourseOutcomes.Parameters("@CourseCode").Value = Request.QueryString("CD")
Me.SqlDataAdapterMainData.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseSyllabusData") Me.SqlDataAdapterReferences.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseReferenceData") Me.SqlDataAdapterTextBook.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseTextbookData") Me.SqlDataAdapterObjectives.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseObjectivesData") Me.SqlDataAdapterTopicData.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseTopicData")
Me.SqlDataAdapterCourseOutcomes.Fill(Me.DtsSyllabusCompleteData1, "procWebSelectCourseOutcomes")
Dim myExportOptions As CrystalDecisions.Shared.ExportOptions Dim myDiskFileOptions As CrystalDecisions.Shared.DiskFileDestinationOptions Dim myExportFile As String Dim myReport As New ABETFormat myReport.SetDataSource(Me.DtsSyllabusCompleteData1)
myExportFile = "C:UNTempPDF" & Session.SessionID.ToString & ".pdf" myDiskFileOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions myDiskFileOptions.DiskFileName = myExportFile myExportOptions = myReport.ExportOptions
With myExportOptions .DestinationOptions = myDiskFileOptions .ExportDestinationType = .ExportDestinationType.DiskFile .ExportFormatType = .ExportFormatType.PortableDocFormat End With
myReport.Export()
Response.ClearContent() Response.ClearHeaders() Response.ContentType = "application/pdf"
Response.WriteFile(myExportFile) Response.Flush() Response.Close() System.IO.File.Delete(myExportFile) Me.SqlConnection1.Close()
End Sub
I already have tried moving the Crystal Reports dll´s to the bin directory. ..... I have tried calling the Garbage Collector at page unload...I also have checked, inside the report, that the database is "up to date"... ... recycling the worker process of the IIS... etc...
I see that, in debbuging mode inside the Visual Studio, when the page loads the debbuging window shows a message notifying that the symbols related to the Crystal Reports dll's could not be loaded.
Should I need to modify the default properties of the database? I checked "database is case insensitive", "use indexes or server for speed".. I have tried checking and unchecking the box "performing grouping on server"
Oh by the way, my report has about 4 subreports in it. Each report loaded shows 1 or 2 pages.
ANY HELP WILL BE EXTREMELY APPRECIATED....
MMSSee [Crystal Reports For Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23&overridelayout=true] article, page 107 and on for details on how to use Crystal reports in session.
Ludek -
Workflow not working in Background Processing
Hi All,
I am relatively new to Workflow. Currently, I am creating Deliveries (preferably in background) once a Sales Order is created. I am using an ABAP Class as the object method to submit the sales order number to the delivery processing method (which just submits basic information to standard SAP transaction VL04). I found that if the execution of the delivery creation task is not in Background Processing (the user manually kicks off the Delivery creation in SBWP) the workflow works as expected and creates the deliveries. However, if the Background Processing is checked, the workflow does not process and does not create a delivery. Is there any specific reason as to why the workflow will not work in background?
Any help you can give would be greatly appreciated. Thanks.
JohnHi,
John
See to process a Back ground task, there should be a proper parameter flow.
Please look at the import parameters in the method you are using to process the back ground task..
If proper import parameters are passed then the task will work
This should help..
Thanks,
Shanky -
Background processing of Program
Hi all,
I have a requirement of background processing of a program which is called from another program.
Requirement : during execution of Program A, Program B is Submitted to run in background with two field values from Program A.
Is it possible ? I am able to explore it. Please help.
Regards,
NibhaDATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
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.
ENDIF.
ENDIF.
ENDIF.
System fields
sy-subrc Meaning
0 Background task scheduled successfully.
4 Scheduling cancelled by user on the selection screen.
8 Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
12 Error in internal number assignment. -
How run a report in background process ?
Hi Experts,
I wrote a code in which I am have multiple selection screens....means in first screen there will 3 radio buttons.
So, depending upon the radio button selected, the other selction screen will be displayed...
So, here i want to run a report in background process...But in menubar im not able to find 'program'.
So, please help me this to run my report in background process.. with any simple code...
Thanks,
Rocky.Hi,
Try to see this example and adapt it for your case:
constants : c_jobname like tbtcjob-jobname value 'ZRFC_CM_38',
c_jobclass like tbtcjob-jobclass value 'A',
c_x type c value 'X',
c_msgclass type arbgb value 'ZXXXSD',
c_error type bapi_mtype value 'E',
c_status type bapi_mtype value 'S',
c_msg1 type msgnr value '177',
c_msg2 type msgnr value '178'.
data : v_jobcount like tbtcjob-jobcount.
ranges:
r_auart for vbak-auart,
r_wbstk for vbuk-wbstk,
r_mtart for mara-mtart,
r_reswk for ekko-reswk,
r_vtweg for vbak-vtweg.
call function 'JOB_OPEN'
exporting
jobname = c_jobname
importing
jobcount = v_jobcount
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if sy-subrc = 0.
Assignment of Ranges
append lines of:
distribution_channel to r_vtweg,
order_type_range to r_auart,
status_range to r_wbstk,
material_type_range to r_mtart,
plant_range to r_reswk.
Submit program in background
submit z_beve_salesorder_list
with p_spart = division
with p_file = file_name
with p_land1 = country
with s_vtweg in r_vtweg
with s_auart in r_auart
with s_wbstk in r_wbstk
with s_mtart in r_mtart
with s_reswk in r_reswk
via job c_jobname
number v_jobcount
and return.
Close the Job
call function 'JOB_CLOSE'
exporting
jobcount = v_jobcount
jobname = c_jobname
strtimmed = c_x
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
others = 9.
if sy-subrc = 0.
Status Message
return-type = c_status.
message id c_msgclass
type c_status
number c_msg1
into return-message
with c_jobname
sy-datum
sy-uzeit.
else.
Error Message
return-type = c_error.
message id c_msgclass
type c_error
number c_msg2
into return-message
with c_jobname.
endif.
endif.
Regards. -
Report Execution - Background Process
Hi Friends,
I have developed a report program.
I have also created a transaction code for executing it.
Now the user needs to execute this program as a background job.
I have tried with SM36 and SM37 transactions. Here, you need to set the variants and time for execution.
But the user has lots of selection criteria and setting the variants for this requirement is highly impossible.
Kindly let me know whether I can add any additional statements in the program so that the program executes as a background process when initiated th' the selection screen / transaction code.
Kindly provide your suggestions.
Thanks in advance.Hi Karthik,
Looks like a wrapper ABAP program is required to meet your requirement. This program can be called in the background and in turn can submit the report program that you have created to achieve the actual functionality.
In this wrapper program, you need to create a dynamic variant using FMs (search RSVARIANT in SE37). Here you can populate the fields of the selection screen based on any complex criteria as you mentioned using ABAP statements. The dynamic variant is similar to the variants created on the selection screen.
Once you have the variant (dynamic) ready you can create a background job and submit it within this wrapper program, for which you again have to use the FMs (search createjob*, and go to the function group).
You have to release the submitted job and you can get the status of the job while it is running using the standard FMs provided for this.
Finally, you can create a spool list for the wrapper program that can detail the status of the submitted job.
It is a good idea to delete the dynamic variant once it ahs been used because if required again, it can be created again. If the dynamic variant is created daily or several times a day, it is definitely good to delete it after the use. The right place to do deletion is at the end of the wrapper program after confirming that the job submitted has completed. Or as an alternate strategy, all variants prior to a week can be deleted when the wrapper program runs today (we are using this strategy).
I have used this successfully.
Hope this helps.
Thanks
Sanjeev -
BDC (Background processing in call transaction )
Frnds how to go for background processing in " call transaction method"
We know that " NO display" mode is there but any other method is there in real time.
> in session method while data is getting uploaded suddenly server stops then how to upload the data from the last record where the server stopped.
plz help.
regards,
satyaHi
u have to use No Display mode in call transaction...there is no other go for this...
Otherwise opt for session method and using SUBMIT rstbdcsub. process in background.
When server stops mean while the processing of the session, u can get the processed records info by the log and you can process the failed / un processed records now by foreground in sm35 or u can process the entire file again or u can create the file with only failed records and process .
Regards,
kumar -
Background Processing & Update Task
Are "background processing" and "update task" processing the same? I have a function which is timing out and I need to have it run in the background. If I used the CALL FUNCTION <name> IN UPDATE TASK, would that provide the same resource level and time allowance as having the logic run via a SUBMIT?
Hi,
This is the F1 documentation for calling a FM in Update task
Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task.
This is the F1 documentation for calling a FM in background task
Flags the function module func to be run asynchronously. That is, it is not executed at once. Instead, the data passed using EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
Hope this helps
Regards,
San -
Can't find background processes in compressor 2.0.1
I am working with Compressor 2.0.1 and have been trying to convert FCP files to burn to a dvd but when I go to submit a batch, I keep getting a window saying that it cannot submit because it can't find the background processes. I tried reseting the background processes several times but it still won't do anything. I recently upgraded my mac operating software to 10.5.8, could this have something to do with it?
Thanks for any help,
DougTry this search:
https://discussions.apple.com/search.jspa?resultTypes=&dateRange=all&peopleEnabl ed=true&q=background+processes&containerType=14&container=2732&username=&rankBy= relevance&newq=background+processes*&numResults=15 -
Compressor error message "Unable to connect to background process"
My compressor application became corrupted and showed 2220 hours to convert a FCP file of 65 min to a 90 min mpeg2. After re-installing Compressor every time I try to submit a file I get the error message "Unable to connect to background process"? I tried resetting the background as instructed in the manual but continue to get the same message?
Anybody ever encountered this problem?Ya I am also getting the same problem I asked here on forum.
some solution is here
http://www.kashum.com/rbf.pl?c=blog&i=1152611689&referer=r
on this link
http://support.apple.com/kb/TA47672?viewlocale=en_US
but they have not worked for me. -
"Unable to Connect to Background Process." Revisited
Hello,
I am getting the dreaded "Unable to Connect to Background Process."
YES I tried the apple suggestion. I also tried the hostconfig suggestion (that one was a mistake!). Archive instal on the system then a re instal of Compressor & Q Master and no luck.
I did notice one thing in activity monitor "Compressord (Not Responding)" It is hung force quit it and re launch compressor again and it dose that.
Same is true on my PowerBook G4 17 and my New MacBook Pro 17 (Witch I migrated from the PowerBook)
I am use Compressor 2.1
Not sure where to go from here.
Thanks for any info you can give me!
Shaun
MacBook Pro 17 inch Mac OS X (10.4.6) 2 GB Ram 100 GB 7200 RPM DriveRobert's suggestion above is the only thing that worked for me. I tried all of the other "fixes" on this and other threads, but nothing solved the problem until I did this:
- Quit Compressor
- Run Terminal and then enter...
sudo /Library/StartupItems/Qmaster/Qmaster
...and enter your system password.
- Re-Run Compressor and re-submit the batch and it
should work. Sometimes you need to wait a minute or
so for Qmaster to get "up and running" but it has
always worked for me. And Qmaster keeps running
until you reboot.
Hopefully, this will help someone else with the same problem.
G5 Mac OS X (10.4.6)
Maybe you are looking for
-
How to make something like this
This is a starbucks commercial : http://www.youtube.com/watch?v=0xAwKBywrEk I've got a few questions : - Do you think this is done in Motion? After Effects or Flash or...? - What technique is used in this clip? ( I really like how the graphics 'join
-
Scenario By default it will sign in with current Microsoft account, if a user accesses Microsoft website (www.live.com, www.bing.com, etc.) with Microsoft account on Windows 8.1. This article describes how to disable this default sigh-in behavior if
-
Invoking long running web service from BPEL
I have a web service. It takes more than 5 minutes (could be up to a few hours) to run. Now I need to invoke it from the BPEL workflow. I tried it, but doesn't work. It seems that there is timeout problem. Does anyone know how to integrate the long-r
-
How to use L_TO_CONFIRM to confirm transport order
Hello friends, I am using function L_TO_CONFIRM to confirm transport order in my program. But it is not working. I have copied the main fields from table ltak and ltap. However it is still not working. May be some other parameters need to be filled.
-
Display list of all phone Running the same application using wifi in c#
someone help me please I want list all the devices connected in my application usin wifi