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_OBJECT_TYPE_CHECK.abap
Created June 18, 2020 19:49
Check max length and namespace support for object supported by abapGit
REPORT zabapgit_object_type_check LINE-SIZE 255.
TABLES: objh.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
SELECT-OPTIONS:
s_obj FOR objh-objectname.
SELECTION-SCREEN END OF BLOCK b1.
TYPES:
@mbtools
mbtools / ZABAPGIT_CLAS_POSITION_INDEX.abap
Created June 24, 2020 09:37
Create index of source code position for classes
REPORT zabapgit_clas_position_index.
DATA: gt_class TYPE TABLE OF seoclsname,
go_helper TYPE REF TO cl_oo_source_pos_index_helper.
START-OF-SELECTION.
CREATE OBJECT go_helper.
SELECT obj_name FROM tadir INTO TABLE gt_class
/*
* ABAPGIT COMMON CSS
*/
/* GLOBALS */
body {
overflow-x: hidden;
}
a, a:visited {
@mbtools
mbtools / readme.md
Created December 21, 2020 20:33
abapGit HTML
@mbtools
mbtools / ZTEST_ABAPGIT_HTML_VIEWER.abap
Last active October 24, 2023 20:04
ZTEST_ABAPGIT_HTML_VIEWER
REPORT ztest_abapgit_html_viewer.
SELECTION-SCREEN BEGIN OF SCREEN 1001.
* dummy for triggering screen
SELECTION-SCREEN END OF SCREEN 1001.
CLASS lcl_gui DEFINITION.
PUBLIC SECTION.
METHODS on_event
@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.
*&---------------------------------------------------------------------*
*& 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 / 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.
@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:
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