Skip to content

Instantly share code, notes, and snippets.

@sandraros
sandraros / gist:0f67117cb1b40a2a089b75b28c675178
Last active August 21, 2025 04:11
ABAP program to manage GOS attachments
" Blog post 2024/07/31:
" https://community.sap.com/t5/technology-blogs-by-members/yet-another-post-about-gos-attachment-programming/ba-p/13778915#M168561
"
" The parameters and START-OF-SELECTION are located at the end of the source code.
"
" CREDITS: https://github.com/keremkoseoglu
"
" zcl_bc_gos_toolkit
" Permalink: https://github.com/keremkoseoglu/ABAP-Library/blob/2fc3eb2f3ecc891cd7e7d8c1bba291526d42779a/document/zcl_bc_gos_toolkit.abap
" Latest: https://github.com/keremkoseoglu/ABAP-Library/blob/master/document/zcl_bc_gos_toolkit.abap
DEMO
DATA(csv_reader) = zcl_csv_reader=>create(
it_csv = concat_lines_of( table = string_table sep = |\n| )
i_column_separator = |\t| ).
" Skip first line
TRY.
csv_reader->jump_to_next_line( ).
CATCH cx_root INTO DATA(error).
APPEND VALUE #( line = |{ error->get_text( ) } { csv_reader->line_number } { csv_reader->character_number }| ) TO log.