After pulling the latest Nextcloud image I got some warnings about missing indices, missing primary keys and about converting some column types to big int. The warnings could easily be fixed by running the suggested occ comands. Append “-no-interaction” to suppress the confirmation question (see docs).
sudo micro /etc/default/grub
# if not already set, update
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
sudo update-grub
Create new shortcut for the “System Monitor”
Copying my dotfiles over. First the .aliases
alias ll='ls -Al --color=auto --block-size=MB --group-directories-first'
alias ls='ls -l --color=auto --block-size=MB --group-directories-first'
alias cp='cp -vRi'
alias rm='rm -vRi'
alias mv='mv -vi'
alias ln='ln -v'
alias mkdir='mkdir -pv' # Creates parent directories if needed
alias chown='chown -v'
alias chmod='chmod -v'
alias rmdir='rmdir -v'
alias ps='ps -f'
#alias tar='tar -xvf' #made some problems
alias df='df -Th'
alias lsd='lsd -Al --group-dirs first'
alias jobs='jobs -lr'
alias sudo='sudo ' #Allows for aliases to work with sudo.
alias pls='sudo $(history -p !!)'
alias wget='wget -qc --show-progress' #Download with WGet with pretty and useful features.
alias grep='grep -sI --color=auto' #Colorful (auto) 'grep' output.
alias psf='ps -faxc -U $UID -o pid,uid,gid,pcpu,pmem,stat,comm' #Less excessive, current-user-focused ps alternative.
alias klog="sudo dmesg -t -L=never -l emerg,alert,crit,err,warn --human --nopager" #Potentially useful option for viewing the kernel log.
alias lsblk='lsblk -o name,label,fstype,size,type,uuid'
alias ping='ping -c 5' # Stop after sending 5 pings
# Docker
alias dpsa='docker ps -a --format "table{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Ports}}\t{{.Status}}"'
# Find commands I type often so I can alias them
# https://www.jakeworth.com/alias-terminal-commands/
alias typeless='history n 20000 | sed "s/.* //" | sort | uniq -c | sort -g | tail -n 100'
# Micro Editor
alias mic='micro'
alias nano='micro'
# Make mount command output pretty and readable
alias mnt='mount | column -t'
# jump to my download directory
alias dl='cd "$HOME"/Downloads'
# Youtube-dl
alias dlvid='youtube-dl --add-metadata --embed-thumbnail'
alias dlmp3='youtube-dl -x --audio-format mp3 --add-metadata --embed-thumbnail'
alias dlbest='youtube-dl -f bestvideo+bestaudio'
# Git
alias git add .='git aa'
alias git commit -m='git cm'
# mkdir && cd
function mcd() {
mkdir -p $1
cd $1
}
# Archive extraction
# usage: ex <file>
ex ()
{
if [ -f "$1" ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar.zst) unzstd $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# navigation
up () {
local d=""
local limit="$1"
# Default to limit of 1
if [ -z "$limit" ] || [ "$limit" -le 0 ]; then
limit=1
fi
for ((i=1;i<=limit;i++)); do
d="../$d"
done
# perform cd. Show error if cd fails
if ! cd "$d"; then
echo "Couldn't go up $limit dirs.";
fi
}
Followed by my .zshrc
neofetch | lolcat
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="robbyrussell"
ZSH_THEME=powerlevel10k/powerlevel10k
# zsh-syntax-highlighting has to be the last plugin!
plugins=(git tmux zsh-autosuggestions zsh-syntax-highlighting)
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='micro'
else
export EDITOR='nano'
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source $ZSH/oh-my-zsh.sh
if [ -f ~/.aliases ]; then
. ~/.aliases
fi
eval $(thefuck --alias FUCK)
DATA: l_p0001 TYPE p0001,
l_return TYPE bapireturn1.
"...
DATA(l_guid) = cl_system_uuid=>create_uuid_c32_static( ).
EXPORT p0001 = l_p0001 TO MEMORY ID l_guid.
SUBMIT z_hr_report WITH p_guid = l_guid AND RETURN.
IMPORT return = l_return FROM MEMORY ID l_guid.
Importing:
REPORT z_hr_report.
PARAMETERS p_guid TYPE sysuuid_c32.
DATA: l_p0001 TYPE p0001,
l_return TYPE bapireturn1.
START-OF-SELECTION.
IMPORT p0001 = l_p0001 FROM MEMORY ID p_guid.
CHECK sy-subrc = 0.
"do stuff...
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = l_p0001-pernr
IMPORTING
return = l_return.
IF l_return-type = 'E'.
EXPORT return = l_return TO MEMORY ID p_guid.
RETURN.
ENDIF.
onInit: function () {
this._oModel = this.getOwnerComponent().getModel();
},
onButtonPress: function (oEvent) {
//get Data
var sPath = oEvent.getSource().getBindingContext().sPath;
var oData = this.getView().getModel().getObject(sPath);
var that = this;
//busy on
this._busyDialog = new sap.m.BusyDialog({});
this._busyDialog.open();
//create
this._oModel.create("/DataSet", oData, {
success: function (oData) {
that._busyDialog.close();
sap.m.MessageToast.show(that.getResourceBundle().getText("ok"));
},
error: function (oError) {
that._busyDialog.close();
sap.m.MessageToast.show(that.getResourceBundle().getText("nok"));
}
});
},
Badi Implementierung anlegen und Filter-Ausprägungen hinzufügen. Es muss für jede benötigte Filter-Ausprägung eine eigene BAdI Implementierung und Klasse angelegt werden.
Klasse anlegen und in der Interface Methode die Kundenlogik, wie in der Dokumentation empfohlen, in eine private Methode kapseln. Bsp.:
METHOD if_ex_pt_blp_user~process_data.
CHECK i_record IS BOUND.
IF i_record->data->category = cl_pt_tmw_tdm_const=>cat_infty
AND i_record->data->type = '2001'.
"hier die erforderliche Logik rein, z.B. weitere Prüfungen
process_it2001( EXPORTING i_record = i_record " Aktueller Satz
i_time_data = i_time_data " Aktuelle Zeitdaten
IMPORTING e_messages = e_messages " Ausgabemeldungen für die Transaktion
e_time_data = e_time_data ). " Neue und geänderte Daten
"An den konkreten Infotypsatz kommt man z.B. folgendermaßen:
DATA(record_data) = CAST cl_pt_td_it2001( i_record->data ).
DATA(p2001) = record_data->if_pt_td_it2001~p2001.
ENDIF.
ENDMETHOD.
//Input String yyyymmdd
var date_string = '20200101'
//Create date object
var oDate = new Date(date_string.substr(0, 4), date_string.substr(4, 2), date_string.substr(6, 2))
oDate.setMonth(oDate.getMonth() - 1)
var year = oDate.getFullYear().toString()
var month = oDate.getMonth().toString()
var day = oDate.getDay().toString()
//Add leading zero's
if (month.length === 1 ) {
month = '0' + month
}
if (day.length === 1 ) {
day = '0' + day
}
//Return string: 20191201
var sDate = year + month + day
Browser Caching: This is what tells the visitors browser to cache the files locally to speed up future site/page visits. We will set this up using Nginx. On Apache, this is accomplished using .htaccess files.
Server Caching: This caches static versions of pages (Page cache). We are going to accomplish this using Nginx FastCGI cache.
Frontend Caching: This means caching WordPress PHP files so they don’t have to be re-compiled for every visit. We are going to set this up using PHP OpCache.
Database Caching: This optimizes database queries by storing them in the RAM for faster delivery. We are going to use Redis for this.
Danach ggf. noch die Transportschicht im Paket anpassen. Beim Speichern muss man dafür einen lokalen Transportauftrag anlegen. Dieser kann nach der Änderung wieder gelöscht werden.
Alternativ die Objekte erstmal in einen lokalen Transportauftrag aufnehmen und anschließend einen Transport von Kopien anlegen, die Objekte aus dem lokalen Auftrag aufnehmen und transportieren. Auf diesem Weg kann trotz “falscher” Transportschicht transportiert werden.
Auswertungsweg O-O-S-P liefert unter einer gegebenen Org. Einheit alle Personen, auch aus tieferen OE.
T-Code: OOAW
DATA(lt_actor) = VALUE tswhactor( ).
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'O'
act_objid = lv_oe " die Org. Einheit, von der gestartet werden soll
act_wegid = 'O-O-S-P'
act_plvar = '01'
act_begda = sy-datum
act_endda = sy-datum
act_tflag = space
act_vflag = space
authority_check = space
TABLES
result_tab = lt_actor
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
" do error handling
ENDIF.
" Nur Pernr's relevant
DELETE lt_actor WHERE otype <> 'P'.
" Doppelte Pernr's entfernen
DELETE ADJACENT DUPLICATES FROM lt_actor.
Zum Testen des Auswertungsweges kann man den Report RHSTRU00 verwenden. Einfach Planvariante, Objekttyp und eine ObjektId einer Org. Einheit eingeben, sowie den Auswertungsweg und Statusvektor 1 (aktiv).