To run a program in BACKGROUND using SUBMIT
I need to run a program in background using the SUBMIT option. Here i have to pass an internal table form one program to another which will be used to update sales orders using BDC.
Questions
1} Can we execute a program in background using SUBMIT?
2} I am sending data to a MEMORY ID , if i run the program in background will the memory id work. As in do memory IDs work in the background.
Thanks in Advance
refer same thread.
Re: Problem with SUBMIT in Background
Similar Messages
-
How to run a program in background?
Hi abapers,
I want to run a program in background using sm36 and sm37.But i am not aware of input in that tansaction.So kindly tell me the steps ho run a program in background.
Regards
AnsumanHi Ansuman Parhi,
by useing T-codes
First go to transaction SM36 to schedule the job.
When you enter the "Start condition" for job, do as follow.
Select processing by "Date/Time".
Enter date as current date.
Let us say you are scheduling this job today then give date 08/30/2007.
Check "periodic job" checkbox.
Hit "periodic value" button and select to run "Daily"
Also have a look on below thread
Re: How to run program in background?
This is how to do it through code
data: lv_job_name like tbtco-jobname,
lv_job_nr like tbtco-jobcount,
lv_job_released type c,
lv_job_start_sofort type c,
lv_print_parameters type pri_params.
lv_job_name = 'Z_test'. " your background program name
call function 'JOB_OPEN'
exporting
jobname = lv_job_name
importing
jobcount = lv_job_nr
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if syst-subrc = 0.
*submit job with all the selection screen params...
submit (lv_job_name)
with applfile = applfile
with p_lines = p_lines
with rfc_dest = rfcdest
with p_selmtd = lv_selmtd
with px_shsim = px_shsim
with px_sherr = px_sherr
user syst-uname
via job lv_job_name number lv_job_nr and return.
if sy-subrc = 0.
call function 'JOB_CLOSE'
exporting
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
importing
job_was_released = lv_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.
if syst-subrc 0.
message i162(00) with
'An error occured while closing the background job.'.
stop.
endif.
endif.
endif.
skip 1.
write: / 'Background process', lv_job_name ,
'called successfully' no-gap.
write: / 'You can check the job in transaction SM37'.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
How to run a program in background and how to check the output
I have to run my program as background job... it has a selection screen...... and i need to check the output after its complete.
hi,
u need to create one program for this.
tables:btcevtjob.
parameters:job(32).
data:count like btcevtjob-jobcount.
call the function modules JOB_OPEN,JOB_SUBMIT AND JOB_CLOSE
and pass the parameters in those function modules.
once u execute this program,
go with sm37->provide jobname->select the option scheduled
->execute
selct the entry->go with release option.
under releasae select immediate option
save
select the job name again
go with release
status is in finished stage
now go with spool option
give spool no
go for display
o/p displayed.
before this,go for se38->provide the name of program which u want to run in back ground->seelct variants->change->provide variant name->go for create->provide input value->go with attributes->provide description->save
this variant name u have to give in the job_submit fm.
or
se38->program->execute->in back ground
Reward points if useful,
Thanks,
Usha -
Running BDC program in background for the transaction VL02N
Hi All,
I have coded a BDC program (call transaction method) for the transaction code VL02N. I can able to run the program manually & successfully. But if I execute the program in background(SM36), it is going to dump giving CNTL_ERROR.
Note: I am not using any of the GUI_UPLOAD, GUI_DOWNLOAD funciton modules in the program. But I am using the FTP command funtion modules like( FTP_COMMAND, FTP_CONNECT, FTP_DISCONNECT and FTP_SERVER_TO_R/3).
<removed_by_moderator>
Thanks in advance.
Ramesh.
Edited by: Julius Bussche on Jul 8, 2008 5:55 PMVL02N is an enjoy transaction. You cant run it in background. Please try VL02.
Thanks
Romit -
Hello All,
I have selection screen where i have parameters for programs, classes and filename.
When i give program name and filename and execute. A Popup appears and asks the path for the file to be saved in xml format. This is done through foreground. It is working correctly in foreground and the file saves in xml format in specified location.
I have tried using the JOB Schedule for background but it is not working.
My requirement is to do the same process in background. How can i achieve the same process as foreground for the given programs and classes to save the file in xml format through background process.
Could anybody help me in this issue.
ThanksHello Indrakaran Reddy,
You cannot run the programs which involves the user intervention,pop-up displays etc., in the background mode.
For this, you need to have the file in the application server not on the desktop(presentation server).
Once, your file is in the application server, give the class and path of the file in the selection screen and then save it as a variant.
Then, schedule the program in the background using the transaction SM36.
This is how it works. Hope you understood the concept clearly.
Thanks,
Babu Kilari -
Running the program in background
Hi Friends,
Can you tell me how to enable a program to run in background, please.
Thanks for the help.
venuHi Venu,
Let me make one thing clear. A background job doesnt mean its someother program running. It just means the program doesnt run online but it runs as a task.
Point two you need not have to write any code for it, all that you need to do is schedule a job.
Point three, if you are getting baffled with what's JOB_OPEN,.... and other function modules, then let me make a point clear. You manually schedule a job in SM36/SM37 but if you schedule it in a program then you use these FMs.
You generally use it when data is large and you dont want the user to wait till the execution is complete.
Please remember to what Christian was referring to.
Rgrds,
Srikanth -
Run java program in background
I want to run a java program in background in windowsXP...can anyone help please......can anyone suggest an easy software for running java program as windows service...i tried one but without any success
How many of the links here have you tried while you were waiting for an answer?
http://www.google.com/search?q=running+java+program+as+windows+service
(Note that the query is a direct copy/paste from your post.) -
How tu run the program in background
Hi SapAll.
actually iam new to ABAP ,i just want to know on how i can run the particular program in background .
can any one explain me in steps .
i also want to know on how to delete the particular job which has been already created in sm36 .
will be waiting for best response.
regards.
VarmaHi
Find the below steps to be defined.
1. Go to SM36 -
> Give the Program Name
2. If you have priority defined that to in Job class
3. Click -
> Start Condition
4. Select Data/Time Tab
5. Give the Date and Time for the job execution. (If you want to certain intervale provide it) -
Problem in running a program in Background
Hi Guys,
Execution of a report interactively gave no errors. We tried to schedule job in background, with variants for the respective cases. But this resulted in the
following error in the joblog: "Error in function module POPUP_TO_CONFIRM"
I know this function module expects a user input.How can I supress this
dialog when I run the report in background.
Thanks and Regards,
Rajanyou have to check before the FM call is the report runs in background/foreground:
IF sy-batch IS INITIAL.
=> foreground, you cam call POPUP_TO_CONFIRM.
ELSE.
=> background
ENDIF. -
Why does the terms for logic say we cant run these programs for commercial use
question i have regarding the terms for garage band and logic terms where is says just under section 2 it says ((i) to download, install, use and run for personal, non-commercial use, one (1) copy of the Apple
Software directly on each Apple-branded computer running OS X (“Mac Computer”) that you
own or control; and)
im not sure if it means i cant use garage band or logic to produce music for clients for commercial use ?
check it out here
http://images.apple.com/legal/sla/docs/LogicPro.pdf
http://images.apple.com/legal/sla/docs/GarageBand.pdfSection C/2/A/(ii) of the Logic Pro document says:
if you are a commercial enterprise or educational institution, to download, install, use and run
one (1) copy of the Apple Software for use either: (a) by a single individual on each of the Mac Computer(s) that you own or control, or (b) by multiple individuals on a single shared Mac Computer that you own or control.
and section C/2/B says:
The Apple Software may contain sample content including but not limited to artwork, audio files, audio loops, built-in sound files, graphics, images, impulse responses, photographs, samples, sound sets, sound settings, video files, or similar assets (“Sample Content”). This Sample Content is proprietary to Apple and/or its licensors, and is protected by applicable intellectual property and other laws, including but not limited to copyright. Except as otherwise provided, all Sample Content included in the Apple Software may be used on a royalty-free basis to create your own original soundtracks for your film, video and audio projects. You may broadcast and/or distribute your own soundtracks that were created using the Sample Content, however, individual Sample Content assets may not be commercially or otherwise distributed on a standalone basis, nor may they be repackaged in whole or in part as audio samples, clipart, music beds, sound effects, sound files, sound libraries, stock animation, or similar assets.
(my emphasis).
All this would seem to cover you for the use you propose (this is not a legal opinion). GarageBand is presumably similar. -
Running a program in background
Dear all,
I have to execute a database upload program in background while clicking a pushbutton.
Ho to do this ?
<b>note : No input parameters for the program</b>.when 'Update'.
perform update.
and in the perform , u have to put a logic to upload DB table.
Regards
Prabhu -
Problem while running the program in background
hi SDNs,
i have problem while i run report in background. in background, last three columns are not appearing in the report. whereas it showing all columns in foreground.
i have increased the line-size, even then it is giving truncating last some columns.
could you any one pls help me out, what to do ?
Thanking you,
Ramakrishna Shi prakash ramu,
even it is not working. it is directly talking me to spool request..
i think it is not possible, while ur running the report in background.,
any how if possible could u pls send me the code...
thanks
ramu -
It has an error when run a program in background job
Dear Expert,
we have a program
when run it in background,it has a error "Error during import of clipboard contents" but when run it normally(run in front workbench se38 or run the t-code),everything is ok.i've used typingJDBG in the command box to debuge the background job,there has no error.
whould you like to tell me what had happen? thanks a lot!
addition: the program used a function ALSM_EXCEL_TO_INTERNAL_TABLE
Thanks & Regards,
Kerry
Edited by: Kerry Wang on Aug 24, 2009 2:12 PM
Edited by: Kerry Wang on Aug 24, 2009 2:14 PM
Edited by: Kerry Wang on Aug 24, 2009 2:14 PMHi,
You cannot use FMs to get data directly from the presentation server when program is executed in the backgroud.
Check the thread : GUI_DOWNLOAD
Regards,
Himanshu -
Hi All,
I have a report which if i run in background is giving me dump.I am getting tsv_tnew_blocks_no_roll_memory error.I checked in debugging and am pasting the code
where it is failing
Fetching delivery history
SELECT ebeln ebelp zekkn vgabe
gjahr belnr buzei bwart
budat menge xblnr lfbnr
FROM ekbe
INTO TABLE t_ekbe
FOR ALL ENTRIES IN t_eket
WHERE ebeln = t_eket-ebeln
AND ebelp = t_eket-ebelp
AND bwart IN r_bwart.
In the internal table t_eket there are 2400000 records.
Also there are many other hufe internal tables in the run time in program.
I think this error is bacause of memory allocation or lack of it.
So any solutions are most welcome.
I have tried using free itab.
Am verifying it now.
Please suggest.
Thanks in advance,
Saket.Is there a way to filter more data in T_EKET.
2400000 in For all entries is too much for a select query.
Regards,
Mohaiyuddin -
Running ABAP Program in Background
Hi,
I need to write a program which could run in background mode based on some condition. For example, I have two radio buttons, Excel and Spool. If I select Excel the program should run normally in foreground mode. If I select spool the program should run in background mode and save the out put in spool.
How can I do this?
Thanking you in advance
Regards,
EswarHi,
long time ago, I found this coding at http://www.4ap.de.
This coding ask in a popup for running in background, when the select-option fields
s_carrid and s_connid are intitial.
Hope it helps you....
Stefan
TABLES: sflight.
DATA: BEGIN OF i_sflight OCCURS 0,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
currency LIKE sflight-currency,
paymentsum LIKE sflight-paymentsum,
zielbetrag LIKE sflight-paymentsum,
END OF i_sflight.
DATA: sw_int(1) TYPE p.
DATA answer.
DATA: job LIKE tbtcjob-jobname.
DATA: num LIKE rsjobinfo-jobnumb.
SELECT-OPTIONS: s_carrid FOR sflight-carrid,
s_connid FOR sflight-connid.
PARAMETERS: p_curr LIKE tcurr-tcurr OBLIGATORY DEFAULT 'EUR'.
AT SELECTION-SCREEN.
CLEAR answer.
CHECK sy-batch IS INITIAL AND sy-ucomm NE 'JOBS'.
IF s_carrid[] IS INITIAL AND
s_connid[] IS INITIAL.
CALL FUNCTION 'POPUP_TO_DECIDE'
EXPORTING
textline1 = 'Sie haben nichts eingeschränkt!'(001)
textline2 = 'Das Programm wird voraussichtlich'(002)
textline3 = 'länger laufen.'(003)
text_option1 = 'Im Hintergrund'(004)
text_option2 = 'Trotzdem ausführen'(005)
titel = 'Achtung, Langläufer!'(006)
IMPORTING
answer = answer
EXCEPTIONS
OTHERS = 1.
CASE answer.
WHEN '1'.
CONCATENATE sy-uname sy-repid INTO job SEPARATED BY '_'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job
IMPORTING
jobcount = num
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
SUBMIT (sy-repid)
TO SAP-SPOOL
VIA SELECTION-SCREEN
VIA JOB job NUMBER num
WITH s_carrid IN s_carrid
WITH s_connid IN s_connid
WITH p_curr = p_curr
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = num
jobname = 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
OTHERS = 8.
IF sy-subrc = 0.
MESSAGE s311(tg) WITH job num.
* Der Batch Job & wurde mit der Nummer & eingeplant
ELSE.
MESSAGE e102(ss).
* Fehler bei der Joberzeugung
ENDIF.
WHEN '2'.
WHEN 'A'.
SET CURSOR FIELD s_carrid-low.
MESSAGE e055(c/).
* Die Selektion ist zu umfangreich. Bitte einschränken.
ENDCASE.
ENDIF.
START-OF-SELECTION.
CHECK sy-ucomm NE 'JOBS' AND answer NE '1'.
SELECT carrid connid fldate currency paymentsum
INTO TABLE i_sflight
FROM sflight
WHERE carrid IN s_carrid.
LOOP AT i_sflight.
FORMAT COLOR COL_NORMAL INTENSIFIED = sw_int.
sw_int = 1 - sw_int.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = sy-datum
foreign_amount = i_sflight-paymentsum
foreign_currency = i_sflight-currency
local_currency = p_curr
IMPORTING
local_amount = i_sflight-zielbetrag
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
OTHERS = 5.
MODIFY i_sflight TRANSPORTING zielbetrag.
WRITE: / i_sflight-carrid,
i_sflight-connid,
i_sflight-fldate,
i_sflight-paymentsum CURRENCY i_sflight-currency,
i_sflight-currency,
i_sflight-zielbetrag CURRENCY p_curr,
p_curr,
AT sy-linsz ''.
AT END OF connid.
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE: / i_sflight-carrid,
i_sflight-connid,
10 'Summe',
i_sflight-zielbetrag CURRENCY p_curr
UNDER i_sflight-zielbetrag,
p_curr,
AT sy-linsz ''.
ENDAT.
AT END OF carrid.
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE: / i_sflight-carrid,
10 'Summe',
i_sflight-zielbetrag CURRENCY p_curr
UNDER i_sflight-zielbetrag,
p_curr,
AT sy-linsz ''.
NEW-PAGE.
ENDAT.
AT LAST.
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE: /10 'Gesamtsumme:',
i_sflight-zielbetrag CURRENCY p_curr
UNDER i_sflight-zielbetrag,
p_curr,
AT sy-linsz ''.
ENDAT.
ENDLOOP.
Maybe you are looking for
-
I cannot seem to find the DE for me
See one problem that happens to many Linux users is that they become nomads. (My friend has fallen to this fate. Arch's simplicity isn't the solution to everyone I guess.) Distro hoppers. Liking parts of one distro and parts of others and changing th
-
How to identify active ABAP objects in the HR R/3 System?
Hi We are in process of doing assessment on HR 4.6C to ECC 6. I need to identify the active abap objects ( Reports/FM's etc. ) in the sytem. Appreciate if some one can suggest me how to look into the system. Rgds Peddi
-
Word Document will not enlarge
I have down loaded Yosemite 10.10.1 and now my "Word Document" screen will not enlarge. Can someone help? I use an IMac, 4MB, Intel Core 2 Duo
-
Hi, I am sorting a Vector that contains CardTiles objects. CardTiles is a class that extends JButton and implements Comparable. The code works fine but i get the following warning after compilation. Note: DeckOfCards.java uses unchecked or unsafe ope
-
When this occurs, Internet Explorer usually will start, but sometimes it is affected also and similarly will not start until the laptop is re-booted. I have tried all possible ways of starting Firefox but there doesn't seem to be any difference. Occa