Execute MCSI report in background : process Output
Hello Folks,
I am working on Ecc 6.0 . i executed the report MCSI (RMCY9200) in background .
I need to process the output of that Job , But could not find any spool for the same job ...
Then i came to know that the Output of the job has to be seen from the Select Version option with the same Report MCSI(tcode)...
But now i have no idea, as how to process that output through an abap program...
Experts, please throw sum light, as how i can process it through an abap program ?
Thanks & regards
Sonal...
Hi Rajani,
This is because of the printer specification selected while running/scheduling the job.
Please follow the below steps to get it corrected:
1) Go to SE38, enter the program name and press F8
2) Enter the selection parameters and from menu click Program -> Execute in Background
3) Now you need to select *Properties* button at below
4) Click on Format in the Next window
5) Select one which format with maximun WIDTH ot the width which works for you.
6) Save the Settings and run the job
Hope this helps!
Regards
Shital
Similar Messages
-
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. -
Execute a report in background
Hi All,
I have to create a batch job which will run a report. For that batch job i have to show only few Columns in report. This report also used to run for others batch jobs.
Now i want to know how can i modified my report to know which batch job is executing my report while processing in background.
i.e i can modify the report output based on the folloing condition.
If SY-BATCH is initial and BATCHJOBNAME = 'Test'.
desired output.
else.
endif.Hi piyush,
1. The answer to your question is :
the FM
GET_JOB_RUNTIME_INFO
2. Use this FM inside the code
of your report.
3. It will give you various details like.
EVENTID
EVENTPARM
EXTERNAL_PROGRAM_ACTIVE
JOBCOUNT
JOBNAME
STEPCOUNT
regards,
amit m. -
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 -
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. -
Executing a report in background,without selection scr with a variant
Dear All,
Please let me know whether I can execute a report which doesn't has a selection-screen, in background, <b>using a variant</b> ?
Alok.Hi,
In order to restrict the user to run it only in background , you can as well check for SY-BATCH condition.
The other way is try to remove "execute in foreground" option from the menu and this can be done with the function module .
Do reward points if useful and close the thread if the doubt is cleared
data: begin of int_exc occurs 0,
code like sy-ucomm,
end of int_exc.
data wf_repid .
initialization.
clear int_exc.
int_exc-code = 'ONLI'.
append int_exc.
int_exc-code = 'PRIN'.
append int_exc.
move: sy-repid to wf_repid .
call function 'RS_SET_SELSCREEN_STATUS'
exporting
p_status = '%_00'
p_program = 'wf_repid'
tables
p_exclude = int_exc
Regards,
Ram
Pls reward points if helpful.... -
How to run report in background, save output to word or excel
Hello all,
I have a huge report that needs to be run in background and I need the report in word. When running in Dialog it takes too long and SAP times out. How do you get something to run in background and have the output in excel. I know you can go into SM37, find the spool and then forward the spool request to a local file, is there an easier way to do it? Maybe setting up some kind of to text printer since the background job always asks for the output printer. Any suggestions?
Thanks a lot,
SergiyHi,
Please check the article below:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f048c590-31a4-2c10-8599-bd01fabb93d4?quicklink=index&overridelayout=true
-Vikram -
Data of alv report in excel file in background processing using open datas
Hi Experts,
I have developed report for purchase register . if i execute this report in background process i am not able to get the downloaded file in excel and output is also not coming properly, columns are going to overlap.
i used open dataset read dataset and close dataset but still problem is not solved. so if anyone have code with this and also which will have concatenate statement in the code send it.
Regards,
RahulHi Rahul,
Ur code shud be like below:
DATA : l_filename2 TYPE string,
v_extn.
SPLIT p_filename AT '.xls' INTO l_filename2 v_extn.
CONCATENATE l_filename2 'downloaded' INTO l_filename2 SEPARATED BY '_'.
CONCATENATE l_filename2 'txt' INTO l_filename2 SEPARATED BY '.'.
OPEN DATASET l_filename2 IN TEXT MODE FOR OUTPUT ENCODING DEFAULT.
IF sy-subrc <> 0.
MESSAGE e499(sy) WITH text-e02.
ENDIF.
LOOP AT it_order_number INTO wa_order_number.
TRANSFER wa_order_number TO l_filename2.
ENDLOOP.
CLOSE DATASET l_filename2.
Now, go to tcode AL11 and check it in the Application server itself.
Hope this helps,
Regards,
Arnab. -
Hi Experts,
I have developed report for purchase register . if i execute this report in background process i am not able to get the downloaded file in excel and output is also not coming properly, columns are going to overlap.
i used the functional module SAP_CONVERT_TO_XLS_FORMAT, but it is coming without data i.e excel file is blank.So tell me How to download excel file in background process
directly? If u have reference code send me.
Regards,
Balu.KHi Bala,
Below is the sample code...
PARAMETERS: p_file TYPE fileextern DEFAULT '/sapout/xyz'.
File on Application Server
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE.
Transfer the content.
LOOP AT gt_output INTO gs_output.
TRANSFER gs_output TO p_file LENGTH 1000.
ENDLOOP.
CLOSE DATASET p_file.
Hope it will help.
About SPAD, follow the below steps.
Goto SPAD-> Full Administartion-> Device Types-> Format Types->
Check for the format X_65_1024/4.
This is the maximum allowed size format with 65 lines and 1024 charcters.
If its there you can use it.
Or create a new format with 65 lines(20000 lines are allowed without page breaks) and 1024 columns(maximum allowed) Z_65_1024.
Then copy the standard Device type to ZSAPWIN and attach the new format Z_65_1024.
Then copy the Output device LOCL to ZLOCL and assign device type ZSAPWIN.
Then while sheduling jobs in background you can use ZLOCL with the new fromat Z_65_1024.
BR/Manas -
Background processing in ALV Oops
Hi all,
I have requirement to execute a report in background processing.I have to create report using classes.
Iam using class cl_gui_alv_grid for creating report.When iam executing report in background am getting Fatal errror-GUI can not be reached.
Regards,
Srilatha.Hi,
The issue is bcz. in background screen container is not recognized.
Change the code as follows:
SET PF-STATUS 'SCREEN_100'.
SET TITLEBAR 'xxx'.
<b>*if program is run in background
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = off.
IF off IS INITIAL.
IF container1 IS INITIAL.
CREATE OBJECT container1
EXPORTING
container_name = 'CC_ALV1' .
ENDIF.
ENDIF.
CREATE OBJECT g_grid1
EXPORTING
i_parent = container1.</b>
PERFORM prepare_field_catalog.
PERFORM exclude_button.
PERFORM display_alv.
Best regards,
Prashant -
BackGround Task to execute report is 'IN PROCESS'
Hello Experts,
I have developd a workflow where i have added a task which will execute a report in background as code below -
SUBMIT rhakti00
USING SELECTION-SCREEN 1000
WITH SELECTION-TABLE rspar
AND RETURN.
The output of the report is not relevant for my req so i dnt need to display the output of report after thts y i want to run this report in background.
Now,while executing the task ,the report has started executing in background perfectly but tht task remain in 'IN PROCESS' status. When i checked the tRFC for that task so its showing me mesaage that - "Screen output without connection to user."
Plz suggest how to complete my background task.
Regards
Nitinthnks for the reply Kiran,
regarding ur point to send report output to many users....i want to make it clear tht i dont need to send or display the output of the report. I just need to execute the report in background and task shud get complete.
Also,Can u plz explain it further abt writing code in FM and thn get the output in export or table parameter.......i mean which field or which table of which type shud i use in export or table paramenters of FM. if u can tell me somethg in coding also..tht will ne helpful...
Regards
Nitin -
Display title in spool generated in background processing of report
Hi All,
I am working on a report which uses splitter container to display report details as title in one part of the container and ALV report (using OOPS ALV) in the other part when executed in foreground.
I have referred the following links and added code accordingly to execute the report in background.
OOps ALV in background
CNTL_ERROR while running a report in background mode
But in the spool that is generated, I am able to see only the ALV output in the form of classical report without the report details as title. To add the tilte I have tried using "top_of_page" event, but it is not working. Please let me know how this can be achieved.
Thanks & Regards,
AnkitHi Sandeep,
Check if you can create batch job to run for S_ALR_87013558 using SM36
The Program name is GP8YTY7TBR1TYRPCIPKAC6X9GZG
Please check with ABAP.
Regards,
Nitin -
Problem in background processing of a report
Hey,
I am facing a problem while executing a report in background. In foreground its running absolutely fine but in background the job get cancelled every time .
can any body tell me how to find the cause of the problem and how can we debug the report in background
thanks
bobbyHi Amole,
following error is encountered in background processing
ABAP/4 processor: GETWA_NOT_ASSIGNED
job cancelled
thanks
bobby -
Execute report painter report in background
Hi All,
I have created new library, report group and a new report in report painter, the report is working fine if we execute in foreground, but if we execute in background then the values are blank.
Please help me how to get the values if we execute the report in background.
Regards,
RajHi,
I have created a new report for balance sheet which displays for whole year by a break up of periods from 1 to 16,
because if extracting the data for whole year i am getting ABAP short dump as runtime exceeded.
Now i want to run the report in background, but when i run the report in background the values are not appearing in the report.
I am using T.code GRR3.
Regards,
Raj -
Executing the report in the background
Hi Frnds,
I want to execute a report in background.After executing the report I want to receive a mail.
I think this is possible through reporting agent.
so i need the steps for this how to do...pls do the need ful..waiting for reply..
Thanks and Regards
Rajasekar.Hi,
there are two parts of it -
a. you have some exceptions & you run report in background & are informed if exception occurs, for that kind of scenario look at -
http://help.sap.com/saphelp_bw33/helpdata/en/d3/a850390aa3b608e10000000a11402f/content.htm
b. Without exception you can play with WEb template & get informed -- I am not very sure.see this --
http://help.sap.com/saphelp_bw33/helpdata/en/9e/9f653ade969f4de10000000a114084/content.htm
If you are on BW350, it can be achieved by Information Broadcasting feature. see this -
http://help.sap.com/saphelp_nw04/helpdata/en/a5/359840dfa5a160e10000000a1550b0/content.htm
Hope it helps
regards
VC
Maybe you are looking for
-
System freezes at wake up & location change (AirPort to blame?)
Hi, Ever since I got my new MacBook Pro last March I have had an issue where it crashes upon wake and changing locations. I never had this with my previous PowerBook. I wonder if some one has a solution for this as this is a very nasty problem... Wha
-
Missing hard drive memory on brand new Macbook Pro
Hi all, Forgive my lack of technical knowledge here, but I've just bought a new Macbook Pro Retina, and despite migrating literally about 1GB worth of files, the system is showing approx. 22GB of storage space being taken up by 'other.' I know these
-
How to control Named Destinations in Bookmarks?
Using Frame 8, Acrobat Pro X. In the generated pdf, properties of the bookmark show we will "Execute a menu item" and "Use Named Destination", e.g. G1.1007744. If I choose Browse, a long list of destinations is provided but I have no idea - what they
-
Arch 0.7.1 FTP install only CD ISO
Hi there i was sick of downloading the whole base cd when i was going to use FTP install anyway. So i decided to modify the cd and made a FTP install only cd. i dont know if someone did it before .. whatever its nothing big just a really tiny modific
-
Help! needed original file cannot be found
I move the whole iTunes files to a new computer. I can see all the songs. I purchase a new songs and connect my ipod mini to add to my ipod. I am getting "song could not be used because original file cannot be found" error message. What is wrong? Ale