Professional Documents
Culture Documents
Kurulum Admlar
Contents
Kurulum
...................................................................................................................................................
3
Exchange
/
Relay
Ayarlar
........................................................................................................................
7
irket
i
E-Posta
Senaryosu
................................................................................................................
7
irket
D
E-Posta
Senaryosu
(Relay)
..................................................................................................
7
Exchange
zerinde
Dorudan
Relay
Ayar
......................................................................................
8
Microsoft
IIS
zerinden
Relay
Ayarlar
............................................................................................
8
Faydal
pular
......................................................................................................................................
14
rnek
Kodlar
.........................................................................................................................................
14
E-Posta
le
Mesaj
+
Ek
Gndermek
...................................................................................................
14
E-Posta
le
Mesaj
+
Ek
Gndermek
(<BR>
le
Satr
Krarak)
...............................................................
18
E-Posta
le
SAP
Ekranna
Link
Gndermek
........................................................................................
22
Bir
SmartForm
ktsn
PDF
Olarak
E-Mail
le
Gndermek
...............................................................
24
rnek
SAP
Programlar
..................................................................................................................
24
CONVERT_OTF
Fonksiyonunu
Kullanmak
.....................................................................................
24
Hatalar
ve
zmler
..............................................................................................................................
28
Internal
error:
SO_OBJECT_MIME_GET
Exception:
2
........................................................................
28
PDF
Trke
Karakter
Problemi
..........................................................................................................
28
Works
Cited
...........................................................................................................................................
28
Kurulum
SCOT
ayarlar,
detayl
bir
ekilde
455140
numaral
OSS
notunda
aklanmtr.
Burada,
basit
bir
konfigrasyonun
nasl
yaplacan
greceiz.
SCOT
ilem
koduna
gidiyoruz.
Settings
Send
Jobs
mensne
giriyoruz.
Burada,
E-Posta
gndermekten
sorumlu
RSCONN01
programn
kuracaz.
Ayn
ilemi
SE38
ierisinde
RSCONN01i
arka
planda
kurarak
da
gerekletirebiliriz.
Settings
Confirmation
Of
Receipt
mensnde,
E-Posta
iletileri
iin
Gnderildi
bilgisinin
istenmediini
belirteceiz.
Eer
Gnderildi
bilgisini
istiyorsanz,
yukarda
belirtilen
OSS
notunu
inceleyin.
Settings
Default
Domain
mensnde,
irkete
ait
varsaylan
alan
adn
gireceiz.Buraya
cozumevi.com
yazacak
olursak;
SAP,
SMTP
sunucusuna
balanldnda
ilk
olarak
HELO
cozumevi.com
komutunu
gnderecektir.
Ayarlar
tamamladmza
gre,
artk
E-Posta
ilevini
aktive
edebiliriz.
View
System
Status
blmne
girip,
INT
SMTPye
ift
tklyoruz.
Alacak
pencere,
rnek
olarak
u
ekilde
konfigre
edilmi
olmaldr:
Node
In
Use
Bu
tk,
ilemin
aktif
olduunu
gstermektedir.
Code
Page
Bu
blmde,
SAPde
geerli
Code
Page
deerini
girin.
Trke
iin
ISO-8859-9
veya
Windows-
1254
kullanlabilir.
Bu
bilgileri
girdikten
sonra,
Internet
seeneinin
yanndaki
SET
dmesine
tklyoruz.
Bu
penceredeki
Address
area
blm,
hangi
Domainlere
ait
E-Postalarn
gnderilebileceini
belirtmektedir.
Sade
bir
kurulumda,
buraya
*
yazlmas
gerekir.
SAP
SCOT
(Authenvcavon
gndermiyor)
Exchange
(Authenvcavon'a
bakmyor)
Eer
E-Posta
iletileri
sadece
irketteki
E-Posta
adresleri
arasnda
gnderilecekse,
Exchangein
varsaylan
ayarlar
herhangi
bir
Relay
ayarlamas
yapmadan
bu
ileme
izin
verecektir.
Bu
durumda,
Kurulum
balndaki
Mail
Host
&
Port
blmne
dorudan
doruya
Exchange
sunucusunun
adresi
girilebilir.
Baka
bir
ayara
gerek
yoktur.
SAP
SCOT
(Authenvcavon
gndermiyor)
Exchange
(Authenvcavon'a
bakmyor)
Eer
mterinin
kendi
Exchange
sunucusu
varsa,
Kurulum
balndaki
Mail
Host
&
Port
blmne
dorudan
doruya
Exchange
sunucusunun
adresini
girebilirsiniz.
Exchangei
ise,
SAPden
gelecek
olan
Relay
iletilerinde
Authentication
istemeyecei
ekilde
ayarlamalsnz.
Bu
ayari
yle
yaplmaktadr:
Exchange
System
Manager
altindan
Server`imiza
ulasiyoruz.
Bunun
altindaki
protocols
bolumunden
smtp
detayina
giriyoruz.
Default
Smtp
Virtual
Server
properties
icinde
access
menu
altinda
relay
restrictions
bolumune
girerek
SAP
server
ip
adresini
bu
listeye
ekliyoruz
(only
the
list
below
secenegi
checkli
olacak
sekilde).
Microsoft
IIS
zerinden
Relay
Ayarlar
SAP
SCOT
(Authenvcavon
gndermiyor)
IIS
SMTP
(Authenvcavon
ekliyor)
Exchange
(Authenvcavon'a
bakyor)
Dardan
Hosting
hizmeti
ald
iin
Exchange
ayarlarna
dorudan
mdahele
ans
olmayan
bir
firma,
irketin
a
zerindeki
bir
Windows
2003
makinasna
SMTP
servisi
kurulabilir.
SAP,
E-Posta
iletilerini
bu
servise
gnderir,
servis
ise
irketin
dardaki
gerek
SMTP
sunucusuna
(Authentication
yaparak)
Relay
eder.
Kurulum
balndaki
Mail
Host
&
Port
blmne
Exchangein
adresini
deil,
aradaki
IIS
makinasnn
adresi
girilmelidir.
IIS
ayarlarn
aada
bulabilirsiniz.
Herhangi
bir
bilgisayara
IIS
kurulur.
Bu
makina,
srekli
ak
kalabilecek
bir
makina
olmaldr.
Sz
konusu
makina
kapanacak
olursa
E-Posta
kayb
olmaz,
ancak
gnderimler
kesintiye
urar.
Kurulum
srasnda
SMTP
servisi
Seilmelidir.
-start-settings-control
panel-Administrative
Tools-IIS
ift
tklanr.
iis
ynetim
konsoluna
gelip
Default
SMTP
Virtual
Server
altnda
bulunan
Domains
zerine
gelip
sa
tkladktan
sonra
New
domain
seenei
tklanr
Remote
Seeneini
Seip
Next
ile
ilerleyiniz
Burada
hangi
uzantl
adreslere
mail
gnderilecek
ise*.com
,
*.org.
,
*.net
vb.
ayr
ayr
girilmelidir.
Eklediimiz
domain
zerinde
sa
tu
zellikler
sekmesine
geliyoruz
General
sekmesinde
select
incoming
mail
to
be
relayed
for
your
remote
domain
seeneini
seiyoruz
forward
all
mail
tos
mart
host
alanna
asl
domain
ismimizi
yazyoruz(rnek
:
limak.com.tr)
Outbound
security
butonuna
basp,
Basic
authentication
seeneini
seiyoruz.
user
name=
gerek
domainimizde
bulunan
bir
mail
adresi
girilir.
ok.
Daha
sonra,
SMTP
virtual
Server
zerinde
satu
zelliklere
gidip
ip
adresi
alanna
relay
ilemi
iin
kurduumuz
smtp
servisinin
bulunduu
bilgisayarn
ip
si
girilir.
Relay
butonu
tklanr
add
butonu
tklanr
ve
domain
name
alanna
=
gerek
domain
adresi
girilir(rnek:limak.com.tr)
Ok
diyerek
ilem
tamamlanr
Sonu
:
yaptmz
bu
ayarlar
sonucunda
Sap
den
mail
gnderildii
zaman
mail,ilk
olarak
smtp
servisini
kurduumuz
makinaya
gelecek
servis
kendisine
gelen
maili
gerek
mail
servera
Relay
edecektir.
Faydal
pular
Srada
bekleyen
/
gnderilemeyen
E-Posta
iletileri,
SOST
ilem
kodunda
izlenebilir.
Ayn
yerde,
gnderilemeyen
iletiler
tekrar
gnderilebilir.
rnek
Kodlar
E-Posta
le
Mesaj
+
Ek
Gndermek
function
zaswf_send_msg_as_email.
*"----------------------------------------------------------------------
*"*"Local
Interface:
*"
IMPORTING
*"
REFERENCE(I_BNAME)
TYPE
XUBNAME
*"
REFERENCE(I_MSGID)
TYPE
SY-MSGID
*"
REFERENCE(I_MSGNO)
TYPE
SY-MSGNO
*"
REFERENCE(I_MSGV1)
OPTIONAL
*"
REFERENCE(I_MSGV2)
OPTIONAL
*"
REFERENCE(I_MSGV3)
OPTIONAL
lv_class
=
i_msgid.
lv_msgnr
=
i_msgno.
lv_langu
=
sy-langu.
call
function
'SVMCRT_INT_GETMSG_LONGTEXT'
exporting
msg_class
=
lv_class
msg_nr
=
lv_msgnr
language
=
lv_langu
importing
text
=
lv_text.
replace
all
occurrences
of:
'&V1&'
in
lv_text
with
i_msgv1,
'&V2&'
in
lv_text
with
i_msgv2,
'&V3&'
in
lv_text
with
i_msgv3,
'&V4&'
in
lv_text
with
i_msgv4.
clear
lf_split.
lf_split-con
=
'X'.
lf_split-len
=
strlen(
lv_text
).
do.
lf_split-pos1
=
lf_split-pos2.
add
255
to
lf_split-pos2.
if
lf_split-pos2
gt
lf_split-len.
lf_split-pos2
=
lf_split-len.
clear
lf_split-con.
endif.
lf_split-plen
=
lf_split-pos2
-
lf_split-pos1.
lt_cont-line
=
lv_text+lf_split-pos1(lf_split-plen).
append
lt_cont.
if
lf_split-con
is
initial.
exit.
endif.
enddo.
if
i_memai
eq
'X'.
clear
lt_rece.
select
single
smtp_addr
into
lt_rece-receiver
from
adr6
where
addrnumber
eq
(
select
addrnumber
from
usr21
where
bname
eq
i_bname
)
and
persnumber
eq
(
select
persnumber
from
usr21
where
bname
eq
i_bname
).
lt_rece-rec_type
=
'U'.
if
not
lt_rece-receiver
is
initial.
append
lt_rece.
endif.
endif.
if
i_mesap
eq
'X'.
clear
lt_rece.
lt_rece-receiver
=
i_bname.
lt_rece-rec_type
=
'B'.
lt_rece-express
=
'X'.
append
lt_rece.
endif.
check
not
lt_rece[]
is
initial.
*
Send
mail
lo_email
=
cl_bcs=>create_persistent(
).
call
function
'SO_RAW_TO_RTF'
tables
objcont_old
=
lt_cont
objcont_new
=
lt_text.
lv_subj
=
lf_docdat-obj_descr.
lo_docum
=
cl_document_bcs=>create_document(
i_type
=
'RAW'
i_text
=
lt_text[]
i_subject
=
lv_subj
).
if
not
i_attxt[]
is
initial.
call
function
'SO_RAW_TO_RTF'
tables
objcont_old
=
i_attxt
objcont_new
=
lt_attx.
call
method
lo_docum->add_attachment
exporting
i_attachment_type
=
i_attyp
i_attachment_subject
=
i_atsub
i_att_content_text
=
lt_attx[].
endif.
call
method
lo_email->set_document(
lo_docum
).
lo_sende
=
cl_sapuser_bcs=>create(
sy-uname
).
call
method
lo_email->set_sender
exporting
i_sender
=
lo_sende.
loop
at
lt_rece.
case
lt_rece-rec_type.
when
'U'.
lv_saddr
=
lt_rece-receiver.
translate
lv_saddr
to
lower
case.
lo_recip
=
cl_cam_address_bcs=>create_internet_address(
lv_saddr
).
when
'B'.
lv_uname
=
lt_rece-receiver.
lo_recip
=
cl_sapuser_bcs=>create(
lv_uname
).
endcase.
call
method
lo_email->add_recipient
exporting
i_recipient
=
lo_recip
i_express
=
'X'
*
Send
mail
lo_email
=
cl_bcs=>create_persistent(
).
lv_subj
=
lf_docdat-obj_descr.
lo_docum
=
cl_document_bcs=>create_document(
i_type
=
'RAW'
i_text
=
lt_CONT[]
i_subject
=
lv_subj
).
IF
NOT
i_attxt[]
IS
INITIAL.
REFRESH
lt_attx.
CALL
FUNCTION
'SO_RAW_TO_RTF'
TABLES
objcont_old
=
i_attxt
objcont_new
=
lt_attx.
CALL
METHOD
lo_docum->add_attachment
EXPORTING
i_attachment_type
=
i_attyp
i_attachment_subject
=
i_atsub
i_att_content_text
=
lt_attx[].
ENDIF.
IF
NOT
i_attx2[]
IS
INITIAL.
REFRESH
lt_attx.
CALL
FUNCTION
'SO_RAW_TO_RTF'
TABLES
objcont_old
=
i_attx2
objcont_new
=
lt_attx.
CALL
METHOD
lo_docum->add_attachment
EXPORTING
i_attachment_type
=
i_atty2
i_attachment_subject
=
i_atsu2
i_att_content_text
=
lt_attx[].
ENDIF.
CALL
METHOD
lo_email->set_document(
lo_docum
).
lo_sende
=
cl_sapuser_bcs=>create(
sy-uname
).
CALL
METHOD
lo_email->set_sender
EXPORTING
i_sender
=
lo_sende.
LOOP
AT
lt_rece.
CASE
lt_rece-rec_type.
WHEN
'U'.
lv_saddr
=
lt_rece-receiver.
define
apptxt2.
concatenate
&1
'='
&2
into
lt_text-line.
append
lt_text.
end-of-definition.
define
apptxt.
lt_text-line
=
&1.
append
lt_text.
end-of-definition.
*
rnek
bir
I_CMD
u
formatta
olabilir:
*
*ZCZMAS003
S_EBELN-LOW=6100000017;
*
CMD'
formatlayalm
apptxt
'[System]'.
apptxt2:
'Name'
sy-sysid,
'Description'
space,
'Client'
sy-mandt.
apptxt
'[User]'.
apptxt2:
'Name'
i_bname,
'Language'
sy-langu.
apptxt
'[Function]'.
apptxt2:
'Title='
space,
'Command'
i_cmd,
'Type'
'Transaction'.
apptxt
'[Configuration]'.
apptxt2:
'GuiSize'
'Normal
window'.
*
letiyi
gnderelim
call
function
'ZASWF_SEND_MSG_AS_EMAIL'
exporting
i_bname
=
i_bname
i_msgid
=
i_msgid
i_msgno
=
i_msgno
i_msgv1
=
i_msgv1
i_msgv2
=
i_msgv2
i_msgv3
=
i_msgv3
i_msgv4
=
i_msgv4
i_mesap
=
i_mesap
i_memai
=
i_memai
i_attyp
=
'SAP'
i_atsub
=
'EXECUTE'
i_attxt
=
lt_text[].
endfunction.
*
OUTPUT_OPTIONS
=
*
USER_SETTINGS
=
'X'
i_vbeln_va
=
w_vbeln_va
i_vbeln_vl
=
p_vbeln
i_vbeln_vf
=
w_vbeln_vf
i_kunnr
=
w_kunnr
i_name1
=
w_name1
IMPORTING
job_output_info
=
ls_job
TABLES
i_pack
=
wt_pack
EXCEPTIONS
formatting_error
=
1
internal_error
=
2
send_error
=
3
user_canceled
=
4
OTHERS
=
5.
IF
sy-subrc
<>
0.
MESSAGE
ID
sy-msgid
TYPE
'S'
NUMBER
sy-msgno
WITH
sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4.
LEAVE
LIST-PROCESSING.
ENDIF.
*
Convert
OTF
to
regular
lines
CALL
FUNCTION
'CONVERT_OTF'
EXPORTING
format
=
'PDF'
max_linewidth
=
132
*
ARCHIVE_INDEX
=
'
'
*
COPYNUMBER
=
0
*
ASCII_BIDI_VIS2LOG
=
'
'
*
PDF_DELETE_OTFTAB
=
'
'
IMPORTING
bin_filesize
=
l_size
bin_file
=
l_bin_file
TABLES
otf
=
ls_job-otfdata
lines
=
lt_lines
EXCEPTIONS
err_max_linewidth
=
1
err_format
=
2
err_conv_not_possible
=
3
err_bad_otf
=
4
OTHERS
=
5.
IF
sy-subrc
<>
0.
MESSAGE
ID
sy-msgid
type
'S'
NUMBER
sy-msgno
WITH
sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4.
LEAVE
LIST-PROCESSING.
ENDIF.
*&------------------------------
*&
E-MAIL
PARAMETERS
*&------------------------------
*
OTF
Lines
->
Internal
table
l_n
=
XSTRLEN(
l_bin_file
).
WHILE
l_i
<
l_n.
CLEAR
lt_solix.
lt_solix-line
=
l_bin_file+l_i.
APPEND
lt_solix.
ADD
255
TO
l_i.
ENDWHILE.
LOOP
AT
lt_solix.
CLEAR
ls_soli.
ASSIGN
ls_soli
TO
<ptr_hex>
CASTING.
MOVE
lt_solix
TO
<ptr_hex>.
APPEND
ls_soli
TO
lt_objcont.
ENDLOOP.
*
Header
information
ls_object_hd_change-objnam
=
'EMAIL'.
MESSAGE
s023(ztr)
WITH
p_vbeln
INTO
ls_object_hd_change-objdes.
"
Subject
ls_object_hd_change-objla
=
sy-langu.
ls_object_hd_change-objsns
=
'O'.
ls_object_hd_change-objlen
=
l_size.
ls_object_hd_change-file_ext
=
'PDF'.
*
Receiver
CALL
FUNCTION
'ADDR_GET_COMPLETE'
EXPORTING
addrnumber
=
w_adrnr
IMPORTING
addr1_complete
=
ls_addr
EXCEPTIONS
parameter_error
=
1
address_not_exist
=
2
internal_error
=
3
wrong_access_to_archive
=
4
OTHERS
=
5.
IF
sy-subrc
<>
0.
MESSAGE
ID
sy-msgid
TYPE
'S'
NUMBER
sy-msgno
WITH
sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4.
LEAVE
LIST-PROCESSING.
ENDIF.
LOOP
AT
ls_addr-adsmtp_tab
INTO
ls_smtp
WHERE
date_from
LE
sy-datum.
CLEAR
lt_receivers.
lt_receivers-recextnam
=
ls_smtp-adsmtp-SMTP_ADDR.
lt_receivers-recesc
=
'E'.
lt_receivers-sndart
=
'INT'.
APPEND
lt_receivers.
ENDLOOP.
IF
lt_receivers[]
IS
INITIAL.
MESSAGE
s024(ztr).
LEAVE
LIST-PROCESSING.
ENDIF.
*
Document
type
&
originator
l_document_type
=
'EXT'.
l_originator
=
sy-uname.
*&------------------------------
*&
SEND
MAIL
*&------------------------------
CALL
FUNCTION
'SO_OBJECT_SEND'
EXPORTING
object_hd_change
=
ls_object_hd_change
object_type
=
l_document_type
originator
=
l_originator
originator_type
=
'B'
*
importing
*
sent_to_all
=
x_sent_to_all
TABLES
objcont
=
lt_objcont
objhead
=
lt_objhead
receivers
=
lt_receivers
EXCEPTIONS
active_user_not_exist
=
1
communication_failure
=
2
component_not_available
=
3
folder_not_exist
=
4
folder_no_authorization
=
5
forwarder_not_exist
=
6
note_not_exist
=
7
object_not_exist
=
8
object_not_sent
=
9
object_no_authorization
=
10
object_type_not_exist
=
11
operation_no_authorization
=
12
owner_not_exist
=
13
parameter_error
=
14
substitute_not_active
=
15
substitute_not_defined
=
16
system_failure
=
17
too_much_receivers
=
18
user_not_exist
=
19
x_error
=
20
OTHERS
=
21.
IF
sy-subrc
NE
0.
MESSAGE
ID
sy-msgid
TYPE
'S'
NUMBER
sy-msgno
WITH
sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4.
LEAVE
LIST-PROCESSING.
ENDIF.
ENDFORM.
"
send_mail
Hatalar
ve
zmler
Internal
error:
SO_OBJECT_MIME_GET
Exception:
2
SOST
ilem
kodunda
grlebilecek
bu
hatann
sebebi
byk
ihtimalle
SCOT
penceresinde
Default
Domain
veya
Default
Codepage
deerlerinin
atanmamasdr.
Works
Cited
SAP
AG.
(2007,
04
27).
Note
625818
-
PDF
conversion:
Turkish
support
(ISO
8859-9).
12
24,
2009
tarihinde
SAP
OSS:
https://websmp230.sap-
ag.de/sap/bc/bsp/spn/sapnotes/index2.htm?numm=625818
adresinden
alnd