Friday, July 25, 2008

Configuring outbound SAP to Internet mail Gateway (R/3 4.0 and above

Step 1 (UNIX SETUP)Logon to your as sidadmChange directory to /sapmnt/SID/global (or any directory globally available across all application servers)Create the following entries in file SAP_EMAIL_GATEWAY.sh and save the file
#!/bin/shGWCONFIG=/sapmnt/SID/global/SAP_EMAIL_GATEWAY.cfgexport GWCONFIG/sapmnt/SID/exe/mlunxsnd $*
Execute the command: mlosmadm SAP_EMAIL_GATEWAY.cfg (enter the following information)
System name : SIDClient : 200Username : MAILADMPassword : initpassLanguage : ELoadbalancing : YMessage Server : Codepage : Step 2 (SAP SETUP)
Logon to SAPSYSTEM (SID) via SAPGUITransaction SU01, create user MAILADM and password initpass, usertype CPIC Transaction SM59, Click Create
RFC Destination : SAP 4.5 INTERNET MAIL GATEWAY Connection Type : TDescription : INTERNET EMAIL GATEWAYHit RETURNClick EXPLICIT HOSTEnter /sapmnt/P21/global/ SAP_EMAIL_GATEWAY.shSave your entries
Transaction SCOT, click Edit--> CREATE NODES
Node : EMAIL Description : SAP CONNECT NODE FOR EMAIL (continue)RFC DESTINATION: (choose SAP 4.5 INTERNET MAIL GATEWAY from the pull down menu)Choose radio button InternetAddress area : *DOMAIN (your intranet domain)CcontinueFormat : DOC, DAT, R3F, TXT, RAW,PPT,XLS (continue)ContinueSet further address types : NMinimum waiting : 5 minutesCheck both Node is in use', Node can resolve path references ContinueChoose Goto--> Schedule Background JobEnter name for the job & save
Configuring outbound SAP to Internet mail Gateway (Upto R/3 3.1I)
SAP can be configured to send and receive emails from different sources. This section explains how to integrate SAPOffice with an external email system. This is in no way supplementing the online documentation available on the online documentation CD supplied by SAP but simplyfies the process to the bare Internet email must be configured and running prior to this. Email from SAP is forwarded to the users external email client such as Eudora, Outlook etc.
You can configure inbound and outbound forwarding. Outbound flow forwards a SAP message (eg:update termination) via UNIX sendmail to the intended recepient. Inbound accepts a message from sendmail and places it in the users SAPOffice inbox. Many SAP shops prefer to configure outbound only.
Configuring outbound forwarding
SAP configuration
Create your RFC destination for outbound email using transaction SM59
RFC Destination : SAP_INTERNET_GATEWAY
Connection Type : T
Description : SAP internet mail gateway
Click on 'Explicit Host' if you want on demand gateway dameon invocation.
Program : /sapmnt/SID/exe/mlunxsnd
Target Host : Enter hostname that runs your central instance.
Click 'Test Connection' and you should see a successfull message.
Choose menu Tools-->Administration-->Management-->Process Technology-->Office-->Office Settings
Click Internet Gateway
Gateway Destination : SAP_INTERNET_GATEWAY
Path for configuration file : /sapmnt/SID/exe/sap_mailSID.cfg
Return Address : .com
Click Internet Settings and fill in the following fields
Save the settings
Click Back
Choose menu Office-->Addresses-->Communication Types
Type in INT over the Comm. type and Internet Mail over description.
. Check Maintain and Send checkboxes and Save your entries.
UNIX configuration
. cd /sapmnt/SID/exe
.mlosadm sap_mailSID.cfg
Client 000
Username : MAILADM
Password : MAILADM
Language : E
System name : SID
System number :
Hostname :
Gateway hostname:
Gateway server sapgw
Sendmail Command :
Update file : Y
Testing
Logon to SAP
Execute transaction SO01
Write a message and send it to
If you don't see the mail in your internet mailbox, go back and review steps 1-12
Back to Top
FTP from ABAP
There are 2 ways of executing FTP from an ABAP (online or batch mode),
Initiated from the operating system. A script is available in the utility repository that explains how to do this very easily.
Initiated from the ABAP itself An example is given below.
Create a logical OS command 'zftp' using transaction SM69. Make sure that you enable 'comand line parameter allowed' checkbox
Create a shell script called 'zftp' with the following lines
RMTHOST=`echo $2 tr '[A-Z]' '[a-z]'`
ftp -v $RMTHOST <<> /out/zftp.$$ 2>&1
lcd /out
put $1
bye
EOF
Use the SXPG_COMMAND_EXECUTE function module to call this script (zftp) with the filename you want to transfer as the parameter. Eg:
call function 'SXPG_COMMAND_EXECUTE'
exporting
commandname =
tables
exec_protocol =
exceptions
no_permission = 1
command_not_found = 2
parameters_too_long = 3
...
Back to Top
Enable web based online documentaion (R/3 4.0 or above)
Install Netscape webserver or use an existing web server (requires administrators privelege)
Create a directory called SAPDOCS4 under your web server document root.
Mount the CDROM containing online documentation on your PC or your UNIX server.
Recursively copy all files under /cdrom/docs/ to the SAPDOC4 directory under the web server root.
Create the following entries in your /usr/sap/SID/SYS/profile/DEFAULT.PFL
eu/iwb/installed_languages = ENeu/iwb/help_type=2eu/iwb/server_win32=webserver.domain.comeu/iwb/path_win32=saphelp/helpdata
Restart your SAP system
Back to Top
How to access an external database from ABAP via DBLINK (ORACLE)
Using transaction SE11, create a table (ZTABLE) with the same fields as the table in the external database, make sure that the type and lengths of the fields are identical.
Using transaction SE11, create a view (ZTABLE_VIEW, projection view) using BASIS table ZTABLE
Using SVRMGRL>
create dblink REMOTE_DB as connect to remote_user identified by password; (database link created)drop table ZTABLE; (table dropped)create synonym ZTABLE for ZTABLE@REMOTE_DB; (synonym created)
Using transaction SE16 , type in ZTABLE_VIEW and hit RETURN
Enter value in key fields and hit execute. (displays rows from the remote table)
Tips and Tricks
To see the complete text of an error/warning message on the SAPGUI status bar, right click on the message and drag left.
To prevent your spool requests getting deleted from the BASIS cleanup jobs, you need to uncheck the Delete after print checkbox in the print control screen, execute transaction SP01, find your spool#, click on Attributes and change the Delete After date
Short cuts using the OK-code box.
%sc
Search in page
%pc
Download do local file
p+
Page up
p-
Page down
p++
Top of page
p--
End of page
Use transaction AL11 to browse the application servers directory structure

No comments: