This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rem 1) select the text lines representing a table whose columns are separated by the tab character | |
Rem 2) run this macro | |
Rem 3) result: the tab characters are replaced by two or more space characters such a way each column | |
Rem has the same number of characters | |
Rem 4) you may then copy/paste those text lines inside HTML <pre>...</pre> it will look like a table | |
Sub tabs_to_spaces() | |
Dim par As Paragraph | |
Dim pars() As Paragraph | |
Dim arr(50) As Integer ' 50 tabs maximum per line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Improvement of code at https://blogs.sap.com/2014/02/25/alternative-to-readtext-function-module/comment-page-1/#comment-4121 | |
* including Kenneth proposal at https://blogs.sap.com/2014/02/25/alternative-to-readtext-function-module/comment-page-1/#comment-452639 | |
* | |
* Create your own class implementing LIF_PROCESSOR to process each text extracted. | |
* Two demo classes are provided: LCL_WRITER (active) and LCL_VERIFIER (if you want to test). | |
* | |
* Note: you won't need this code if you have the newest standard function modules READ_MULTIPLE_TEXTS and READ_TEXT_TABLE installed in | |
* your system (cf note 2261311 – Function module for reading multiple SAPscript texts -> https://launchpad.support.sap.com/#/notes/2261311/E ) | |
REPORT zdemo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* SUMMARY OF SPECIFIC BEHAVIORS: | |
* | |
* input string (formatted as string template) returned string (formatted as string template) | |
* ------------------------------------------- ----------------------------------------- | |
* any string containing %00 return empty string | |
* unencoded null character null character returned unchanged | |
* A%0AB A\nB | |
* A%0DB A\rB | |
* A%B return empty string | |
* A+B A B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS zcl_abapgit_user_exit DEFINITION PUBLIC FINAL CREATE PUBLIC . | |
PUBLIC SECTION. | |
INTERFACES zif_abapgit_exit. | |
ENDCLASS. | |
CLASS zcl_abapgit_user_exit IMPLEMENTATION. | |
METHOD zif_abapgit_exit~custom_deserialize_abap_clif. | |
DATA: lo_deserializer TYPE REF TO zcl_abapgit_oo_deserializer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS ltc_main DEFINITION | |
FOR TESTING | |
DURATION SHORT | |
RISK LEVEL HARMLESS. | |
PRIVATE SECTION. | |
CONSTANTS iterations TYPE i VALUE 50000. | |
DATA: sflight_s TYPE STANDARD TABLE OF sflight. | |
METHODS setup. | |
METHODS reference_into FOR TESTING. | |
METHODS assigning FOR TESTING. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT. | |
DATA l_string TYPE string. | |
DATA character2 TYPE string. | |
data(vietnamese) = 'ớắ'. | |
data(emoji) = '🦀🦀🤙🤙🤙🌎🌍🌏'. | |
PERFORM get_characters_unicode_range USING '0000' 'FFFF' CHANGING l_string. | |
DATA(off) = 0. | |
data(xml_characters) = ``. | |
data(non_xml_characters) = ``. | |
WHILE off < strlen( l_string ). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS lcl_app DEFINITION. | |
PUBLIC SECTION. | |
METHODS at_selection_screen_output. | |
METHODS at_selection_screen_exit. | |
METHODS on_sapevent FOR EVENT sapevent OF cl_gui_html_viewer | |
IMPORTING action frame getdata postdata query_table. | |
PRIVATE SECTION. | |
DATA o_html TYPE REF TO cl_gui_html_viewer. | |
ENDCLASS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT. | |
SELECT-OPTIONS s_prog FOR sy-repid. | |
SELECTION-SCREEN BEGIN OF LINE. | |
SELECTION-SCREEN COMMENT (64) label_1. | |
PARAMETERS prog_bef TYPE syrepid DEFAULT 'ZTEMPORARY'. | |
SELECTION-SCREEN END OF LINE. | |
SELECTION-SCREEN BEGIN OF LINE. | |
SELECTION-SCREEN COMMENT (64) label_2. | |
PARAMETERS prog_aft TYPE syrepid DEFAULT 'ZTEMPORARY2'. | |
SELECTION-SCREEN END OF LINE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Version of code from blog post, adapted to work/compile with 7.40+, and no need to create ddic structure ZDEBUGGER_SCRIPTING_S | |
*https://blogs.sap.com/2022/01/09/abap-unit-tests-generate-a-value-statement-for-the-contents-of-an-internal-table/ | |
* | |
*Installation -> transaction code SAS -> script editor -> paste code -> save as script Z_GET_ABAP_FROM_VARIABLE or any name | |
*---------------------------------------------------------------------* | |
* CLASS lcl_debugger_script DEFINITION | |
*---------------------------------------------------------------------* | |
* | |
*---------------------------------------------------------------------* | |
CLASS lcl_debugger_script DEFINITION INHERITING FROM cl_tpda_script_class_super . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*"* use this source file for any type of declarations (class | |
*"* definitions, interfaces or type declarations) you need for | |
*"* components in the private section | |
* Copyright SAP pieces of IF_SALV_GUI_GRID_DATA_SOURCE in ABAP 7.57 SP 0 | |
INTERFACE lif_salv_gui_grid_data_source. | |
TYPES: BEGIN OF ys_field_references, | |
fieldname TYPE lvc_fname, | |
field_reference_type TYPE salv_de_celltype, |
OlderNewer