Skip to content

Instantly share code, notes, and snippets.

@Gong-Bao-Chicken
Gong-Bao-Chicken / nested2flat_structure.abap
Last active February 26, 2023 15:12
Convert nested ABAP structure into Flat structure
DATA: lo_structure_descriptor type ref to cl_abap_structdescr,
lo_structure_descriptor_tmp type ref to cl_abap_structdescr,
lo_table_descriptor type ref to cl_abap_tabledescr,
lt_structure_components_nested type cl_abap_structdescr=>component_table,
lt_structure_components_flat type cl_abap_structdescr=>component_table,
lv_index type sy-tabix.
lo_table_descriptor ?= cl_abap_structdescr=>describe_by_data( lt_result_table_nested ).
lo_structure_descriptor ?= lo_table_descriptor->get_table_line_type( ).
lt_structure_components = lo_structure_descriptor->get_components( ).
@Gong-Bao-Chicken
Gong-Bao-Chicken / dyn_structure_table_type.abap
Created February 6, 2020 15:53
Dynamischen neuen Typen aus Tabellen Referenz oder / und Struktur erzeugen
FIELD-SYMBOLS: <fs_data> type any table,
<fs_result> type any.
DATA : ref_table_des TYPE REF TO cl_abap_tabledescr,
lt_component_descriptions TYPE cl_abap_structdescr=>component_table.
* Describe Input Table
DATA: lo_input_tabdescr TYPE REF TO cl_abap_tabledescr,
lo_input_strdescr type ref to cl_abap_structdescr.
@Gong-Bao-Chicken
Gong-Bao-Chicken / docker-compose.yaml
Created March 12, 2019 14:58
Gitlab + Gitlab Runner on same machine using Docker & Docker compose
version: "3"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'subdomain.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://subdomain.example.com'
@Gong-Bao-Chicken
Gong-Bao-Chicken / 0020_plugin.indexedsearch.ts
Last active September 9, 2020 08:47
How to Create a (global) Search Box for Typo3 7,8 and probably 9
plugin.tx_indexedsearch {
show {
rules=0
}
settings {
targetPid = YOURPID
displayRules = 0
exactCount = 1
@Gong-Bao-Chicken
Gong-Bao-Chicken / ABAP Class Exception Example..abap
Last active June 27, 2017 14:10
How to use Class Exeptions in ABAP
* Prerequirements:
*
* 1. Create an Exception Class /{PACKAGE}/CX_{NAME} in the working package.
* 2. Open the Exception Class and add Interface: "IF_T100_MESSAGE" to it.
* 3. Create a 'Nachrichtenklasse' with the name /{Package}/(...)_{NAME}_NK
*
*Then:
*
* 1. Open the working Class and select a method to which to add an exception.