Skip to content

Instantly share code, notes, and snippets.

View alezhu's full-sized avatar
🏠
Working from home

Alexandr Zhuravlev alezhu

🏠
Working from home
View GitHub Profile
@alezhu
alezhu / ZTEST_SRLZ_JSON_VS_BUFFER.abap
Created August 23, 2022 09:00
Test performance export+import to|from buffer vs JSON serialization
REPORT ztest_srlz_json_vs_buffer.
TYPES:
BEGIN OF ts_result,
tag TYPE char30,
start TYPE i,
end TYPE i,
diff TYPE i,
END OF ts_result,
tt_result TYPE STANDARD TABLE OF ts_result WITH EMPTY KEY.
@alezhu
alezhu / ztest_extract_uniq.abap
Created August 12, 2022 13:50
Test speed of geting unique values from internal table
*&---------------------------------------------------------------------*
*& Report ZTEST_extract_uniq
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ztest_extract_uniq.
TYPES:
BEGIN OF ts_result,
tag TYPE char30,
start TYPE i,
@alezhu
alezhu / SPLIT_STRING_BY_SPACE_MAX_LEN.abap
Created June 23, 2022 06:41
Split string into string table by max length but only on words borders
CLASS zcl_tm_327_str_utils DEFINITION PUBLIC CREATE PUBLIC .
PUBLIC SECTION.
METHODS split_string_by_space_max_len
IMPORTING
!iv_value TYPE csequence
!iv_max_len TYPE i
!iv_max_rows TYPE i DEFAULT 0
RETURNING
VALUE(rt_result) TYPE string_table .
ENDCLASS.
@alezhu
alezhu / MSVIMF21.abap
Last active April 12, 2024 12:00
Enhancement for generate wide maintenance view screen
"1
"Add Implicit Enhancement at the end of form CREATE_DYNP_HEADER (INCLUDE MSVIMF21)
"Put this code inside created enhancement:
PERFORM post_create_dynp_header in PROGRAM ZBC_MAINTANCE_VIEW_EXITS if FOUND
USING p_dyname p_gencb p_detail dropdown_length_tcrl max_dynp_fieldlen CHANGING p_header.
"2
"Add Implicit Enhancement at the begin of form CREATE_DYNP_FIELDLIST (INCLUDE MSVIMF21)
"Put this code inside created enhancement:
@alezhu
alezhu / ZCL_ALV_GUI_BUILDER.class.abap
Created February 8, 2021 13:26
SALV toolbar with dropdown button
class ZCL_ALV_GUI_BUILDER definition
public
inheriting from CL_ALV_GUI_INSTANCE_BUILDER
create public .
public section.
data MO_ALV_GRID type ref to CL_GUI_ALV_GRID read-only .
events ON_GRID_CREATE
@alezhu
alezhu / 0002-Adapt-to-CMake-3.18.patch
Last active November 30, 2020 16:22 — forked from nickoe/FindwxWidgets.cmake
FindwxWidgets.cmake needed to make findwx work on windows with vcpkg and msvc
From 7fe225eddb0c63e7f3a191b2f9b71f5e829e819a Mon Sep 17 00:00:00 2001
From: Alexandr Zhuravlev <alexandr.zhuravlev@gmail.com>
Date: Mon, 30 Nov 2020 19:15:39 +0300
Subject: [PATCH 2/2] Adapt to CMake 3.18
---
FindwxWidgets.cmake | 475 +++++++++++++++++++++++---------------------
1 file changed, 246 insertions(+), 229 deletions(-)
diff --git a/FindwxWidgets.cmake b/FindwxWidgets.cmake
@alezhu
alezhu / Z_STRANGE_BEHAVIOUR_OF_CAST.abap
Last active November 2, 2020 12:52
Strange behaviour of class casting
REPORT ztest_class_ref_data.
CLASS lcl_abstract_data DEFINITION ABSTRACT.ENDCLASS.
CLASS lcl_abstract_processor DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS constructor IMPORTING io_data TYPE REF TO lcl_abstract_data.
PROTECTED SECTION.
DATA mo_data TYPE REF TO lcl_abstract_data.
ENDCLASS.
FUNCTION zf4if_brand_sample_exit.
*"----------------------------------------------------------------------
*"*"Локальный интерфейс:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" REFERENCE(CALLCONTROL) TYPE DDSHF4CTRL
*"----------------------------------------------------------------------
@alezhu
alezhu / update_wifi_drv.sh
Created December 25, 2018 21:04
GMOLO Wifi Realtek RTL8723BU chipset (0bda:b720)
#!/bin/sh
sudo apt-get install git build-essential linux-headers-$(uname -r)
git clone https://github.com/lwfinger/rtl8723bu
sed -i 's/EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/#EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE/g' ~/rtl8723bu/Makefile
cd rtl8723bu
make
sudo make install
xed admin:///etc/modprobe.d/blacklist.conf
@alezhu
alezhu / htix5288.service
Last active December 25, 2018 20:36
GMOLO touchpad
[Unit]
Description=HTIX5288 driver workaround
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service systemd-logind.service suspend.target
[Service]
ExecStart=/usr/local/bin/touchpad.sh
[Install]
WantedBy=multi-user.target suspend.target