How to submit a program after completion of a background job
Hi Experts,
I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
CALL TRANSACTION 'ZSAPRCK60' USING zbdcdata
OPTIONS FROM g_s_options
MESSAGES INTO msg_tab.
SUBMIT SAPRCK10 VIA SELECTION-SCREEN
WITH kalaid = p-kalaid
WITH kaladat = sy-datum
WITH PARALLEL = 'X'
WITH SERVNUM = '10'
WITH backgr = 'X'
AND RETURN.
Mohana
Hi,
There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
do.
call fm BD****STATUS
IF STATUS (IMPORT PARAMTER) eq 'F'.
exit.
endif.
enddo.
Regards,
Nagaraj
Similar Messages
-
How to debug a program which is running in background (Job)
Hi,
I have a program which can be run only in background. I have to debug that program. Could you please let me know, how can I do that?
Thanks,
Sandeepbasic FAQ, please search before asking.
Thread locked.
Thomas -
How to re-activate 'Mail' after complete successful Time machine re-installation except 'Mail' backup keeps getting stuck?
Trying to re-instal my email history the 'Mail Message Import' dialogue screen says: 'Mail needs to import your messages. This might take a few minutes. You won't be able to use Mail until the import is finished'.
The problem is: after importing 5,000 messages it stops and the 'Time remaining' only keeps adding up to many hours (17 hours). There are almost 80,000 email messages in my Time machine backup.
How to get this working? I am even prepared to give up my email history if i can only get my 'Mail' application working again. -
How to execute closing cockpit after completed the configuration?
Hi Expert,
Please help, how to execute closing cockpit after completed the configuration? or if who have a document it will be helpful.
Best regards,components of closing cockpit
Organizational Hierarchies (Company Codes, Controlling Area, Operating Concern, etc)
Task List template (Preconfigured templates available)
Task Lists: Derived from template and extremely crucial for successful definition of the month-end close.
Dependencies between the tasks
Monitor
Detailed information
5 steps for setting-up Closing Cockpit
Conduct Planning and Research
Create the basic template data
Build the closing template hierarchy structure
Configure individual tasks
Change the template to an executable task list
For delivering the Closing Cockpit successfully, you need to have a clear understanding of the current closing routines, the required tasks, who is responsible for each task, which tasks when executed should affect which level of the organization, and finally a clear process for review and documentation. -
How do I stop programs from running in the background?
How do I stop programs from running in the background? In the old system you could delete them.
Most of those apps aren't running in the background, but what you are asking is how to close the apps.
To close an app in iOS 7, drag the app up from the multitasking display. Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to the app that you want to close and then swipe "up" on the app preview thumbnail to close it. -
How to capture the date and time of a background job
Hi experts,
How to capture the date and time of a background job?
How to find whether it is runned succesfully or not?
If it is not successful how to put error message?
ASAP
Thanx in advance,
SudhaTo Display the STATUS of the JOB which is exectued in background
CLEAR : wa_jobsteplist.
REFRESH : i_jobsteplist.
WRITE:/ 'DISPLAYING JOB STATUS'.
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 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.
To Display the status text as per the status type
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / 'Scheduled'.
WHEN 'R'. WRITE: / 'Released'.
WHEN 'F'. WRITE: / 'Completed'.
WHEN 'A'. WRITE: / 'Cancelled'.
WHEN OTHERS.
ENDCASE. -
Need to run 2 concurrent programs after completing child concurrent program
Hi,
Could you suggest me on below:
R12/ 11g
I have main concurrent program MAIN_CONC_PG.
In this concurrent program there is a child concurrent program CHLD_CONC_PG.
This child concurrent program will run for parameters 1,2,3,4,5.
CHLD_CONC_PG program will run simultaneously 5 times:
CHLD_CONC_PG ==> 1
CHLD_CONC_PG ==> 2
CHLD_CONC_PG ==> 3
CHLD_CONC_PG ==> 4
CHLD_CONC_PG ==> 5
Now, after completion of above 5 Child Concurrent programs i have to start 2 more concurrent programs using fnd_request.submit_request:
1) Item Attributes
2) Vendor populate
Thanks.931832 wrote:
yes, both the Conc Programs are part of Main Conc Prog.
1) Item Attributes
2) Vendor populate
I should be using FND_CONCURRENT.WAIT_FOR_REQUEST.
any sample code that uses FND_CONCURRENT.WAIT_FOR_REQUEST ??
IN my Main Conc Prog, i have below child conc prog. after completing below program i have to run 1) Item Attributes 2) Vendor populate conc progms.
FOR i IN 1..v_count
LOOP
v_request_id := fnd_request.submit_request(application => 'XXDH',
program => 'XXPTN_ITEM_ORDR_E',
description => NULL,
start_time => NULL,
sub_request => FALSE,
argument1 => i);
END LOOP;Hi,
You can also try something like this.
declare
l_reqid_tab is table of number index by pls_integer;
l_reqid_tbl l_reqid_tab;
function program_successful ( p_conc_req_id number ) return boolean
is
l_finished boolean;
l_phase varchar2 (100);
l_status varchar2 (100);
l_dev_phase varchar2 (100);
l_dev_status varchar2 (100);
l_message varchar2 (100);
begin
if p_conc_req_id > 0 then
l_finished := fnd_concurrent.wait_for_request ( request_id => p_conc_req_id
,interval => 5
,max_wait => 0
,phase => l_phase
,status => l_status
,dev_phase => l_dev_phase
,dev_status => l_dev_status
,message => l_message );
commit;
if upper(l_dev_status) in ('WARNING', 'ERROR') and upper(l_dev_phase) in ('COMPLETE') then
return false;
elsif upper(l_dev_status) in ('NORMAL') and upper(l_dev_phase) in ('COMPLETE') then
return true;
else
return false;
end if;
else
return false;
end if;
end program_successful;
begin
for i in 1..v_count loop
l_reqid_tbl(i) := fnd_request.submit_request....
end loop;
for i in 1..l_reqid_tbl.count loop
if program_successful(l_reqid_tbl(i)i) then
null;
end if;
end loop;
-- code to submit your other program here.Hope this helps.
Regards,
Allen
Edited by: Allen Sandiego on Jun 18, 2012 9:47 AM
Made some modifications since number of spawned child requests is variable. -
How to submit a Program in Background without wait ?
hi experts,
I have one requirement in which i want to call another executable program from one program by passing some parameters to the calling program from called program. <b>I dont want to wait till the executatio of the calling program gets over.</b>i just want to submit the program & <b>wants to continue with my calling program</b>.
i am not bothered with the results of the called program.
How to do this...
if possible pl. send me the code. especially i am using some parameters & internal tables to be passed to the called program from calling program.
Regards,
UmeshHi Umesh,
You can schedule a job programatically .. Please find below the steps..
This will schedule a background job (and this you can view in Sm37) and returns control to the calling program.
DATA: jobnumber TYPE tbtcjob-jobcount,
jobname TYPE tbtcjob-jobname.
Set the job name
jobname = 'xxx'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobnumber
EXCEPTIONS
OTHERS = 0.
SUBMIT reportname USER sy-uname
VIA JOB jobname
NUMBER jobnumber
WITH param1 = "fill the parms/sel fields with new values
WITH Param2= "fill the parameters/sel fields
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobnumber
jobname =jobname
strtimmed = 'X'
EXCEPTIONS
OTHERS = 0.
Thank You.
Regards,
Uma -
How to find Spool number for a 2 steps background job.
Hi All,
How to find spool number (and also the background job name ) for a 2 steps background job.
in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
Thanks,
Shiva.Which one creates the spool? (first one I guess)
What kind of spool? (WRITE, sapscript, smartform, pdf...)
Do you use special statements like NEW-PAGE, or other things?
Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...) -
Error after a scheduling a background job
Hi all,
I'm trying to schedule an interface program in background which reads data from application server and posts a document in Finance through a BAPI funtion module.But after scheduling the job in the immediate mode,its getting canceled showing the error
"Could not ascertain code page"
"Job cancelled after system exception ERROR_MESSAGE" in the job log.
Please help me with this...
thanksHi ,
To decode the reason behind job failure , use ST22 Tcode with Exception Name as ERROR_MESSAGE ( as that is what is given in the Job log ) and User - SAP Logon Id
This would give the system dump log and tell you where exactly the job failed .
Please note this applies for any background job and is not specific for your case .
Do have a look at the dump in future ...
Thanks -
Need to know how to find out the Variant associated with a background job
Hello,
Plz help me in finding out how to find the variant associated with a background job. I need to know which variant does the program picks up when it runs the scheduled background job. There are so many variants that exist. How do I figure out which one is being picked up by the program. When I go and see into the job that are already finished it shows the parameter as "&00000000645354" which I do not understand what it corresponds to. I was expecting a variant name instead of this number in the parameter field. Is there a way I can find out the name of teh variant the program is using automatically in the background job ??
Thanks in anticipationYes it is possible which is variant, input fields are choosen
- go to SM37 and locate the background job which was processed using proper selection criteria
- select the Job and click on 'Step' button availabe in the screen
- the new screen is 'step list overview'. now, place the cursor on selected variant avaialble on the screen, then from Menu >> Goto>> variant
which gives the list of input values.
hope this helps
Thanks
JK -
How can I execute program after using F4_Filename function?
Hi all,
I'm a new user on the forum. I've been working with ABAP and SAP for a few weeks. I wrote a program for importing data from excel file to SAP using BDC. During searching this forum I found information about F4_Filename function which allows users to browse the disc for a file. I'd like to add this function to my program. I have a parameter for a file name but this is an ordinary static string field. When I added the code which I found in the message on this forum the rest of program doesn't execute.
This is simple program for example:
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
f_name = p_file.
write:/ f_name.
This program works correctly. There is a field for parameter. I can change the default name for a file.
After all, I can run the program (F8) and rest of the code is executed. The field for parameter dissapears from the screen and the file name is displayed. ( command write)
Now I added a function F4_Filename
REPORT Z_TEST8_AB.
DATA f_name TYPE STRING.
PARAMETERS p_file like rlgrap-filename DEFAULT 'c:\test.xls'.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
field_name = 'p_file'
importing
file_name = p_file.
f_name = p_file.
write:/ f_name.
I can browse a computer for a file now but after selecting the file I can't run the rest of the code. When I click on the icon or press key F8 the field for parameter doesn't dissapier and the command write is not executed.
What do I do wrong?
Could anyone suggest me a solution? How can I executed the code after using this function?
Thanks in advance.
Regards,
Arek.Hi arkadiusz,
1. simple
2.
<b>start-of-selection.</b>
f_name = p_file.
write:/ f_name.
regards,
amit m. -
How to terminate the program after we run it?
I am doing Ehernet LabVIEW program.In that program I developed the code for generating message box if the bytes u sent to another system should have to come back again.If the bytes are coming in the result then the message box should appear as "Ehernet Test Passed".If it is False then message box should appear as "Ehernet Test Failed".When I run the program the message box was appeared.I put the message box in the Case structure.After running the program the loop was not terminated.How can I overcome the problem.I attached my vi.Pl verify this.
Attachments:
new_ethernet.vi 45 KBHi
First of all - you don't have any loop in your vi.
If you want to exit LV after running the vi, you can use the "Quit LabView" function. The "Stop"-function just stops the vi, which actually does not affect your vi, as it stops automatically, after closing the messagebox.
Thomas
Using LV8.0
Don't be afraid to rate a good answer... -
How to reinstall firefox 7 after complete deletion and recover all personal settings
I tried windows restore, but there are no records of a restore point.
I was using CC Cleaner program which told me that a previous version Firefox 6 was still on the drive. I allowed it to delete that, and then found that my Firefox 7 icon & program had disappeared completely.
I could just download & reinstall FF7, but then all my saved settings would probably be wiped out -- is that correct ??Give it a try. Firefox saves all of your personal settings in a different folder than the program itself. So it's possible that you still have your personal settings ([[Profiles|profile folder]]). You can install the latest Firefox and if it finds your profile you'll be back in business.
-
How do I 'save as' after completing a form?
I want to be able to 'save as' rather then 'save'. I have loaded PDF forms for contract purposes that will be modified often, I would like to save the file as a different file after editing rather then saving over the root file.
Thanks!Hi a_hubick,
George is right that you need to duplicate it and then can edit it.
We currently do not support the "Save as" feature. We have added this is our backlog. Thanks for contacting us.
-Shilpi
Maybe you are looking for
-
Hi, what is the meaning of multicast in bpm ?? thanks kumar
-
"On" button works intermittently
I have to press the "On" button located at the top right of the screen on my HP Split several time before I get a response. It will eventually work, but sometimes I have to press it five or six times. It doesn't seem to make a difference whether I'm
-
What if you do not have access to an old email account to fix iCloud problems?
So I seem to be having the same problem as a lot of other people - I have updated my apple ID however my iCloud has not followed. When I go to change it, the old email is grayed out. I have clicked delete account, and it needs my password to my old I
-
Summary field printing on the first line when it supposed to prin last page
i have created manual report. in the end of the report i have summay columns. wheni run in oracle reports it perfectly shows the grand totle. when i generate to file (PDF) thegrand total print on the first line. can some one tell me wht is it printig
-
System process running queries every 25 seconds against SQL 2012 Developer Edition
While debugging a long running stored procedure I wanted to include SP:stmtStarting and SP:stmtCompleted. I noticed that every 25 seconds I was getting multiple queries against every database on my local server like: select table_id, item_guid, oplsn