Email multiple spools from background job - SM36 using Spool List recipient
I create a background job using Spool List Recipient to email me the reports. The program that I scheduled to run creates 2 spools. When the spools are sent via email, only the last spool is sent.
Please advise on how I can get the 2 spools sent via email.
i would not use the Spool List recipient from Job and use the function RSPO_SPOOLJOB_TO_OFFICE in your Program instead.
tell me if it helps.
Regards,
Laurent
Similar Messages
-
Write the Error log from background Job to the Spool request
Hi ,
I have a situation where in i need to capture the error log of a Z program which runs as a background job and write that log into the spool request. My Z program calls runs RSEINB00 program using the SUBMIT statement. When this Job fails the error log can be seen in SM37. But i need this error log to be sent in to a spool.
I can read the error log using the BP_JOBLOG_READ FM and can also create a spool using the RSPO_SPOOL_OPEN FM.
The problem is, when the Submit statement executes, due to internal valdation in the RSEINB00 program the program terminates. Due to this it is not able to perform the SY-SUBRC Check and thus doesn't read the log.
Can anybody suggest me how to overcome this problem. I am attaching the code for your refernece.
SUBMIT RSEINB00
USING SELECTION-SET 'TEST2'
TO SAP-SPOOL
LIST NAME 'LOCL'
IMMEDIATELY space
KEEP IN SPOOL 'X'
AND RETURN.
<b>If sy-subrc <> 0.</b>
CALL FUNCTION 'BP_JOBLOG_READ'
EXPORTING
CLIENT = SY-MANDT
JOBCOUNT = i_tbtco-jobcount
JOBLOG = i_tbtco-joblog
JOBNAME = i_tbtco-jobname
TABLES
JOBLOGTBL = l_joblog
IF SY-SUBRC <> 0.
else.
message i002 with l_joblog-msgv1.
ENDIF.
<b>
ENDIF.</b>
Rgds,
Kewal
P.S. : any other approach to solve this problem will be appreciated too and the points will be rewarded suitably.If I select a job in SM37 and I click on "spool" I get a list with separate spool entries for each of the steps, e. g.
Programmname/Kommand Programmtyp Spoolliste
Z_MM_STAT_UPDATE_WERK ABAP 1707445
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1707459
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_MARA ABAP 1721423
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1721437
Z_MM_STAT_UPDATE_MARA ABAP 1721446
Z_MM_STAT_UPDATE_WERK ABAP 1721447
Z_MM_STAT_UPDATE_VKORG ABAP 1721471
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721521
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721816
It's in German but I'm sure you get the idea. For each Z_MM_STAT_UPDATE and variant I have a separate spool list that I can display.
Markus -
Create spool for background jobs which uses submit statement
Hi Gurus,
I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
Thanks in advance, <REMOVED BY MODERATOR>
Regards,
Srinivas.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PMhi check this link ...
Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
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 PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
sy-subrc Meaning
0 Background task scheduled successfully.
4 Scheduling cancelled by user on the selection screen.
8 Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
12 Error in internal number assignment.
regards,
venkat.
Edited by: venkat appikonda on Mar 18, 2008 6:32 PM -
How to get spool from background job run?
Hello,
I have this situation and need help on how to resolve:
I have RFC FM which called from another system, in that FM I am submitting BDC section as a batch job by report RSBDCSUB. The problem is that this job may run for 1 or 2 hours and my RFC call will be close by that time. How can I bring the result of my batch job run back to the calling system in this case? Will appreciate any hints.
Thank you,
GlennHi
After you the Job completes. Use the spool ID and fetch the Spool list using the report RSPOLST2.
You can download the spool job using the Function module RSPO_DOWNLOAD_SPOOLJOB.
Thanks
Dev -
How do i email multiple photos from iphoto
how do i email multiple photos from iphoto?
I have OSX 10.6.8 and use the Photo Browser from within the mail app to add iPhoto pics to emails.
-
Create Spool from Internal table & converrt the spool to PDF
Hi All,
My requirement is take data from a table and find amount specific to each Vendors . So I took all the data into ITAB and do all the calculation. Later after calculation I have to create a spool from this ITAB and this spool have to convert to PDF. Later this PDF have to seend via email.
To convert the internal table to Spool , I used
LOOP AT t_summ INTO wa_summ.
w-amount = wa_summ-remittanceamount.
CONCATENATE wa_summ-vendorcode
wa_summ-controlnum
w-amount INTO wa_textdata SEPARATED BY space.
APPEND wa_textdata TO t_textdata.
ENDLOOP.
DESCRIBE TABLE t_textdata .
w-file_length = syst-tfill * 1022.
l_doctype = 'LIST'.
l_layout = 'X_POSTSCRIPT'.
CONCATENATE ' Listbill Summary Report for' syst-datum INTO
l_title SEPARATED BY space.
l_receiver = syst-uname.
* Create Spool
CALL FUNCTION 'RSPO_SR_OPEN'
EXPORTING
dest = 'LOCL'
* LDEST =
layout = l_layout
name = 'SUMREP'
* SUFFIX1 =
* SUFFIX2 =
copies = '1'
* PRIO =
* immediate_print = ' '
* AUTO_DELETE =
titleline = l_title
receiver = syst-uname "
* division = l_pri_params-prabt " abteilung
* authority = l_pri_params-prber "
* POSNAME =
* ACTTIME =
* LIFETIME = '8'
* APPEND =
* COVERPAGE =
* CODEPAGE =
doctype = l_doctype
* ARCHMODE =
* ARCHPARAMS =
* TELELAND =
* TELENUM =
* TELENUME =
IMPORTING
handle = l_spool_handle
spoolid = w-spoolid
EXCEPTIONS
device_missing = 1
name_twice = 2
no_such_device = 3
operation_failed = 4
OTHERS = 5
. "#EC DOM_EQUAL
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SLVC_C1022_TO_C255'
EXPORTING
i_file_length = w-file_length
TABLES
it_c1022 = t_textdata
et_c255 = lt_spool.
l_length = w-file_length.
LOOP AT lt_spool INTO ls_spool.
l_length = l_length - 255.
IF ( l_length > 0 ).
l_line_length = 255.
ELSE.
l_line_length = l_length + 255.
ENDIF.
* Write contents to spool
CALL FUNCTION 'RSPO_SR_WRITE'
EXPORTING
handle = l_spool_handle
text = ls_spool
length = l_line_length.
ENDLOOP.
* Close Spool
CALL FUNCTION 'RSPO_SR_CLOSE'
EXPORTING
handle = l_spool_handle
pages = 1
FINAL = 'X'
EXCEPTIONS
handle_not_valid = 1
operation_failed = 2
OTHERS = 3
By this I can see the spool with data in SP02.
Then to conver to PDF, I used
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w-spoolid
no_dialog = 'X'
DST_DEVICE = 'LOCL'
* PDF_DESTINATION =
IMPORTING
* PDF_BYTECOUNT =
* PDF_SPOOLID =
list_pagecount = list_pagecount
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
pdf = t_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\t\t.pdf'
filetype = 'BIN'
TABLES
data_tab = t_pdf
* FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
But later when I go and open the PDF, I am getting an error saying'Page cannot be open because it dont have any pages'
Please help me
Regards,
NikhilHi Nikhil,
<li>If you are still not able to find out the problem. You can an alternative way , which is used for the same purpose.
<li>Try this way. It creates spool and and same CONVERT_ABAPSPOOLJOB_2_PDF fm is used to convert spool to PDF. It works. Test this test program.
REPORT ztest_notepad.
DATA:g_val TYPE c,
w_pripar TYPE pri_params,
w_arcpar TYPE arc_params,
i_pdf TYPE TABLE OF tline,
spoolid LIKE tsp01-rqident,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname,
l_jobcount LIKE tbtcjob-jobcount.
DATA:it_t001 TYPE TABLE OF t001 WITH HEADER LINE.
START-OF-SELECTION.
SELECT * FROM t001 INTO TABLE it_t001.
"Read, determine, change spool print parameters and archive parameters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = w_arcpar
in_parameters = w_pripar
layout = 'X_65_132'
line_count = 65
line_size = 132
no_dialog = 'X'
IMPORTING
out_archive_parameters = w_arcpar
out_parameters = w_pripar
valid = g_val.
IF g_val NE space AND sy-subrc = 0.
w_pripar-prrel = space.
w_pripar-primm = space.
NEW-PAGE PRINT ON NEW-SECTION PARAMETERS w_pripar ARCHIVE PARAMETERS w_arcpar NO DIALOG.
ENDIF.
LOOP AT it_t001.
WRITE:/ it_t001.
ENDLOOP.
NEW-PAGE PRINT OFF.
CALL FUNCTION 'ABAP4_COMMIT_WORK'.
spoolid = sy-spono.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolid
no_dialog = ' '
IMPORTING
pdf_bytecount = l_no_of_bytes
pdf_spoolid = l_pdf_spoolid
btc_jobname = l_jobname
btc_jobcount = l_jobcount
TABLES
pdf = i_pdf.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\temp\test.pdf'
filetype = 'BIN'
TABLES
data_tab = i_pdf.
Thanks
Venkat. -
Failed to Run OLE Excel program in background JOB (SM36)
Please help.
I have write a program to use OLE to create a Excel file.
The program can run successful in front end workstation. However, when I run the program in background job by SM36.
The statement "CREATE OBJECT EXCEL 'EXCEL.APPLICATION'" return with error "SY-SUBRC = 2".
How can I solve it ?
Can OLE Excel be run on background job ?
Thanks so much,
MarkHi Mark:
Your need is a very common one. I also was asked to generate an Excel in Background.
It is not possible to work with OLE in background mode.
The reason is: In background mode there is no presentation server. OLE is executed in presentation server.
Below I paste the code I wrote to solve my problem.
This class sends a mail with an excel attached. The Excel content will be the internal table you pass to the class. But the Excel is not binary, it is a plain text file, separated by tabulators. Anyway, when you open it with Excel, the columns are properly shown.
Sorry. Comments are in spanish, I don't have time to translate it.
I kindly ask to everybody which want to use it to keep my name in the code.
* Autor: Jordi Escoda, 30/10/2008.
* Descripción: Esta clase genera un correo electrónico destinado a
* una persona, adjuntando el contenido de una tabla interna como
* Excel (campos separados por tabuladores).
* La virtud de esta clase es su sencillez de utilización. Para lanzar
* el mail con el excel adjunto basta con declarar la tabla interna,
* llenarla, colocar el asunto del mensaje, el destinatario, el nombre
* del excel adjunto, y pasar la tabla interna.
* Ejemplo de utilización:
* DATA: lc_mail TYPE REF TO cl_mail_builder_xls_attach.
* DATA: lt_anla TYPE STANDARD TABLE OF anla.
* SELECT * INTO TABLE lt_anla FROM anla.
* CREATE OBJECT lc_mail.
* CALL METHOD lc_mail->set_subject( 'Excel adjunto' ).
* CALL METHOD lc_mail->set_recipient( 'XXX@XXXDOTCOM' ).
* CALL METHOD lc_mail->set_attach_filename( 'ANLA' ).
* APPEND 'Cuerpo del mensaje' TO lt_body.
* APPEND 'Saludos cordiales' TO lt_body.
* CALL METHOD lc_mail->set_bodytext( lt_body ).
* CALL METHOD lc_mail->set_attach_table( lt_anla ).
* CALL METHOD lc_mail->send( ).
* CLASS cl_mail_builder_xls_attach DEFINITION
CLASS cl_mail_builder_xls_attach DEFINITION.
PUBLIC SECTION.
METHODS: set_subject
IMPORTING im_subject TYPE so_obj_des,
set_bodytext
IMPORTING im_body TYPE bcsy_text,
set_recipient
IMPORTING im_recipient TYPE ad_smtpadr,
set_attach_table
IMPORTING im_table TYPE ANY TABLE,
set_attach_filename
IMPORTING im_attach_name TYPE sood-objdes,
send.
PRIVATE SECTION.
CONSTANTS:
c_tab TYPE c VALUE cl_bcs_convert=>gc_tab,
c_crlf TYPE c VALUE cl_bcs_convert=>gc_crlf,
c_singlequote TYPE c VALUE '.
DATA: l_recipient_addr TYPE ad_smtpadr.
DATA: send_request TYPE REF TO cl_bcs,
document TYPE REF TO cl_document_bcs,
recipient TYPE REF TO if_recipient_bcs,
bcs_exception TYPE REF TO cx_bcs.
DATA: binary_content TYPE solix_tab,
size TYPE so_obj_len.
DATA: l_string TYPE string,
l_body_text TYPE bcsy_text,
l_subject TYPE so_obj_des,
l_attach_name TYPE sood-objdes.
METHODS: create_binary_content,
get_dataelement_medium_text
IMPORTING im_table_name TYPE tabname
im_field_name TYPE fieldname
EXPORTING ex_medium_text TYPE scrtext_m.
ENDCLASS. "cl_mail_builder_xls_attach DEFINITION
* CLASS cl_mail_builder_xls_attach IMPLEMENTATION
CLASS cl_mail_builder_xls_attach IMPLEMENTATION.
METHOD set_bodytext.
l_body_text[] = im_body[].
ENDMETHOD. "add_bodytext
METHOD set_subject.
l_subject = im_subject.
ENDMETHOD. "add_subject
METHOD set_attach_filename.
l_attach_name = im_attach_name.
ENDMETHOD. "add_subject
METHOD set_recipient.
l_recipient_addr = im_recipient.
ENDMETHOD. "add_subject
METHOD set_attach_table.
* Rellena en un string el contenido de la tabla interna recibida
DATA: ref_to_struct TYPE REF TO cl_abap_structdescr.
DATA: my_like TYPE fieldname,
nombretabla TYPE tabname,
nombrecampo TYPE fieldname,
texto_mediano TYPE scrtext_m.
DATA: l_idx TYPE i,
l_valorcampo(16) TYPE c,
l_long TYPE i.
FIELD-SYMBOLS: <fs_linea> TYPE ANY,
<fs_campo> TYPE ANY.
FIELD-SYMBOLS: <comp_descr> TYPE abap_compdescr.
CHECK NOT im_table[] IS INITIAL.
* Línea con los nombres de las columnas.
CLEAR l_string.
LOOP AT im_table ASSIGNING <fs_linea>.
* Toma los atributos del componente
ref_to_struct =
cl_abap_structdescr=>describe_by_data( <fs_linea> ).
LOOP AT ref_to_struct->components ASSIGNING <comp_descr>.
ASSIGN COMPONENT <comp_descr>-name
OF STRUCTURE <fs_linea> TO <fs_campo>.
* Obtenemos el origen de donde proviene (like). Ej:BKPF-BUDAT
DESCRIBE FIELD <fs_campo> HELP-ID my_like.
SPLIT my_like AT '-' INTO nombretabla nombrecampo.
CALL METHOD get_dataelement_medium_text
EXPORTING
im_table_name = nombretabla
im_field_name = nombrecampo
IMPORTING
ex_medium_text = texto_mediano.
IF texto_mediano IS INITIAL.
CONCATENATE l_string <comp_descr>-name INTO l_string.
ELSE.
CONCATENATE l_string texto_mediano INTO l_string.
ENDIF.
AT LAST.
CONCATENATE l_string c_crlf INTO l_string.
EXIT.
ENDAT.
CONCATENATE l_string c_tab INTO l_string.
ENDLOOP.
EXIT.
ENDLOOP.
* Contenido de la tabla
LOOP AT im_table ASSIGNING <fs_linea>.
* Toma los atributos del componente
ref_to_struct =
cl_abap_structdescr=>describe_by_data( <fs_linea> ).
LOOP AT ref_to_struct->components ASSIGNING <comp_descr>.
* Asignamos el componente ue tratamos, para obtener
* el valor del mismo
ASSIGN COMPONENT <comp_descr>-name OF STRUCTURE <fs_linea>
TO <fs_campo>.
CASE <comp_descr>-type_kind.
WHEN 'P'. "Packed Number
* Convierte a caracter
WRITE <fs_campo> TO l_valorcampo.
CONCATENATE l_string l_valorcampo INTO l_string.
WHEN OTHERS.
l_long = STRLEN( <fs_campo> ).
IF l_long > 11 AND <fs_campo> CO ' 0123456789'.
* El Excel muestra un número tal como 190000000006
* en formato 1,9E+11.
* Para eviarlo, los números de más de 11 dígitos los
* concatenamos con comillas simples.
CONCATENATE l_string c_singlequote
<fs_campo> c_singlequote INTO l_string.
ELSE.
CONCATENATE l_string <fs_campo> INTO l_string.
ENDIF.
ENDCASE.
AT LAST.
* Añade CRLF
CONCATENATE l_string c_crlf INTO l_string.
EXIT.
ENDAT.
* Añade tabulador
CONCATENATE l_string c_tab INTO l_string.
ENDLOOP.
ENDLOOP.
create_binary_content( ).
ENDMETHOD. "set_attach_table
METHOD create_binary_content.
DATA: l_size TYPE so_obj_len.
* convert the text string into UTF-16LE binary data including
* byte-order-mark. Mircosoft Excel prefers these settings
* all this is done by new class cl_bcs_convert (see note 1151257)
TRY.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = l_string
iv_codepage = '4103' "suitable for MS Excel, leave empty
iv_add_bom = 'X' "for other doc types
IMPORTING
et_solix = binary_content
ev_size = size ).
CATCH cx_bcs.
MESSAGE e445(so).
ENDTRY.
ENDMETHOD. "create_binary_content
METHOD send.
DATA: l_sent_to_all TYPE os_boolean.
TRY.
* create persistent send request
send_request = cl_bcs=>create_persistent( ).
* create and set document with attachment
* create document object
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = l_body_text
i_subject = l_subject ).
* add the spread sheet as attachment to document object
document->add_attachment(
i_attachment_type = 'xls'
i_attachment_subject = l_attach_name
i_attachment_size = size
i_att_content_hex = binary_content ).
* add document object to send request
send_request->set_document( document ).
* add recipient (e-mail address)
recipient =
cl_cam_address_bcs=>create_internet_address(
l_recipient_addr ).
* add recipient object to send request
send_request->add_recipient( recipient ).
* send document
l_sent_to_all = send_request->send(
i_with_error_screen = 'X' ).
COMMIT WORK.
IF l_sent_to_all IS INITIAL.
MESSAGE i500(sbcoms) WITH l_recipient_addr.
ELSE.
MESSAGE s022(so).
ENDIF.
CATCH cx_bcs INTO bcs_exception.
MESSAGE i865(so) WITH bcs_exception->error_type.
ENDTRY.
ENDMETHOD. "lcl_mail_xls_attachment
METHOD get_dataelement_medium_text.
DATA: lt_fld_info TYPE STANDARD TABLE OF dfies,
wa_fld_info TYPE dfies.
* Busca en el diccionario los datos del campo
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = im_table_name
fieldname = im_field_name
langu = sy-langu
TABLES
dfies_tab = lt_fld_info
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
CLEAR ex_medium_text.
IF sy-subrc = 0.
READ TABLE lt_fld_info INDEX 1 INTO wa_fld_info.
* Si lo ha podido tomar del diccionario...
IF NOT wa_fld_info-scrtext_m IS INITIAL.
* Toma el nombre del nombre de campo del diccionario
ex_medium_text = wa_fld_info-scrtext_m.
ENDIF.
ENDIF.
ENDMETHOD. "get_dataelement_medium_text
ENDCLASS. "cl_mail_builder_xls_attach IMPLEMENTATION -
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!!!! -
Trigger mail for cancelled background jobs scheduled using SM37
Dear Experts,
My requirement is to trigger email whenever a job gets cancelled in background.
For this I have already tried creating a workflow using BO BPJOB for event ABORTED.
But for some reason the event is never getting triggered.
I tested executing the workflow from tcode SWDD, it was running successfully, which means that there is no issue with my workflow.
Now I want to resolve the above issue OR
I want to raise the event manually from the program through some BADI or Exit.
But I didn't find any BADI or Exit for tcode SM37. Can anybody let me know if any.Hi,
Please refer the below links.
Workflow- Background job fail
Re: Send mail when job fails
Regards
GK.
Moderator message: please do not post just links without any further explanations.
Edited by: Thomas Zloch on Sep 20, 2010 11:53 AM -
Background job not generating spool
Hi all,
I am calling a report from another report. The called report will display the final output list.
Here, the called report will be executed in background.
here the job is completing but the spool is not generated.Hi,
It seems that the final internal table which has the output data is empty & hence write statements are not executed ( assuming all the write statements are inside a loop).
Place one write statement outside loop like
write :/ 'Following is the result :'.
& check whether spool is generated. If yes, then the problem is of empty internal table.
You can select the job in SM37 & type JDBG in command prompt to debug a background job.
Debug & check the issue.
Best regards,
Prashant -
Printing from background jobs ....
Hi, I have ECC 6.0 , I have a job that generate an invoice with printer inmmediality, when job run, invoice is not printed.
I define my printer as F at SPAD transaction, I check SP01 and show me my invoice, but I need that it go to the printer directly.
I read 128105 note and say that I can not print with Frontend printing (F) from a job, I try with I, S and U but does not work.
Regards.Hi, I change to L in my printer (SPAD transaction) and when I try to print from SAP, showme following message:
SAP spool error log
=====================
Print request processing log
The host spool is reporting errors
Message from host spool:
Unable to initialize device
192.168.0.85\EP
End of message
Command used: print /d:
192.168.0.85\EP G:\usr\sap\DEV\DVEBMGS00\data\000000968700001.DEV
Errors occurred processing this print request
Error during print request output. l_rc = 1
There may be no printout
Most important attributes of spool request
Request number 9687
Request name LIST1S DM RFITEMAP_OAL
Client 350
Owner OALTUVE
Request attributes
Time created 2007102421205500
Remaining life +00008000000
Dispo 1 (Go/Hold) G
Dispo 2 (Keep/Delete) K
Dispo 3 (Indirect/Direct) D
Default output device DM
Default no. copies 1
Format X_65_255
Main print request characteristics
Spool request number 9687
Print request number 1
Print request attributes
Time created 2007102421205500
Output device DM
Format X_65_255
Character converter active when first problem occurred
No information available.
If I change to F, I can print from SAP but no from my job.
Any comments?....
Regards. -
Emailing multiple photos from camera roll
Search threads but didn't find. Can multiple photos from camera roll be sent in an email on the iPhone 4
In round about way yes.
Go to photos.
In thumbnail view click menu item (think moved to top right in iOS4) to enable multiselect.
Select photos (up to 5 ... sorta) and then you can click share.
The sorta part is that if you do more than 5 the share will go away, but you can still select more, then choose copy, then go open email and paste in more than 5. -
Is there a way to email multiple files from pages
I want to send multiple files from pages, cover letter and resume, but when I select both files, the share icon goes dull and it can't be selected. Is there a work around for this?
Are you aware that someone without Pages cannot open the files? And that Pages will only run on OS X? Your best bet is do save the files as PDFs, then just drag the icons into your open email.
Walt -
Regarding Background Job Abort using
Hi ,
I am using FM BP_JOB_ABORT to abort background jobs through program,but it taking longtime to cancel background jobs in SM37 after exectuing FM BP_JOB_ABORT in program..
will i have to write any statement in program after this FM BP_JOB_ABORT to cancel the background job immediately through program..
Awaiting for valuable suggestion..
Regards
AnilHi,
I looking for FM to cancel background jobs quikly through program..
Regards
Anil -
I'm at a loss on how to troubleshoot this. It's a big deal because this is a client and prompt communication is key - hard to do when replies are heading off to wherever.
The original email was sent from an AOL account on my desktop. The recipient was entered as [email protected], the from was my non-Apple email address. Her response showed up only on my phone as an iMessage, and she is certain that all she did was reply to my text.
What do I even check in this case? Is there a setting on her phone that might cause this? I don't have her phone specs available, unfortunately.It is confusing!
The original message went from my email account ([email protected]) to the recipient [email protected] Our office frequently uses this method to send text messages to clients.
She hit reply to that message, and instead of going back to the orignating address (which is typical, we do this all the time), it went to iMessage - even though my iPhone had not been in any way involved in the exchange.
I just disassociated my email address from iMessage using the directions you gave. I believe that should fix the problem.
Thanks for your assistance!
Maybe you are looking for
-
GetParameter, setAttribute and session values
I am having a problem forwarding values to a jsp from my servlet. This problem only occurs when multiple users are accessing the same pages to make a payment. The value is passed from the page to the servlet. The servlet gets the value using a getPar
-
URGENT!!! Java Gurus Please Help with adf issue!
PLEASE SEE MY LATEST POST BELOW TIMO'S RESPONSE. THE REQUIREMENT HAS CHANGED. THAT IS THE ISSUE I AM LOOKING A SOLUTION FOR. Hello All, We have a requirement where our adf/jsf app needs to pick an EXCEL file from the server where the application is d
-
Export parameter in elementary search help not working.
I have created an elementary search help that will display all sold-tos for entered ship-to(s). Everything works fine except that the sold-to that is selected from the hit list is not being entered into the customer field on the selection screen. eg
-
Intercompany STO between 2 Full Warehouses with Handling Unit Activated.
Hi, I want to perform Intercompany STO between plant A and B both have Full warehouse management activated with HU Mgmt. Will this process be exactly same as the generic process? - Create PO - Do VL10g - Go to VL02n and then create TOs and assign HUs
-
A bug auto-select mode + filtered by type layers
In addition to this: http://forums.adobe.com/message/4302940#4302940 When selecting multiple layers: 1. click > 2. "draw" a rectangle on the canvas to select desired layers > 3. release to submit selection The bug happens on step 2: the selection rec