Latest Updates
Tampilkan postingan dengan label sap. Tampilkan semua postingan
Tampilkan postingan dengan label sap. Tampilkan semua postingan

SSO Ways : SAPLogonTicket & User Mapping

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

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 : 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

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..

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.