Archive for Agustus 2011
Latest Updates

Oracle : Problem PSAPTEMP

Today, we already finished clone SAP Production which is will be tested to Functional team, after we decide to let Functional team, we got problem when we want to extend TABLESPACE.

we run BRtools to extend TABLESPACE, but in the middle processing we got issues there is a temp datafile does not exist when we restore database, we check again our backup and we did not find temp datafile.

here the error message:
ORA-01157: cannot identify/lock data file 255 - see DBWR trace file
and we follow the detail error, the Oracle said that temp.data1 does not exist at Oracle Data  ( /oracle/SID/sapdata1/temp_1/temp.data1 )

In this case, our oracle in Open condition and we can access SAP.

We try to check at Oracle Level






SQL> select * from v$tempfile;

     FILE# CREATION_CHANGE# CREATION_TIME          TS#     RFILE# STATUS
---------- ---------------- --------------- ---------- ---------- -------
ENABLED         BYTES     BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ---------- ------------ ----------
NAME
--------------------------------------------------------------------------------
         1             6043 17-JUN-10                3          1 ONLINE
READ WRITE          0          0   1468006400       8192
/oracle/BMP/sapdata1/temp_1/temp.data1

         2        851216007 12-AUG-11                3          2 ONLINE
READ WRITE 8589934592    1048576   8589934592       8192
/oracle/BMP/sapdata1/temp_2/temp.data2

     FILE# CREATION_CHANGE# CREATION_TIME          TS#     RFILE# STATUS
---------- ---------------- --------------- ---------- ---------- -------
ENABLED         BYTES     BLOCKS CREATE_BYTES BLOCK_SIZE
---------- ---------- ---------- ------------ ----------
NAME
--------------------------------------------------------------------------------

One simple idea is we try to Alter Database and reuse (create temp data file).
SQL> alter tablespace PSAPTEMP add tempfile '/oracle/BMP/sapdata1/temp_1/temp.data1' size 1468006400 reuse autoextend off;
alter tablespace PSAPTEMP add tempfile '/oracle/BMP/sapdata1/temp_1/temp.data1' size 1468006400 reuse autoextend off
*
ERROR at line 1:
ORA-01537: cannot add file '/oracle/BMP/sapdata1/temp_1/temp.data1' - file
already part of database
But, it does not work :-( , Oracle still check at v$tempdatafile;

Ok lets we try to drop and re-create temp data file .

SQL> alter tablespace PSAPTEMP drop tempfile '/oracle/BMP/sapdata1/temp_1/temp.data1';

Tablespace altered.

SQL> alter tablespace PSAPTEMP add tempfile '/oracle/BMP/sapdata1/temp_1/temp.data1' size 8192M;

Tablespace altered.

Great!!! it works and we can extend tablespace.













SSO Ways : SAPLogonTicket & User Mapping

Many System in SAP environment, we need to create simple communication between SAP product, in this case if we want to integrate between SAP ECC and SAP EP, we can use SSO method for easy communcation

in many case, we can divide SSO method with 2 main ways :
  1. SSO with SAPLogonTicket, in this way, we need generate  Certificate between two systems and exchange both certificate, this method is recommended by SAP
  2. SSO with User Mapping, in this way we need map user at SAP EP with user at SAP ECC, so SSO will work together.
So, in many case the simpler administration SSO with SAPLogonTicket is best method, but if we want to test some users we can use SSO with user mapping

so, go with your option.

SSL Thawte and AS ABAP

We have small requirement for our AS ABAP for SSL implementation, we need this because we need Secure Coomunication between backend (ECC) and SAP EP (AS JAVA).

For our customer side, they are already buy Public Key from Thawte Inc and we can directly assign in their system (Non SAP and SAP).

First of all, we need Public Key (zip file) from Our customer , password of Public Key so we can deploy at Our SAP system.

Lets start it

  1. if we chek at ABAP with transaction code STRUST, we dont configure SSL anything!!!
  2. Please download sapgenpse,libcrypto.so from http://service.sap.com based on your OS
  3. Please ask the customer, we need Public Key from Thawte for example xxxsslkey.p12
How to assign this to our SAP
  1. After download sapgenpse, libcrypto.so from SMP, you have to copy both files to /usr/sap/SID/DVEBMGS00/sec
  2. Copy xxxsslkey.p12 to /usr/sap/SID/DVEBMGS00/sec
  3. please make sure this environment configured, if not you can set now by :
    1. #export LIBPATH=/usr/sap/SID/DVEBMGS00/sec
    2. #export SECUDIR=/usr/sap/SID/DVEBMGS00/sec
      In our case, we did not generate PSE, because PSE will be generated when we execute command use sapgenpse
  • In the console you need run this command
#export SECUDIR=/usr/sap/SID/DVEBMGS00/sec
#./sapgenpse import_p12 -p /usr/sap/SID/DVEBMGS00/sec/SAPSSLC.pse /usr/sap/SID/DVEBMGS00/sec/xxxsslkey.p12
after you execute those command, you will receive this

import_p12: MISSING password for PKCS#12 file "/usr/sap/DEV/DVEBMGS00/sec/axisworld.p12"

Please enter PKCS#12 encryption  password: *************
PKCS#12/PFX file contains 1 keypair:
You have to put xxxsslkey.p12 password (ask the customer or Thawte consultan) , after you put the password you receive the message

1. FriendlyName = "<none>"

     X.509v3 (type=Both) RSA-2048 (signed with sha1WithRsaEncryption)

     Subject="CN=*.domain.co.id, OU=IT, O=Company, L=Jakarta Selatan, SP=DKI Jakarta, C=ID"

     Issuer ="CN=Thawte SSL CA, O="Thawte, Inc.", C=US"



Choose a PIN for your new PSE "/usr/sap/SID/DVEBMGS00/sec/SAPSSLC.pse"

Please enter PIN: *************


Please reenter PIN: ************* 

PIN, you need put PIN here, PIN is free, you  can fill anything, its best idea, same with password.
In this step we already create PSE (please check at SAPSSL.pse at that directory), but we are not finish yet....

We need generate cred_v2 for running SSL at particular port (for example 8001 by user root)

please run this command by user root.

we need add user <sid>adm which can run SSL at particulat port.

#./sapgenpse seclogin -p SAPSSL.pse -x <PIN> -O <sid>adm
after you can run this command, you will receive

running seclogin with USER="root"
creating credentials for secondary user "<sid>adm" ...
Added SSO-credentials for PSE "/usr/sap/SID/DVEBMGS00/sec/SAPSSLC.pse"
"CN="
after successfully runned, you need check file cred_v2, you must see file cred_v2

OK...in this case, we almost done..

back to SAP gui, please restart services SSL by tcode SMICM and make sure you have configured this parameters :
  1. ssl/server_pse has value /usr/sap/SID/DVEBMGS00/sec/SAPSSLC.pse
  2. ssf/ssfapi_lib has value /usr/sap/SID/SYS/exe/run/libsapcrypto.o
  3. sec/libsapsecu has value /usr/sap/SID/SYS/exe/run/libsapcrypto.o
  4. ssl/ssl_lib has value /usr/sap/SID/SYS/exe/run/libsapcrypto.o
  5. ssf/name has value SAPSECULIB
If you check at SMICM, you will see like this message









Done..enjoy the SSL.

FTP Script Automatically : UNIX

1 Month a go, we already passed our SAP Implementation (All Modules), there are some requirement for BASIS to support project from setting printer, setting user ID, setting Role.

In this case, we need to develop interface between SAP and FTP server to upload PO Document when user run Z Report automatically.

ABAPer already develop Z Report for creating PO document and in last line will call our UNIX automatically.

So, let begin develop FTP Script, we devide 3 bash shell scripts:
  1. Precheck Condition for FTP , we call sftp.sh
  2. FTP script for transfering file and moving , we call sftp_next.sh
  3. Batchmode for Uploading File, we call batchcmd

sftp.sh
lv_base="/usr/users/interfac/XX/outbound/outboundlog"
lv_batch="/usr/users/interfac/XX/outbound"
lv_c=`ls -ltr $lv_batch | grep -i XX | wc -l`

if [ $lv_c == 0 ]
then
echo "No Files for FTP or Has been transfered" $(/bin/date +%m-%d-%Y) >> $lv_base/no_transfer_$(/bin/date +%m-%d-%Y).txt
else
# In this case, we use Port Secure(31) instead of SFTP
/usr/bin/ftp -n <ipadressFTPserver> 31 < $lv_batch/batchcmd >> $lv_base/sftp_log_$(/bin/date +%m-%d-%Y-%H:%M:%S).txt
sleep 5
/usr/users/interfac/XX/outbound/sftp_next.sh
fi
 
sftp_next.sh
lv_direk="/usr/users/interfac/XX/outbound/outboundlog"
lv_log=$lv_direk/move_file_$(/bin/date +%m-%d-%Y-%H:%M:%S).txt
lv_base="/usr/users/interfac/XX/outbound"

mv /usr/users/interfac/XX/outbound/XX* $lv_direk
echo "Copy or Move File" $lv_file "Success" >> $lv_log
batchcmd : Sequence command, core of FTP script
batchcmd
user
user password
prompt
lcd /usr/users/interfac/XX/outbound/
mput XX*
pwd
bye

So, we already create UNIX script, lets we move to ABAP Code
here, we add some line ABAP code for call UNIX script
 
**  Unix Command
data: UNIXCOMM(50).
DATA: BEGIN OF ITABA occurs 0,
      LINE(200),
      end of ITABA.

*-- Unix Command to call a ftp script in unix
    unixcomm = '/bin/sh /usr/users/interfac/XX/outbound/sftp.sh'.
    call 'SYSTEM' id 'COMMAND' field  UNIXCOMM
       id 'TAB'   field  ITABA-*SYS*.

    MESSAGE i001(aq) WITH 'File Successfully Transferred'.

Done..Good Luck for your ABAP code

SPAM : What we need and What For

SPAM at SAP environment is different "spam" at Email term, in here SPAM is stand for Support Package Manager or we can call it, a tools for patch Support Package.

most likely Support Package have many new update for their support package, begin from the early patch until the latest patch, SPAM needed to patch also, because before we patch our support package at system, It BEST IDEA we need update our pacth our SPAM.

Many isues about error, performance and "abnormal" issues will came up when we patch our support package, and the best solution is we need patch our SPAM first for reducing this all issues.

SPAM patch can be patched not always sequence for example, you have SPAM level at 39, you need download Level 43 at http://service.sap.com/swdc and you can patch SPAM without need level 40,41 and 42, so its easy right?

One more IMPORTANT : if we patch our Support package/SPAM, you have to logon to client 000 (Mandatory) and use User WITHOUT sap* or DDIC instead of you can duplicate another user from sap*/ddic

SUGGESTION : if you want to patch, role of thumb : please check size of patch level (file) before you start Import your patch expecially if you use Front End Uploading instead of from Application server
if you got patch update > 50 MB, Its Best IDEA you extract from Application server otherwise you can upload from your Laptop


So, if any problem.. just read the SAP Note, good luck for patching

SAP system copy : Backup Restore

Today, we got job from our project manager to set up system like a real production for testing purpose, because we use UNIX for our SAP Landscape, we decide to set our sandbox system (like production) use Backup restore method, we think it's better idea because we have tight timeline.

we already have SAP ECC6 EHP 6 SP 6 for our landscape, we need to patch our SAP_HR for the latest one, of cource we have to need sandbox system for testing only by ABAPer and Functional team.

so, we need setup sandbox system, fisrt let me describe what we do until finish :
  1. We need Server installed with same OS version like our real production, we use AIX 6.1 TL2
  2. make sure all software patch same with existing server like C++ librabry, Bor.rte, etc
  3. We only need backup online + Redolog offline for yesterday
  4. we need copy Oracle engine, SAP Kernel, Oracle client and SAP System Administrator environment
  5. We copy all services (/etc/services)
  6. Restore backup online
  7. Restore Redo log
  8. Apply Redo log
  9. We open database and Start SAP
we prepare for this action only 1 day which is
  1. backup online + redolog we did day before
  2. FTP of backup online + redolog we did day before
  3. Copy All engine --> 3 Hours
  4. Precheck all prerequisites before start SAP & oracle 1 Hours
  5. restore from hot backup, we need only 1 hours (DB Size +/- 400 GB), we use compress = yes
  6. recovery database from offline redolog after restore
  7. Open database and SAP started.
So, we have clone of SAP Production and start to patch our SAP_HR, EA-HR

Cheers..

Fundamental : Concept of AS JAVA part1

I will explain about SAP Netweaver AS Java , for my favorite, i will explain fundamental of what is AS Java at SAP environment, we already know about SAP netweaver AS ABAP for many application server installed of many customer in the world.

SAP come with ABAP for core of application, but for trend technology, SAP started adopt Java Enterprise for support their product, so we called SAP netweaver AS Java.

Before i explain more about AS Java, its better i try to explain what SAP Web Application server is.

SAP Web Application Server is scalable and reliable component platform, this technology platform provides a complete development infrastructure, for developing, distribute and execute platform-independent , robut and scalable web services and business application.

SAP Web Application Server support both ABAP and Java also web services through ICM (Internet Communication Manager) for SAP Web As 6.10, in the next technology is SAP Web As 6.20

lets continue more deep with SAP Web Application AS Java....

maybe, we already heard about Java, this is a like programming language (introduced by Sun Microsystem in 1995), platform-independent technology. etc. But if we are in SAP environment, we will face this tehcnology simpler than you know Java as usual.:-)

As SAP Web AS 6.20, we are served two technology, we can use ABAP Technology and Java Technology as Development Language.

Java can run in any platform without change any code for which a Java Runtime Environemnt (JRE), Java can run at any Operating System for UNIX, Windows,Linux, MacOS, OS/2,etc

Properties of Java
you have to know different of two basic types of Java Programs
  • Applications, Java programm can run at computer like client-server application accross the internet/intranet
  • Applets, we called this as "little application", we can face this application when we use small application through web browser. we can state this application client-side application.
IMPORTANT : Java not equal Javascripts, its totaly different. Do not always connected "java" as "java programming". Java script is embedded at HTML, java script was developed with HTML pages. Java scrips is client-side script and not independent programming language, so this script dependent what web browser use.

Java is independt programming language, unlike traditional programming language which generates machine code depends on specifi platform, but Java produces program code at Virtual machine (JVM - emulate processors) and we call it bytecode

Virtual machine as interface between java and real hardware. with all excellent concept of Java technology, SAP also use the concept of cross-platform virtual machine in the ABAP, ABAP program of SAP converted program code into bytecode which intepreted by ABAP Virtual Machine , ABAP work process (WP)

continue.......

    SAP Business Object : Roadmap..what next?

    A new approaching delivered by SAP as leader of ERP Application, SAP has decide its product : SAP Business Object (BI) Platform as the main tool based on SAP netweaver technology for couple of years. This product will working together with existing SAP systems.

    let us see what SAP BOBJ within SAP Netweaver architecture.

    SAP Management Console

    Sometimes, SAP users always interact with Windows Operating System. Windows is supported by SAP for Application servers, As Administrator always use tools for monitoring SAP health (stop, start, etc), for example SAP MMC with nice views expecially for Windows server based.

    As SAP Netweaver 2004, SAP give us excellent tools for monitoring our systems based on window or unix, you can access this services under the SAP kernel (/sapmnt/SID/exe), you can find one folder servicehttp,

    So, how we use this services ?
    Prepare your browser supported access Java, because this java based application, if you haven't installed java runtime, you need to install when you access this services.

    open your browser (for example : Internet explorer/Mozilla) :
    type this address formulas :
    http://<hostname/ip_address>:5<systemnumber>13 and press Enter

    Automatically, SAP will redirect you to http://<hostanme/ip_address>:5<systemnumber>13/sapmc/sapmc.html?SID=<systemnumber>&HOST=<hostname/ip_address>

    wait for second..you will bring to java application.