Background job step - Printer - Output device table
Hi,
When creating background job, printer- output device also specified for every step. Which table to check for job name and output device combination ?
Thanks.
Hi Raj check table TBTCP
Similar Messages
-
Background Job not Printing TOs immediately
Hello experts,
I am having an issue with printing Transfer Orders created by background job, the output requests are sent to the output controller with status '-' . It works when I manually create the TOs or if I run the RLAUTA10 program with my userID in SE38 .
I have set the background job user default print parameters in SU3 to print immediately.
Also in the Job step, I have set up the print parameters to 'print immediately'
I have assigned printer for sorce storage type & set the indicator to use the source sto type in OMLV, The printer seems to be determined correctly, I've checked the Spool request name & printer in the spool controller, only issue seems to be the print not being triggered immediately.
Not sure, if there is some other setting that I have to make to be able to print the TOs created by the background job immediately.
Any help would be appreciated.
Thanks
Kris Twhether the printer which you assigned is configured in SAP (network printer)? or LOCL?
printing may not happen if LOCL(background job)
Thanks -
Page-break in alv background job for alv output variant not coming correctl
Hi,
I have created an ALV grid report. When i run the report in background i get the output with correct page-break on FIELD1. Now when i run the report in background with an "ALV output variant" (its the ALV variant that controls the fields display in the output; this is not the program variant), i do not get the page-break on FIELD1. I have already build the sort criteria and using:
gs_sort-group = '* '. "New-Page
Please let me know what could be reason for not getting the page-break in background when i am using the alv output variant and how do i correct this problem.
Regards,
RakeshHello Everyone,
I have solved the problem. While running the program in background, we get the page-breaks when we use the below part of code in the sort catalogue with the condition that the program variant should not use any ALV layout variant.
gs_sort-group = '* '. "New-Page
If you are using the ALV layout variant in the program variant then we can check the ROWPOS, COLPOS, and NO_OUT for that ALV layout variant and pass them along in the fieldcatalog table. You should be careful with not to pass the layout variant in the DISVARIANT. You can notice that i have cleared it and simply passing the program name into that.
*C-- Process separately for jobs running in Background. Actually
*C-- sortcat-group solves the problem only in Foreground. In background
*C-- when ALV layout variant is not selected then it works otherwise it
*C-- fails. So for background jobs we are reading the fieldcat and then
*C-- passing the same in the display FM.
IF sy-batch = 'X'.
CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
i_dialog = ' '
i_user_specific = ' '
i_default = ' '
* I_TABNAME_HEADER =
* I_TABNAME_ITEM =
it_default_fieldcat = gt_fieldcat
i_layout = gs_layout
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
IMPORTING
* E_EXIT =
et_fieldcat = lt_fieldcat
* et_sort = gt_sort[]
* ET_FILTER =
* es_layout = gs_layout
CHANGING
cs_variant = gs_disvariant
EXCEPTIONS
wrong_input = 1
fc_not_complete = 2
not_found = 3
program_error = 4
OTHERS = 5
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR gs_fieldcat.
LOOP AT gt_fieldcat INTO gs_fieldcat.
*C-- Transfer all position changes to gt_fieldcat from lt_fieldcat
CLEAR ls_fieldcat.
READ TABLE lt_fieldcat
INTO ls_fieldcat
WITH KEY fieldname = gs_fieldcat-fieldname.
IF sy-subrc = 0.
gs_fieldcat-row_pos = ls_fieldcat-row_pos.
gs_fieldcat-col_pos = ls_fieldcat-col_pos.
gs_fieldcat-no_out = ls_fieldcat-no_out.
MODIFY gt_fieldcat FROM gs_fieldcat INDEX sy-tabix.
CLEAR gs_fieldcat.
ENDIF.
ENDLOOP.
*C-- Clear the disvariant for the background job as it contains the ALV
*C-- layout varinat
CLEAR gs_disvariant.
gs_disvariant-report = 'ZGPPMP0001'.
Then pass gt_fieldcat to 'REUSE_ALV_GRID_DISPLAY'.
The reason i'm doing it this way is that when we pass the layout variant name, the contents in gt_fieldcat were getting modified.
One more thing i'd like to point out is that that, i tried to delete the fields with no_out = 'x'. Now when i ran the program in background with all the fields in sort catalog (suppose there are 2 fields field1 and field2) also in fieldcatalog it ran fine. In the next run in background i removed one of the fields in sort catalog from the fieldcatalog (delete the fields with no_out = 'x') and i got dump. Basically i had hidden field1 and so the code which was deleting fields with no_out = 'x' deleted this field from gt_fieldcat. So basically we should not delete fields with no_out = 'x'.
I was getting ABAP runtime errors MESSAGE_TYPE_X in the following part of the standard code.
000310 LOOP AT CT_SORT INTO LS_SORT.
000320
000330 READ TABLE IT_FIELDCAT ASSIGNING <LS_FIELDCAT>
000340 WITH KEY FIELDNAME = LS_SORT-FIELDNAME BINARY SEARCH.
000350 IF SY-SUBRC NE 0.
> MESSAGE X000(0K).
000370 ENDIF.
000380
000390 LS_SORT-SELTEXT = <LS_FIELDCAT>-SELTEXT.
i have just mentioned this part because when i checked the forum many people were getting such errors "MESSAGE_TYPE_X". This could also be one of the reasons. -
Background job- getting printed automatically
In my BDC Program i have submitted Session for Background Processing using
Submit RSBDCSUB..........
my code is also given below..The problem is after the user executes the program, background job is automatically going to his Local printer and getting printed. HOw to avoid this?
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = gf_jobname
IMPORTING
jobcount = gf_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
*-Submit the selected sales orders for changes.
SUBMIT rsbdcsub AND RETURN
WITH mappe = v_sess
WITH von = sy-datum
WITH bis = sy-datum
WITH z_verarb = 'X'
WITH fehler = space
WITH batchsys = space
WITH logall = space
USER sy-uname VIA JOB gf_jobname NUMBER gf_jobcount.
IF sy-subrc NE 0.
MESSAGE i999 WITH text-013.
EXIT.
ENDIF.
*-Close job and start immediately.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = gf_jobcount
jobname = gf_jobname
strtimmed = 'X'
IMPORTING
job_was_released = gf_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.On SUBMIT use
SUBMIT zxxxxxx TO SAP-SPOOL
WITHOUT SPOOL DYNPRO
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
DESTINATION printer
NUMBER number
AND RETURN -
Hi,
I have 3 steps in my job. I want to check the status of each job step and if that job step fails , send email to certain people.
How do i go abt doing abt it??
In table TBTCP -- it gives the status of each job step as 'P' ie scheduled even for the finished ones... so i cant get correct data from TBTCP.
Is der any FM implementing the same??
Its Urgent.
Answers will be rewarded,
regards,
RohanHi Rohan,
Instead of creating the stpes, why don't you create the Job after completing the Fisrt job and for the Third Job select after completion of the Second job, so that you will get the Status in TBTCP table from there you can write the code to send the email
Regards
Sudheer -
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 -
How to stop background job to print papers
Hi all,
I have background job of forms running every day and its printing papers. My requirement is to stop the printing of papers in the background job.
How to do this .
i am using CALL FUNCTION 'GET_PRINT_PARAMETERS and NEW-PAGE PRINT ON PARAMETERS v_params NO DIALOG.
NEW-PAGE PRINT OFF.
Thanks
KrupaliHi,
<li>Set the below before you call NEW-PAGE PRINT ON
lw_pripar-prrel = space.
lw_pripar-primm = space.
<li>Call NEW-PAGE PRINT ON like below
NEW-PAGE PRINT ON
NEW-SECTION
PARAMETERS lw_pripar
ARCHIVE PARAMETERS lw_arcpar
NO DIALOG.
Thanks
Venkat.O -
Multiple background jobs to fill set-up tables in LO
Hi,
Can we schedule multiple background jobs for filling the same set-up table concurrently - obviously with non-overlapping selections.
ex: one background job for filling order# 1000 to 100,000
one background job for filling order#100,001 to 200,000
Both jobs running at same time.
Thanks,
Anita S.Hi Anitha,
Yes we can Schedule Multiple Setup Jobs for the same Application wiht the Diff Ranges of selections.
It is possible and i have tried in our project.
Egg:-
We did a Reload of some doc that were missing in BI.
Did selective deletion of those corrupted data in some Data targetsand filled the Setup tables wiht those selection conditions (in our case 10 diff selection).
We ran this jobs in Background simultaniously when all the jobes finished we have ran the Full Repair Requests of those 10 selections to those respective data targets.
Hope this gives you enough clarity.........!!!
Best Regards,
VNK. -
Sending output to a printer in a background job
I did a quick search on this issue and found a few suggestions. One suggestion was to use something like this:
SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.
I looked at the SAP help for SUBMIT and it was quite helpful however it raised a few questions. The program that am writing will be run in the background. I want to create a simple report that will print at several different printers when it is done. Looking at the help section (specifically this part):
"The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.
The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.
The selscreen_options additions can be used to determine the selection screen for the program accessed and to supply it with values.
The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.
You can schedule the program for background processing by specifying job_options. "
It seems like I would create a simple program like this:
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
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 submitable TO SAP-SPOOL
SPOOL DESTINATION 'LT50'.
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.
That will then call the background job and the output will go to the print spool. I have a few reservations about this. The print spool will not be determined until the background job. The background job creates sales orders and the material group, in the sales order, determines the printer that the final report will go to. Also, if this is the way to do it, do I just do simple write statements in the background job?Hi,
Please try this ... perhaps it may help.
SUBMIT submitable TO SAP-SPOOL
SPOOL DESTINATION 'LT50'.
IMMEDIATELY 'X' "Add here
VIA JOB name NUMBER number
AND RETURN.
OR
SUBMIT submitable TO SAP-SPOOL
SPOOL DESTINATION 'LT50'.
IMMEDIATELY 'X' "Add here
WITHOUT SPOOL DYNPRO "Add here
VIA JOB name NUMBER number
AND RETURN.
Regards,
Ferry Lianto -
Hi All,
I am new to ABAP. as per our client requirement we need to call background job though a abap code.
How can we retrive background jobs? where/in which tabl are names of backghround job saved?Hi,
please check out the below link it will help you
http://help.sap.com/saphelp_46c/helpdata/en/73/69ef3d55bb11d189680000e829fbbd/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/4a/2d513897110872e10000009b38f889/content.htm
http://www.finance.utoronto.ca/fast/qrg/nav/commonrptfcns/runrptbackgr.htm
the following list is the available system tables
ADCP Person/Address assignment (central address administration)
ADIRACCESS Table to store keys for TADIR objects
ADR2 Telephone numbers (central address admin.)
ADRP Persons (central address administration)
APQD DATA DEFINITION Queue
APQI Queue info definition
D010SINF ABAP- Information about ABAP program source code
E071 Change and Transport System- Object Entries of Requests/Tasks
E07T Change and Transport System- Short Texts for Requests/Tasks
ENLFDIR Additional Attributes for Function Modules
INDX System table INDX
NAST Message Status
STXH STXD SAPscript text file header
T005 Countries
T005S Taxes- Region (Province) Key
T005U Taxes- Region Key- Texts
T006 Units of Measurement
T015M Names of the months
T247 Month name and short text
T777A Building Addresses
TADIR Directory of Repository Objects
TBTCO Job status overview table
TBTCP Batch job step overview
TFDIR Function Module
TFTIT Function Module Short Text
TSP03L Spool- Long device names
TSTC SAP Transaction Codes
TSTCT Transaction Code Texts
TUTYP User Types in Current Price List in SAP System
TUZUS Special versions
TVARV Table of variables in selection criteria
TVDIR View Directory
US930 Data Relevant to Measurement for User Master Record
USR01 User master record (runtime data)
USR02 Logon data
USR04 User master authorizations
USR06 Additional Data per User
USR14 Surchargeable Language Versions per User
USR21 Assign user name address key
ARCH_OBJ Objects for archiving and reorganization
BTCUED Description of user event IDs for background processing
BTXSUPB BSI- Upgrade-Information
CCCFLOW Client Copy Control Flow
DBSTATC DB Optimizer Control (Statistics Creation)
DEVACCESS Table for development users
DEVL OBSOLETE- Do not use (See TCETRAL)
E070 Change and Transport System- Header of Requests/Tasks
E070L CTS- Index for Assigning Numbers to Requests/Tasks
INSTVERS Documentation for installation Status and History
PAT03 Patch Directory
SDBAC DBA Action Table
T100 Messages
TAPLT Program Application Long Texts
TASYS OBSOLETE- Do not use, see TCEDELI
TDEVC Development Classes
TEMSE Temp Sequential table.
TLOCK Change and Transport System- Lock Table
TNAPR Processing programs for output. Can be very handy to find the print program for a SAPScript.
TNAST Printed output control table
TPFET Table of profile parameters
TPFHT Profile header, administration data for profiles in DB
TPROT Table contains all DD tables to be logged
TRBAT Communication Table for Transport Control
TRDIRT Title texts for programs in TRDIR
TRESN Table of Naming Conventions in ABAP Workbench
TRJOB Job ID for Coordinating Batch-ABAP/UNIX for Transports
TSP03C Spool- Device Description Extension
TST03 TemSe data
TSYST OBSOLETE- Do not use (see TCESYST)
TWSYS OBSOLETE- Do not use (See TCETRAL)
USOBT Relation transaction - authorization object
USR03 User address data
USR05 User Master Parameter ID
USR12 User master authorization values
USR40 Table for illegal passwords
USR41 User master- Additional data
UST04 User masters
VARIT Variant texts
VARID Variant directory
D010TAB Table for Use Report---Tables
DD02L SAP tables
DD02T R/3 DD- SAP table texts
DD03L Table Fields
DD03T DD- Texts for fields (language dependent)
EDIDC IDOC Control Records
EDIDOT Short description of IDoc types
EDID2 IDOC segments (version 3.1)
EDID4 IDOC segments (version 4.6)
EDSEA EDI- Table of all segments of current release
VRSX2 Central Table for Version Management (Report Source)
TSE05 Can add parameters to the INSERT COMMAND (IC). Then, when you insert command, your info appears in the editor. Useful for comment blocks, common section of code, etc.
CDPOS Change document items
CDHDR Change document header
T529A governs the foreground sequence of infotypes the system will use to prompt the user during online and batch processing. You will have to code your BDC to follow that sequence of creating infotypes.
T588Z governs the dynamic event processing that will only take place during online user inputs. For BDC's you will have to create separate BDC's to handle any infotypes that are inserted dynamically by this table.
T588M Infotype Screen Control
***********please reward points if the information is helpful to you************* -
To check the status of a step inside a background jobs
Hi All,
i have a requirement where i have to check the status of a step(program)
inside a background job.
I tried with table TBTCP, but this will give the program status as P(scheduled)
always.
i know to find the status of a background job as whole, but how will we
find out the status of a program inside a job.
Could anyone please help?Use function module BP_JOBLOG_READ, result is an internal table of structure TBTC5,
Analyze this internal table, looking for message S550(00) at the beginning of a step.
Regards -
I am defining background job in abap report i am facing the below error
Printer not suitable for job step; automatic output not possible.
Kindly suggest Immediately,
Best Regards,
kaleesThe error was resolved, we are not assigned properly in variant.
-
How to get data from the called program using SUBMIT in a background job?
Hi Experts,
I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
Kindly let me know your inputs and valuable suggestions.Kumar,
When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
Check these threads to get some idea
submit report to spool & import spool id
Re: Generate Spool for a report
K.Kiran. -
Actual Varaint Name used in the Background Job
Hi,
When a program is executed in Background made the selection screen variant selected is not the one that is shown in the Background Job Step information. There we see variant as &0000000000044.
I want to find the actual variant that was selected at the time of running the program in background mode.
Thanks.Hi,
I also faced the same issue and after my R&D i found a workaround for this. Check this out.
Create a selection screen parameter and hide it.
PARAMETERS: po_varnt TYPE sy-slset NO-DISPLAY.
Now place below code in AT SELECTIO-SCREEN OUTPUT event.
AT SELECTION-SCREEN OUTPUT.
CHECK sy-batch IS INITIAL.
CLEAR po_varnt.
MOVE sy-slset TO po_varnt.
If you are running in background by pressing F9 from selection screen, Use your hided parameter po_varnt for the variant name instead of sy-slset.
If you are running the report in foreground or through SM36 then you can use sy-slset to know the variant name.
Thanks,
Vinod. -
Backup of background jobs after system refresh
Hi All,
I want to know that during the system refresh how can we take the backup of the background jobs which are in "Released" state so that we can schedule them the same way after the refresh is done. Presently we are taking the screen shot of "start condition" and "step" of each and every job and then using those screenshots we are scheduling them again after the refresh is completed. It would be really helpful and time saving for us if we come to know the tables where this information is stored and also if there is any other easier way for this.
Regards,
LovneeshHello,
Check the below thread. It mentions all the tables that contain batch job information.
https://scn.sap.com/thread/1709175
" Check below mentioned tables
BTCCTL,
BTCDELAY
BTCEVTJOB
BTCH1000
BTCH1010
TBTCO
TBTCP
These have all the information you need regarding background jobs, you may export these tables at the source and import them "
Check and provide feedback.
Regards,
Mudasir
Maybe you are looking for
-
My icloud password is different to my normal apple password I use for itunes can I change it to be the same, have ipone 4s just got ipad air having problems getting old photos from phone to pad ?
-
Concept of Integrated Consolidation Unit of SEM BCS
HI Experts, I'm now in the SEM BCS 4.0 and BW 3.5 implementation. Previously I was the ECCS specialist and before the FI and AM specialist. Now I'm in SEM BCS implementation. I have one question in connection to the integrated consolidation unit. As
-
WAD changes are not reflecting
Hi , I have WAD Issue ,If i change the present web template and if i do change anything on the present web template and if run this web template it is giving the previous result....it is not reflecting the present changes. The changes made in the WAD
-
Hello I have Oracle 9, and I have a LogFile corrupt, message:ORA-00354 corrupt redo log block header, so I would like to drop this LogFile but i have next error: ORA-00350 log string of thread string needs to be archived, and I can not drop it, Could
-
Printing data in Smart form side by side.
Hi Abap Guru's, I have data in internal table. i dont know how many records are there in it. I need to print the data, side by side in smart form. For example: Mr James was a member of the above-mentioned plan. you and <b>your c