PR Release Notification thru Mail
Hi,
Whenever a Purchase Requisition is created it follows the defined release strategy.
1) The issue is we want to notify the person
concerned to release next, thru Email(Outlook or to SAP Inbox atleast).
2)And when the final PR release is done notify the Buyer about the PO?
Can we do this without Workflow.
Thanks in advance,
Suzane.
Hi John,
I tried PFTC_DIS transaction..it indeed has options for Notifying about the PR's.There's one task(50000070) which sends an email to the author of Requisition.But i donot know how should i use this or what should i do further.
Hi Pranav,
My second query was about sending an Email Notification to the Buyers(Guys in our Purchasing deaprtment) to create a PO when the final PR release is over.
anywayz thank u both for the help.
regards,
suzane.
Similar Messages
-
Reg: PO release notification needs to send to the PR Creater with PO num
HI Gurus,
Iam new to workfow. I have one senario in workflow.
Requirement: when ever PO release notification needs to send to the PR Creater with PO number and corresponding PR number.
Please guide how to do this .
My questions :
1.How can we can get the PR Creater user id to send notification mail
Thanks & Regards
RameshHi Ramesh ,
Which workflow you are using for PO . If it is the standard one , there is a rule used in the worklfow called 20000027.
In this there is an USer exit . In this exit , you can write your code for sending the workitem to the PR creator.
If you are using a custom workflow for this , then create a new rule and in that write the code for fetching the PR Creator and assign the user ro the actor tab. Incluse this rule in ur task .
This will solve your problem. -
Can I have push notifications for Mail, like on the iPhone?
Hello,
I was wondering if it's possible to enable push notifications for Mail on the Mac, basically like on the iPhone. I know that you can choose how often you want Mail to check your inbox, but this only works if Mail is open. Is there a feature that allows me to close the application, but still receive notifications when a new mail arrives?
ThanksAnon M wrote:
Hello,
I was wondering if it's possible to enable push notifications for Mail on the Mac, basically like on the iPhone. I know that you can choose how often you want Mail to check your inbox, but this only works if Mail is open. Is there a feature that allows me to close the application, but still receive notifications when a new mail arrives?
Thanks
Not as yet, although
1. The installation of third party programs such as Growl may give you this option. I don't use it personally so have a look at it and similar but at your own risk
2. Wait for Mountain Lon (10.8) to be released later this year as they are advertising such things as notifications, more in line with the iOS interface of iPads and iPhones
http://www.apple.com/macosx/mountain-lion/
3. In the meantime, do some reading here on threads relating to Mail in Lion as it seems like you certainly having an issue with Mail that most people do not have.
Good Luck
Pete -
Mountain Lion: on the Notification Center notification and Mail:
how to limit notifications to an email account?
At least, is it possible to choose what email account, the arrival of a message launch a notification.
When running more than a dozen e-mail accounts, it may be appropriate to display only the notifications of one or two major accounts.Which os are you using? Which Mail version are you using?
-
For this program i could send the smart form thru mail but in the inbox ..
*& Report ZSFOO
REPORT ZSFOO.
*& Report ZSFINV
TABLES : KNA1, " General Data In Customer Master
KNB1, " Customer Master(Company Code)
BSID, " Accounting: Secondary Index for Customers
ZSMARTFORM, " Custom table for Storing Bank Details
zsf_exp_inv, " Structure that stores required fields from all tables used
KNVK. " Customer Master Contact Partner
data : Begin of it_struct occurs 0.
include structure zsf_exp_inv01.
data : End of it_struct.
types : begin of ty_bsid,
kunnr like bsid-kunnr,
WAERS like bsid-WAERS,
XBLNR LIKE BSID-XBLNR,
BUDAT LIKE BSID-BUDAT,
WRBTR LIKE BSID-WRBTR,
BUKRS LIKE BSID-BUKRS,
end of ty_bsid.
types : begin of ty_kna1,
kunnr like kna1-kunnr,
NAME1 LIKE KNA1-NAME1,
STRAS LIKE KNA1-STRAS,
MCOD3 LIKE KNA1-MCOD3,
LAND1 LIKE KNA1-LAND1,
SORTL LIKE KNA1-SORTL,
end of ty_kna1.
types : begin of ty_knb1,
kunnr like knb1-kunnr,
ZTERM LIKE KNB1-ZTERM,
end of ty_knb1.
types : begin of ty_knVK,
kunnr like kNVK-kunnr,
NAME1 LIKE KNVK-NAME1,
end of ty_knVK.
types : begin of ty_ZSMARTFORM,
SNO LIKE ZSMARTFORM-SNO,
CURRENCY LIKE zsmartform-currency,
BANKNAME LIKE zsmartform-bankname,
ADDRESS1 LIKE ZSMARTFORM-ADDRESS1,
ADDRESS2 LIKE ZSMARTFORM-ADDRESS2,
ADDRESS3 LIKE ZSMARTFORM-ADDRESS3,
ADDRESS4 LIKE ZSMARTFORM-ADDRESS4,
ADDRESS5 LIKE ZSMARTFORM-ADDRESS5,
ADDRESS6 LIKE ZSMARTFORM-ADDRESS6,
VALIDFROM LIKE ZSMARTFORM-VALIDFROM,
VALIDTO LIKE ZSMARTFORM-VALIDTO,
end of ty_ZSMARTFORM.
data : it_bsid type table of ty_bsid,
it_kna1 type table of ty_kna1,
it_knb1 type table of ty_knb1,
it_zsmartform type table of ty_zsmartform,
it_knVK type table of ty_kNVK.
data : wa_bsid like line of it_bsid,
wa_kna1 like line of it_kna1,
wa_knb1 like line of it_knb1,
wa_zsmartform like line of it_zsmartform,
wa_knVK like line of it_knVK.
*****************Selection Screen**********************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR,
S_belnr FOR BSID-belnr,
S_BUKRS FOR BSID-BUKRS,
S_CURR FOR ZSMARTFORM-CURRENCY.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF IT_PARAM OCCURS 0.
INCLUDE STRUCTURE ZPARAMETERS.
DATA : END OF IT_PARAM.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
SKIP 1.
Parameters : OPTION1 AS CHECKBOX,
P_POINF(300) type c,
OPTION2 AS CHECKBOX,
P_DESC(300) TYPE C,
OPTION3 AS CHECKBOX,
P_MONTH(200) TYPE C,
OPTION4 AS CHECKBOX,
P_RATE(100) TYPE C.
SELECTION-SCREEN END OF BLOCK B2.
**********************PARAMETERS***********************************
data : l type i,
Y(300) type c,
j type i,
k type i value 1,
s type i,
m(300) type c,
p type i,
z type i.
data : l1 type i,
Y1(300) type c,
j1 type i,
k1 type i value 1,
s1 type i,
m1(300) type c,
p1 type i,
z1 type i.
data : l2 type i,
Y2(300) type c,
j2 type i,
k2 type i value 1,
s2 type i,
m2(300) type c,
p2 type i,
z2 type i.
data : l3 type i,
Y3(300) type c,
j3 type i,
k3 type i value 1,
s3 type i,
m3(300) type c,
p3 type i,
z3 type i.
IF OPTION1 = 'X'.
concatenate P_POINF ',' into P_POINF.
l = strlen( P_POINF ).
do l times.
Y = P_POINF+j(k).
case Y.
when ','.
m = P_POINF+s(z).
s = j + 1.
z = -1.
p = p + 1.
if p = 1.
IT_PARAM-LINE1 = m.
endif.
if p = 2.
IT_PARAM-LINE2 = m.
endif.
if p = 3.
IT_PARAM-LINE3 = m.
endif.
when '.'.
if p = 4.
IT_PARAM-LINE4 = m.
endif.
endcase.
j = j + 1.
z = z + 1.
enddo.
ENDIF.
IF OPTION2 = 'X'.
concatenate P_DESC ',' into P_DESC.
l1 = strlen( P_DESC ).
do l1 times.
Y1 = P_DESC+j1(k1).
case Y1.
when ','.
m1 = P_DESC+s1(z1).
s1 = j1 + 1.
z1 = -1.
p1 = p1 + 1.
if p1 = 1.
IT_PARAM-LINE5 = m1.
endif.
if p1 = 2.
IT_PARAM-LINE6 = m1.
endif.
if p1 = 3.
IT_PARAM-LINE7 = m1.
endif.
when '.'.
if p1 = 4.
IT_PARAM-LINE8 = m1.
endif.
endcase.
j1 = j1 + 1.
z1 = z1 + 1.
enddo.
ENDIF.
IF OPTION3 = 'X'.
concatenate P_MONTH ',' into P_MONTH.
l2 = strlen( P_MONTH ).
do l2 times.
Y2 = P_MONTH+j2(k2).
case Y2.
when ','.
m2 = P_MONTH+s2(z2).
s2 = j2 + 1.
z2 = -1.
p2 = p2 + 1.
if p2 = 1.
IT_PARAM-LINE9 = m2.
endif.
if p2 = 2.
IT_PARAM-LINE10 = m2.
endif.
if p2 = 3.
IT_PARAM-LINE11 = m2.
endif.
when '.'.
if p2 = 4.
IT_PARAM-LINe12 = m2.
endif.
endcase.
j2 = j2 + 1.
z2 = z2 + 1.
enddo.
ENDIF.
IF OPTION4 = 'X'.
concatenate P_RATE ',' into P_RATE.
l3 = strlen( P_RATE ).
do l3 times.
Y3 = P_RATE+j3(k3).
case Y3.
when ','.
m3 = P_RATE+s3(z3).
s3 = j3 + 1.
z3 = -1.
p3 = p3 + 1.
if p3 = 1.
IT_PARAM-LINE13 = m3.
endif.
if p3 = 2.
IT_PARAM-LINE14 = m3.
endif.
if p3 = 3.
IT_PARAM-LINE15 = m3.
endif.
if p3 = 4.
IT_PARAM-LINe16 = m3.
endif.
endcase.
j3 = j3 + 1.
z3 = z3 + 1.
enddo.
ENDIF.
APPEND IT_PARAM.
select * from kna1 into corresponding fields of table it_kna1 where kunnr in s_kunnr.
select * from knb1 into corresponding fields of table it_knb1 for all entries in it_kna1 where kunnr = it_kna1-kunnr.
select * from bsid into corresponding fields of table it_bsid for all entries in it_kna1 where kunnr = it_kna1-kunnr and belnr in s_belnr and bukrs in s_bukrs..
SELECT * FROM KNVK INTO CORRESPONDING FIELDS OF TABLE IT_KNVK FOR ALL ENTRIES IN IT_KNA1 WHERE KUNNR = IT_KNA1-KUNNR.
select * from zsmartform into corresponding fields of table it_zsmartform .
DATA : AMT LIKE SPELL.
loop at it_bsid into wa_bsid.
read table it_kna1 into wa_kna1 with key kunnr = wa_bsid-kunnr.
read table it_knb1 into wa_knb1 with key kunnr = wa_bsid-kunnr.
read table it_zsmartform into wa_zsmartform with key CURRENCY = wa_bsid-WAERS.
READ TABLE IT_KNVK INTO WA_KNVK WITH KEY KUNNR = WA_BSID-KUNNR.
it_struct-name1 = wa_kna1-name1.
it_struct-stras = wa_kna1-stras.
it_struct-mcod3 = wa_kna1-mcod3.
it_struct-land1 = wa_kna1-land1.
it_struct-sortl = wa_kna1-sortl.
it_struct-zterm = wa_knb1-zterm.
it_struct-xblnr = wa_bsid-xblnr.
it_struct-currency = wa_zsmartform-currency.
it_struct-currency = wa_bsid-waers.
it_struct-budat = wa_bsid-budat.
it_struct-BANKNAME = wa_zsmartform-BANKNAME.
it_struct-ADDRESS1 = wa_zsmartform-ADDRESS1.
it_struct-ADDRESS2 = wa_zsmartform-ADDRESS2.
it_struct-ADDRESS3 = wa_zsmartform-ADDRESS3.
it_struct-ADDRESS4 = wa_zsmartform-ADDRESS4.
it_struct-ADDRESS5 = wa_zsmartform-ADDRESS5.
it_struct-ADDRESS6 = wa_zsmartform-ADDRESS6.
it_struct-CURR = WA_BSID-WRBTR.
IT_STRUCT-NAME = WA_KNVK-NAME1.
IT_STRUCT-AMOUNT = IT_SPELL-AMT.
append it_struct.
endloop.
data : x type i,
x1 type i,
a type string.
loop at it_struct.
x = strlen( it_struct-curr ).
x1 = x - 3.
a = it_struct-curr+0(x1).
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = a
CURRENCY = ' '
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = AMT.
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
endloop.
DATA: ws_ucomm LIKE sy-ucomm.
DATA: form_name TYPE rs38l_fnam.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
data : i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
data : wa_objhead TYPE soli_tab,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE string.
DATA: w_bin_filesize TYPE i.
wa_ctrlop-getotf = 'X'.
CALL FUNCTION '/1BCDWB/SF00000001'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_outopt
user_settings = 'X'
IN_WORDS = amt
importing
job_output_info = t_otfdata
TABLES
I_ZSF_EXP_INV = it_struct
I_ZPARAMETERS = it_param.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
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 'WS_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
CODEPAGE = ' '
filename = 'c: est59.PDF'
filetype = 'BIN'
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10
IF sy-subrc <> 0.
*You should include message-id in the report heading
WRITE : sy-subrc.
ELSE.
WRITE : 'File Test.pdf downloaded succesfully'.
ENDIF.
loop at t_pdf_tab.
translate t_pdf_tab using '~'.
concatenate wa_buffer t_pdf_tab into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
Create Message Body
Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'O'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Hazard report-' p_load '.pdf' INTO i_objpack-obj_descr.
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-obj_descr = 'test'.
i_objpack-doc_size = v_lines_bin * 255.
APPEND i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
COMMIT_WORK = 'X'
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
for this program i could send the smart form thru mail but in the inbox i could not
download it it says needed to be decoded properly.file not starting with pdf....
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'Mail sent'(003)
txt1 = 'The report is sent via e-mail.'(004)
txt2 = ' '.
LEAVE PROGRAM.
ENDIF.hi krishna,
u r right. there is no error in sending the mail and the file but the problem is that file created and converted to pdf is not done properly.jst verify whether the file is created properly or not .thats the only problem that can occurs else ur program is absolutely right. -
How to send an attachment thru mail in SAP?
Hi all,
I have an file which has been sent by the customer. The file type may vary each & every week (sometimes XLS, sometimes CSV & sometimes notepad). This file has to be sent to another person thru mail as an attachment.
Is it possible to send thru the fun mod 'SO_SEND_NEW_*'.
If so how to send as attachment. If not thru this fun mod, how to send?
Thanks,
Vijay.I am enclosing the sample code to trigger an email, The logic for this is in comments, check this I am shure yuor problem will be solved.
*& Report ZGBL_SLA_PER
REPORT zgbl_sla_per NO STANDARD PAGE HEADING LINE-COUNT 26(3) MESSAGE-ID
zmsg2.
DECLARATION OF DB TABLES
TABLES: zncrfid, zrule_id.
DECLARATION OF INTERNAL TABLES
DATA: BEGIN OF ncrf OCCURS 0,
zncrf_id(15) TYPE c,
zncrf_l4_name(60) TYPE c,
z9gl_sla_flag(1) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
zdate_changed(8) TYPE n,
ztime_changed(6) TYPE n,
END OF ncrf.
*DATA: NCRF LIKE ZNCRFID OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF it_ruleid OCCURS 0,
zrule_id(10) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
END OF it_ruleid.
*data: wa like ncrf occurs 0 with header line.
DATA: BEGIN OF itab OCCURS 0,
zncrf_id(15) TYPE c,
zncrf_l4_name(60) TYPE c,
z9gl_sla_flag(1) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
zdate_changed(8) TYPE n,
ztime_changed(6) TYPE n,
END OF itab.
data: file(10) type c,
dates type date.
EMAIL DECLARATION
*CONSTANTS: c_subject LIKE sodocchgi1-obj_descr VALUE 'Subject',
*c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*DATA: g_time TYPE char8,
*g_email(40) TYPE c,
*g_sent_all(1) TYPE c,
*g_doc_data LIKE sodocchgi1,
*g_error TYPE sy-subrc.
*DATA: i_message LIKE solisti1 OCCURS 0 WITH HEADER LINE,
*i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
*i_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
*DATA: BEGIN OF mailid OCCURS 0,
zemail_id TYPE zrule_id-zemail_id,
END OF mailid.
*data: mailid like zrule_id occurs 0 with header line.
UPLOADING FLAT FILE TO INTERNAL TABLE NCRF
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\VAMSY\file.txt'
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = ncrf[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF sy-subrc EQ 0.
Checking internal table ncrf is empty then
*delete records from TABLE ZNCRF_ID ******************************
IF ncrf[] IS INITIAL.
MESSAGE i003(ZMSG2).
ELSE.
DELETE FROM zncrfid.
ENDIF.
*****Values are read from rule table and checking owner and owner_value
*from zrule_id table and inserted into ZNCRFID **************
SELECT * FROM zrule_id INTO CORRESPONDING FIELDS OF TABLE it_ruleid
WHERE zrule_id IN ('OWNER1', 'OWNER2').
append IT_RULEID.
LOOP AT ncrf WHERE z9gl_sla_flag EQ 'Y'.
READ TABLE it_ruleid WITH KEY zowners = ncrf-zowners
zowners_value = ncrf-zowners_value.
IF ncrf-zowners = it_ruleid-zowners AND ncrf-zowners_value =
it_ruleid-zowners_value AND ncrf-z9gl_sla_flag ='Y'.
itab-zncrf_id = ncrf-zncrf_id.
itab-zncrf_l4_name = ncrf-zncrf_l4_name.
itab-z9gl_sla_flag = ncrf-z9gl_sla_flag.
itab-zdate_changed = sy-datum.
itab-ztime_changed = sy-uzeit.
itab-zowners = it_ruleid-zowners.
itab-zowners_value = it_ruleid-zowners_value.
APPEND itab.
ENDIF.
ENDLOOP.
modify database table zncrfid FROM ITAB
LOOP AT itab.
WRITE:/ itab-zncrf_id, itab-zncrf_l4_name, itab-z9gl_sla_flag,
itab-zowners, itab-zowners_value, itab-zdate_changed,
itab-ztime_changed.
zncrfid-zncrf_id = itab-zncrf_id.
zncrfid-zncrf_l4_name = itab-zncrf_l4_name.
zncrfid-z9gl_sla_flag = itab-z9gl_sla_flag.
zncrfid-zowners = itab-zowners.
zncrfid-zowners_value = itab-zowners_value.
zncrfid-zdate_changed = itab-zdate_changed.
zncrfid-ztime_changed = itab-ztime_changed.
INSERT INTO zncrfid VALUES zncrfid.
ENDLOOP.
ENDIF.
ENDIF.
*CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
DATE = sy-datum
IMPORTING
WEEKDAY = file.
**CHECKING FOR THE FIRST MONDAY OF THE MONTH.
dates = sy-datum.
shift dates by 6 places left.
if file CO 'monday' and dates < 7 and dates >= 1.
else.
message e004(zmsg2).
endif.
EMAIL SEND TO OWNERS LIST
**Fill the mail body in i_message.
get email id's from database into internal table et_mailid
Fill the document data.
*g_doc_data-doc_size = 1.
Populate the subject/generic message attributes
*g_doc_data-obj_langu = sy-langu.
*g_doc_data-obj_name = 'SAPRPT'.
*g_doc_data-obj_descr = c_subject .
*g_doc_data-sensitivty = 'F'.
Describe the body of the message
Information about structure of data tables
*CLEAR i_packing_list.
*REFRESH i_packing_list.
*i_packing_list-transf_bin = space.
*i_packing_list-head_start = 1.
*i_packing_list-head_num = 0.
*i_packing_list-body_start = 1.
*DESCRIBE TABLE i_message LINES i_packing_list-body_num.
*i_packing_list-doc_type = 'RAW'.
*APPEND i_packing_list.
Add the recipients email address
*LOOP AT mailid.
*CLEAR i_receivers.
*i_receivers-receiver = mailid-zemail_id.
*i_receivers-rec_type = 'U'.
*i_receivers-com_type = 'INT'.
*i_receivers-notif_del = 'X'.
*i_receivers-notif_ndel = 'X'.
*APPEND i_receivers.
*ENDLOOP.
Call the FM to post the message to SAPMAIL
*CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
*EXPORTING
*document_data = g_doc_data
*put_in_outbox = 'X'
*commit_work = 'X'
*IMPORTING
*sent_to_all = g_sent_all
*TABLES
*packing_list = i_packing_list
*contents_txt = i_message
*receivers = i_receivers
*EXCEPTIONS
*too_many_receivers = 1
*document_not_sent = 2
*document_type_not_exist = 3
*operation_no_authorization = 4
*parameter_error = 5
*x_error = 6
*enqueue_error = 7
*OTHERS = 8.
Store function module return code
*g_error = sy-subrc.
Get i_receivers return code
*LOOP AT i_receivers.
*ENDLOOP.
**Instructs mail send program for SAPCONNECT to send email(rsconn01)
*WAIT UP TO 2 SECONDS.
*IF g_error EQ 0.
*SUBMIT zgbl_sla_per WITH mode = 'INT'
*WITH output = 'X'
*AND RETURN.
REWARD IF FOUND USEFULL,
Cheers, -
Separate program to send a smartform converted into pdf, thru mail
Hi Folks,
I had created a smartform and converted it into a PDF format.
Now I want a separate program where in if i submit this program it should sent it throuogh mail.
Note:-<b>I want a separate program not the one where in you design a smartform,convert into pdf and then send thru mail all in one program</b>
Points will be given.
K.Kiran.hi kiran
the program is as follows
The user is provided with
a) file name
b) email address to send mail
and it sends ANY FILE (.xls,.pdf .xyz..)
Instantaneously !
4. Make two things first :
1. Include with the name : ZAMI_INCLFOR_MAIL
2. Report with the name : ZAM_TEMP147 (any name will do)
3. Activate both and execute (2)
4. After providing filename, email adress
5. Code for Include :
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
CODE FOR PROGRAM
5.
REPORT zam_temp147 .
INCLUDE zami_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
regards,
navjot
reward if helpfull -
Notifications from Mail not working in iCal
Notifications from Mail are not working. I have set the proper setting in both iCal and Mail with no luck. .ICS files show up in Mail when I search but they don't populate of show in the Notifications window in iCal.
The same problem here. It used to work for a while. But after the last update it stopped working.
if I get an e-mail reply to an event, it does not update the attendee list.
i figured out though, that if you drag the .ics file onto iCal window (events part), the attendee status is updated and event is marked as done, but there is still a question mark in the upper part of the event.
obviously a bug. -
Not getting notification e-mail in case of time based publication
Hi,
We are working with subscription service.
We have one document subscribed by some users.
Users are getting notification mail whenever there is any modification in that particular document.
But when I am setting the lifetime property of the document.
Users are not getting notification e-mail when that document get published or get expired.
We checked in the Subscription Service.In the Allowed Admin Notification field we have to mention the proper event.
But we don't know which event name to mention.
It will be very helpful if any one let me know about it.
We are using EP 7.0.
Regards,
BiswarupHi Biswarup,
From the official documentation http://help.sap.com/saphelp_nw04s/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/content.htm this definitely should work out of the box.
Anyhow, what kind of subscription do you have chosen, immediate subscription or regular (daily, weekly, ...)?! If you are talking about an immediate subscription, try to alter this to a regular subscription. <i>Maybe</i> the change event which triggeres immediate subscriptions isn't thrown correctly by the TBP.
But even in this case, please open an OSS message, as this should be considered as a bug (or at least as a lack of documentation on help.sap.com).
Hope it helps
Detlev -
Attachment sent thru mail in PL/SQL code.
Hi.
I have a requirement..
I have to send bunch of an error description thru mail along with attachment says xls.All error should be club in xls and should be sent these attachement thru EMAIL.
Please provide a sample code for the same.
I have a code that mail can be send with the help of oracle supplied package UTL_SMTP.But how can I send the attachement thru mail.
Please provide a sample code.
ThanksHi!
Check this sample code - i don't know whether that satisfy ur requirement or not ------
CREATE OR REPLACE PROCEDURE CALL_SEND_MAIL
(p_sender varchar2,
p_recipients varchar2,
p_subject varchar2,
p_mailbody varchar2,
p_attachment varchar2 ) IS
v_recipients VARCHAR2(1000):=null;
flag number:=0;
fil BFILE;
file_len PLS_INTEGER;
MAX_LINE_WIDTH PLS_INTEGER := 54;
buf RAW(2100);
amt BINARY_INTEGER := 2000;
pos PLS_INTEGER := 1; /* pointer for each piece */
filepos PLS_INTEGER := 1; /* pointer for the file */
v_file_name VARCHAR2(100) ; /* ascii file attachment */
v_file_handle UTL_FILE.FILE_TYPE;
v_directory_name VARCHAR2(100) := '/utlpath';
v_line VARCHAR2(1000);
conn UTL_SMTP.CONNECTION;
mesg VARCHAR2(32767);
mesg_len NUMBER;
crlf VARCHAR2(2) := chr(13) || chr(10);
data RAW(2100);
chunks PLS_INTEGER;
len PLS_INTEGER;
modulo PLS_INTEGER;
pieces PLS_INTEGER;
err_num NUMBER;
err_msg VARCHAR2(100);
v_subject VARCHAR2(200);
v_mailbody varchar2(1000);
CURSOR C1 (p_proc_code varchar2) IS
select mail_id
from mat.mmat_mail
where mail_proc_code=p_proc_code
and mail_active='Y';
BEGIN
v_file_name := p_attachment;
if p_subject is null then
BEGIN
SELECT mail_subject
INTO v_subject
FROM mat.mmat_mail
WHERE mail_proc_code='VENDEXCH'
AND mail_subject is not null
AND rownum < 2;
EXCEPTION
WHEN no_data_found then
v_subject:=null;
END;
else
v_subject:=p_subject;
end if;
if p_mailbody is null then
BEGIN
SELECT mail_message
INTO v_mailbody
FROM mat.mmat_mail
WHERE mail_proc_code='VENDEXCH'
AND mail_message is not null
AND rownum < 2;
EXCEPTION
WHEN no_data_found then
v_mailbody:=null;
END;
else
v_mailbody:=p_mailbody;
end if;
if instr(p_recipients,'@') = 0 then
for vc1 in c1(p_recipients) loop
flag:=flag+1;
if flag=1 then
v_recipients:=vc1.mail_id;
else
v_recipients:=v_recipients||', '||vc1.mail_id;
end if;
end loop;
else
v_recipients:=p_recipients;
end if;
BEGIN
conn := mat.send_mail.begin_mail(
sender => p_sender,
recipients => v_recipients,
subject => v_subject,
mime_type => mat.send_mail.MULTIPART_MIME_TYPE);
END begin_mail;
BEGIN
mat.send_mail.attach_text(
conn => conn,
data => v_mailbody,
mime_type => 'text/html');
END attach_text;
if v_file_name is not null then
BEGIN
mat.send_mail.begin_attachment(
conn => conn,
mime_type => 'text/plain',
inline => TRUE,
filename => v_file_name,
transfer_enc => '7 bit');
begin
v_file_handle := utl_file.fopen(v_directory_name, v_file_name, 'r');
loop
utl_file.get_line(v_file_handle, v_line);
mesg := v_line || crlf;
mat.send_mail.write_text(conn => conn, message => mesg);
end loop;
exception
when others then
null;
end;
utl_file.fclose(v_file_handle);
mat.send_mail.end_attachment(conn => conn );
END begin_attachment;
end if;
mat.send_mail.end_mail(conn => conn);
exception
when no_data_found then
mat.send_mail.end_attachment( conn => conn );
dbms_lob.fileclose(fil);
when others then
mat.send_mail.end_attachment( conn => conn );
err_num := SQLCODE;
err_msg := SUBSTR(SQLERRM, 1, 100);
dbms_output.put_line('Error number is ' || err_num);
dbms_output.put_line('Error message is ' || err_msg);
dbms_lob.fileclose(fil);
END;
Regards.
Satyaki De. -
How do i change my notification e-mail
Hello,
How do I change my notification e-mail address without changing my apple id?
I want my notification e-mail address to be my me.com address.
Thanks a lot and best regards.Firstly, if you have 'Find My iPhone/iPad/iMac' enabled on any of your devices, turn it off.
Create a new email address, for example at Yahoo or Gmail, or anywhere convenient (or you can use an existing address as long as it has never been associated with an Apple ID).
Go to http://appleid.apple.com and click 'Manage your Apple ID'. Sign in with the current ID.
Where it says 'Apple ID and primary email address' and gives your current ID email address, click 'edit'.
Enter your new address and click 'Save changes'.
Now you will need to go to each of your devices and sign out in System Preferences (or Settings)>iCloud - 'Sign out' on a Mac, 'Delete this account' on an iOS device (this will not delete the account from the server).
Then sign back in with your new ID. Your iCloud data will disappear from your devices when you sign out, but reappear when you sign back in.
I re-iterate: before you start, turn off 'Find My Mac' (or whatever) or you will need the services of Support. -
Service entry sheet rej thru mail
hi all,
i have a requirement, when ever i am blocking/rejecting the service entry sheet i need to send this details to the external system thru mail .
Is Any bapi or idoc i s available in the system for updating the same.
any other customization needed to this.
Regards,
veluhi all,
any body faced this similar requirement in their project
Regards,
velu -
Getting job name to notification e-mail when monitoring runtime limits
Hello,
In CPS version M33.49-55614 the requirement is to notify users via e-mail when a certain job exceedes the defined maximum runtime limit.
We have defined the limit in "Runtime Limits" tab of Job definition and have defined an event to be raised in the same tab.
The event is used as an Wait event for a Job chain consisting of 1 step only with System_Mail_Send. The mail Subject text is using an expression '=waitEvents.<event_name>.raiserComment'.
After this we are receiving notification e-mails with Subject: Maximum Runtime Limit breached. Raising an event for job 1460806.
But the Job name is not passed through the '=waitEvents.<event_name>.raiserComment' expression.
We use the same scenario for notification e-mails for Error or Killed jobs, and in these cases the same expression '=waitEvents.<event_name>.raiserComment' results to notification e-mail subject: Event raised by Job:1460826 (JOBNAME) going to status Killed.
The question is how to get the JOBNAME also to e-mail notification for exceeded maximum runtime?
2 attempts did not help:
- Add the $ substitution variable to Event Raise comment
- use =waitEvents.<event_name>.raiserJobName in notification mail Subject
Thanks and Regards,
Ernest LiczkiHi Biswarup,
From the official documentation http://help.sap.com/saphelp_nw04s/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/content.htm this definitely should work out of the box.
Anyhow, what kind of subscription do you have chosen, immediate subscription or regular (daily, weekly, ...)?! If you are talking about an immediate subscription, try to alter this to a regular subscription. <i>Maybe</i> the change event which triggeres immediate subscriptions isn't thrown correctly by the TBP.
But even in this case, please open an OSS message, as this should be considered as a bug (or at least as a lack of documentation on help.sap.com).
Hope it helps
Detlev -
Is there a read notification in mail for Mac OS X Lion
Is there a read notification in mail for Mac OS X Lion?
You could try this, I guess:
http://email.about.com/od/macosxmailtips/qt/et_request_recp.htm
or this
http://hints.macworld.com/article.php?story=20050512155856402
I don't know if they work.
charlie -
Can the form attachment files be included in the notification e-mail?
Can the form attachment files be included in the notification e-mail?
Best regardsHi,
Currently the attachment cannot be sent with email notifications in FormsCentral. You may submit feature request via http://forums.adobe.com/docs/DOC-4233.
Thanks,
Wenlan
Maybe you are looking for
-
Why can't I open my start page on my hp laptop and the side screen won't open so I can turn it off
I can't open my start page and I can't shut off my computer even when I push the little window button on my laptop it won't open.I't will go to sleep when I push the power button .
-
Install Oracle 11.2.0.3 32Bit Client on Window 7 x64
Good morning, I just tried to install the new Oracle 11.2.0.3 32Bit Client on Windows 7 x64, most of it works - just the OLEDB drivers are not registered ... does anyone know how to register them manually ? the 11.2.0.2 Client works fine .... And ple
-
i have a table tab1 with record(1,2,3,4,5,6,7,8,9). i want to create a procedure, when we pass the parameter in procedure then that record come on top rest record below of that. thanks,
-
Report Question - NAV attributes
Can I create a variable if it is a displayed attribute?
-
Update ipod photo to play videos
I am using an 30gb ipod photo and still thinking of upgrading to ipod (video). i just wanna know if i could just upgrade the software on my ipod photo so it could play videos. is it possible since a software update is already available online? please