Monday, July 27, 2009

TSM SQL Statement

TSM SQL Statement

Show the number of scratch volumes in the library
SELECT COUNT(volume_name) AS Number_of_scratch FROM libvolumes WHERE STATUS='Scratch'

Show the storage pool name, volume name, percentage utilized and percentage reclaimable for all volumes in copy storage pools. Useful if you have lots of offsite volumes and wish to reclaim some
select a.stgpool_name,a.volume_name,a.pct_utilized,a.pct_reclaim from volumes a,stgpools b where a.stgpool_name=b.stgpool_name and b.pooltype='COPY' order by a.stgpool_name,a.pct_utilized

Show percentage utilization of each volume in each storage pool
SELECT a.volume_name, b.stgpool_name, b.pct_utilized FROM libvolumes a, volumes b WHERE a.volume_name=b.volume_name ORDER BY b.stgpool_name, b.pct_utilized

Show volumes that are not in readwrite status
select VOLUME_NAME, ACCESS from volumes where access !='READWRITE'

Show volumes in the library that are less than 20% utilised
SELECT volume_name, stgpool_name, pct_utilized FROM volumes WHERE pct_utilized <20AND devclass_name !='DISK' AND access !='OFFSITE'

Show volumes in a specified storage pool
SELECT volume_name, stgpool_name, pct_utilized FROM volumes WHERE stgpool_name='storage pool name' AND access !='OFFSITE' ORDER BY pct_utilized

Monday, May 25, 2009

Change Request Management (ChaRM)

Change Request Management (ChaRM) is an SAP tool to manage all those activities performed between the design of a change and the final promotion to a productive system.

ChaRM can:

- Improve efficiency and transparency of change management processes
- Minimize business disruptions
- Store documentation of implemented changes
- Track and monitor changes
- Improve audit process
- Reduce risk of correction and project failures

ChaRM benefits include:

- Allow the Organization to control and manage changes in the SAP system effectively
- Guarantee that any change to the SAP system follows the standard process flow and procedures with mandatory controls and documented steps
- Effectively adheres to requirements for SOX compliance

Convert Quick View into a Query

The Quick View reports can easily be converted into SAP Queries. To do this, choose first the query group that you are assigned to and that you will want to assign your query to. If the QuickView you want to convert is based on an InfoSet, that InfoSet must be assigned to your query group.

Navigate to the main screen of the Query tool with SQ01 transaction and select “Query” –> “Convert QuickView”. On the dialogue-box, select the QuickView you want to change, as in figure 1. Click the green check mark and add the name of the Query and define an InfoSet on the following dialogue-box (figure 2), to proceed with the query. Then select “enter”. The Quick View is now converted into a query, and can be shared with other users.

Tuesday, May 12, 2009

SAP Purchasing Configuration Tips and Tricks

SAP Purchasing Configuration Tips and Tricks

Goods Receipts/Invoice Receipts for Purchase Order

Transaction OMW1 allows you to set whether the Price Control is a mandatory "S" or "V".

V indicate that you want the system to value the stocks with the latest price.
S indicate that you want the system to value the stocks with a fixed price method.

Price Control V - Moving Average Price

Assume Material Master current price is 10

Goods Receipts for Purchase Order - Movement Type 101

Material Document Posting created - inventory increases
Accounting Document Posting created
Debit 12345 Inventory 12
Credit 67890 GR/IR 12
New Moving Average Price = ( GR value + Total value ) / ( GR quantity + Total stock )
Invoice Recipts for Purchase Order - MR01
Accounting Document Posting created
Debit 67890 GR/IR 12
Debit 12345 Inventory 3
Credit 45678 Vendor 15
New Moving Average Price = ( Inventory difference of 2 + Total value ) / ( Total Stock)
Price Control S - Standard Price
Material and Accounting Document is the same.
The one with the lower value will be posted with a price variance entry.

Goods Receipts for Purchase Order - Movement Type 101

Material Document Posting created - inventory increases
Accounting Document Posting created
Debit 12345 Inventory 10
Debit 23456 Price Variance 2
Credit 67890 GR/IR 12
No change in Standard Price
Invoice Recipts for Purchase Order - MR01
Accounting Document Posting created
Debit 67890 GR/IR 12
Debit 23456 Price Variance 3
Credit 45678 Vendor 15
No change in Standard Price
General Ledger Account Configuration
Transaction OMWB - Automatic posting for inventory
Inventory posting BSX
Goods receipt/inv.receipt clearing acct WRX
Cost (price) differences PRD
Transaction XK03 - Account Payable Vendor Master
Tick Accounting info. and hit the Enter key
Field name Reconcil.acct 45678
Vendor Returns Without PO Reference

You can used Return Purchase Order, transaction code ME21N

At the item details, look for the Return columns and tick it.

MIGO_GR - Goods Receipt for Return Purchase Order
Movement type will be 161 to deduct the stock and 162 for reversal.
During Goods Receipt for Return Purchase Order, you do not have to change the movement type from 101 to 161 as the system will automatically assign the movement type to 161 upon saving the postings. However, before saving, check if there is a tick in the Return Column to ensure that it is a return Purchase Order.

Create a new Purchase Order Number range to differentiate
OMH6 - Define Number Ranges

Create a new Purchase Order Type to differentiate e.g ZB
OMEC - Define Document Type

Changing the PO Layout sets
OMFE - Messages: Output Programs

/: IF &EKKO-BSART& = 'ZB'.
/ RETURNED PURCHASE ORDER
: ELSE.
/ PURCHASE ORDER
/: ENDIF.

Purchasing List for Open Purchase Order, Goods Receipt, Invoices

Open Purchase Order = Open Goods Receipts ( Selection parameters WE101)

This two parameters determined what information is shown:

selection parameter
scope-of-list parameter
The configuation transaction code is OMEM
You can define additonal selection parameter for your users as well as untick those fields which you does not want it to be printed.
Your can have the Purchasing Documents by :-

ME2L - Vendor
ME2M - Material
ML93 - Service
ME2K - Account Assignment
ME2C - Material Group
ME2B - Requirement Tracking Number
ME2N - Purchase Order Number
ME2W - Supplying Plant
Force buyers to create Purchase Order with ref. to a Pur. Req., Quotation or Pur. Ord.
Transaction OMET
Create a new entry, give it a name and tick :-
Ref. to PReq
Ref. to P.O.
Ref. to quotation
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EFB to the authorization code.
Type in Parameters value you want e.g. XX
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order without a reference.
Define default values for buyers
Transaction OMFI
Double click on the default values you want to change.
Save it.
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EVO to the authorization code.
Type in Parameters value you want e.g. 01
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order and check the default values.
In the Fast Processing button :-
you can choose whether to adopt automatically all the line items fields in the Purchaes Requisitions
Puchase Order Condition
Suppose you want to calculate the GST and DISCOUNT for a Net Value of 1000.
Net value 1000
GST 10% of 1000 100
DISCOUNT 10% of 1000 100
Final Net value 900

This is what you do :-

M/08 - Define calculation schema
First check the conditions column Steps e.g. PB00 and PBXX belongs to step 1.
Next check the last Steps after Actual Price
Now, look at the column Fro To
If you want the DISCOUNT to be calculated based on 1000, put the Steps number in the column Fro
The Fro To controls the calculation.
Information Structure
In the SAP standard info structure S012 is updated by the Purchase Order creation date, not the Goods Receipt date. e.g. a Purchase Order is created in January and good receipt is in February and March, S012 will shows the values in period January.
Transaction MC26
Info structure S012 Update group (stats) SAP
Double click on Goods received qty
In the section Date field for period determination
Purchase Order Layout Sets, Message Types
Create a new message types for a different layout of Purchase Order
M/34 - Maintain message types
Click the Partner definition button
Insert the new message type to the Partner
OMQN - Fined-tuned Message Control
Add a new Printer Operation 1 - New 2 - Change
OMFE - Layout sets for Purchase Order
Attach the new message type to the new layout sets
M/36 - Maintain message detemination schema : Purchase Order
OMQS - Assign schema to Purchase Order
OMGF - Assign Output devices to Purchasing Groups
MN05 - Assign default Message Type to Purchasing Groups
User Defaults for Purchase Order
There are some fields which you can set as defaults for the buyer in transaction ME21.
Transaction SU01
Input the user name and click Parameters

PID Parameter value
LIF - Vendor number
BES - Purchase Order Number
BSA - Order type
EKG - Purchasing group
EKO - Purchasing organization
WRK - Plant
LAG - Storage location
MKL - Material group
WAK - Promotion

PO Release Strategy

4.6x

The release code is a two-character ID allowing a person to release (clear, or approve) a requisition or an external purchasing document. The release codes is basically controlled via a system of authorizations (authorization object M_EINK_FRG).

Use SE12, structure CEKKO to check all the fields available for controlling the Purchase Order.

e.g. If the total value for the Purchase Order exceeds 10,000, release strategy 01 is assigned to the Purchase Order. There is only one characteristic created in this example. For controlling the Purchase Order type, create characteristic for CEKKO-BSTYP and the value NB.

CT04 - Create Characteristic e.g. NETVALUE

Click Additional data Table name CEKKO Field name GNETW and press enter
(for currency dependent field, you are prompt to enter the currency which the system then converts the currency of the Purchasing document into this currency)

In the Basic data (X refers to tick),
X Mutliple values
X Interval values

In the Value data, in the Char. value column, type >10000 and press enter

Save your data

CL02 - Class

Class - Create REL_PUR

Class type - 032

Click Create

Description - Release Procedure for Purchase Order

In the Same Classification section, click Check with error

In the Char. (characteristic) tab, type NETVALUE to assign your characteristics to the class

OMGS - Define Release Procedure for Purchase Order Type

Release Group - New entries
Rel.group Rel. Object Class Description
02 REL_PUR Rel. Strategy for PO

Release codes - New entries
Grp Code
02 01

Release indicators
Release indicators Release Description
0 Blocked
1 X Release

Release Strategy
Release group 02

Rel.strategy 01

Release codes 01

Release status 0
1

Classification Choose your check values

OMGSCK - Check Release Strategies
(make sure there are no error messages)

Once the Purchase Order is not release, buyers will not be able to print the Purchase Order.

Goods Receipts will be shown with Message no. ME 390 - Purchasing document XXXXXXX not yet released.

In 4.6c, Purchase Order with Release Strategy have a tabs at the end of the Header. This allowed the buyers to check the release status of the Purchase Order.

The person with the release authorization have to use ME28 to release the Purchase Order.

Prompt the last Purchase Order Price for the Material

If you want the system to take the price from the last Purchase Order, then do not maintain the conditions in the info record because it has precedence over the last PO. This means that the netprice field in the info record should be left blank.

In the case when you have already maintained the conditions in the info record (or netprice), try to delete them or make them invalid by changing the validity date.

Even though no price was maintained, the info record will still keep track of the Order price history.

To check the Order price history, go into the material info record and click Environment -> Order price history

Adopt Purchase Order Header Text

To default the Header Text into the Purchase Order

Step 1 :- Maintain text in Vendor Master

MK02 - Change Vendor
Choose Extras -> Texts - Input the text in Purchasing memo
Step 2 :- Link Text types to Header text in Purchase Order
OMFV - Define rules for copying (adoption of) text
Choose Header Text
Choose Goto -> Linkage: text types -> To vendor
Filled in the field No. (e.g. 01 - Header Text), next tick whether you want the text to be adopted or for displayed only
Choose Update to save
Create a new Purchase Order Document Type
4.6x
If you have more than one company code, you might want to define a new document type and number range to differentiate between the two company.

Define a new number range not in used
OMH6 - Number Ranges for Purchasing Documents

Copy the NB - Standard PO to e.g. ZB
OMEC - Define Document types

Maintain :
Text for Document Header/Item
Text for Document Supplement
OMF6 - Messages Header Texts

Send Purchase Order via Output Determination

Read note 191470 - Purchase order as an e-mail

From release 4.5, you can send your purchase order via output determination. This note have indicate all the requirement and settings necessary to send purchase order via the output determination once your SAP have been connected to an External Mail System.

Send Purchase Order with Microsoft Outlook

This is how it work:-

First you send the text converted Purchase Order to your SAPoffice
Sample ABAP program for sending mail to your SAPoffice
Then from Microsoft Outlook, you can send it out externally to your Vendor
Install the SAP setup program on the SAP Presentation CD-ROM under \GUI\WINDOWS\WIN32
Execute the SAPsetup program and choose the Desktop Interfaces.
Then choose the SAP MAPI Service Provider (select Change Options to display the selection)
Once the SAP MAPI is installed. You can create your logon profile for SAPoffice.
Go into your Control Panel of your windows.
Select the Mail option from the Control Panel to call the MAPI profile manager.
Choose Add to call up the new logon profile setup wizard
Select Add from the Services and select the SAP MAPI Service Provider
Type in the required R/3 information (client, sap user name, password)
The supplied PST file is sapwrk.pst

Now, logon to your Microsoft Outlook and see whether you can access all your SAPoffice folders.

If you send the file using SP01 -> System -> List -> Send, the file will have the extension ALI. Use the Windows Explorer to default open with the Windows Notepad.

Sending mail directly from SAP via Microsoft Exchange

If you want to send your mail directly via Microsoft Exchange, you have to install the SAP Exchange Connector Software on your Microsoft Exchange Server.

The setup program SETUP.EXE is located on the R/3 Presentation CD in the directory :\GUI\WINDOWS\WIN32\SXC.

Then you have to setup :-

SM59 - The RFC destination
SCOT - SAPconnect

Monday, April 27, 2009

Remove "http://www.lalamao.cn" from internet explorer startpage

1.在 internet選項 中將主頁設定為空白頁。

2.點擊開始按鈕,點「執行」,輸入 regedit ,展開註冊表HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command
將其值C:\Program Files\Internet Explorer\IEXPLORE.EXE "http://www.lalamao.cn " 後的 "http://www.lalamao.cn" 去掉。

3.展開註冊表HKEY_CLASSES_ROOT\http\shell\open\command
同樣將其值C:\Program Files\Internet Explorer\IEXPLORE.EXE "http://www.lalamao.cn " 後的 "http://www.lalamao " 去掉。

4.刪除各IE快捷方式中的http://www.lalamao.cn 後輟.

Monday, April 20, 2009

Create Cash Journal

Use the Tcode: FS00 or the path is IMG > Financial Accounting > Bank Accounting >Business Transactions > Cash Journal > Create G/L Accounts for Cash Journal.

In this activity, you create a G/L account, for the cash journal in the required company code. Ensure that the account can only be posted to automatically and displays a unique account currency If you want to run several cash journals with different currencies in this account, make sure that the indicator Balances in local currency only is not set, The account currency corresponds to the company code currency.

Define Document Types for Cash Journal Document

You can select existing document types for cash journal documents, or define new document types in this activity. You must have document types for the following postings:

-G/L account postings
-Outgoing payments to vendors
-Incoming payments from vendors
-Incoming payments from customers
-Outgoing payments to customers

Ensure that on the detail screen, the selection fields under Permitted account types, your postings are selected accordingly. Useful selections are for example, account types customer, vendor, G/L account.

Documents Type Controls:

-Number Range of Document
-Accounts Groups to be allowed for Posting
-Reverse Document Type Allowed for Reversal of Cash Journal
-Persons authorized allowed for cash journal Posting

Use the tcode OBA7 or the IMG Path > Financial Accounting > Bank Accounting >Business Transactions > Cash Journal > Define Document Types for Cash Journal.

Define Number Range Intervals for Cash Journal Document

You have to define a number range interval for cash journal documents. Each document then receives a unique number that does not clash with the G/L document number.

Note: This number range assigns a unique number per company code to each cash journal document. In addition, the cash journal documents are numbered sequentially per company code and cash journal.

Use the Tcode: FBCJA1 or the IMG path > Financial Accounting > Bank Accounting > Business Transactions > Cash Journal > Define Number Range Interval For Cash Journal Document.

FI - Setup Cash Journal

Using this activity we can :

1.Set Cash journal indicator for easy identification.
2.Assignment to G/L account , which will automatically updates the G/L Account
3.Set Currency that is allowed for posting of cash journal Posting
4.Document type allowed for cash journal
5.Naming of Cash Journal

Use the Tcode: FBCJC0 or the IMG Path > > Financial Accountings > Bank Accounting > Business Transaction > Cash Journal > Setup Cash Journal.

Thursday, February 12, 2009

Delete Lock Entries using SM12

From time to time a user may lock an object and for some reason like lost connection or program error, the lock on that object remains. All old lock entries should be analysed and corrected. Whenever a user complains about some locked entries in the system perform the following sequence of actions:

• From the User Overview screen (SM04) verify that the user whose lock entries are to be deleted is currently not logged onto the system. If the user is still logged in, ask him to log out. This is mandatory in order to detect the truly old unwanted lock entries. Otherwise, we run the risk of deleting valid lock entries that may lead to database inconsistencies.

• From the SAP R/3 main screen choose the menu option Tools -> Administration, Monitor -> Lock entries. Alternately execute transaction SM12.

• Type in the client and the concerned user name (who is currently holding the locks) in the fields ‘Client’, and ‘User name’. Click on the ‘Continue’ pushbutton (green tick pushbutton).

• In the following screen we get a display of the various lock entries for the selected user. Any long held or stuck lock will be displayed in blue color. Place the cursor on an entry in the list and click on the "detail description" pushbutton. This gives we the application server name from which the user, who has implemented the lock, has logged on. Place the cursor on a lock entry in that list and click the ‘Delete’ pushbutton. The system prompts we with a warning message regarding the consequences of deleting lock entries. We can ignore the warning, and confirm the deletion of the selected lock entry. Repeat this procedure for all other lock entries of the user.
Only long held/stuck locks should be deleted manually as deleting the normal locks might lead to data inconsistencies.

Thursday, February 5, 2009

SAP Beginners Guide into the world of SAP

Download SAP Beginners Guide into the world of SAP

Database administration

Download Here............

Performance Tuning for SAP R/3

Dynamic SQL in SAP

Database Administration Experiences

Sap - Instalacao e Post NW04 WAS ABAP HPUX Oracle

Ebook: mySAP Tool Bag for Performance Tuning and Stress Testing

SAP R/3 - Overview of ITS Concepts and Languages

SAP R/3 - Overview of ITS Concepts and Languages

TOC
- Concepts and Languages of R/3
- Concepts at the Analysis Level
- Concepts at the Design Level
- Concepts at the Implementation Level
- Customizing and System Evolution
- Architectural Aspects of R/3................

Download the ebook

SAP Standard for Upgrades

This document provides details regarding the upgrade standard. It explains the basic concept of the standards, describes the seven key focus areas of upgrade projects, and lists and ex-plains the activities of the different phases of a “standard” SAP upgrade project.

Click here to download WP_SAP_Standard_for_Upgrades

Tuesday, February 3, 2009

AIX commands

AIX commands

1. Useful commands

Note All AIX commands reference can be found under
http://www.austin.ibm.com/doc_link/en_US/a_doc_lib/aixgen/wbinfnav/CmdsRefTop.htm

1.1 Memory

bootinfo –r shows how much RAM does my machine has (as root)
lsattr –E –l sys0 –a realmem shows how much RAM does my machine have (as non root)
rmss -c 512
rmss -r sets the memory size to 512 MB
resets the memory size to the original one

1.2 Devices

lsattr -El en0 displays en0 driver params
lsattr -El ent0 displays ent0 HW params
lsattr -El rmt0 displays tape params
lscfg -vp -l rmt0 (all information about a tape drive)
lsattr -El sys0 displays system type, firmware, etc driver params
lscfg –v lists all system HW config (NVRAM)
lsdev –Csscsi list all scsi devices
lsdev –Cspci list all pci devices
lsparent –Ck scsi list all scsi adapters
lsdevfc list fiberchannel devices
cfgmgr Configures devices
lsdev -Ccdisk Shows all disks
lsdev -Cctape Shows all tapes
cfgmgr -v -l device –v Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output.
cfgmgr -v -l device Name Specifies the named device to configure along with its children.
If you only turned on a disk tower at e.g. scsi2 cfgmgr -v -l scsi2 will only configure this with detailed output.
lsdisp To check which graphic adapter is installed.
lscfg -vp -l mga0 (all information about a adapter)
lscfg -vp -l hdisk0 | grep Machine gives info about the disk manufacture type
lsslot -c pci For 6F1 only !!!! Lists all slots ,voltage,boards,etc !!!!
bootlist -m normal cd0 rmt0 hdisk0 Changes the default bootlist
lsmcode -c display the system firmware level and service processor
lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0
lsmcode -A display the microcode level for all supported devices


1.3 System info

/usr/bin/uname -m Get machine ID
/usr/bin/uname -M Get platform type
oslevel Displays current AIX level
oslevel -r Displays current AIX maintenance level
oslevel -g List filesets at levels later than maintenance level !!!
lsps -a Paging space settings.
lscfg -vp -l proc0 (1,2,3) (all information about a processor[s])
lscfg -vp -l mem0 |pg (all information about memory modules installed)
env ulimit Environment setings - show user ulimit
bootinfo –s hdisk0 Displays disk size
lsattr -El sys0 -a systemid Determines the system serial number
lscfg –vp|grep ROM|grep -v CD Determines the system Firmware level

1.4 System issues

TERM=vt100 -If you execute a command/application and it responds with msg
‘ The type of your terminal is unknown to the system’,run those commands (In ‘ksh’)
set term=vt100 -Same (In tcsh’)
rcp -rp /dataVolumes/brisque1.1.0/jobs/flower.job sciroot@ripro3:/dataVolumes/ripro3.3.0/jobs/ -Copying a file from one Unix machine (Brisque) to another (Server) the assumption is that both machines know each other’s names (in hosts file)
dd if=/dev/fd0 of=/temp/diskimage bs=4096 -Duplicate a diskette copy from diskette to hard drive
dd if=/temp/diskimage of=/dev/fd0 bs=4096 -copy diskette image onto diskette
/usr/lpp/X11/bin/xset -display unix 0 s off -Kill display timeout
lsfs -v jfs -List of Filesystem items.
lsfs -q -v jfs -you can see also the parameter of a filesystem and thus see if e.g. /backup was or is a big_filesystem_enabled one.
Important for the 2GB File limit.
lsuser –f root Shows all user parameters (max .file size,etc)
sysdumpdev -L Check last system dump status
sysdumpdev -l Check system dump device settings
lslpp -f Upd_Timna_DTM.obj List contents of the package

1.5 Networking

ksh
for ENT in ` lsdev –Cs pci|grep ent | awk '{ print $1 }'|cut –c 1,2,4 `;do
mktcpip –S $ENT
done
exit -Shows all interfaces IP config+mask+router+DNS !
host timna1 displays station default IP address – works ONLY in DNS environment
ifconfig en0 displays en0 driver params
netstat -i displays network interfaces setting
mktcpip -S en0 #host:addr:mask:_rawname:nameserv:domain:gateway:type:start
syslab18:192.9.100.1:255.255.255.0:en0:10.4.2.12:csil.creoscitex.com:10.4.30.1:N/A:no
GREAT TCPIP info in one command !!!
showmount –e displays all exported volumes
showmount -a show who's got my filesystemsses mounted over IP !
lssrc –g tcpip displays all IP oriented processes status
entstat -drt ent0 |grep –i error display any communication errors on etn0
entstat -r Resets all the statistics back to their initial values.
arp -a shows a local arp cache
cd /usr/local/es/;res restarts appletalk
netstat -ptcp shows IP statistics
netstat -pudp shows UDP statistics
netstat -c
-s
-m client only;
server only
NFS mount
netstat -I en0 10 Trace en0 every 10 seconds
netstat -rn Display routing info with IP address (10.4.27.182)
netstat -in Shows the state of all configured interfaces
netstat -r Display routing info with full hostnames (timna2.csil.creoscitex)
nfsstat –z ;to reset NFS stats without reboot
cat /etc/resolv.conf Check DNS settings
stopsrc –g NFS To stop NFS services on a client
startsrc –g NFS To start NFS services on a client
traceroute 149.115.39.1 Trace all hobs (interconnections=routers) to the destination IP
netpmon -o netpmon.out
trcstop Traces all network processes activity into a logfile. Must be preceede by a trcstop command !
nslookup hostname Shows the DNS server name and address
ping -R -c 1 bnc2 Ping with displaying the routing info
namerslv -s | grep domain | awk '{ print $2 }' Displays a fully qualified domain name of a host
rup Shows the status of a remote host on the local network
nmonnfs Traces all NFS processes activity
mount hostname:/filesystem /mount-point Mount an NFS filesystem
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
rmnfs Stops and un-configures NFS services
mknfs Configures and starts NFS services
exportfs -u (filesystem) Un-exports a filesystem
exportfs Lists all exported filesystems
exportfs -a Exports all fs's in /etc/exports file

1.6 Disks

synclvodm -vP svg3 synchronizes ODM and the disk VG info.
redefinevg svg3 Redfined VG definition in ODM
lqueryvg -p hdisk0 –Avt -reads logical volumes info from disk
bootinfo -s hdiskx Shows Megabytes available even if no volume group is assigned.
lspv -p hdiskx (PP's used, location on disk, mount point)
lscfg -vp -l hdiskx (all information about a disk/raid)

1.7 Filesystem

chfs -a size=+200000 /var increases /var FS by 100MB
du -sk /john shows directory used space in kb !!!!
mount all mounts all FS
umount /dataVolumes/rtest9.1.0 unmounts a FS
fuser -k /dev/cd0 Releases a CD that will not unmount !
fuser –c /dataVolumes/rtest9.1.0 -Find out which process_id lock the FS
istat Shows when the file was last created/modified/accessed !!!!

1.8 System monitoring

istat Shows create/modify/access file info
alog -o -t boot | more displays system boot log
w Lists login users and their programs.
who Identifies the users currently logged in
/usr/local/es/swho Identifies the Ethershare users currently logged in
last |more shows last logins
last –20 Shows recent 20 lines
last root Shows username ‘root’ login/logout record
last ftp Shows all FTP session in the record
mount shows all mounted filesystems (nfs+local)
ps -ef show all running processes
ps -ef |grep Scitex show all scitex running processes
du -ak /scitex|sort -n -r|head –10 -Display 10 biggest directories on the volume by size
find /scitex -xdev -size +2048 -ls|sort -rn +6|head –10 -to find 10 top files in the root (/) directory larger than 1 MB.”-xdev” helps searching ONLY in “/” !!!!!!!!!
history Last commands run on the system by this user
alog -ot boot Lists a log of all boot operations
grep TX /etc/environment Verify daylight settings

1.9 Performance issues

nmon a nice monitor - runs only on AIX5 and up
topas a nice monitor - runs only on AIX 4.3.3 and up
monitor -top 10 -s 2 monitors system 10 top processes with 2 seconds
iostat 2 displays disks activity every 2 seconds refresh interval
iostat –a 2 AIX5 ONLY !!!!
displays disks and ADAPTER !!!! activity every 2 seconds refresh interval
vmstat 2 ;monitors virtual memory statistics every 2 seconds (see appendix A)
sar –P ALL 2 2 Show all CPU’s activity on an SMP machine
svmon –i 2 Monitors real and virtual memory
ps auxw | sort –r +3 |head –10 -Shows top 10 memory usage by process
ps auxw | sort –r +2 |head –10 -Shows top 10 CPU usage by process
ps –auw | grep defunct Shows zombies processes (to kill – reboot or kill the parent)
filemon –O all –o filemon.out ; find / -name core ; trcstop Traces FS,LV,disks,files activityof a “find” command into a logfile (filemon.out). Must be preceded by a trcstop command.
tprof –x find / -name core ; trcstop Traces CPU activityof a “find” command Severall logfile are created. Must be preceded by a trcstop command.
tprof -ske -x "sleep 30" -Trace CPU activity for next 30 seconds.Results in file sleep.tprof

lvmstat –ev svg1
lvmstat –v svg1 2 AIX5 ONLY !!!!
enable gathering the VG statistics
Display VG logical volumes statistics every 2 seconds

1.10 Remote issues (working over the modem)

pdelay tty0; pdisable tty0 >/dev/null ;penable tty0
-Resets tty0
stty erase '^?' Makes bakespace to work
/scitex/version/utils/modem/kermit -l /dev/ttyx –c atdt {phone #} Use Unix to Dail-out (for any reason) ttyx is the serial port the cable is connected
/scitex/version/utils/modem/kermit -s /u/d0/ripro_messages -i Sends a file to a remote desktop in binary mode
/scitex/version/utils/modem/kermit –r
-Receives a file to from remote desktop

1.11 Browsing errlog with errpt

errpt -a -s 0604090601 -e 0605090901 browse the errlog in detail for all errors within a timeframe
errpt -a -N SYSPROC |more
errpt -a -N SYSPROC > /tmp/err.log Browse the errlog for the SYSPROC resource, can be into the file
errpt -j 5DFED6F1 -Browse the errlog by the identifier
errpt –A -AIX5 ONLY !!!! Shows less detailes then errpt -a
errpt –D -AIX5 ONLY !!!! eliminates double entries

1.12 Security issues

chmod -s Filename Remove Sticky Bit to a file or directory

chmod +r+w+x+t Filename Add Read+Write+Execute+Temp mode to a file or directory.
This is a ‘blanket’ change for all owner, user & group.
Numeric Access Modes
0 (---) - no access
1 (--x) - execute permissions; search permissions for directories
2 (-w-) - write access
3 (-wx) - execute/search permission and write access
4 (r--) - read access
5 (r-x) - execute/search permission and read access
6 (rw-) - read and write access
7 (rwx) - execute/search permission and read and write access
mkpasswd -f rebuild the /etc/passwd indexes in case of suspected corruption

1.13 Miscellaneous

ksh
find / -type f|xargs grep "10.4.27.181" 2> /dev/null
-Find all files containing my IP address
compress -c file > file.Z Compresses the files while keeps the original
whereis Returms full path of program

Specifying impermissible passwords for the users

There might be certain passwords which we do not want be used by our users. To prevent them from using certain passwords, do the following:

Go to transaction SE16.

Enter the table name USR40 and click on create entries.

Click on New Entries.

Then you can enter the list of impermissible passwords.

Save your entries.

Henceforth, the users wouldn’t be able to use the above-mentioned passwords.

Client Copy Procedure

  1. Logon to TARGET client (200 on SAPDEV)
  2. Check SM04 to see if users are active - all MUST be logged out
  3. Run SCC9 to define Remote CLient Copy
  4. Select SAP_APPX profile
  5. Select Source Destination (SAPPRD - RFC connection must exist - SM59)
  6. Select schedule
  7. Check what happened with SCC3

Friday, January 16, 2009

Local Client Copy - SCCL

Step by Step Procedure to create a copy of a client locally in the same SAP server.

1. Logon to SAP server

2. Use Transaction Code SCC4

3. Go to change mode

4. Create a new client, assign client number & description as per request

5. Logoff from current client.

6. Login to newly created client using the following credentials :

i. Client Number : Newly created one

ii. User Id : SAP*

iii. Password : PASS

7. Use Transaction Code SCCL for local client copy

8. Give reference client for copy and profile as per the request

9. Use SCC3 Transaction code to monitor progress of Client Copy.

Golden rules for CLIENT Copies

1. Master data can not be copied without copying transactional data and transactional data can not be copied without copying master data.

2. Application data (transactional and master) should not be copied without copying configuration data.

3. Client copy requires a valid client as the destination client. Make sure that the client exists in T000 table and you can logon to that client.

4. The transport system and the transport management system of 4.0 are the only proper tool to be use to keep multiple systems in sync by transporting development and customizing changes to another instance.

5. When you copy a client from one system to another, client-independent tables should only be copied if they are not yet modified in the target system.

6. We recommend the users to read all the OSS notes regarding client copy that applies to their SAP release. It is always better to schedule the client copy job in the background for the night run when normal work is not taking place.

7. Always check the database space before performing a client copy.

8. To avoid data inconsistencies all the users working in the source and target clients should logoff from the system.

9. RSCLICHK program should be run in the target system remotely before doing a client export. This program will give information about the missing definitions from the data dictionary in the target. After executing this program and getting successful results you can ensure that the client copy will have no problems. In case some tables are different; you can use SE11 to compare and adjust the table structure in both the system before the client copy. A remote test client copy also can be executed to know the differences between source client and target client.

10. If you are not in release 2.2 then do not use R3trans to copy a client.

Change default SAP Logo on front screen..

Replace SAP Splash Logo : Change default SAP Logo on front screen..

1. Identify a picture to replace the existing SAP logo. This picture can be in any valid picture format - gif, bmp, jpg. But convert it to jpg since that is the smallest available picture type. Store the picture somewhere on your workstation.

2. Go to transaction SMW0.

3. On the SAP Web Repository: Initial Screen, click “on” the radio button for Binary data for WebRFC applications, and click the Find icon or press F8. On the SAP Web Repository: Objection selection screen, click the Execute icon or press F8.

4. On the SAP Web Repository: Object display screen, first make sure that the mime extension exists for your picture type. Click Settings -> Maintain MIME types. Look to the far right of the Data Browser: Table MIMETYPES Select Entries screen, and if you don’t see your file type - gif, jpg, bmp - then you need to add it. Once you at done, back out to SAP Web Repository: Object display screen.

5. Now you can upload your picture. Click the Create icon or press F5. Fill in the name of your picture and a brief description and click the Import icon. Then provide the location of your picture and load it in.

6. Go to transaction SM30. Fill in the table name SSM_CUST and click Maintain.

7. On the Change View “Set Values for the Session Manager / Profile Generator” screen, click New Entries and add an entry called START_IMAGE and set the value to the name of your picture created in step #5. Then press the Save icon.

You have replaced the SAP splash screen picture. Log off and back on to view your work!

SAP R/3 dispatcher and work processes

Types of work processes:

  • Message : Coordinates the communication between different instances of a single SAP R/3 system. Used for Logon purpose and load balancing.
  • Dispatcher : Redirect the request from GUI client to free process.
  • Dialog : Interpreting the ABAP code and execute the business logic. Used for interactive online processing.
  • Batch : For Background jobs.
  • Enqueue : Single “Central Lock Management Service” that controls the locking mechanism between the different application servers and the database.
  • Update : Responsible for consistency in asynchronous data changes.
  • Gateway : Used for transport of bigger amount of data between application servers as well as external (non SAP) systems that communicate with SAP.

Profile Parameters for Client Login and password security (RZ10, RZ11)

login/accept_sso2_ticket

login/certificate_request_ca_url

login/certificate_request_subject

login/create_sso2_ticket

login/disable_cpic

login/disable_multi_gui_login

login/disable_multi_rfc_login

login/disable_password_logon

login/failed_user_auto_unlock

login/fails_to_session_end

login/fails_to_user_lock
login/min_password_diff

login/min_password_digits

login/min_password_letters

login/min_password_lng

login/min_password_specials

login/no_automatic_user_sapstar

login/password_change_for_SSO

login/password_expiration_time

login/password_logon_usergroup

login/password_max_new_valid

login/password_max_reset_valid

login/system_client

login/ticket_expiration_time

login/ticket_only_by_https

login/ticket_only_to_host

login/ticketcache_entries_max

login/ticketcache_off

login/update_logon_timestamp

Increasing or Decreasing the Number of Work Processes

1. Log on to any client in the appropriate SAP system.

2. Go to transaction RZ10.

3. On the Save profile popup, click the No button.

4. On the Edit Profiles screen, select the _DVEBMGS00_SAP Profile from the dropdown, or whatever instance profile you need to change. In the Edit profile section, click the radio button to the left of Extended maintenance. Click the Change button.

5. On the Maintain R/3 Profile screen, locate the dialog processes rdisp/wp_no_dialine in the Parameter name column. Change the matching value under Parameter value to the new value. Click the Copy button. Do the same for the batch processes, rdisp/wp_no_btc, and the update processes, rdisp/wp_no_vb. Be sure to click the Copy button after each change. When all the changes have been made, click the white arrow on green picture-icon.

6. On the Edit Profiles screen, click the Save picture-icon.

7. On the Save profile popup, click the No button.

8. On the Activate profile popup, click the Yes button.

9. On the Edit Profiles popup, click the green √ button.

10. On the Caution! Caution! Caution! popup, click the green √ button.

11. If you receive a Possible Inconsistencies in OP Modes screen, double click over the unless you are unsure of why this message has been displayed.

12. You will not get a confirmation message. You may now leave the RZ10 transaction.

What Needs to Be Backed Up?

The PRD Instance

Daily backup should be made for these SAP specific directories:

/usr/sap/

/sapmnt/

/usr/sap/trans on the TMS Domain Controller Server

Any directories containing flat files that are used by the SAP instance

Daily backups should be made for these Oracle specific directories:

/oracle

Directory holding redo logs if not in the /oracle structure

Weekly backup should be made for these OS specific directories:

Root

/etc

/dev

For Oracle, the entire /oracle directory should be backed up daily if there is only one Oracle Instance on the server, and each separate /oracle/ directory if there is more than one instance on the server.

It is also recommended that a full offline image of the entire server be made before the monthly closing cycle.

The DEV and QAS Instances

Weekly backup should be made for these SAP specific directories:


/usr/sap/

/sapmnt/

Any directories containing flat files that are used by the SAP instance

Weekly backups should be made for these Oracle specific directories:

/oracle

Directory holding redo logs if not in the /oracle structure

Monthly backup should be made for these OS specific directories:

Root

/etc

/dev

For Oracle, the entire /oracle directory should be backed up daily if there is only one Oracle Instance on the server, and each separate /oracle/ directory if there is more than one instance on the server.

It is also recommended that a full offline image of the entire server be made at the same time every month.

Creating a User Audit Profile

Creating a User Audit Profile

1. Log on to any client in the appropriate SAP system.

2. Go to transaction SM19.

3. From the top-most menu bar on the Security Audit: Administer Audit
Profile screen, click Profile -> Create.

4. On the Create new profile popup, type in a new Profile name and click
the green √ picture-icon.

5. On the Filter 1 tab of the Security Audit: Administer Audit Profile
screen, click the □ to the left of Filter active to place a √ in the box.
In the Selection criteria section, select the Clients and User names to
be traced. In the Audit classes section, click “on” all the auditing
functions you need for this profile. In the Events section, click the
radio button to the left of the level of auditing you need. Once you
have entered all your trace information, click the Save picture-icon.
You will receive an Audit profile saved in the status bar at the bottom
of the screen.

6. Please note that while the user trace profile has been saved, it is not
yet active. To activate the user trace, see the next section Activating
a User Audit Profile.

7. You may now leave the SM19 transaction.

Activating a User Audit Profile

1. Log on to any client in the appropriate SAP system.

2. Go to transaction SM19.

3. On the Security Audit: Administer Audit Profile screen, select the audit
profile to be activated from the Profile dropdown. Click the lit match
picture-icon to activate it. You will receive an Audit profile activated
for next system start in the status bar at the bottom of the screen.
The audit will not begin until after the SAP instance has been recycled.

4. You may now leave the SM19 transaction.

Viewing the Audit Analysis Report

1. Log on to any client in the appropriate SAP system.

2. Go to transaction SM20.

3. In the Selection, Audit classes, and Events to select sections of the
Security Audit Log: Local Analysis screen, provide your information to
filter the audit information. If you need to trace the activities of a
specific user, be sure to include that user’s ID. Click the Re-read
audit log button.

4. The resulting list is displayed. This list can be printed using the usual
methods.

5. You may now leave the SM20 transaction.

UNIX Kernel Patch: UNIX Kernel Replacement

1. Download the two necessary archives - SAPEXE.SAR and SAPEXEDB.SAR - from SAP MarketPlace. There files can be found at http://service.sap.com/patches. Be careful that your Basis level is high enough to use the patch level of the files you download. For example, if your SAP instance is on Basis level 39 and the description of one of the SAPEXE.SAR files is Stack 42, you need to download a SAPEXE.SAR of a lower level.

2. Once both files have been downloaded, log on to the UNIX server as adm and copy them up to a directory on the UNIX server - I use one called /usr/sap/trans/NewKernel. unCAR the files with SAPCAR command “sapcar -xvf “SAPEXE*.SAR”.

3. As adm, stop the SAP instance. Log on as ora and stop the TNS listener, and log on as root and stop saposcol.

4. Make a backup of your run directory before patching. I usually create a /usr/sap//SYS/exe/backup_run and copy all the files in /usr/sap//SYS/exe/run to it.

5. Copy all the files unCARed in step 2 to /usr/sap//SYS/exe/run. If prompted, overwrite all.

6. Change the owner of saposcol to root, sapdba & all br* files to ora, and all the rest to adm.

7. Start saposcol, the TNS listeners, and the SAP instance.

8. You have patched your UNIX SAP kernel. If you run into any problems starting your SAP instances, stop everything, rename the directories /usr/sap//SYS/exe/run to /usr/sap//SYS/exe/bad_run and /usr/sap//SYS/exe/backup_run to /usr/sap//SYS/exe/run to restore your old kernel.

UNIX commands used for SAP administration

1. stopsap/startsap for stopping/starting SAP+ DB, stopsap r3/startsap r3 for stopping/starting R3

2. Cdpro for checking the profiles path SAPMNT//profile

3. Cdexe for checking the kernel folder

4. find . -name filename -print for checking the file in the present directory

5. dpmon pf= , jcmon pf=

6. df -k, bdf for checking all file system usages; df -k ., bdf. for individual file usages

7. ls -lrt for listing of files according to the date modified

8. du -a | sort -k 1n,1 for sorting the files in a recursive manner.

9. h for listing previous used commands.

10. rm <> for removing file, gzip for zipping the file.

11. Ps -ef is to check the how many running process and Kill any running process

12. gunzip to unzip file

13. tar -xvzf file name to run the zip folder of file content

14. mv mo from one path to another

15. Rf remove forcifully any file

16. Make command to effect any coading content

17. make clean to clean the effect of make command

18. cp coppy from one location to another

19. pwd check the current directory