Setting up Background job
Hello Guys,
I gone thru the forum and tried to set up the background job for an requirement but could not able to proceed further as I was not sure how to move on..
Requirement
We would like setup to call our PM's automatically when they are due or at least 3 days before.This would save time to plan well in advance.
In this case where should I mention the 3 day period ? I just started getting into SM36 and clikc the start condition and set the time to run and then flagged the periodic job and clicked the periodic values as daily and save it. Then I hit steps button and maintain ristra20 as prog name and keep the variant as blank and save it .(Is variant is neccessary ?) Then I get into sm37 where I could see some * on job name .I dont know how to proceed from here and wht would be the job name and other steps Also I tested job wizard and not sure what is the purpose of this ?
Could anyone walk me through for the above mentioned requirement
Mahee
Mahee,
Creating the work order ahead of the actual due date is actually accomplished by the "call Horizon" parameter on the Maintenance Plan. A 100% Value on this field indicates that the Call object be created on the date its due. Please enter a appropriate value here based on the plan to get the order created 3 days ahead.
You actually schedule the PM in background using IP30 transaction.First create and save a variant for the plan that you would liek to schedule.Then call up the variant In here enter the plan details and then choose Program > execute in background.Enter a valid SAP printer and then choose "DATE AND TIME" push button to enter the start date and time of the job.After this, Choose the "Periodic job" check box and then choose "period values" at the bottom of the screen to indicate the frequency at which you would like to run the program and then choose the "SAVE" button.
This should complete teh job creation for you.
Regards
Narasimhan
Similar Messages
-
Procedure for setting a background job
Hi Experts,
Please give me the step by step procedure in setting a background job.
Thanks,
KavinHi,
Specifying ABAP Program to Run in Background
ABAP program or external program can be specified to be run in the background. More than one program can be executed with a single background job. To do it you should add a job step for each program.
Let us first discuss the procedure for creating an ABAP report.
The Users field will, by default, display your name, indicating that the user (you) is authorized to run this program.
In case there is another user authorized for scheduling the job, then the default name is changed and system displays the name of the other user.
Now choose ABAP and enter the name of the report.
Choose variant from the Variant list. Specify the language you want the report to be in.
With Print specifications, you can specify whether you want the report output to be held in the SAP spool system or have it printed as soon as the job has run.
For external command, by default, the job step will run under your SAP System authorizations. So your name will appear in the User field.
But if the program is running under the authorization of another user, you can change this default option by entering another user name.
Then choose External command and enter the predefined SAP name. If required, enter any additional arguments required for the command.
The host system on which the command should run and the type of operating system at the host should be specified. You can determine the host name using the host name command on the target host system.
You can also specify how the output from the external program should be treated, as well as other runtime options by using Control flags. It is advisable to use default settings for these options. If you are authorized for background processing, you can also choose External programs as a job step option.
To run an external program, enter the exact path, program or script name, arguments required by the program, and the name of the host system on which the program is to run. After this, save the job step and return to the job identification screen.
Note that in the SAP system the ABAP programs are not predefined; therefore, the system does not perform an authorization check. Hence, the system does not bother to check whether you are allowed to use the command.
For detailed information on Background Job, Check the following link and help.sap.com,
http://aspalliance.com/1129_Background_Processing_SAP_R3_System
Hope this helps you.
Regards,
Vinodh -
Rule set import - Background job did not run
Hi,
I am setting up my CC 5.2 production system. I have downloaded from ruleset from the dev CC and imported it into production. However the background job generated did not run. I am implementing SAP note 999785 to fix this, but am wondering what should I do about the rule set? Do I need to delete the rule set and reimport it? As this background job did not run I notice that the permission rules did not generate.
Any advice is welcome.
ThanksHi,
as the backgorund job never ran and no rules were created, I can just reimport the ruleset and let the job run. I have tried this and the rules were created successfully -
Background job not yet been Finished
Hi,
I have set a Background job today at 10:15 to start run at today 11:30 AM.
it is a periodic daily process at 11:30 am.
But when i checked the status of this job, its still in the status Released.
i know that, this job will not take more then 20 mins
what could be reason?
Regards,
SwethaHello Sweta,
As the job is in 'released' status so you can say that it has not started running, it will come to 'active' status as soon as it starts running, so you should not fear to cancel the job scheduled.
Answer to why in 'released' status for such a long time may be due to some network speed problem or due to some other jobs alreay running in the system which would be occupying all the work processes which are available in the system. If possible try to find the job which has taken more that 65 thousand seconds, kill that job and then refresh after 5-10 mins to see the status of your job.
Hope it helps.
Thanks,
Jayant -
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 -
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. -
Hi,
In my program iam using this function call function 'LIST_TO_ASCI'
so what ever the output placed in list is transfered to end customer in the textfile format , my problem is when i set in background job, some records are missing , is there any restrictions for setting column and row size
REPORT ZDEVTESTING
NO STANDARD PAGE HEADING
LINE-SIZE 275
LINE-COUNT 80
MESSAGE-ID YMSG.
INCLUDE Y_INCLUDE_FTP_V01.
TYPE-POOLS : SLIS.
TYPE-POOLS: SLIST.
TABLES: LIKP,
LIPS,
LFA1,
VBKD,
KNA1,
ADRC,
VBAP,
KNVK,
T005T,
ZMMGRINFO,
ZSDDOITEM,
ZPASPACKLIST,
ZSDPACKINFO_V1.
DATA : BEGIN OF TEM_ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
END OF TEM_ITAB.
DATA: V_LOTID(15) TYPE C,
V_TOT_LFIMG(30),
V_COUNTRY_TEXT(15),
TEMP_CHARG,
L_NTGEW LIKE ZSDPACKINFO_V1-NTGEW,
L_LFIMG LIKE LIPS-LFIMG.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN, "UTAC DO NO
CUSO(30), "CUSTOMER SO
CUIN(10), "CUSTOMER PART NO
POSNR LIKE LIPS-POSNR, "ITEM NO
ARKTX LIKE LIPS-ARKTX, "ShortTextforSOITEM
LFIMG LIKE LIPS-LFIMG, "QTY
WADAT_IST LIKE LIKP-WADAT_IST, "DO DATE
VBELN1 LIKE LIKP-VBELN, "UTAC PO NO
NAME1 LIKE KNA1-NAME1, "SHIPPING NAME
NAME2 LIKE ADRC-NAME1, "Billing Name
FNAM(35), "Forwarder Name
LIFNR LIKE LFA1-LIFNR, " Forwarder
MAWB(40), "MAWB Number
HAWB(40), "HAWB Number
FLNO(70), "Flight Number
ZCUST_LOTID LIKE ZMMGRINFO-ZCUST_LOTID, "CUSTLOTID
CHARG LIKE LIPS-CHARG, "UTACLOTID
ZDATECODE LIKE ZMMGRINFO-ZDATECODE, "UTAC DATE CODE
ZU_COO LIKE ZMMGRINFO-ZU_COO, "COUNTRY OF ORIGIN
V_BTGEW(19), "GROSS WEIGHT
V_NTGEW LIKE ZSDPACKINFO_V1-NTGEW, "Net Weight
V_CTN1 LIKE ZSDPACKINFO_V1-ZU_CTN_NUM, "CARTON NUMBER
V_DIM(15), "CARTON DIMENSION
KUNAG LIKE LIKP-KUNAG, "Sold-to-Party
V_QTY1(30),
V_QTY2(30),
V_QTY3 LIKE LIPS-LFIMG,
V_QTY LIKE LIPS-LFIMG,
V_QTY4 LIKE LIPS-LFIMG,
V_QTY5(30),
ADRNR LIKE KNA1-ADRNR,
BSTKD LIKE VBKD-BSTKD, "CUST PO
MATNR LIKE LIPS-MATNR, "MATERIAL
WERKS LIKE LIPS-WERKS, "PLANT
V_CTN(4),
V_TOTCTN(4),
NTGEW LIKE ZSDPACKINFO_V1-NTGEW,
NTGEW1(30),
SHPN(35), "CUSTOMER NAME
KUNNR LIKE LIKP-KUNNR, "SHIP-TO-PARTY
END OF ITAB.
DATA : BEGIN OF ITAB1 OCCURS 0.
INCLUDE STRUCTURE ITAB.
DATA : END OF ITAB1.
DATA: BEGIN OF S_DATA OCCURS 0,
CUSO(30), "CUSTOMER SO
CUIN(10), "CUSTOMER PART NO
POSNR LIKE LIPS-POSNR, "ITEM NO
ARKTX LIKE LIPS-ARKTX, "ShortTextforSOITEM
LFIMG LIKE LIPS-LFIMG, "QTY
KUNAG LIKE LIKP-KUNAG, "Sold-to-Party
V_QTY1(30),
V_QTY2(30),
WADAT_IST LIKE LIKP-WADAT_IST, "DO DATE
VBELN LIKE LIKP-VBELN, "UTAC DO NO
VBELN1 LIKE LIKP-VBELN, "UTAC PO NO
NAME1 LIKE KNA1-NAME1, "SHIPPING NAME
NAME2 LIKE ADRC-NAME1, "Billing Name
LIFNR LIKE LFA1-LIFNR, " Forwarder
FNAM(35), "Forwarder Name
MAWB(30), "MAWB Number
HAWB(30), "HAWB Number
FLNO(70), "Flight Number
ZCUST_LOTID LIKE ZMMGRINFO-ZCUST_LOTID, "CUSTLOTID
CHARG LIKE LIPS-CHARG, "UTACLOTID
ZDATECODE LIKE ZMMGRINFO-ZDATECODE, "UTAC DATE CODE
ZU_COO LIKE ZMMGRINFO-ZU_COO, "COUNTRY OF ORIGIN
V_BTGEW(19), "GROSS WEIGHT
V_NTGEW LIKE ZSDPACKINFO_V1-NTGEW, "Net Weight
V_CTN1 LIKE ZSDPACKINFO_V1-ZU_CTN_NUM, "CARTON NUMBER
NTGEW1(30),
V_DIM(15), "CARTON DIMENSION
ADRNR LIKE KNA1-ADRNR,
BSTKD LIKE VBKD-BSTKD, "CUST PO
MATNR LIKE LIPS-MATNR, "MATERIAL
WERKS LIKE LIPS-WERKS, "PLANT
V_QTY3 LIKE LIPS-LFIMG,
V_QTY LIKE LIPS-LFIMG,
V_QTY4 LIKE LIPS-LFIMG,
V_QTY5(30),
V_CTN(4),
V_TOTCTN(4),
NTGEW LIKE ZSDPACKINFO_V1-NTGEW,
SHPN(35), "Customer Name
KUNNR LIKE LIKP-KUNNR, " Ship-to-Party
END OF S_DATA.
DATA: HOST LIKE ZFTP-HOST,
USERNAME LIKE ZFTP-USERNAME,
PWD(100) TYPE C,
PRGNAME LIKE ZFTP-PRGNAME,
RDIRLOC LIKE ZFTP-RDIRLOC,
LDIRLOC LIKE ZFTP-RDIRLOC,
HANDLE TYPE I,
FNAME(40) TYPE C,
FAILED(1) TYPE C.
DATA: L_OK(1) TYPE C,
L_ERRMSG(150) TYPE C.
DATA : T_ZMMGRINFO LIKE ZMMGRINFO OCCURS 0 WITH HEADER LINE.
DATA:T_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
VBELN LIKE THEAD-TDNAME.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS :
S_KUNAG FOR LIKP-KUNAG DEFAULT 'BC1001'.
PARAMETERS : S_WADAT LIKE LIKP-WADAT_IST DEFAULT SY-DATUM.
PARAMETERS: S_UPLOAD AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM WRITE_DATA.
PERFORM DOWN_DATA.
*& Form GET_DETAILS
FORM GET_DATA .
SELECT LIKP~VBELN
LIPS~POSNR
LIKP~WADAT_IST
LIKP~KUNNR
LIKP~KUNAG
KNA1~NAME1
KNA1~ADRNR
VBKD~BSTKD
LIPS~MATNR
LIPS~CHARG
LIPS~LFIMG
LIPS~WERKS
LIPS~VGBEL
LIPS~ARKTX
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM LIKP
JOIN LIPS ON LIKPVBELN = LIPSVBELN
JOIN VBKD ON LIPSVGBEL = VBKDVBELN
JOIN KNA1 ON KNA1KUNNR = LIKPKUNNR
WHERE LIPS~LFIMG GT 0 AND
LIKP~KUNAG IN S_KUNAG AND
LIKP~WADAT_IST = S_WADAT
ORDER BY LIKP~WADAT_IST
LIKP~VBELN.
LOOP AT ITAB.
CALL FUNCTION 'Z_GET_CHAR_VAL'
EXPORTING
WERKS = ITAB-WERKS
MATNR = ITAB-MATNR
CHARG = ITAB-CHARG
IMPORTING
ZMMGRINFO = T_ZMMGRINFO
EXCEPTIONS
INVALID_COMBINATION = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ITAB-ZCUST_LOTID = T_ZMMGRINFO-ZCUST_LOTID.
ITAB-ZDATECODE = T_ZMMGRINFO-ZDATECODE.
ITAB-ZU_COO = T_ZMMGRINFO-ZU_COO.
VBELN = ITAB-VBELN.
*Extracting the Flight Number
PERFORM READ_TEXT USING 'Z006' 'E' VBELN 'VBBK'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-FLNO.
Extracting the MAWB Number
PERFORM READ_TEXT USING 'Z007' 'E' VBELN 'VBBK'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-MAWB.
Extracting the HAWB Number
PERFORM READ_TEXT USING 'Z008' 'E' VBELN 'VBBK'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-HAWB.
Extracting the Carton Dimension
PERFORM READ_TEXT USING 'Z013' 'E' VBELN 'VBBK'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-V_DIM.
CONCATENATE ITAB-V_DIM 'CM' INTO ITAB-V_DIM SEPARATED BY SPACE.
PERFORM READ_TEXT USING 'Z015' 'E' VBELN 'VBBK'.
DELETE T_LINE WHERE TDLINE = SPACE.
IF NOT T_LINE[] IS INITIAL.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-CUSO.
ENDIF.
Customer PartNumber
PERFORM READ_TEXT USING 'Z017' 'E' VBELN 'VBBK'.
LOOP AT T_LINE.
MOVE : T_LINE-TDLINE TO ITAB-CUIN.
ENDLOOP.
Extracting the Gross Weight
PERFORM READ_TEXT USING 'Z022' 'E' VBELN 'VBBK'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-V_BTGEW.
*Qyantity in DO
PERFORM READ_TEXT USING 'Z015' 'E' VBELN 'VBBP'.
READ TABLE T_LINE INDEX 1.
MOVE T_LINE-TDLINE TO ITAB-V_QTY.
*UTAC PO NUMBER AND DO NUMBER
MOVE ITAB-VBELN TO ITAB-VBELN1.
*FARWORDER NAME
SELECT SINGLE LIFNR INTO ITAB-LIFNR FROM VBPA
WHERE VBELN = ITAB-VBELN AND PARVW = 'ZF'.
SELECT SINGLE NAME1 INTO ITAB-FNAM FROM LFA1
WHERE LIFNR = ITAB-LIFNR.
CONDENSE ITAB-FNAM.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = ITAB-KUNAG.
IF SY-SUBRC = 0.
ITAB-KUNNR = KNA1-KUNNR.
ENDIF.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = ITAB-KUNNR.
IF SY-SUBRC = 0.
SELECT SINGLE * FROM ADRC WHERE ADDRNUMBER = KNA1-ADRNR.
ITAB-SHPN = ADRC-NAME1.
ENDIF.
SELECT SINGLE * FROM T005T
WHERE LAND1 = ITAB-ZU_COO AND
SPRAS = SY-LANGU.
IF SY-SUBRC EQ 0.
V_COUNTRY_TEXT = T005T-LANDX.
ELSE.
CLEAR V_COUNTRY_TEXT.
ENDIF.
MOVE ITAB-LFIMG TO ITAB-V_QTY1.
TRANSLATE ITAB-V_QTY1 USING ','.
CONDENSE ITAB-V_QTY1 NO-GAPS.
MODIFY ITAB.
CLEAR ITAB.
ENDLOOP.
ENDFORM. " GET_DETAILS
***& Form READ_TEXT
Reading the text
FORM READ_TEXT USING P_ID LIKE THEAD-TDID
P_LAN LIKE THEAD-TDSPRAS
P_NAME LIKE THEAD-TDNAME
P_OBJ LIKE THEAD-TDOBJECT.
REFRESH T_LINE. CLEAR T_LINE.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = P_ID
LANGUAGE = P_LAN
NAME = P_NAME
OBJECT = P_OBJ
TABLES
LINES = T_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
ENDFORM. " READ_TEXT
*& Form WRITE_DATA
text
FORM WRITE_DATA.
LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO ITAB1.
AT NEW VBELN .
WRITE :/1 'ORDER'.
WRITE : 6 SY-VLINE.
WRITE : 7 ITAB1-CUSO LEFT-JUSTIFIED.
WRITE : 17 SY-VLINE.
WRITE : 18 ITAB1-CUIN LEFT-JUSTIFIED.
WRITE : 24 SY-VLINE.
WRITE : 25 ITAB1-ARKTX LEFT-JUSTIFIED.
WRITE : 43 SY-VLINE.
LOOP AT ITAB WHERE VBELN = ITAB1-VBELN.
L_LFIMG = L_LFIMG + ITAB-LFIMG.
ENDLOOP.
WRITE : 44 L_LFIMG NO-GROUPING LEFT-JUSTIFIED.
WRITE : 54 SY-VLINE.
WRITE : 55 ITAB1-WADAT_IST LEFT-JUSTIFIED.
WRITE: 65 SY-VLINE.
WRITE : 66 ITAB1-VBELN LEFT-JUSTIFIED.
WRITE: 76 SY-VLINE.
WRITE : 77 ITAB1-VBELN1 LEFT-JUSTIFIED.
WRITE : 87 SY-VLINE.
WRITE : 88 ITAB1-NAME1 LEFT-JUSTIFIED. .
WRITE : 123 SY-VLINE.
WRITE : 124 ITAB1-SHPN LEFT-JUSTIFIED.
WRITE : 159 SY-VLINE.
WRITE : 160 ITAB1-FNAM LEFT-JUSTIFIED.
WRITE : 204 SY-VLINE.
IF ITAB1-HAWB <> ''.
WRITE : 205 ITAB1-HAWB LEFT-JUSTIFIED.
ELSE.
WRITE : 205 ITAB1-MAWB LEFT-JUSTIFIED.
ENDIF.
WRITE : 245 SY-VLINE.
WRITE : 246 ITAB1-FLNO LEFT-JUSTIFIED.
WRITE : 266 SY-VLINE.
CLEAR L_LFIMG.
ENDAT.
SELECT * FROM ZSDPACKINFO_V1 WHERE VBELN = ITAB-VBELN AND
ZU_CTN_NUM NE '' AND ZU_LCHARG = ITAB-CHARG.
MOVE ZSDPACKINFO_V1-LFIMG TO ITAB-V_QTY2.
MOVE ZSDPACKINFO_V1-NTGEW TO ITAB-NTGEW.
MOVE ZSDPACKINFO_V1-NTGEW TO ITAB-NTGEW1.
MOVE ZSDPACKINFO_V1-ZU_CTN_NUM+6(4) TO ITAB-V_CTN.
TRANSLATE ITAB-V_QTY2 USING ', '.
CONDENSE ITAB-V_QTY2 NO-GAPS.
MOVE-CORRESPONDING ITAB TO S_DATA.
S_DATA-V_QTY4 = ITAB-V_QTY2.
CLEAR S_DATA-V_QTY2.
COLLECT S_DATA.
ENDSELECT.
LOOP AT S_DATA.
WRITE :/1'LOT'.
WRITE : 4 SY-VLINE.
WRITE : 5 S_DATA-CUSO LEFT-JUSTIFIED.
WRITE : 15 SY-VLINE.
WRITE : 16 S_DATA-CUIN LEFT-JUSTIFIED.
WRITE : 23 SY-VLINE.
WRITE : 24 S_DATA-ZCUST_LOTID LEFT-JUSTIFIED.
WRITE : 35 SY-VLINE.
WRITE : 36 S_DATA-CHARG LEFT-JUSTIFIED.
WRITE : 46 SY-VLINE.
WRITE : 47 S_DATA-V_QTY4 NO-GROUPING LEFT-JUSTIFIED .
WRITE : 57 SY-VLINE.
WRITE : 58 S_DATA-ZDATECODE LEFT-JUSTIFIED.
WRITE : 62 SY-VLINE.
WRITE : 63 V_COUNTRY_TEXT LEFT-JUSTIFIED.
WRITE : 75 SY-VLINE.
WRITE : 76 S_DATA-V_BTGEW LEFT-JUSTIFIED.
WRITE : 83 SY-VLINE.
L_NTGEW = S_DATA-NTGEW1.
WRITE : 84 L_NTGEW LEFT-JUSTIFIED.
WRITE : 94 SY-VLINE.
WRITE : 95 S_DATA-V_CTN LEFT-JUSTIFIED.
WRITE : 99 SY-VLINE.
WRITE : 100 S_DATA-V_DIM LEFT-JUSTIFIED.
WRITE : 115 SY-VLINE.
ENDLOOP.
REFRESH S_DATA.
ENDLOOP.
ENDFORM.
*& Form DOWN_DATA
text
--> p1 text
<-- p2 text
FORM DOWN_DATA.
DATA : P_FILE(128) TYPE C.
DATA: P_FNAME(100).
data abap_list like abaplist occurs 1.
DATA : BEGIN OF IFILE OCCURS 0,
TEXT(1023) TYPE C,
END OF IFILE.
PRGNAME = SY-CPROG.
CONCATENATE '/home/sapifc/custrept/' 'IDT_' SY-DATUM '_' '2245' '.txt' INTO P_FILE.
call function 'LIST_TO_ASCI'
exporting
list_index = sy-lsind
tables
listasci = IFILE
listobject = abap_list
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
if sy-subrc <> 0.
endif.
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT IFILE.
TRANSFER IFILE TO P_FILE.
ENDLOOP.
ENDIF.
CLOSE DATASET P_FILE.
ENDFORM.HI,
The width of spool can be of max. 255 size.
In your case, you are displaying data at 266 also (THe WRITE statement).
Try to fit all the columns within 255 width.
Best regards,
Prashant -
How to run the program in background job,program should run in 3 days.
Dear Gurus,
i have a program , that program should run approximately 3 days to get the result.
i scheduled this program as a background job.
how can i run sto5 t-code for this same program.
i that case how we can trace the output.
Experts please help me out.
Thank u very much.
Regards
sudheerHello Sudheer,
The trace can be set on background jobs by using ST12 transaction. Please make sure that the trace is activated for only few minutes in production environment.
Contact your basis team to activate trace on background job and the transaction used is ST12.
Thanks -
Hi Friends,
I wnat to set the background job with following conditions:
Monday to Friday
From 9AM to 6 PM
To run on every half an hour.
Can any one guide for the same.
Regards,
Sai KrishnaHi Friends,
In our Organization PR is created by user dept. & PR release is completed accordingly. In this process Purchase dept. is not in the release strategy. Now PR is completly released & while converting to make PR to PO, purchase dept. found there is some problem in PR. Is there any way Purchase dept. can reject PR & send to user dept. for correcting it.
One method is to have Purchase dept. also in release strategy loop. We are having nearly 400 release strategies. To change all these will take much time. Is there any other way.
Thanks & Regards
Sai Krishna -
Background job terminated in LSMW last step
Experts:
When I run the last step in LSMW: 13 Start Direct Input Program,
I set a background job for Trans:BMV0,
But it goes an error:
"Job started
Step 001 started (program RMDATIND, variant....)
Could not open file xxxx.lsmw.conv
Job cancelled after system exception ERROR_MESSAGE"
could you tell me possible reasons for this error?thank you!Ichecked the file assignment in step seven.
what file path and name did you define for the converted file? is this located on your PC or on the application server?
did you execute step 11?
did step 11 tell you that SAP had written xxx records to the conv-file?
The file path is on the application server
yes,I executed it.
Transactions Read: 9,066
Records Read: 50,324
Transactions Written: 9,046
Records Written: 50,228 -
Report to be generated,mailed based on Reminder date through background job
Hi All,
We have a requirement where in I need to mail the "Task Monitoring" report to the Personnel administrator based on the reminder date set for different task types mentioned in IT 0019.
I am using T-code sm36 to set the background job on a monthly basis.
I am able to mail the report for as per the reminder dates set in the "Task monitoring" report. But I want to know how the system will pick the reminder date on a monthly basis to mail the report accordingly.
Eg. For the month of Jan, i have set the reminder dates falling in that very month in the selction output of "Task Monitoring" report and mailed.
Now I want sytem to automatically pick the reminder dates and mail the report. Pls let me know the steps to make the sytem pick the next reminder dates on its own on monthly basis.
Points would be rewarded for appropriate solutions.
Thanks.
DeepaliHi,
After pressing save button to create a variant, system takes me to the Variant Attributes screen. There I select on "Selection variable" accross "Reminder date". I clcik on the "Dynamic date calculation".
Then when i go to the "Name of Variable column" and i select "First day of the month" from the drop down. Can u pls explain me how this would help me capture the "Reminder dates" on monthly basis falling on each month when i mail the report on monthly basis.
Eg. For the month of Jan, i need all the reminder dates falling in this month.
For the month of Feb, i need all the reminder dates falling in this month. Like this, It goes on all for all the months.
Thanks. -
How to set pl/sql function as background job in apex?
Hi,
I wrote a function which returns boolean value based on result.This function updates a table everyday.How to set this as a background job?or do I need to use dbms_job only?
Thanks,
Mahender.No, you can use APEX_PLSQL_JOB.
Example:
DECLARE
l_sql VARCHAR2(4000);
l_job NUMBER;
BEGIN
l_sql := 'BEGIN MY_PACKAGE.MY_PROCESS; END;';
l_job := APEX_PLSQL_JOB.SUBMIT_PROCESS(
p_sql => l_sql,
p_status => 'Background process submitted');
--store l_job for later reference
END;
full documentation link [http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_plsql_job.htm#BGBCJIJI]
If I help you, please stamp my answer as CORRECT or HELPFULL :) -
Setting layout to a report in background job
Hi.
Does anybody knows how I set layouts dynamically to a report output, given that such report is scheduled to run once a day in a background job?
It would work for me, either: through SM36 or coding JOB_OPEN / JOB_SUBMIT / JOB_CLOSE (or any other option, if available).
My requirement is to execute every night few reports, each with their corresponding variants and layouts.
Something like:
RUN <report1> VARIANT <variant1> LAYOUT <layout1> JOB <job>. (it would output and xls file).
RUN <report2> VARIANT <variant2> LAYOUT <layout1> JOB <job>. (it would output another xls file).
RUN <report3> VARIANT <variant3> LAYOUT <layout2> JOB <job>. (it would output a 3rd xls file).
How should I do to inform variant and layout parameters?
Thank you.
Rafael.I think I didn't make myself clear in my explanation. Sorry about that.
My question is, I can create a new field in selection-screen specifically to layout and it would work. However, as I'm running it in background, the ALV will not be shown and the output file must be the export of the ALV with the layout (if in XLS, it'd be even better, but in .CSV would work as well). I just don't think it would work with a .TXT output, because there's no way to reflect the layout in a .TXT file.
Is there any way of having the ALV inside the output file (saved in the server, in background processing)?
Thank you so much!
Edited by: rvsilvax on Nov 30, 2011 3:45 PM -
Setting format for spool requests in background jobs, for emails
Hi,
Don't know if this is the correct forum, but I'll give it a go (will appricate info regarding what forum is applicable otherwise.)
For some periodical background jobs that we run in ECC, we have in the job set up that a mail group of people to receives the spool request via mail. Vi have used this a few years now. When we recently uppgraded from R/3 to ECC, the format of the spool request sent as mail attachment changed from .txt to .htm. This is however not the problem for us.
We now have a scenario with a daily mail report, i.e. delivered as an attachment (htm-format) in our email system (Lotus Notes).
So far so good, and nothing really new about this, except the changed format.
What the users want is to print this report. It can be done, but it is a wide report, so it cuts the report in three pieces, as there is no automatic sizing to landscape printout and/our automatic sizing to one page. The best solution would be if it automatically was set up to landscape + automatically fit page size. Which format (.txt .htm .xls .pdf...) we receive the file in, is not really important, as long as we can print it directly without having to reformat it. Now we have to save the file to excel manually after we receive it, and then format the excel sheet. Just for printout purpose, so it is annoying work.
Any solution available? (preferrably without coding)
BR,
NiclasHi NTR,
If you are using FM REUSE_ALV_LIST_DISPLAY to print your ALV Report it has got a paramter IS_PRINT in which you can pass your format type. Below is the field name where you have to pass your format type.
IS_PRINT-print_ctrl-PRI_PARAMS-PAART
Regards
Bala -
Setting up archive delete functionalities using background job
Hi,
Through SARA transaction there we can set up a archive delete job by selecting the files, job timing details. Instead of this, we want to set up this functionality using a background job as per the variant and timing requirements.
Is there any option to set up a background job of archive delete functionality by selecting the files through a program or function moduel. Please suggest me if anyone has done this in previous.
Thanks,
SivaHello,
Take a look at OSS note 205585 which describes how to schedule archive delete jobs indirectly using program RSARCHD.
Hope this helps.
Best Regards,
Karin Tillotson
Maybe you are looking for
-
Hi Friends, I need your valuable suggestions for a problem we are currently facing regarding emails in process chains. An explanation of the issue is as follows: The users who load data (present at different geographical locations Ex. A, B, C) use a
-
I have an iPhone 4 and recently updated the software. Since then, the screen will not turn off consistently after the 1 minute auto-lock. How do I fix this?
-
Invalid key number for CRforVS_13_0
why diplay invalid key number when I add a new crystal report in VS 2010?
-
Does a belkin pre-n router work well with a macbook?
Hello, I have a macbook and am going to purchase a wireless router. I've been looking at the belkin pre-n router and have read some great reviews, but none used a mac to test the router. So does anyone have experience with this router and if so, woul
-
IMovie and Photobooth crashing
Both my iMovie and Photobooth apps are crashing right when I start them up. Command: iMovie Path: /Applications/iMovie.app/Contents/MacOS/iMovie Parent: WindowServer [58] Version: 7.1.1 (529) Build Version: 2 Project Name: iMovieApp Source Version: 5