2020年6月12日 星期五

SAP - Client Copy – Local, Remote, Import/Export


Client Copy

用SCC4可以創建一個空的client,但要如何填入資料到這個client 則必須使用 "client copy"

Client copy means "transferring client specific data" within the same instance(SID) 或 between different instances(SID).

Client copy can be performed with three different methods :
  • Local client copy: Copy client within the same instance (SID). T-code SCCL
  • Remote client copy: Copy client between different instances(SID). T-code SCC9
  • Client Import/Export: Copy client between different instances(SID). T-code SCC8

前置作業

為避免資料不一致的狀況,在開始進行client copy之前
1) Disconnect and lock business users(SU10). End the session of active users (SM04). 
2) Suspend all background jobs
Execute SE38 --> Fill program name with "BTCTRNS1" --> Execute
3) Target system 必須有足夠的表空間. (DB02)
4) 為避免不一致的狀況,在做client copy 時,最好不要有使用者連接到source client進行作業
5) rdisp/max_wprun_time parameter should be changed to 2000 second as a SAP recommendation . 雖然指定使用parallel processes and schedule job in the background, dialog processes 不會被使用.


Local Client Copy (T-CODE SCCL)

Scenario:
Source Instance & client --> QASCL000
Target Instance & client --> QASCL801

Step 1) 創建 new target client using SCC4. client 801 in QAS system. Log on this client (QASCL801) with user SAP*
Step 2) T-Code SCCL.
Select desired profile
Enter Source client
Enter Description
Step 3) 預設 Client Copy 執行時是single process. 分配 workload to parallel processes 可以縮短 copy client的時間
Select Goto from the menubar. Select Parallel Process.
Step 4) Schedule as background job.
Step 5) 用SCC3來查看client copy 的日誌. Status - "Successfully Completed" means client copy is completed.


Remote Client Copy(T-CODE SCC9)

Scenario:
Source Instance & client --> DEVCL101
Target Instance & client --> QASCL202

Step 1) 登入target system. 創建 new target client using SCC4. client 202 in QAS system. Log on this new client (QASCL202) with user SAP*
Step 2) T-Code SCC9.
Step 3) Fill the basic details as requirement.
Step 4) 預設 Client Copy 執行時是single process. 分配 workload to parallel processes 可以縮短 copy client的時間
Select Goto from the menubar. Select Parallel Process.
Step 5) Schedule the client copy in background
Step 6) 用SCC3來查看client copy 的日誌. Status - "Successfully Completed" means client copy is completed.

Client Import/Export

對容量較大的database, 建議使用 client import/export 替代 remote client copy.
Scenario:
Source Instance & client --> PRDCL300
Target Instance & client --> QASCL202
This technique always starts with client export step.
Note: 必須先確認/usr/sap/trans file system 有足夠的空間來進行the client export.

How to export client?

Step 1) 登入target system. 創建 new target client using SCC4. client 202 in QAS system. 
Step 2) 開始做export. Export 是將 data files and co-files 從 source system's database 傳送到 target system's import buffer.
Log on to the source system/source client(PRD). Execute T-code SCC8.
Step 3) Select profile Choose target system.
Step 4) Schedule the export in background
Step 5) 當工作開始執行, data files and co-files of profiles from PRD system's database 傳送到 QAS system's import buffer. 
Once we will import request in QAS only then it will be reflected in a database of QAS system.

Depending on the chosen export profile there can be up to 3 transport requests created:

Request PRDKO00175 will hold the cross-client data,
Request PRDKT00175 will hold the client dependent data,
Request PRDKX00175 will also hold some client dependent data.


如何 import the client? 

Step 1) 登入新創建的 target client(QASCL202) using SAP*.
Step 2) T-Code: STMS_IMPORT
選擇由client export 產生的 transport requests. Import theses transport requests on the target client.
The transport requests should be imported 依下列順序:
Request PRDKO00175
Request PRDKT00175
Request PRDKX00175
系統會自動偵測到先前執行的client export transport requests and 自動做 import of the 3 requests.
The import logs 可以在 STMS_IMPORT 中觀察
Step 3) Post import phase: 當import完成後, 執行SCC7 來進行 post client import actions. Schedule the post import job in background.
Step 4) 用SCC3來查看Import log. The Client is successfully imported.

2020年6月11日 星期四

SAP - What is Client? How to create a new client


 

What is a SAP Client?

Client = A Customer. 在SAP裡面,我們可以想成每一個customer 對應到一個client. 在一個SAP instance內, 可以創建一個或多個clients,而不需要安裝多套SAP軟體給每個客戶專用. 這提供了隔離,一個client 無法看到其他client的資料。  

What does client contain?
Application Data - Application data is the data that are stored in the database tables.
Customizing Data - Customizing data is data created by customers when they customize their systems
User Master Record - A user master record defines the authorizations assigned to a user. Basis consultants are responsible for maintaining the user master record and assigning authorizations.

SAP comes with three "standard clients": 
000 Client: We can find this clients in the system as soon as we install SAP r/3 software. This is called master client. Client 000 contains a simple organizational structure of a test company and includes parameters for all applications, standard settings, and configurations for the control of standard transactions and examples to be used in many different profiles of the business applications. It contains client independent data.

001 Client: This clients is a copy of the 000 client including the test company. This client's settings are client-independent if it is configured or customized. People normally use 001 clients to create a new client.

066 Client: This client is called early watch client. The SAP earlywatch alert is a diagnosis service, for solution monitoring of SAP and non-SAP systems in the SAP Solution Manager. Alert may contain Performance issue, average response time, current system load, Database administration,etc..



How to create a new client?

從理論上講,我們可以創建000到999個客戶。但是要維護如此大量的客戶就成為了一個挑戰。
Step 1) Execute T-Code SCC4

Step 2) Click New Entry to make a new SAP Client

Step 3) 
1. 輸入client基本資料
Client number & description
City to which client Belongs (例 Amesterdam)
Logical system may be <SID>CLNT<Client Number> (例 QASCL800)
Std Currency may be (例 TWD)
Client roles may be Test, Customizing, Demo, Training/Education, Production, etc..
2. 視需求輸入client specific data and set permission for the clients
3. Save
4. Press F3 to come back to SCC4

Step 4) New client will be there in the list

SAP - What is SAP Instance and SID, Configure SAP GUI



What is an Instance?

SAP instance is a group of resources ....
  • Memory
  • Work Processes
  • Dispatcher
  • Gateway

3種類instances
  • Dialog instance
  • Central Instance
  • Database Instance

SAP System= Dialog Instance + Central Instance + Database Instance.


Configure SAP GUI

Step 1) Click on 新增 button
Step 2) Fill the Server details
  • 連線類型 Connection Type: 自訂應用程式伺服器 Custom Application Server
  • 說明 Description: - Name of instance
  • 應用程式伺服器 Application Server: - IP address of remote application server
  • 事例號碼 Instance number: which you can find from os level (Unix) Goto /usr/sap/sid/DVEBGMS00 Here instance number = 00
  • System ID: - As per you setting which you have specified during installation time.

SAP - Basis 初探


SAP - Systems Applications and Products
BASIS - Business Application Software Integrated solution
ABAP -  Advanced Business Application Programming, originally Allgemeiner Berichts-Aufbereitungs-Prozessor, German for "general report creation processor"

什麼是BASIS?

Basis是一系列的程式和工具,做為SAP applications 和DB/OS/通訊協定之間的界面。
藉由BASIS,SAP applications(如FI, CO, MM....) 可以在其上執行與彼此溝通,無論使用何種OS 與 DB。

如今,Basis被稱為Netweaver。
BASIS的別名是SAP Application Server Technology,NetWeaver的別名是SAP Web Application Server。

添加 java stack(J2EE, ,JSP...開發的應用程序)後,增強了業務流程的安全性標準。
ABAP和Java stack 可以在一個平台上執行。
Netweaver支援標準協議,例如HTTP,SMTP,XML,SOAP,SSO,WEBDAV,WSDL,WMLSSO,SSL,X.509和Unicode格式。

Basis是SAP applications and ABAP的 OS。
Basis提供服務,例如與OS的溝通,DB溝通,記憶體管理,收集應用程式的執行時的資料,Web請求,交換業務資料等。
 
Basis支援各種操作系統與資料庫
(Unix, Microsoft windows server, AS400, z/OS, etc) and databases (Oracle, DB2, Informix, Maxdb, Microsoft SQL Server, etc).

BASIS是一組工具 - 提供下列功能:

  • 系統管理與監控
  • Common monitoring tool CCMS(Computing Centre Management System) ,可從一個地方監控R/3系統的警報。]
  • 伺服器端的ABAP和Java 腳本
  • DB的管理與監控
  • 資源管理,如memory,buffer 等
  • 用於用戶管理的authorization和profile management工具
  • 對系統和business objects的Internet訪問控制
  • TMS(Transport Management System)將各種修改從DEV系統轉移到PRD系統
  • Client-Server 架構與配置
  • Presentation layer的GUI設計

SAP Basis 顧問的職責:

SAP Basis apps/OS/DB的middleware的工具,SAP Basis顧問必須能執行以下任務。
  • 監控SAP ap server,ABAP dump和system log 分析
  • Performance tuning
  • DB維護,DB備份排程與還原
  • 安裝R/3,Netwwaver,Solution Manager...
  • 維護SAP License
  • 安裝SAP landscape, TMS...
  • Client creating, client copying, client deletion...
  • Background jobs scheduling, job monitoring, job deletion...
  • 維護profile and operation mode
  • 安裝patch,升級和安裝附加組件
  • 系統複製,系統刷新等
  • Basis天天都會學到新東西