File path problem in background job spool
Hello ,
i have probelm in file path of the background job in spool.
i have selection screen
Radiobutton : p_local
parameter: path1.
Radibutton: p_applicatioserver
parameter: path2.
if i keep program in background job, it will alwas take second option.
Now user selected first option and executed job in abckground. File stored in the spplication server with corect file path name. (path2)
But when i go to sm37 entered job name and checked the spool, it gives me the file path name path1. but i need the file path1 in the background spool. my question whether i need to change the file path name in program or whether i have to change the setting
Regards,
zub
First of all, local is not an option in background job; you can only save to the apps server, and your program should take that into consideration by checking for sy-batch = 'X', for example. You should be checking in your at selection-screen to be sure the user has not chosen local path and file and background job.
Similar Messages
-
What data is stored in the CC Background Job Spool File?
What information is stored in the location referenced in the CC Configuration/Miscellaneous setting of 'Background Job Spool File Location'? Our test and production versions of this system are configured the same, with both pointing to the same location on their respective servers. However the test location shows a virsa/bgJobSpool folder in it containing multiple files while our production system shows this location as empty.
Both versions seem to be working OK. We are running backgrounds jobs in each (risk analysis, management reviews, rule generation, etc.) and seeing results.
We updated to the GRC 5.2 a few months ago and are currently on SP9. This issue came up during a system audit, so we need to come up with an explanation for the differences.
Thanks.I had reviewed that SAP note previously, but it does not seem to help any with our situation. We are running ad hoc background risk analysis jobs frequently and can always see the results. Everything seems to work fine from the application side, we just don't see the logs where we thought they should be over on the server.
From the outside, it looks like maybe it is ignoring the configuration setting and is still using the default location for the log. Does it need to be on the same drive as the application? I believe our application and the default location are both on our E drive, but we want to put the location for this and the Alert Log on the D drive.
Thanks. -
Has anyone put the RAR Background Job Spool on a different server?
We are on GRC 5.3 SP 13.
Has anyone put the RAR Background Job Spool File Location (assigned in the Miscellaneous configuration section) on a server different than the one that the GRC Frontend/Java system is on?
I currently have it assigned to a folder on the GRC server, but it is running out of space. I am having a problem getting the users to delete old reports as they say they need to keep them for internal Audit controls. They are also resisting downloading the reports (more work for them). I have been told that we cannot easily increase the file space on the GRC server (would basically have to purchase more storage and rebuild the server).
I was thinking about moving the folder over to our virtual storage area, were file size can be more easily expanded. I haven't found any documentation that says the folder has to be on the GRC server, but I also haven't seen any examples of where it has been put on a different server.
Has anyone done this, and did you run into any problems?
Thanks.Hello Bob,
I got your point. Probably there's no recommendation about this, because the recomended practise is to delete or archive the spools as suggested in note : Note 1511027 - Periodic clean up of spool files
If you have a requirement to keep these files "online", I think the option to save them to a network drive is fine. I haven't tried it for this specific scenario. You have to take into account:
- Specific user to connect to FileServer
- Availability of the FileServer. If the FS is down, the RAR job will cancel.
- Performance. I mean, write to a local disk is not the same to write to a network drive. This point is very difficult to measure, because it depends on a lot of things like network speed, server load, etc.
Maybe someone has already implemented it and gives you more hints.
Cheers,
Diego. -
I have looked an read through almost all the file path problem post possible and I am still having issues maybe one of you guys can help me, here are my files
I am doing this as an example so that I can apply it to all of my file problems....
Harold Timmis
[email protected]
Orlando,Fl
*Kudos always welcome
Attachments:
pathexample.zip 122 KBFirst of all, to troubleshoot the problem it would help to put some filepath indicators at each point so that you can see what is going on. Also, in your exe having an error dialog "Simple Error Handler.vi" to let you know what LabVIEW didn't like in the exe.
Now, when you run a top level ("Main.vi") and use the "Current VI's Path " in the development mode it returns <Filepath>\"Current path"\Main.vi. So stripping once will get you to <Filepath>\"Current path" . Now if you make it into an exe the "Current VI's Path" returns <Filepath>\"Current path"\"Name.exe"\Main.vi so you are "nested" one deeper.
I use the following construct to determine whether the vi is being used as in the development environment or as an exe, the parse the path accordingly, although in this instance it is used to supply different directory names to a little more complex file system.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion -
Problem in Background Job. Job Completed Successfully but data not Posted
Hi All,
There is a problem in Background Job in Production server (600).
The job completed successfully but data not posted.
The same Job was working perfectly till the starting of the May month.
but now it is not working and rebate has not been posted.
Where to check and what to check
Pls suggest.
Regards,
P KamalHi ,
Please first check the status of the Job , ifs successfully completed then debug it (tcode JDBG) and
check out, whether the values passed (might be using Import-export ,set-get parameter Ids) to the Job are getting passed properly or not. These values might not be getting passed properly.
If it has some error in Job Log then let me know the error.
Regards,
Uma -
Download(xls) file fm ABAP using background job
Hi,
My request is how to download(xls) file fm ABAP using background job. ( Daily 3 times download )
Pls advise...Hello Rajesh,
Actually it is not the function module WRITE_DATASET but command OPEN DATASET. Check this link for more info:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/content.htm
Also for this please contact your ABAP collegues. It is their job and they should have the expertise.
Regards.
Ruchit. -
Hello All,
I have a requirement to send/export the background job spool in Excel (in MHTML format) in ECC 6.0. Please help.
Thank you.
NaliniHi Jigar,
Thanks for your response.
Anything is like download to desktop or email is fine. But in MHTML format.
We can download the ALV report in MHTML spreadsheet format when we run the program online. But the program is running for long time and going to dump.
So i scheduled it as background job and downloading the output in .HTML format. But user wants the spool/report output in .MHTML spreadsheet format.
I can write the code. Instead of changing the existing program I would like to know is there any way (from standard SAP) that I can get the background spool in MHTML spreadsheet format.
Thanks,
Nalini -
Background Job spool / output file in different app server
We are working with 2 ECC app servers, A and B.
I've defined in app server A a background job to run an abap report and this report creates and submit 4 other background jobs.
Each of these 4 jobs is regarding an abap report which outputs a text file in the server.
The question is, why are the jobs generating the files in different app servers randomically?
The same file, in the 1st execution was generated in app server A, and without any change was generated in app server B, in the job 2nd execution?
Thank you!Hi,
You can specify server name whille creating a batch job , so that it gets executed to that server only.
there is one field (in SM36 during creation or SM37 while modifying batch job) called "Exec Target " , where you can specify server name.
Hence you can plan to run your some batch jobs on server A or B.
Regards,
Rupali -
Background job - Spool output screwed up.
Hi Friends,
i am running a report in background and i have 40 to 50 columns as a result the output of the back ground job spool output does not show in one lone but as soon as it reaches to the certain point it splits the line and shows one line as as two...
what could be the problem?
thank you,
pasala.Check
In your report
- [REPORT - list_options|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm] [LINE-SIZE width|http://help.sap.com/abapdocu_70/de/ABAPREPORT_LIST_OPTIONS.htm#&ABAP_ADDITION_2@2@]
- [NEW-PAGE|http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE.htm] [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPNEW-PAGE_OPTIONS.htm#&ABAP_ADDITION_4@4@]
In print parameter of the step/job
- [SUBMIT - spool_options |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm] [SPOOL PARAMETERS pri_params|http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_PRINT_PARAMETERS.htm#&ABAP_ADDITION_1@1@] or [LINE-SIZE width |http://help.sap.com/abapdocu_70/en/ABAPSUBMIT_LIST_OPTIONS.htm#&ABAP_ADDITION_1@1@]
Also read [Printing Lists |http://help.sap.com/abapdocu_70/en/ABENPRINT.htm] and [SET_PRINT_PARAMETER|http://www.sdn.sap.com/irj/scn/advancedsearch?query=set_print_parameters] for LAYOUT and LINE_SIZE parameters.
Regards,
Raymond -
Problems creating background job for program (job open, submit and close)
Hi gurus,
im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
Below goes my code,
any ideas will be rewarded
CLEAR: stdt_modify_type, stdt_output.
CALL FUNCTION 'BP_START_DATE_EDITOR'
EXPORTING
stdt_dialog = 'Y'
stdt_input = stdt_input
stdt_opcode = 14
IMPORTING
stdt_modify_type = stdt_modify_type
stdt_output = stdt_output
EXCEPTIONS
fcal_id_not_defined = 1
incomplete_last_startdate = 2
incomplete_startdate = 3
invalid_dialog_type = 4
invalid_eventid = 5
invalid_opcode = 6
invalid_opmode_name = 7
invalid_periodbehaviour = 8
invalid_predecessor_jobname = 9
last_startdate_in_the_past = 10
no_period_data_given = 11
no_startdate_given = 12
period_and_predjob_no_way = 13
period_too_small_for_limit = 14
predecessor_jobname_not_unique = 15
startdate_interval_too_large = 16
startdate_in_the_past = 17
startdate_is_a_holiday = 18
startdate_out_of_fcal_range = 19
stdt_before_holiday_in_past = 20
unknown_fcal_error_occured = 21
no_workday_nr_given = 22
invalid_workday_countdir = 23
invalid_workday_nr = 24
notbefore_stdt_missing = 25
workday_starttime_missing = 26
no_eventid_given = 27
OTHERS = 28.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MOVE 'X' TO gv_flag.
ENDIF.
DATA jobname LIKE tbtcjob-jobname.
DATA jobcount LIKE tbtcjob-jobcount.
DATA job_release LIKE btch0000-char1.
DATA job_imediate TYPE c.
CLEAR: jobname, jobcount, job_release.
CONCATENATE 'MAPAEXEC' sy-uname sy-datum
INTO jobname SEPARATED BY space.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ENDIF.
SUBMIT z_mapa_execucao_orcamental
VIA JOB jobname NUMBER jobcount
WITH ano EQ ano
WITH so_perio IN so_perio
WITH so_date IN so_date
WITH so_org EQ so_org
WITH so_num IN so_num
AND RETURN.
IF stdt_output-startdttyp EQ 'I'.
CLEAR job_imediate.
job_imediate = 'X'.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
calendar_id = stdt_output-calendarid
event_id = stdt_output-eventid
event_param = stdt_output-eventparm
event_periodic = stdt_output-periodic "?
jobcount = jobcount
jobname = jobname
laststrtdt = stdt_output-laststrtdt
laststrttm = stdt_output-laststrttm
prddays = stdt_output-prddays "??
prdhours = stdt_output-prdhours "?
prdmins = stdt_output-prdmins "??
prdmonths = stdt_output-prdmonths
prdweeks = stdt_output-prdweeks "?
predjob_checkstat = stdt_output-checkstat
pred_jobcount = stdt_output-predjobcnt
pred_jobname = stdt_output-predjob
sdlstrtdt = stdt_output-sdlstrtdt
sdlstrttm = stdt_output-sdlstrttm
strtimmed = job_imediate
targetsystem = stdt_output-instname
start_on_workday_not_before = stdt_output-notbefore
start_on_workday_nr = stdt_output-wdayno
workday_count_direction = stdt_output-wdaycdir
IMPORTING
job_was_released = job_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
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ELSE.
MESSAGE i004(zmapas) WITH jobname.
ENDIF.
Thanks in advance,
Best Regards
João MartinsHello João.
In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
Check this code:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CHECK sy-subrc = 0.
CLEAR seltab_wa.
MOVE: t_jobs-param TO seltab_wa-selname,
t_processar-line+34 TO seltab_wa-low.
APPEND seltab_wa TO seltab.
seltab_wa-selname = 'P_LOJA'.
seltab_wa-low = t_processar-ficheiro+7(4).
APPEND seltab_wa TO seltab.
*** Submete o programa para o JOB
SUBMIT (t_jobs-repid)
WITH SELECTION-TABLE seltab
USER sy-uname
VIA JOB w_jobname NUMBER w_jobcount
AND RETURN.
*** Encerra o JOB
l_hora = sy-uzeit.
ADD 60 TO l_hora.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = w_jobname
sdlstrtdt = sy-datum
sdlstrttm = l_hora
targetserver = w_servidor
IMPORTING
job_was_released = l_liberado
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.
Regards.
Valter Oliveira. -
Hi,
I have problems when creating a job that is supposed to be run once in background. I use the common steps as described below. My problem is that the report is executed twice.
- First it is executed synchronously when the job is created
- Then it is executed in the normal job step as I want it to do
I don't want it to be executed the first time because it creates data!!!
Code:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobid
IMPORTING
jobcount = w_jobnr
sdlstrtdt = sy-datum
sdlstrttm = sy-uzeit.
SUBMIT (p_prog)
WITH p_idocnr = p_idocno
USER p_user
VIA JOB w_jobid
NUMBER w_jobnr
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobnr
jobname = w_jobid
strtimmed = 'X'
IMPORTING
job_was_released = w_jobrel.
Does anyone have a clue of what I should do to prevent this?
// Regards HansHi again,
1. U are right.
2. It will happen if we use SUBMIT.
3. As per the help documentation,
it will run the program in separate session,
( as soon as submit statement comes)
4. and run the INITIALIZATION event.
The VIA JOB addition also loads the program accessed in a separate internal mode when the SUBMIT statement is executed and the system performs all the steps specified before START-OF-SELECTION. This means the events LOAD-OF-PROGRAM and INITIALIZATION are triggered and selection screen processing is performed. If the selection screen is not processed in the background when VIA SELECTION-SCREEN is specified, the user of the calling program can eidit it and schedule the program accessed in the background request using the function Place in Job. If the user cancels selection screen processing, the program is not scheduled in the background job. In both cases, execution of the program executed is completed after selection screen processing and the system returns to the calling program due to the AND RETURN statement.
regards,
amit m. -
Problem with background job using SUBMIT under different user
Hi All,
I am submitting a background job under different user name. I am submitting this job by using JOB_OPEN , SUBMIT report and JOB_CLOSE. But submit statement is returning sy-subrc 8, becuase of this the job_close is failed. Can you please help me to solve this problem.
Thanks in advance.
TjguptaHi,
The user is having all authorizations. is there any difference with user types?
This user is having user type " as communication data".
Thanks,
Tjgupta -
Can ABAP proxy to consume WSDL file be run as background job for every10min
Hi all,
I have a requirement where I need to build an interface which gatheru2019s the purchase order details and send to external third party software in their required format (as an XML file).
So I should be the first point of contact and should trigger the interface each time a purchase order is generated.
So I am thinking that I should develop a background job for every 10 minutes which will look for new purchase orders and gathers the information of the purchase orders and send them to external third party software in their required format.
I have gone through all the SAP forums and e-Learning but still I have confusion in regards to how is it possible technically? Can some one guide me with some information on the same.
I have a little bit of confusion and want to know few things.
1) Should I create a web service or should I consume a web service?
2) If I need to consume a web service, then can I write an ABAP proxy to be run in background fro evry 10 minutes? I mean can we run ABAP proxy as a batch job in the background?
3) Is there a difference between consuming an XML file and WSDL File?
Any Help will be highly appreciated.
Regards,
Jessica.There are two options (as I know) to generate XML file.
1. Use XML TRANSFORMATION to get the XML string based your TRANSFORMATION. You can input your data and get back the XML string. Download this string to a file
Test XML generation program is:
types: begin of ty_data,
num type i,
end of ty_data.
DATA: itab TYPE standard table of ty_Data,
la_data like line of itab,
xmlstr TYPE string.
DO 3 TIMES.
la_data-num = sy-index.
APPEND la_data TO itab.
ENDDO.
CALL TRANSFORMATION ztest_np1
SOURCE table = itab
RESULT XML xmlstr.
CALL FUNCTION 'DISPLAY_XML_STRING'
EXPORTING xml_string = xmlstr.
My ZTEST_NP1 transformation. To create a transformation, click on the transformation in the "CALL TRANSFORMATION ztest_np1" statement. Select Simple transformation type.
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="table"/>
<tt:template>
<table>
<tt:loop ref=".table">
<item>
<tt:value ref="NUM"/>
</item>
</tt:loop>
</table>
</tt:template>
</tt:transform>
XML string is like:
<?xml version="1.0" encoding="utf-8" ?>
<table>
<item>1</item>
<item>2</item>
<item>3</item>
</table>
To use this option, you have to create a transformation and than use it to generate the XML string.
Check this SAP Help
http://help.sap.com/saphelp_nw04s/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm
2. You can concatenate and create an XML string and download that string into a file.
Regards,
Naimesh Patel -
ALV list display in a Background job - Spool output
Hi,
We are currently working on a report scheduled to be run in the background job, and the ALV list is displayed in the spool output.
ALV list in the spool does not look the same as front run job, the column headers are all crowded together, and there is no grid in-between different columns or rows. It's hard to read.
Is there a way to add grid for this kind of output?
Thanks!Hi Deepak:
I expanded your report into two rows display, and the grid in the spool display simply gone!
report zzscratch line-size 120 no standard page heading.
type-pools slis.
tables pa0001.
data : li_field type standard table of slis_fieldcat_alv,
gi_events type standard table of slis_alv_event,
gr_layout_bck type slis_layout_alv,
gr_save like disvariant,
gr_events type slis_alv_event.
types : begin of gtt_emp,
pernr type persno,
ename like pa0001-ename,
uname like pa0001-UNAME,
end of gtt_emp.
data : lr_field type slis_fieldcat_alv.
data : lc_rep like syst-repid.
data : li_emp type standard table of gtt_emp,
lr_emp type gtt_emp.
data : gv_ref_table type lvc_rtname.
gv_ref_table = 'CATSDB'.
lr_field-fieldname = 'PERNR'.
lr_field-ref_tabname = gv_ref_table.
lr_field-inttype = 'N'.
lr_field-outputlen = 8.
lr_field-seltext_l = 'EMPLOYEE Number'.
append lr_field to li_field.
lr_field-fieldname = 'ENAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 40.
lr_field-seltext_l = 'EMPLOYEE Name'.
append lr_field to li_field.
lr_field-fieldname = 'UNAME'.
lr_field-ref_tabname = 'PA0001'.
lr_field-inttype = 'C'.
lr_field-outputlen = 12.
lr_field-seltext_l = 'User Name'.
lr_field-row_pos = 2.
lr_field-col_pos = 1.
append lr_field to li_field.
lc_rep = sy-repid.
gr_layout_bck-edit_mode = 'D'.
gr_save-report = sy-repid.
lr_emp-pernr = '00000001'.
lr_emp-ename = 'abc'.
lr_emp-uname = 'testus'.
append lr_emp to li_emp.
lr_emp-pernr = '00000002'.
lr_emp-ename = 'def'.
append lr_emp to li_emp.
lr_emp-pernr = '00000003'.
append lr_emp to li_emp.
lr_emp-pernr = '00000004'.
append lr_emp to li_emp.
lr_emp-pernr = '00000005'.
append lr_emp to li_emp.
lr_emp-pernr = '00000006'.
append lr_emp to li_emp.
lr_emp-pernr = '00000007'.
append lr_emp to li_emp.
lr_emp-pernr = '00000008'.
append lr_emp to li_emp.
end-of-selection.
Function module for ALV grid display
call function 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = lc_rep
is_layout = gr_layout_bck
it_fieldcat = li_field
i_save = 'A'
is_variant = gr_save
it_events = gi_events
TABLES
t_outtab = li_emp[]
EXCEPTIONS
program_error = 1
others = 2.
if sy-subrc <> 0.
clear gr_messages.
message e023 into gr_messages.
append gr_messages to gi_messages.
endif. -
Hi,
I recently upgraded to a new computer and I have Develope toolbox and some other extensions from Web Assist and curiously when I click on HELP button in any of them I receive in error message like the one below.....virtually all of the error messages are the same. I known that it is a path problem, but when I follow the path indicated in the error message I find the file exactly where it should be on the computer.....hmmmm...any ideas out there?
Firefox can't find the file at /MacHD/Users/jimelander/Library/Application Support/Adobe/Dreamweaver 9/Configuration/Shared/DeveloperToolbox/classes/temp.htmI think un install ADDT then reinstall it..
Hope this helps
Mohnkhan
http://www.mohitech.com
Maybe you are looking for
-
Macbook Pro starting up in different resolution after connecting to LG TV
Hi, Recently my dad used my Macbook to connect to our LG TV. After the connection cut down, my laptop screen down to that resolution with black bars on the bottom for like 1sec. But now every time i shut it down, and turn it back on, the screen with
-
Subscription and Online number conflict.
I have a monthly subscription (Unlimited Europe) that includes an online number. I am being asked to pay to extend my online number (that I've had for a long time), when I click to extend, it says I already have a free number. When I give up and clic
-
Today i installed a server. The download of the guest-template worked fine, installation done within minutes as described in the manual. two questions: 1) i configured the vm.cfg file for use with vnc (vnc=1, vncconsole, vnclisten....) and read in th
-
Help with mysql class (Japplet)
Hi,I have found program that exactly what i want in Japplet ,but its not clean i wana use it on my other classes . Here is what i tired from changing .After all,i am not professionnel in java. The ORGINAL HERE : http://forum.java.sun.com/thread.jsp
-
Canon BJC85 stopped printing after change of ink cartridge
Hello, my mother uses the small Canon BJC85 in combination with her Mac mini. But after she changed the colour printing head against the black only printing head, she can't print any more with the standard driver (GIMP works, but the quality is bad).