Problem in scheduling job in back ground
hi all,
My project scenario is ,i have written a program to create WBS element.
For 1 WBS creation ,In production it takes 20 to 30 min to create as there are many transactional bdcs.
so i want to run that perticular code (all bdcs) in back ground.
so i wrote another program with name 'zback_job_for_wbs_creation' and added all the required code.
in old program,i have written some code to execute this new program in back ground . this code is below..
FORM submit_for_job.
TABLES:btcevtjob.
DATA:l_jobname LIKE tbtco-jobname,
l_jobnumber LIKE rsjobinfo-jobnumb.
DATA: count LIKE btcevtjob-jobcount,
jobname LIKE btcevtjob-jobname.
DATA: job_was_released LIKE btch0000-char1.
jobname = 'WBS_CREATION'.
EXPORT s_scrnum TO MEMORY ID 'W_SCRNUM'.
EXPORT iscrh TO MEMORY ID 'W_ISCRH'.
EXPORT iscrl1 TO MEMORY ID 'W_ISCRL1'.
EXPORT iscrl2 TO MEMORY ID 'W_ISCRL2'.
EXPORT iscrl2b TO MEMORY ID 'W_ISCRL2B'.
EXPORT iscrl2a TO MEMORY ID 'W_ISCRL2A'.
EXPORT iscrl1a TO MEMORY ID 'W_ISCRL1A'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = count
SUBMIT zback_job_for_wbs_creation
with S_SCRNNUM IN S_SCRNUM
and return via JOB JOBNAME NUMBER COUNT TO SAP-SPOOL
WITHOUT SPOOL DYNPRO.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = count
jobname = jobname
strtimmed = 'X'
IMPORTING
job_was_released = job_was_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
here i have put break-point in my submitted program..but its not going to the program and job gets closed successfully without executing my code( Submitted Program).
in above submit statement , if i just write submit progname and return ,then it goes to program.
but job_close function module throws exception no 5.
so pls help me out for this..
i want my submitted program to be run in back ground..
thanks.
Hi,
Start Job Monitor SM37 and search for your job. I think you will find it.
Jobs are not linked to GUI frontend. So you can't debug your background job in that way.
If you want to debug you must be tricky.
Code a never ending loop with an exit condition which you can control by debugging.
DATA:
stop_for_capture.
DO.
IF sy-uname NE 'HABICH'. "change to your account
EXIT.
ENDIF.
IF NOT stop_for_capture IS INITIAL.
EXIT.
ENDIF.
ENDDO.
When your job is running, start TA SM50 and mark relevant batch work process and
choose by menu program -> program -> debugging.
regards
Walter Habich
Similar Messages
-
Info Package-Schedule Jobs in Back ground
Hi,
I want to schedule a job in back ground,I can find that option under schedule tab in the infopackage,
But there is a similar data flow for different data targets when i checked the info package
The column-Job Name Prefix/Sufic is filled with some value
what exactly Job Name Prefix/Sufix will do
ThanksHi
Thanks for the info provided,But u misunderstood my question
I want to know what exactly the function of Job name prefix/sufix
in the schedule
Thanks -
MRP - scheduled at the back ground???
hii
Can somebody explain me how to set MRP to be scheduled at the back ground.
I have to create New MRP controller and do the MRP scedule at background for the same.
Step by steps activities for this and if any ABAPer help we have to get , mention that also.
Thankshii kumar
Thanks for ur response.
But i have gone through, still i need some clarification.
Whethere in satandard SAP system there no possibilities to do MRP scheduling at Back ground at MRP controller level.
What i m asking , i have one company code , 4 plants , i have only one MRP controller.
Using that controller i have to do the MRP setting at background (Automatic).
Note: One MRP controller is used for every material type , hence we have only one MRP controller.
For abouve requirement ,suggest how to proceed furthere .
Thanks -
MRP scheduling at the back ground??
hii
Can somebody explain me how to set MRP to be scheduled at the back ground.
Step by steps activities for this and if any ABAPer help we have to get , mention that also.
ThanksHi,
Plz refer this thread
[mrp;
Regards
Madhu -
Problem editing scheduled jobs
I just had a problem where 3.1, EA1 and EA2 all failed to edit a scheduled job in sqldev. A coworker was able to make the same edit using the same database ID, except he did it through SQL*Plus - that made me suspect a bug in sqldev.
Here are the symptoms:
In sqldev 3.1 (any flavor) > Scheduler > Jobs > edit an existing job > try to edit the JOB_ACTION field. In 3.1, double-clicking in the field only highlights the current word - it does not give me a cursor, and I cannot edit the contents.
In sqldev 3.0.4, editing the same job works as expected. I can edit the field, and save the changes.
Note that the server that I connect to is remote - it is hosted by Oracle OnDemand.Doesn't work for me either;
Here's the exception dumped in the console when selecting Edit:
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: antlr.TokenStream
Dependent class: org.antlr.stringtemplate.language.DefaultTemplateLexer
Loader: ide-global:11.1.1.0.0
Code-Source: /C:/Archivos%20de%20programa/sqldeveloper3.1.06.82/sqldeveloper/lib/stringtemplate-3.1b1.jar
Configuration: <classpath> in /file:/C:/Archivos de programa/sqldeveloper3.1.06.82/sqldeveloper/extensions/oracle.sqldeveloper.jar!/META-INF/extension
.xml
The missing class is not available from any code-source or loader in the system.
at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2387)
at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1546)
at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:226)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1728)
at oracle.classloader.PolicyClassLoader.access$000(PolicyClassLoader.java:143)
at oracle.classloader.PolicyClassLoader$LoadClassAction.run(PolicyClassLoader.java:331)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1692)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1674)
at org.antlr.stringtemplate.StringTemplateGroup.<clinit>(Unknown Source)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)And consecutive tries:
java.lang.NoClassDefFoundError: Could not initialize class org.antlr.stringtemplate.StringTemplateGroup
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Hope that helps for debugging,
K. -
Problem while scheduling job in apex
Hi All ,
I have problem while creating job in apex .Let me explain my problem clearly.I have created a page in
url: http://apex.oracle.com/pls/otn/
Workspace : PREETHI_WORKSPACE
User ID : [email protected]
Password : bowova1
Application :Parse and upload csv file -21007
Page No:1
Page Name :Parse csv file.
Main functionality of this page is to upload csv file into oracle table .First user will browse a file from local machine and upload it in upload region.After that,user enters a table name and clicks create table button which creates a table in DB and also shows the report for the same .Creating table is happening through "create table " process when user clicks "create table" button.Code is working fine .One more things here is, in csv file the second row should have data type mentioned .
My requirement is ,i have to schedule "htmldb_tools.parse_file" in create table process as a job .In this "create table process" we are calling htmldb_tools.parse_file(:P1_FILENAME,'P1_COLLECTION','P1_HEADINGS','P1_COLUMNS','P1_DDL',:P1_TABLENAME);
Problem Iam facing here is that the scope of item :p1_filename is getting lost when we pass it to procedure .I think problem is due to different apex and database session .
Tried a lot through various ways ..Not finding the solution.
Please help...Hi Marco,
I have tried with the setting what u have mentioned in htmldb_tools.parse_file procedure: wwv_flow_api.set_security_group_id(<workspace_id>);
But Job Getting fail and giving error ""ORA-01400: cannot insert NULL into (ORA-01400: cannot insert NULL into ("FLOWS_020200"."WWV_FLOW_COLLECTIONS$"."SESSION_ID")
ORA-06512: at "FLOWS_020200.WWV_FLOW_COLLECTION", line 319
ORA-06512: at "DIMPLE3_HD_DEV.HTMLDB_SID_50", line 196
ORA-06512: at line 2
Please help me out in this issue.
Regards
Dhan -
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..?? -
Problem with export/import in back ground
Hi Experts,
I am having a requirement in which i am exporting an internal table to memory from one program and importing that in another program. in foreground it is working fine. But in background it is not working. Is there any work around.
Here is sample code.
Program1:
types:
begin of tab_type,
para type string,
dobj type string,
end of tab_type.
data:
id type c length 10 value 'TEXTS',
text1 type string value `IKE`,
text2 type string value `TINA`,
line type tab_type,
itab type standard table of tab_type,
itab1 type standard table of tab_type.
line-para = 'P1'.
line-dobj = 'TEXT1'.
append line to itab.
line-para = 'P2'.
line-dobj = 'TEXT2'.
append line to itab.
free memory id 'TD'.
export itab to memory id 'TD'.
Program2:
types:
begin of tab_type,
para type string,
dobj type string,
end of tab_type.
data:
id type c length 10 value 'TEXTS',
text1 type string value `IKE`,
text2 type string value `TINA`,
line type tab_type,
itab type standard table of tab_type,
itab1 type standard table of tab_type.
refresh itab.
import itab from memory id 'TD'.
free memory id 'TD'.
clear line.
loop at itab into line.
write: / line-para, line-dobj.
clear line.
endloop.
Thanks,
JyothiThanks for your links Venkat.
My problem is solved by using the SHARED BUFFER.
Here is the code i used inthe first program
DATA: wa_invdata(10) TYPE c VALUE 'INVDATA'.
DATA: wa_month(10) TYPE c VALUE 'MONTH'.
DATA: wa_process(10) TYPE c VALUE 'PROCESS'.
EXPORT wa_month_end TO MEMORY ID 'MONTHEND'.
EXPORT e_process = it_inv_data[]
TO SHARED BUFFER indx(st) ID wa_process.
EXPORT e_month = wa_month_end
TO SHARED BUFFER indx(st) ID wa_month.
EXPORT e_invdata = it_tab[]
TO SHARED BUFFER indx(st) ID wa_invdata.
EXPORT it_inv_data TO MEMORY ID 'PROCESS'.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'CRDR_ ',
print_parameters TYPE pri_params.
CONCATENATE name
sy-datum
INTO name .
*CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dailog = 'X'
archive_mode = '3'
IMPORTING
out_parameters = print_parameters
out_archive_parameters = archi_parameters
valid = valid_flag
EXCEPTIONS
invalid_print_params = 2
OTHERS = 4.
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.
print_parameters-pdest = 'locl'.
SUBMIT zsd_crdr_monthend_back_process
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.
Second Program
Program zsd_crdr_monthend_back_process.
DATA: wa_invdata(10) TYPE c VALUE 'INVDATA'.
DATA: wa_month(10) TYPE c VALUE 'MONTH'.
DATA: wa_process(10) TYPE c VALUE 'PROCESS'.
IMPORT e_invdata = it_tab[]
FROM SHARED BUFFER indx(st) ID wa_invdata.
IF sy-subrc NE 0 OR it_tab[] IS INITIAL..
No data found for the Month end processing
MESSAGE s398(00)
WITH 'No Data Found'.
STOP.
ELSE.
found the data
IMPORT e_process = it_inv_data[]
FROM SHARED BUFFER indx(st) ID wa_process.
IMPORT e_month = wa_month_end
FROM SHARED BUFFER indx(st) ID wa_month.
Thanks for your help. -
I MADE THIS AND IT'S NOT WORK WHY???
I MUST RUN IT ONLY IN BACKGROUD,IF I MADE
PROGRAM---->EXECUTE IN BACKGROUD IT'S WORK???
data: name like tbtcjob-jobname.
data: number like tbtcjob-jobcount.
DATA: PARAMS LIKE PRI_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LOCAL'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'SUBMIT ... TO SAP-SPOOL'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
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 rxxxx TO SAP-SPOOL
SPOOL PARAMETERS PARAMS
WITHOUT SPOOL DYNPRO
WITH datum IN r_datum
WITH sum = 'X'
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.
ENDIF.Hi Rani,
What is the error that you are getting???
Thanks & Regards,
YJR. -
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. -
Error in Back ground job schedule for call transaction
Hi Experts ,
I have a Program which as Three BDC in it . 1 - to create contact person , 2- customer 3-sales order
Using call transaction if i run with all screens and no screens it's running fine..
if i schedule it background job
conact and customer works fine but sales order not works ..
can anyone give me the solution ?Hi Phani and Pavan ,
It works Fine for Back ground anf fore ground i.e ( N and A ) sales order is created here .
but Sales order not created when i schedule it in back ground as
Program - execute in back ground .
sales not created when i schedule it in background job only using SM36 or Program - execute in back ground ?
Edited by: Pradeep Annaiah on Jan 13, 2009 5:29 AM -
Schedule the Back ground Job with Fiscal Year Vaient????
Hello Guru's,
Please let me know the process of "Schedule the Back ground Job with Fiscal Year Vaient" in APO DP?
Great thanks for your help.
Regards,
SreeHi Venkat,
As i told i am maintaining the periods as 5-4-4, So i want schedule the job as first after the 5th week, then after the 4 th week, then after the 4th week and again after the 5th week ...... like that....
can we schedule the job in back ground as per this periodically???
Thanks for the response.
Regards,
Sree!!
Edited by: sree gunti on Nov 26, 2008 3:30 PM -
Back Ground Job not showing in SM50,
Hi Friends,
I am running XK99 to Mass update Vendor details in Back ground, I am getting some error while running the job in back ground, I would like debugg the issue.
But in SM50 Iam not able to see the job I sechduled using program MASSBACK or transaction XK99.
Please let me know, what could be the problem.
Thanks,
Veerendra.Hi,
Try this - goto SM37 select the background job and enter JDBG in the command field (similar to entering /h to debug).
Cheers.
...Reward if useful -
Back ground jobs after upgradation
Hi Experts
Can you please clarify whether the back ground jobs and the time schedules of the back ground jobs will be copied after upgrade from 4.6b system to ECC.60 or do we need to configure and schedule the back ground jobs through sm37 after upgrade?
Please post as soon as possible.
Thanks & Regards
RojaI think it depends on the server that is copied in the Upgraded Box. If you copy the data from Production, the jobs should be intact.
If you copied Production data, then compare the scheduled jobs in both environments.
If helps, pl do reward
Thanks
Narasimha -
Hi all,
i have processed a job in back ground job scheduling.
But i want to cancel it using t.code SM36.
I have seen that there is delete button, which is not suitable to cancel.
Can anyone help in this regard.
Thanks in advance
VenkatDear Venkat
If the job is in active state. Go to SM37 -> Selecet the respective Job -> Ctrl+F1 or you can click on STOP button in application tool bar.
Similary you can delete job using Shift_F2
Thanks
Eswar
Maybe you are looking for
-
Placing a layer on top of a table
Hi, Some background: I am working on updating my webpage. I have created the files in Photoshop CS2, and then created slices and rollovers in ImageReady so that when the user mouses over a smaller icon on the left side of the screen the image changes
-
Combining two queries in a join
SQL> desc messages; Name Null? Type MESSAGEID NOT NULL NUMBER TITLE NOT NULL VARCHAR2(50) AUTHOR VARCHAR2(20) BODY NOT NULL VARCHAR2(4000) BOARD NUMBER THREAD NOT NULL NUMBER DATE_CREATED NOT NULL DATE SQL> I'm trying to combine both queries outlined
-
FM to remove billing block form billing plan in sales order
i want a FM to remove the billing block from the billing plan present in header data of sales order , i found the FM which delete all billing block present in sales order, is there any FM that check the line of billing block and delete that block of
-
Creating function module related to total length of lay
how to total the planned lengths for all work orders for lay and abandon opertions separatly
-
How do I load Adobe ExportPDF to my new desktop computer?
I have a current subscription and need to apply it to my new computer