Skip to content

Commit

Permalink
Add Client
Browse files Browse the repository at this point in the history
  • Loading branch information
LMS235 committed Oct 17, 2019
1 parent 5190494 commit c121ee1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SAP-Table-EXP-IMP-for-SystemCopy

# SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2015
# SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2019
# www.florian-lamml.de
# Version 1.0 - Initial Release
# Version 1.1 - Client Config

# copy to your Unix / Linux Server and run sap_tab_exp_imp.sh
17 changes: 12 additions & 5 deletions sap_tab_exp_imp.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
#!/bin/bash
# SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2015
# SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2019
# www.florian-lamml.de
# Version 1.0 - Initial Release
# Version 1.1 - Client Config

##### CONFIG EXPORT / IMPORT LOCATION #####
export EXPIMPLOC=
###########################################

############## CONFIG CLIENT ##############
# DEFAULT (000), ALL or CLIENT Number
# Default Value = ALL
export EXPCLIENT=ALL
###########################################

##### info ################################
# with this tool you can export and import
# tables from and into a sap system
# you have to run it as "sidadm"
# it use the normal R3trans for export
# and import with template files
####################(c) Florian Lamml 2015#
####################(c) Florian Lamml 2019#

# Prerequisites ###########################
# need 'dialog' to run
Expand Down Expand Up @@ -45,8 +52,8 @@ export EXPIMPLOC=
export global_pwd=$(pwd)
export global_height=30
export global_width=60
export global_title="SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2015"
export global_backtitle="SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2015"
export global_title="SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2019"
export global_backtitle="SAP Table EXP/IMP for SystemCopy (c) Florian Lamml 2019"

# check export location (and create directory)
if [ -z "$EXPIMPLOC" ];
Expand Down Expand Up @@ -103,7 +110,7 @@ chmod u+x $global_pwd/script/sap_export_tables.sh
chmod u+x $global_pwd/script/sap_import_tables.sh

# EXPORT or IMPORT dialog
DIALOG=(dialog --title "$global_title" --backtitle "$global_backtitle" --radiolist " _______ ___ \n / __/ _ | / _ \ \n _\ \/ __ |/ ___/\n/___/_/ |_/_/ \n _________ ___ __ ____\n/_ __/ _ | / _ )/ / / __/\n / / / __ |/ _ / /__/ _/ \n/_/ /_/ |_/____/____/___/ \n _____ _____ ______ ______ \n / __/ |/_/ _ \/ _/ |/ / _ \ \n / _/_> </ ___// // /|_/ / ___/\n/___/_/|_/_/ /___/_/ /_/_/ \n\nEXPORT or IMPORT Tables?\n\nINFO: $EXPIMPLOCINFO\nINFO: $EXPIMPLOC\n\nINFO:\nOS: $OS | USER: $CURUSER | SAPSYSTEM: $SAPSYSTEMNAME\n\n (c) Florian Lamml 2015" $global_height $global_width 2)
DIALOG=(dialog --title "$global_title" --backtitle "$global_backtitle" --radiolist " _______ ___ \n / __/ _ | / _ \ \n _\ \/ __ |/ ___/\n/___/_/ |_/_/ \n _________ ___ __ ____\n/_ __/ _ | / _ )/ / / __/\n / / / __ |/ _ / /__/ _/ \n/_/ /_/ |_/____/____/___/ \n _____ _____ ______ ______ \n / __/ |/_/ _ \/ _/ |/ / _ \ \n / _/_> </ ___// // /|_/ / ___/\n/___/_/|_/_/ /___/_/ /_/_/ \n\nEXPORT or IMPORT Tables?\n\nINFO: $EXPIMPLOCINFO\nINFO: $EXPIMPLOC \n\nCLIENT: $EXPCLIENT\nOS: $OS | USER: $CURUSER | SAPSYSTEM: $SAPSYSTEMNAME\n\n (c) Florian Lamml 2019" $global_height $global_width 2)
OPTIONS=("EXPORT" "Export SAP Tables" on "IMPORT" "Import SAP Tables" off)
EXPORIMP=$("${DIALOG[@]}" "${OPTIONS[@]}" 2>&1 >/dev/tty)
# check ESC hit
Expand Down
1 change: 1 addition & 0 deletions script/sap_export_tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ dialog --title "$global_title" --backtitle "$global_backtitle" --progressbox "Ex
while read SELTABLES
do
echo "export" >> $EXPIMPLOC/$SELTABLES.tpl
echo "client = '"$EXPCLIENT"'" >> $EXPIMPLOC/$SELTABLES.tpl
echo "file = '"$EXPIMPLOC"/"$SELTABLES".dat'" >> $EXPIMPLOC/$SELTABLES.tpl
cat $global_pwd/templates/$SELTABLES >> $EXPIMPLOC/$SELTABLES.tpl
echo "=== Export START" $SELTABLES "==="
Expand Down

0 comments on commit c121ee1

Please sign in to comment.