cancel
Showing results for 
Search instead for 
Did you mean: 

Adding SAP commands to user shell

omar_moh_ibrahim
Explorer
0 Kudos
1,003

Hello ,
I'am trying to install SAPROUTER on a standalone linux server , before contacting SAP to register new SAPROUTER i want to make sure that SAP commands are executable .

I have successfully set the user environment variables :

SECUDIR="/usr/sap/saprouter"
LD_LIBRARY_PATH="/usr/sap/saprouter"
SNC_LIB="/usr/sap/saprouter/libsapcrypto.so"

i'm trying to use SAP commands such as SAPGENSE but the O.S still can't identify theses commands .

Please inform me how to add SAP commands to user shells in linux .

View Entire Topic

Hello Omar,

the commands are looked up based on the PATH environment variable. If you want to execute the saprouter (and related commands) without a full path, you need to add their location to the PATH.

omar_moh_ibrahim
Explorer
0 Kudos

Hello Adam ,

Thanks alot for your reply ,

do you mean i have to set the environment variable on the PATH in .bash_profile user file like the following syntax

PATH=$PATH:$HOME/bin (Default PATH)

PATH$PATH:/usr/sap/saprouter ( suggested modification )

Thanks in advance .

Yes, you would need to add the /usr/sap/saprouter to the PATH variable.

You can do it in bash (with the .bash_profile) as:

export PATH=$PATH:/usr/sap/saprouter

omar_moh_ibrahim
Explorer
0 Kudos

Alright Adam , i exported the PATH exactly as you wrote and rebooted the system , but still system cannot identify SAP commands here is the output of .bash_profile file inform me if there is any syntax errors or missing items :

# .bash_profile #

Get the aliases and functions

if [ -f ~/.bashrc ]; then . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH=$PATH:/usr/sap/saprouter

0 Kudos

That looks ok so far. What do you see when you check the variable after logging in with the user?

ie: check with the "env" command, or "echo $PATH"

omar_moh_ibrahim
Explorer
0 Kudos

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/sap/saprouter:/root/bin:/usr/sap/saprouter

omar_moh_ibrahim
Explorer
0 Kudos

Thanks Adam for your time issue finally resolved .