Background Job assigment with variant in SM37 , for Textfile uploading
Dear all,
Im using the BAPI_PO_CHANGE to update the existing schedule dates in Purchase Orders,
for this the po's , item, schedules, delivery dates(Need to update) from a Textfile into the internal table
and passing that data to bapi function module, it works fi9 in foreground and the output is a classical report
with Corresponding messages through RETURN.
i need the same to run in background with a variant, but after assigning the background job in SM36,
i found that the job assigned got CANCELLED in SM37.
I hope everything is clear, so kindly revert back with solution.
Regards,
Niranjan.G
Hi,
You should understand that background job will be executed in application server and there will be no gui or access to presentation server available.
You should upload your file to application server through tcode CG3Z.
See F1 help for OPEN DATASET / Search SCN for sample codes for OPEN DATASET.
You should change the code so that it can be run in both modes using the system variable SY-BATCH.
If it is space use GUI_UPLOAD, if it is X use OPEN DATASET.
Regards
Karthik D
Similar Messages
-
Background Job Scheduling with variants in IS - Public sector
Hi,
We run auto write off using scheduled job activity (SM37 -Program : RFKK_MA_SCHEDULER). There is an variant containing Main Transactions that needs to be included / excluded for write off.
The variant values are changed / updated with additional main transactions and when we run the batch jobs the new variant values are not getting picked or used. If we run the program independently i.e FP04M and use the variant, the new variant values are being handled.
I am not sure what is missing in the SM37 background job that is defined though the variant values are runtime parameters and should have automatically be used after it undergoes modification in the next job exeuction.
Kindly provide your feedback.
Thanks & Regards
Bala
P.S. : I Have posted this query in IS forum too.Hi,
You should understand that background job will be executed in application server and there will be no gui or access to presentation server available.
You should upload your file to application server through tcode CG3Z.
See F1 help for OPEN DATASET / Search SCN for sample codes for OPEN DATASET.
You should change the code so that it can be run in both modes using the system variable SY-BATCH.
If it is space use GUI_UPLOAD, if it is X use OPEN DATASET.
Regards
Karthik D -
How to create a background job without a variant ?
How to create a background job without a variant ?
Hi,
Go to se38.. specify the program name and execute Or use Tcode
On the selection screen specify the variant...
Then from the menu options choose program->excute in background...
In this way we can crate a backgroup job with out crateing any varinat for the report...
Satya. -
Schedule background job using system variant
Dear gurus,
We're planning to schedule background job using system variant, for example, current fiscal year and current posting period (transaction AFAB). Is it possible? So for example, for this month, "Posting Period" value will be 6, and then next month will be 7.
Can you tell me how to do this, if I want to set up the schedule only once?
Thanks for your help.
Best Regards,done using abap
-
Retain background jobs and its variants before system refresh activity
Hello All,
I am going to perform system refresh activity on quaity system on monday. Customer wants to retain the background jobs and its variants in the quality system. Please guide me and let me know the steps to retain the background jobs and its variants before starting the system refresh activity.
Regards
SubbuDear Subbu,
You have to export the TBT* Tables to retain the jobs. You can do this with R3trans:
1. Make Export file
2. Make Import file
3. Make Export in Q System before Systemcopy
4. Start Database and not SAP
5. Make Import in Q after Systemcopy
6. Start sap
1. Make Export file /tmp/export_cmd
export
file='/tmp/export_Q.dmp'
client=<your client>
delete from TBTCA
delete from TBTCB
delete from TBTCCNTXT
delete from TBTCCTXTT
delete from TBTCCTXTTP
delete from TBTCI
delete from TBTCJCNTXT
delete from TBTCJSTEP
delete from TBTCO
delete from TBTCO_V01
delete from TBTCP
delete from TBTCPV
delete from TBTCR
delete from TBTCS
delete from TBTC_SPOOLID
delete from BTCEVTJOB
select * from TBTCA
select * from TBTCB
select * from TBTCCNTXT
select * from TBTCCTXTT
select * from TBTCCTXTTP
select * from TBTCI
select * from TBTCJCNTXT
select * from TBTCJSTEP
select * from TBTCO
select * from TBTCO_V01
select * from TBTCP
select * from TBTCPV
select * from TBTCR
select * from TBTCS
select * from TBTC_SPOOLID
select * from BTCEVTJOB
2. Make Import file /tmp/import_cmd
import
file='/tmp/export_Q.dmp'
3. Make Export in Q System before Systemcopy
R3trans -w /tmp/Q_export.log /tmp/export_cmd
4. Start Database and not SAP
sqlplus "/as sysdba"
SQL> startup
or
startsap
stopsap r3
5. Make Import in Q after Systemcopy
R3trans -w /tmp/Q_import.log /tmp/import_cmd
If you want to undo this, start the export script in P system and the Import script in Q system.
Don't be afraid of the delete statement but without delete it doesn't work!
6. Start sap
startsap
Best regards
Willi Eimler -
Is it possible to create a background job without a variant
Hi all,
Is it possible to create a background job without a variant ?
If Yes ..How ?
Thanks in advance
KRHi KR,
if you have any selection-screen in your programm it is not possible otherwise it is possible.
Plzz Reward if it is useful,
Mahi. -
Background Report Program with Variants to be Overwritten
I have an Following Scenario.
I have an Report program with the Selection Screen displaying an Input Parameter of date type sy-datum.This particular program is scheduled as an Background Job.
Now when i execute the program in background the existing variant date must be overwritten with any new values . So please provide an solution for this.
Thanks
K.Nadesh Kumarhi nadesh,
enter date on your selection screen , then save variant.
tick the selection variable check box i.e L.
now click on pushbutton SELETION VARIABLE.
Then select type D and select the criteria current date or whatver of your choice.
if you are not clear then search for the thread "daily background job". I think you will get the answer from there.
Regards
Abhinesh -
Background Job step and Variant
Hi,
We are undergoing process of renaming user IDs(Eg from ABC to XYZ). I would like to know the effect on Background jobs due to renaming. I am sure we need to update the job step(s) with the new user ID. Do we need to do anything with variants too or will they work for new IDs also. Your help is highly appreciated.
Thanks,
Venu.Hi,
This is SAP Business one system administration forum. Please find correct forum and repost your discussion to get quick assistance.
Please close this thread here with helpful answer.
Thanks & Regards,
Nagarajan -
Sending of email triggered in a background job ends with error.
Hello all,
I have created a API which triggers mail to a distribution list using class CL_BCS. When i execute this API in foreground it works fine and the mails are triggered.
However i am calling this API in a report which will scheduled as a background job in my application and this job executes for some 5 to 6 hours and after that i trigger the mail. However at this point the job gets cancelled due to an abort message raised in
one of the CL_BCS methods.
The method is cl_cam_address_bcs=>create_internet_address which is called in my API and internally this calls many other methods. The abort meessage is thrown from the method instantiate_imp_class of class CL_EXIT_MASTER.
The ST22 log reads like this:
Runtime Errors: LOAD_SWITCHSTATES_MISMATCH
Short text: Current switch statuses are incompatible with program switch statuses.
What happened?
The current switch statuses that are read for the execution of the
program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" are incompatible with the switch
statuses with which the
program "CL_IM_CVI_ADDRESS_UPD_IMPL====CP" was generated at the time
20090902114544.
Any advice would be greatly helpful.
Warm Regards,
Naveen MHi!
How you determine sender (method set_sender) ? if you use current user, when it runs on background use a backgorund user and it maybe can not determine an email.
Try force a sender (harcode your user for test when sy-batch eq 'X')
If it works, you need to determine the user to be used on jobs to solve this problem.
I hope it helps
Regards!!!! -
Background Job cancelling with error Data does not match the job definition
Dear Team,
Background Job is getting cancelled when I run a Job on periodically but the same Job is executing perfectly when I run it manually(repeat scheduling) .
Let me describe the problem clearly.
We have a program which picks up files from an FTP server and posts the documents into SAP. We are scheduling this program as a background Job daily. This Job is running perfectly if the files contain no data. But if the file contains data the JOb is getting cancelled with the following messages.
And also the same Job is getting executed perfectly when repeat scheduling is done ( even for files with data).
Time Message text Message class Message no. Message type
03:46:08 Job PREPAID_OCT_APPS2_11: Data does not match the job definition; job terminated BD 078 E
03:46:08 Job cancelled after system exception ERROR_MESSAGE 00 564 A
Please help me in resolving this issue.
Thanks in advance,
Sai.hi,
If you have any GUI function modules used in the program of job
you cannot run it in background mode. -
Background job failing with license check error
Hi Experts
In our ERP 6.0 system ,all the background jobs are failing with license check error.
Have checked the license in SLICENSE and the license is fine.
There is no warning while users are loggign in ,but when any background job is runing its failing with error
Job started
Logon not possible (error in license check)
Job cancelled after system exception ERROR_MESSAGE
Also performed the license test which is failing
F:\usr\sap\XX1\SYS\exe\uc\NTAMD64>saplicense -test pf=F:\usr\sap\XX1\SYS\profile
\XX1_DVEBMGS00_host_xx
Protocol saplicense test:
Read sapsytem name
ok, sapsytem name = XX1
Read message server host
ok, host = hostname
Read message server service port
ok, service port = sapmsXX1
Connect to message server
ok, connect done
Read hardware key from message server
ok, got hardware key
Detach from message server
ok, detached
Check hardware key
ok, hardware key = T0343073854
Connect to database
ok, connected
Check license
ok, check done
Disconnect database
ok, database disconnected
test result: license test failed
LICENSE system: XX1 hardware key: T0343073854 expiration_date:
installation no: key:
userlimit: 0 productid: R3_BASIS
system-nr:
license expired ***
Please suggest how to troubleshoot.
Regards
Ajay@Michael
In SLICENSe the Hardware key field is not BLUE or BLACK and its showing the exact hardware key which i can see at OS level with saplicense -get command.
@Jagadish
Note is good refrence, i reiinstalled the Digitally signed license with saplikey command and it was successful.
But still the license test is failing at OS Level..below is the command prompt output.
===================================================================
F:\usr\sap\XX1\SYS\exe\uc\NTAMD64>saplikey -install C:\license_script_XX.txt pf
=F:\usr\sap\XX\SYS\profile\XX_DVEBMGS00_mngsez148079
SAP License Key Administration - Copyright (C) 2003 SAP AG
2 SAP license key(s) successfully installed.
F:\usr\sap\XX\SYS\exe\uc\NTAMD64>saplicense -test pf=F:\usr\sap\XX1\SYS\profile
\MD1_DVEBMGS00_mngsez148079
Protocol saplicense test:
Read sapsytem name
ok, sapsytem name = XX1
Read message server host
ok, host = host
Read message server service port
ok, service port = sapmsXX1
Connect to message server
ok, connect done
Read hardware key from message server
ok, got hardware key
Detach from message server
ok, detached
Check hardware key
ok, hardware key = T0343073854
Connect to database
ok, connected
Check license
ok, check done
Disconnect database
ok, database disconnected
test result: license test failed
LICENSE system: XX1 hardware key: T0343073854 expiration_date:
installation no: key:
userlimit: 0 productid: R3_BASIS
system-nr:
license expired ***
============================================================
@Juan
The hardware key was changed and we requested a new license with new hardware key,system was runing fine for couple of weeks with all background jiobs for SPAM./SAINT Ok .We performed EHP4 on this system.
But now this issue is here,so i guess we should troubleshoot.
Please let me know any other pointers.
Regards
Ajay
PS In SLICENSE new installed license is fine and all users can login. -
Background Job Terminating with Signal 4 received by operating system
Hi ,
There is a zee ABAP program which is working fine in foreground but the same was not working at BACKGROUND when I shedule the job with the same zee ABAP program. the job is terminating with "Job also cancelled due to process termination. See the system log" But the same was worked previous at background too, there are no changes to the program too.The problem was with only this zee ABAP program for remaining are all working fine.
St22:
An SAP System process was terminated by an operating system signal.
Possible reasons for this are:
1. Internal SAP System error.
2. Process was terminated externally (by the system administrator).
Last error logged in SAP kernel
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZSDUZ980" in
"ADD_NO_ACTIVITY_RECORDS".
The main program was "ZSDUZ980".
The termination occurred in line 1174
of the source code of program "ZSDUZ980" (when calling the editor 11740).
The program "ZSDUZ980" was started as a background job.
Component............ "Taskhandler"
Place................ "SAP-Server witco-10_NCQ_00 on host witco-10 (wp 1)"
Version.............. 1
Error code........... 11
Error text........... "ThSigHandler: signal"
Description.......... " "
System call.......... " "
Module............... "thxxhead.c"
Line................. 7209
The error reported by the operating system is:
Error number..... " "
Error text....... " "
System Environment
SAP Release.............. "31I"
Operating system......... "AIX"
Database type............ "ORACLE"
SAP kernel............... "31I"
SAP database version..... "31I"
Thanks
SambiHi Mark,
Thanks for the reply,
Below are the memory details in our system, according to the Notes you send to me, They have set it as it is.
abap/heap_area_dia 188743680
abap/heap_area_nondia 400556032
abap/heap_area_total 838860800
abap/heaplimit 25165824
The same Zprogram was worked before in the BAckground, But from last week it stop working. But there are no chages happen to this zee ABAP program.
Thanks
Sambi -
Scheduled TMS_ # TMS_TP_IMPORT background jobs fail with error code 0232
Is anyone else having the problem we've just encountered since upgrading to ECC 6.0 and CRM 2007, where once setting up the automatic import ALL background jobs, to have all of the Transport Change Requests imported into the Q-Prod testing systems automatically, fail after several successful runs?
After setting up the automatic import background job to run every 15 minutes, the first few run successfully (importing any transports as it should), then the transports stop being imported.
The background jobs continue to run, but have the following in the job log overviews CRM 2007 - "Could not start transport control program tp". R\3 ECC 6.0 - "Transport control program tp ended with error code 0232".
Only by deleting the background job and recreating it (or manually importing) from STMS, can the transports continue to be imported. Although I have noticed that there are multiple tp.exe processes started, which need to be deleted before the STMS and TMS Background jobs work again.
The:
DB is SQL Server 2005
disp+work is at version 7000.150.14.48855
R3Trans is at version 7000.149.14.47907
tp is at version 7000.144.14.39594
Any suggestions on how to cure this for good?Thanks All
FYI
SAP first suggested the following notes: 19466, 1150361, and to add a Startup profile parameter rfc/use_gwstart = 1. Which was only partially successful.
I guess it had more to do with RFC processes hanging than it did with the tp, which was fixed in a later kernel patch level.
I've upgraded the kernel to the latest (70000.181.0.0) and my problem was fixed.
Ken -
Running job along with variant programatically
Hai,
I have to run a report (which have selection screen) through job from the module pool program.
that is the user will click on a button which triggers the execution of the report in back ground.
this report have a selection screen.I am creating the variant programatically & I have to use the same varinat in the job.But when I checked the job_open fm , it is not taking any input parametrs for variant.
please note creating the variant & job before the execution of the module pool program is not possible because I have to ceate the variant with the values from the module pool screen & I need to use the job
because the foreground process takes huge amount of time hence going for back ground.
can any one please tell how to cretae a job with varinat programatically?
creating a job with out variant is possible through job_open but I want to create a job with variant so that I can run the repor from module pool.
please give your ideas.
Regards,
Bhaskar.Hello,
after the function JOB_OPEN you could use the submit_statment.
submit <Reportname> user <user> via job <jobname> number <jobnumber> using selection-set <variant>.
the jobname and jobnumber you would get from the JOB_OPEN-Function.
At last there would be a call function JOB_CLOSE or JOB_SUBMIT.
Regards Wolfgang -
Background job link with the cycle
Hello experts
We are running the background job XXXX to run the distribution cycle. can anyone let me know where this job is having the link to the cycle which needs to be executed.
meanwhile please explain me about the functionality of the program RKALWAIT.
RegardsJay,
seems data in the TBTCPV view was corrupted .. try to re-define the failing jobs thru SM36 or SM37 ..
for RDDIMPDP -- in SE38--> Run RDDNEWPP program to re-define the Job.
-K
Maybe you are looking for
-
Responses in PDF form are not visible
I have Adobe Acrobat Pro XI installed and have produced a form which can be filled in by third parties. I have received a return in which the all of the responses are not visible unless I click in the field
-
Localization patch for France (Finance Module)
Hi We want to launch E0business in France. kindly inform me what is the latest localization patch available for France (Finance Module). Thanks Krishna
-
Policy issues with new Version
I get the following error when an application has an assembly that asks for a Oracle.DataAccess version of 10.2.0.100 but the new server has 1.102.2.20 with the policies on it. I want to avoid rebuilding assemblies with the latest version since their
-
BBP_GET_CATEGORIES_F4 short dump
Hi Gurus, We are building SRM 7 with ECS. Product categories are replicated froom ECC 6 EHP4. When we are searching product categories in SC with match code it leads to a time out with the following error message : Error application is coming up. htt
-
Server 2008 TS - some client could not connect to the server
Hi guys, I have a Server 2008 x64 Terminal Server with license server (some machine) and installed device CALs. I can connect with Windows 7 client to Terminal Server by RDP (TS assign device CAL to every connected machine automatically) without prob