Skip to content

Instantly share code, notes, and snippets.

View mbtools's full-sized avatar
📦
Busy building apm 😀

Marc Bernard mbtools

📦
Busy building apm 😀
View GitHub Profile
@mbtools
mbtools / zabapgit_repo_labels.abap
Created November 4, 2022 15:42
Tool for mass maintenance of abapGit repository labels
REPORT zabapgit_repo_labels.
********************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2022 abapGit Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@mbtools
mbtools / ztest_round.abap
Created November 1, 2022 21:08
Test ABAP round built-in
REPORT ztest_round.
DATA p TYPE p LENGTH 10 DECIMALS 2.
DATA r TYPE p LENGTH 10 DECIMALS 2.
DATA i TYPE i.
DO 6 TIMES.
CASE sy-index.
WHEN 1.
p = '123.49'.
WHEN 2.
@mbtools
mbtools / PowerShell7.syn
Last active June 1, 2025 02:24
TextPad syntax definition file for PowerShell 7.2
; TextPad syntax definitions, updated for PowerShell 7.2
; See also https://skatterbrainz.wordpress.com/2017/04/27/textpad-the-other-editor/
; Marc Bernard (Oct 2022)
; Based on: PowerShell5.syn by David Stein, skatterbrainz.wordpress.com (Apr 2017)
; Based on: PowerShell3.syn by Matt Boren (Jun 2013)
; Based on: which was based on contribution for PowerShell 1 by James Booth (Dec 2009)
PERL=1
[Syntax]
@mbtools
mbtools / zcl_abapgit_object_nspc.abap
Created June 27, 2022 18:53
Enhanced version for serializing namespaces with software component
CLASS zcl_abapgit_object_nspc DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_objects_super
CREATE PUBLIC .
PUBLIC SECTION.
INTERFACES zif_abapgit_object .
METHODS constructor
@mbtools
mbtools / ZBC_SENDGRID_SETUP
Created December 29, 2021 22:39
Adjust the setup of the SMTP node for SendGrid
************************************************************************
* ZBC_SENDGRID_SETUP
*
* Helper: Adjust the setup of the SMTP node for SendGrid
*
* (c) Marc Bernard Tools 2021
************************************************************************
REPORT zbc_sendgrid_setup.
CLASS zcl_abapgit_object_srvb DEFINITION PUBLIC INHERITING FROM zcl_abapgit_objects_super FINAL.
PUBLIC SECTION.
INTERFACES zif_abapgit_object.
ALIASES mo_files FOR zif_abapgit_object~mo_files.
METHODS:
constructor
IMPORTING
is_item TYPE zif_abapgit_definitions=>ty_item
iv_language TYPE spras
@mbtools
mbtools / ZIF_ABAPGIT_EXIT~CUSTOM_SERIALIZE_ABAP_CLIF.abap
Created September 21, 2021 14:35
abapGit: Auto Pretty-Print Class/Interface Code
METHOD zif_abapgit_exit~custom_serialize_abap_clif.
DATA:
lr_sett_pp TYPE REF TO cl_pretty_printer_wb_settings,
lt_code TYPE rswsourcet,
lt_code_pp TYPE rswsourcet.
CREATE OBJECT lr_sett_pp.
" lowercase setting:
@mbtools
mbtools / ZCL_ABAPGIT_USER_EXIT.abap
Last active September 21, 2021 14:33
abapGit: Display GitHub commit status in header
CLASS zcl_abapgit_user_exit DEFINITION
PUBLIC
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES:
zif_abapgit_exit.
PROTECTED SECTION.
PRIVATE SECTION.
*&---------------------------------------------------------------------*
*& Report ZABAPLINT_LOOKUP
*&---------------------------------------------------------------------*
*& Takes location of abaplint issue and displays corresponding ABAP code
*& or directly jumps to code
*& Input example:
*& Check failure on line 931 in src/core/#mbtools#cl_tools.clas.abap
*&---------------------------------------------------------------------*
REPORT zabaplint_lookup.
@mbtools
mbtools / ZABAPGIT_PARSE_FIELDS.abap
Created March 17, 2021 09:26
abapGit form parsing
REPORT zabapgit_parse_fields.
CONSTANTS:
c_query TYPE string VALUE 'key=00%2601&param=abc%3defg&value=xxx%3fyyy&option=%25%24123%5f'.
DATA:
gv_url TYPE string,
gs_fields TYPE ihttpnvp,
gt_fields TYPE tihttpnvp.