Submiting report in back ground with values
Hello all abapers,
I m working on one application where one module pool program will take input from user for user id and password. After verification, one back ground report will be scheduled by this program to change user pw and add some role in user's profile.
when i schedule the prg in background i need to pass some values like user id and password entered on module pool screen...
how do i pass it to background job when scheduling and how bg job prg will read these values..
please advise me as its needed asap...
thanks in advance,
jigs.
any helpful suggestions will be rewarded.
Hi,
Put the following code in user command:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = 'ZSUBMIT'
IMPORTING
jobcount = jbcnt
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
IF sy-subrc <> 0.
ENDIF.
SUBMIT <program to be submitted> WITH P_user_id = user id VIA JOB 'ZSUBMIT' NUMBER jbcnt AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jbcnt
jobname = 'ZSUBMIT'
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
INVALID_TARGET = 8
OTHERS = 9
IF sy-subrc <> 0.
ENDIF.
A job called 'ZSUBMIT' will be released in background.
Please try and award points if useful.
Thanks and regards,
S. Chandra Mouli.
Similar Messages
-
Filter report by back ground color or by condition
I'd like to filter my report by conditions like iif(Parameter is true, Fields.speed.value > 100 or Fields.speed.value > (speedlimit +15), nothing). I tried using Dataset filter as following set up, but it won't return the order with speed
over 100 or over speedlimit by 15 km/h.
FilterExpression: [Speed]
>
=iif((Parameter.Boolean.value = true, 100 or (fields.Speedlimit.value +15), 0).
Then i filter all the cell that when speed is under the condition like
iif(speed > 100 or speed > (speedlimit+15), "PINK", "White")
but I don't know whether I could filter report by back ground color.
Anyone please help me with any solution.
thanks.Thank you very much for the solution.!
It works when i select "true' for the parameter.
But instead of showing all orders when "false", it shows orders under condition Fields!Speed.Value>(Fields!SpeedLimit.Value+15.
Do you have any idea why?
all order number is 1000
number of orders with Field.Speed.Value > 100 is 13
number of orders with Fields!Speed.Value>(Fields!SpeedLimit.Value+15
is 340
number of orders with Fields!Speed.Value>100
or Fields!Speed.Value>(Fields!SpeedLimit.Value+15 is 353
I'm getting 353 when "True" 340 when "False"(I do want 1000) -
Hi All,
Can we run alv report in back ground,if yes how?
Thanks&Regards.
Srikanth.Vhi Ramu,
Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF. -
I purchased the products and I'm trying to complete a project I've started. I have an image and need to fill the back ground with a color I already have as a background layer so it blends in
You should find the forum for whichever product this concerns and post your question(s) there.
Here is a link to a page that has links to all Adobe forums...
Forum links page: https://forums.adobe.com/welcome -
Problem when printing Alv Tree Report in back ground
Hi,
I am using SUBMIT ...TO SAP-SPOOL WITHOUT SPOOL DYNPRO with GET_PRINT_PARAMETERS FM.Its working fine.
My problem is that my SUBMIT report have TREE STRUCTURE as output so when i am running my program one blank screen is coming with heading DISPLAY LOG TREE because of TREE STRUCTURE.when i click on back button then only further processing happens.
How to avoid this TREE STRUCTURE SCREEN ???
Is there any other way to pass your list o/p to SPOOL other than .....TO SAP-SPOOL..?
Thanks in advance.in foreground when u run ALV report it holds maximum fields and displays in 1 single row, but the case is not in back ground...When any report is run in background, the default size for a line is 255 chars...So, if it more it gets splitted into 2 line item....This is how back ground job works for a report though it is a normal report or alv report.
-
Inventory Audit Report - Zero quantity but with value
Hi All,
Our client are using FIFO costing, due to some backdated transaction we get 0 Qty but the value is not 0 when running Inventory Audit Report base on posting date (system date is fine) at the month end. I understand that the system calculate the cost base on system date and this is system behavior.
So, i just wanted to seek for advice from any expert in accounting especially on costing, will this 0 Qty with value report be accepted by auditor and will it caused any legal issue or this accounting practice is acceptable?
Thanks.Dear Mr Kong,
From what you said it looks like opening a message for this issue is the appropriate action this time.
The stock group will give you an update on this issue.
Kind Regards,
Marcella Rivi
SAP Business One Forums Team -
How to run the program in back ground with out selection screen ?
Hi,
I want to run the program in back ground but don't have selection screen. How to run this program in back ground
as program has no selection screen.
Waiting for quick response.
Best Regards,
Padhy
Moderator message: basic, please search for available information/documentation.
Edited by: Thomas Zloch on Feb 21, 2011 12:43 PMHi,
Go to transaction SE38 --> Execute --> Background.
If your program contains selection screen, you have to pass your input values as variants. -
LQ02 transaction - submiting this in back ground.
Hi All,
I want to submit the program <b>RLLQ0200</b> in background. In the selection scrren we have a parameter PA_DUNKL which takes input as D for background and H for foreground. when i give D for back ground and executing it's throwing an warning message and posting is happening perfectly. But this should not happen in back ground right.
if u people have any idea please let me know, i will reward u.
Note: In the program there was an condition which looking for a back ground and throwing this warning message. For this what i did is, i bypassed this condition. Now it's working fine. But i dont know how much correct iam?HI,
There wont be any problem with the warning message. With warning messages also you can set the background job.
Regards, -
Why can't I remove the back ground with Photoshop?
Here is the original HQ photo. I have used Microsoft paint and cleaned it up pretty well to get the following image.
Now I'm trying to do a better clean up of this photo but I can't get smart selection to work properly it keeps either trying cut parts of the vehicle out or add other vehicles in the shot. Also tried cleaning up the car reflection seen in the doors that also doesn't seem to working right as it just made a blurred mess removing body lines and everything. Now the clean up I did with Paint seems to be good but why can't I do it better with photoshop? Isn't photoshop supposed to be better than paint and more user friendly? Also I wanted the vehicle only and the background to be transparent I can't do that with paint or photoshop at least as far as I can tell..... Seems to me it's just to smart for its own good or either I'm a complete idiot... Someone mind helping me out here?Since the top of the vehicle is as blown out as the sky, Photoshop is just thinking you want to include those areas as well. You probably would have been better served by using something like the Lasso Tool, selecting an outline of the vehicle (not right to the vehicle but a rough space around it, almost like a cutout). You would then click the Mask button at the bottom of the Layers panel. This puts a non-destructive mask on your image where you would then tweak the rest by erasing the edges off the rest of the mask (all non-destructively; if you make a mistake you just "paint" it back in with black).
Thus, Photoshop pwns Paint.
ON EDIT: Note that the next to last sentence above applies to when using the Eraser Tool. The reverse happens with the Paint Tool; painting with white reveals (the image); black conceals.
ON EDIT TO THE EDIT: In order to get background transparency you must save in a file format that supports transparency, like PNG. JPEG, for example, does not support transparency. -
Problem submitting a report in back ground
Hi,
I'm trying to submit a report in background and I always get an error saying make an entry in all required fields. But it works perfectly fine in foreground. I'm not sure what am I doing wrong. Pls suggest.............I'm not using any front end FMs...
SUBMIT RKAEP000 via selection-screen
USING SELECTION-SCREEN 310
with p_tcode eq 'KOB2'
WITH SELECTION-TABLE seltab
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
AND RETURN.Hi chesat
u just compare ur code with this...
Using JOB_OPEN,JOB_SUBMIT,JOB_CLOSE
Demo Program:
REPORT YJob .
DATA : v_jobhead LIKE tbtcjob.
DATA : v_jobcount LIKE tbtcjob-jobcount.
DATA : v_eventparm LIKE tbtcjob-eventparm.
DATA : v_flg_released TYPE c.
DATA: e_error.
DATA: running LIKE tbtcv-run.
TYPES: esp1_boolean LIKE boole-boole.
CONSTANTS: esp1_false TYPE esp1_boolean VALUE ' ',
esp1_true TYPE esp1_boolean VALUE 'X'.
CONSTANTS: true TYPE boolean VALUE esp1_true,
false TYPE boolean VALUE esp1_false.
PARAMETERS: v_jobnam LIKE tbtcjob-jobname,
v_report LIKE sy-repid,
v_varian LIKE raldb-variant,
v_uname LIKE sy-uname.
START-OF-SELECTION.
add the new job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
delanfrep = 'X'
jobname = v_jobnam
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = v_uname
jobcount = v_jobcount
jobname = v_jobnam
report = v_report
variant = v_varian
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
EVENT_ID = IC_WWI_WORKPROCESS_EVENT
EVENT_PARAM = V_EVENTPARM
EVENT_PERIODIC = 'X'
jobcount = v_jobcount
jobname = v_jobnam
strtimmed = 'X'
IMPORTING
job_was_released = v_flg_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.
IF sy-subrc <> 0.
e_error = true.
ELSE.
DO.
CALL FUNCTION 'SHOW_JOBSTATE'
EXPORTING
jobcount = v_jobcount
jobname = v_jobnam
IMPORTING
ABORTED =
FINISHED =
PRELIMINARY =
READY =
running =
SCHEDULED =
EXCEPTIONS
jobcount_missing = 1
jobname_missing = 2
job_notex = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF running = space.
EXIT.
ENDIF.
ENDDO.
ENDIF.
ENDIF.
ENDIF.
Are u using any ALV display while prinitng..?? -
How to run a report in back ground
how to run a report in background with out using job open, submit , close is there any other function module to run report in background.
Hi,
There are two ways for you to handle,
one manually setting up the job through SM36 which is better and convinient,
secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.
Find below steps in doing both:
Procedure 1:
1. Goto Trans -> SM36
2. Define a job with the program and variant if any
3. Click on start condition in application tool bar
4. In the pop-up window, click on Date/Time
5. Below you can see a check box "Periodic Job"
6. Next click on Period Values
7. Select "Other Period"
8. Now give '15' for Minutes
9. Save the job
Procedure 2 via Program:
Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.
DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,
L_RELEASE(1) TYPE c.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = 'ZTEMP2'
IMPORTING
JOBCOUNT = P_JOBCNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH DESTINATION = 'HPMISPRT'
WITH IMMEDIATELY = SPACE
WITH KEEP_IN_SPOOL = 'X' AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = P_JOBCNT
JOBNAME = 'ZTEMP2'
STRTIMMED = 'X'
PRDMINS = 15
IMPORTING
JOB_WAS_RELEASED = L_RELEASE
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope the above helps you.
<b>Reward points</b>
REGARDS -
Download ALV report in back ground in local directry
thanks to all but my porblem is download the ALV report in background in local directry.
sriram.HI ,
Find the small code to download the file in background.
n SAP ABAP you can transfer the contents of the internal table to a file. This is required when you wish to extract data from SAP tables into a flat file. This file can then be used to transfer data to another SAP or NON SAP system. This can also be used for an interfacing when you wish to transfer data on a daily or a weekly basis from R/3 to NON R/3 or SAP. The command used to create a file on the application server is as follows.
OPEN DATASET
Please see example code below.
REPORT ZEX_DATATOFILE .
*& ABAPLOVERS: Data Transfer
Parameters to enter the path
PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat'
LOWER CASE.
Table Declaration
TABLES VBAK.
Data Declaration
DATA D_MSG_TEXT(50).
Get data for file transfer
DATA INT_VBAK LIKE VBAK OCCURS 100
WITH HEADER LINE.
SELECT * FROM VBAK INTO TABLE INT_VBAK.
SORT INT_VBAK BY VBELN.
LOOP AT INT_VBAK.
WRITE: / INT_VBAK-VBELN,
INT_VBAK-KUNNR.
ENDLOOP.
Opening the File
OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
MESSAGE D_MSG_TEXT.
IF SY-SUBRC NE 0.
WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
EXIT.
ENDIF.
Transferring Data
LOOP AT INT_VBAK.
TRANSFER INT_VBAK-VBELN TO FILENAME.
ENDLOOP.
Closing the File
CLOSE DATASET FILENAME.
Regards,
Rajesh Akarte -
Scheduling report in back ground after the previous report is executed
Hi,
There is one report which will be executed manually, once that is executed my report should be executed automatically in background.
Pls help me in how to do this.
Thanks,
LuckyHi,
In the first report, try this code:
DATA l_jobcount TYPE tbtcjob-jobcount.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = 'TEST_JOB'
IMPORTING
jobcount = l_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
MESSAGE e054(bl)
WHEN 2.
MESSAGE e008(mi_badi)
WHEN 3.
MESSAGE e009(mi_badi)
WHEN 4.
MESSAGE e703(fkjo)
ENDCASE.
ENDIF.
SUBMIT z_second_program
WITH p_param1 = 'TES'
WITH s_select_option IN s_range
VIA JOB 'TEST_JOB' NUMBER l_jobcount
AND RETURN.
IF sy-subrc EQ 0.
p_submit = true.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_jobcount
jobname = 'TEST_JOB'
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
invalid_target = 8
OTHERS = 9.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
MESSAGE e012(mi_badi)
WHEN 2.
MESSAGE e013(mi_badi)
WHEN 3.
MESSAGE e009(mi_badi)
WHEN 4.
MESSAGE e014(mi_badi)
WHEN 5.
MESSAGE e015(mi_badi)
WHEN 6.
MESSAGE e541(scpr)
WHEN 7.
MESSAGE e267(arch_ana)
WHEN 8.
MESSAGE e216(xm)
WHEN 9.
MESSAGE e727(fkjo)
ENDCASE.
ENDIF. -
Reporting agent - Back ground scheduling
Hello Gurus,
I am trying to schedule the reporting agent scheduling package in Background... Is it possible to schedule it in Background when executing via Process Chain.
Thank youThanks for the Info.
But the situation that I am facing is.. I have a remote cube and the regular cube attached to a multiprovider which is used to reconcile BW report with that of R/3 tables.
When I execute the report in BW ... the data that is read from R3 tables ... it is under DIA process.
the time out is set to 20 minutes. and everytime the report is executed it is saying uncaught exceptiona and when I check in the log it says time exceeded.
Is there anyway that I can schedule the R/3 side job to a Background job (so that there would be no timeout).
I hope I am clear..
Please help me on this issue. -
Avoid page break in back ground execution of report
Hi Friends,
Normally when we execute any report in back ground it will have page break. eg: FL3N
But we dont see this in foreground execution of a report.
may i know how to avoid this page break when we execute in background.
Thanks in advance
NNSHi Badari,
when you set the Background Job via <b>SM36</b>, you can mention the Variant. and set the time , so that the report will run for every 5 minutes with the mentioned variant. Check it.
Regards
Vijay
Maybe you are looking for
-
Combining documents with multiple layouts into a single book for pdf export
I have made a series of documents that feature 3 different layouts, however I would like to connect all these documents into a book and then export 1 layout style from each document into a pdf to form a book. However when I go to the export book as p
-
i don't have a recovery email and i don't know my securiy question answer... what should i do?
-
Lost 6k songs.. help...
My computer had to be reformatted, and although the tech said he made back up, he didn't. I lost 6k songs on my computer. I still have them on my ipod. Is there a way to get the songs from my ipod back onto my computer? Thanks for any help.
-
Script adding on to my flash on html page
errors in page. this script is getting into my html page with the flash im adding into. my page does not show in the internet after upload. www.aurorabiomed.html/flashretreat.html. everytime i add a flash file into my webpage this script is added and
-
When I answer the call, for few seconds everything is fine, but later I can hear the other person speaking but they can not hear me. Anyone have an idea about this issue?