Automatic CTS (Change and Transport System)
Even though SAP does not recommend automatic imports, it is the most practical way of moving transports from a development system to a QA environment or to a special development system (although It is not recommended to auto imports to a production system for obvious reasons).
There are various methods for doing this. The most effective and simple method is using an OS script (shell/perl etc.) scheduled using cron for user sidadm.
There are a couple of steps you need to take before setting up automatic imports.
- Your entire project team should agree upon the overall strategy, frequency of imports etc.
- Resolve any issues with transport approvals (many shops don't care about traffic between DEV and QA)
- Who is responsible for watching for errors and corrective actions (an email to the developer works in this case)
Configuring outbound SAP to Internet mail Gateway (R/3 4.0 and above)
Step 1 (UNIX SETUP)
Logon to your as sidadm
Change 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
Execute the command: mlosmadm SAP_EMAIL_GATEWAY.cfg (enter the following information)
System name: SID
Message Server: Group name: LOGON GROUP1
Using SAPROUTER: N
Trace Level (inBoound) : 0
Codepage: Trace Level (Outbound) : 0
Update file: Y
Step 2 (SAP SETUP)
Logon to SAPSYSTEM (SID) via SAPGUI
Transaction SU01, create user MAILADM and password initpass, usertype CPIC
Transaction SM59, Click Create
RFC Destination: SAP 4.5 INTERNET MAIL GATEWAY
Connection Type: T
Description: INTERNET EMAIL GATEWAY
Click EXPLICIT HOST
Enter /sapmnt/P21/global/ SAP_EMAIL_GATEWAY.sh
Save your entries
Transaction SCOT, click Edit--> CREATE NODES
Description : SAP CONNECT NODE FOR EMAIL (continue)
RFC DESTINATION: (choose SAP 4.5 INTERNET MAIL GATEWAY from the pull-down menu)
Choose radio button Internet
Address area: *DOMAIN (your intranet domain)
Format : DOC, DAT, R3F, TXT, RAW,PPT,XLS (continue)
Set further address types : N
Minimum waiting : 5 minutes
Check both Node is in use', Node can resolve path references
Choose Goto--> Schedule Background Job
Enter 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 simplifies 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 recipient. Inbound accepts a message from send mail and places it in the users SAPOffice inbox. Many SAP shops prefer to configure outbound only.
Configuring outbound forwarding
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 successful 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
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.
System name: SID
Gateway server sapgw
Update file: Y
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
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 'command 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 << EOF > /out/zftp.$$ 2>&1
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'
no_permission = 1
command_not_found = 2
parameters_too_long = 3
Enable web based online documentation (R/3 4.0 or above)
- Install Netscape webserver or use an existing web server (requires administrators privilege)
- 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 = EN
- Restart your SAP system
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 SAP GUI 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
Shortcuts using the OK-code box.
Search in page
Download do local file
Top of page
End of page
Use transaction AL11 to browse the application servers directory structure.