const name = 'Tom';
Developer dev = new Developer(name);
while(dev.isCoding())
{
dev.listenToMusic();
dev.openStackOverFlow();
dev.drinkWater();
}
Check out my portfolio website to get to know my tech stack and some other cool stuff.
:triangular_flag_on_post: Compilation of things worth remembering in ABAP and SAP
Home Page: https://schmelto.github.io/abap/
License: MIT License
const name = 'Tom';
Developer dev = new Developer(name);
while(dev.isCoding())
{
dev.listenToMusic();
dev.openStackOverFlow();
dev.drinkWater();
}
Check out my portfolio website to get to know my tech stack and some other cool stuff.
ASSIGN COMPONENT 'A' OF STRUCTURE <fs_test> TO FIELD-SYMBOL(<fs_a>).
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXCEPTIONS
error_message = 1.
CLASS zcl_monster DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: main.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_monster IMPLEMENTATION.
METHOD main.
" Local Variables
DATA: ld_monster_number TYPE i,
ld_number_of_heads TYPE i.
create_monster( id_number_of_heads = ld_number_of_heads ).
ENDMETHOD.
ENDCLASS.
METHODS create_monster
IMPORTING
number_of_heads TYPE i
RETURNING
value(monster_number) TYPE i.
DATA: lr_mo TYPE REF TO fsbp_memory_object,
lt_bp3100 TYPE TABLE OF bp3100,
ls_bp3100 LIKE LINE OF lt_bp3100,
ls_add_info TYPE ukm_s_add_info.
lr_mo ?= fsbp_memory_factory=>get_instance(
i_partner = p_part
i_table_name = if_fsbp_const_xo_objects=>mo_bp3100 ).
lr_mo->get_data_new( IMPORTING e_data_new = lt_bp3100 ).
LOOP AT lt_bp3100 INTO ls_bp3100.
IF ls_bp3100-addtype = '10'.
DATA(ammount) = ls_bp3100-amnt.
ENDIF.
ENDLOOP.
CLASS zcl_monster DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS: main.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS zcl_monster IMPLEMENTATION.
METHOD main.
"Local Variables
DATA: monster_madness1 TYPE i,
monster_madness2 TYPE i,
description1 TYPE string,
description2 TYPE string.
monster_madness1 = 25.
monster_madness2 = 50.
" Derive Monster Sanity
IF monster_madness1 LT 30.
description1 = 'Fairly sane'.
ELSEIF monster_madness1 GT 90.
description1 = 'BONKERS'.
ENDIF.
IF monster_madness2 LT 30.
description1 = 'Fairly sane'.
ELSEIF monster_madness2 GT 90.
description1 = 'BONKERS'.
ENDIF.
ENDMETHOD.
ENDCLASS.
alt + shift + m
New:
message = |{ delivery ALPHA = OUT }|.
Old:
CALL FUNCTION 'CONVERSTION_EXIT_ALPHA_OUTPUT'
EXPORTING in = delivery
IMPORTING = delivery.
" and for further processing add the leading zeros back
CALL FUNCTION 'CONVERSTION_EXIT_ALPHA_INPUT'
EXPORTING in = delivery
IMPORTING = delivery.
https://github.com/reyemsaibot/table_compare
Get creditmanagement data of business partner
DATA: lr_mo TYPE REF TO fsbp_memory_object,
lt_bp3100 TYPE TABLE OF bp3100.
"read BP3100 data from memory instance
lr_mo ?= fsbp_memory_factory=>get_instance(
i_partner = '123456789'
i_table_name = if_fsbp_const_xo_objects=>mo_bp3100 ).
lr_mo->get_data_new( IMPORTING e_data_new = lt_bp3100 ).
ABAP Extended Expressions
VALUE #( ( CLIENT ='100' ACCOUNT_NUMBER ='00000001' BANK_CUSTOMER_ID ='0000000000100001' BANK_NAME ='Volksbank' CITY ='Gaertringen' CUKY_FIELD ='' BALANCE ='200.00 ' CURRENCY ='EUR' ACCOUNT_CATEGORY ='01' LASTCHANGEDAT ='20210922132826.0000000 ' )
( CLIENT ='100' ACCOUNT_NUMBER ='00000002' BANK_CUSTOMER_ID ='0000000000200002' BANK_NAME ='Sparkasse' CITY ='Schwetzingen' CUKY_FIELD ='' BALANCE ='500.00 ' CURRENCY ='EUR' ACCOUNT_CATEGORY ='02' LASTCHANGEDAT ='20210922132826.0000000 ' )
( CLIENT ='100' ACCOUNT_NUMBER ='00000003' BANK_CUSTOMER_ID ='0000000000200003' BANK_NAME ='Commerzbank' CITY ='Nuernberg' CUKY_FIELD ='' BALANCE ='150.00 ' CURRENCY ='EUR' ACCOUNT_CATEGORY ='02' LASTCHANGEDAT ='20210922132826.0000000 ' )
)
Add transaction OBB8
for payment term changes
adapt side to github pages
Table ABLM_BLACKLIST for excluded programms
add GS01
, GS02
and GS03
SE80
Class CL_EXITHANDLER
get_instance
and set a Break-Point in the first line of cl_exithandler=>get_class_name_by_interface
New:
lo_monster = zcl_monster_factory( lt_monsters[ monster_name = ld_monster_name]-monster_number ).
Old:
READ TABLE lt_monsters INTO ls_mosnters WITH KEY monster_name = ld_monster_name.
lo_monster = zcl_monster_factory( ls_monster-monster_number ).
CALL FUNCTION 'UKM_DB_UKMBP_CMS_READ'
EXPORTING
i_partner =
i_db_read =
IMPORTING
es_bp_cms =
EXCEPTIONS
not_found = 1
others = 2.
str + shift + L
eclipse
str + H |
Abap Source Text Search |
---|
No response
No response
New:
DATA(day) = SWITCH char10( indicator
WHEN 1 THEN 'Monday' (326)
WHEN 2 THEN 'Tuesday' (327)
" ...
WHEN 7 THEN 'Sunday' (332)
ELSE TROW zcx_day_problem( ) ).
add full hello world program
* With the help of the class cl_fdt_xl_spreadsheet, XML transformations
* data can be extracted from XLSX files and converted into an internal table
TRY.
DATA: lv_rc TYPE i.
DATA: it_files TYPE filetable.
DATA: lv_action TYPE i.
* Call up the FileOpen dialog
cl_gui_frontend_services=>file_open_dialog( EXPORTING
file_filter = |xlsx (*.xlsx)\|*.xlsx\|{ cl_gui_frontend_services=>filetype_all }|
CHANGING
file_table = it_files
rc = lv_rc
user_action = lv_action ).
IF lv_action = cl_gui_frontend_services=>action_ok.
* when file is selected
IF lines( it_files ) > 0.
* read first table entry
DATA: lv_filesize TYPE w3param-cont_len.
DATA: lv_filetype TYPE w3param-cont_type.
DATA: it_bin_data TYPE w3mimetabtype.
* Image on appl. Upload server (binary)
cl_gui_frontend_services=>gui_upload( EXPORTING
filename = |{ it_files[ 1 ]-filename }|
filetype = 'BIN'
IMPORTING
filelength = lv_filesize
CHANGING
data_tab = it_bin_data ).
* solix -> xstring
DATA(lv_bin_data) = cl_bcs_convert=>solix_to_xstring( it_solix = it_bin_data ).
* Excel (itab) -> XML -> Ref object
* Attention: memory-intensive and rel. slow! Large amounts of data should not be processed.
DATA(o_excel) = NEW cl_fdt_xl_spreadsheet( document_name = CONV #( it_files[ 1 ]-filename )
xdocument = lv_bin_data ).
DATA: it_worksheet_names TYPE if_fdt_doc_spreadsheet=>t_worksheet_names.
* Determine worksheet name
o_excel->if_fdt_doc_spreadsheet~get_worksheet_names( IMPORTING worksheet_names = it_worksheet_names ).
IF lines( it_worksheet_names ) > 0.
* get the first worksheet and -> create REF to itab
DATA(o_worksheet_itab) = o_excel->if_fdt_doc_spreadsheet~get_itab_from_worksheet( it_worksheet_names[ 1 ] ).
* Map reference to generic field symbol
ASSIGN o_worksheet_itab->* TO FIELD-SYMBOL(<worksheet>).
ENDIF.
ENDIF.
ENDIF.
CATCH cx_root INTO DATA(e_text).
MESSAGE e_text->get_text( ) TYPE 'S' DISPLAY LIKE 'E'.
ENDTRY.
add alt
+ U
-> delete unused variables to the eclipse shortcut list in alphabetical order
Before:
DATA: ld_use_this TYPE i,
ld_also_this TYPE i,
ld_result TYPE i,
ld_not_used TYPE i,
ld_not_used2 TYPE i,
ld_not_used3 TYPE i.
ld_use_this = 1.
ld_also_this = 1.
ld_result = ld_use_this + ld_also_this.
After:
DATA: ld_use_this TYPE i,
ld_also_this TYPE i,
ld_result TYPE i.
ld_use_this = 1.
ld_also_this = 1.
ld_result = ld_use_this + ld_also_this.
REPORT zfi_change_ukmbp_data.
PARAMETERS: p_partn TYPE bu_partner OBLIGATORY.
SELECT SINGLE FROM but000
FIELDS partner,
partner_guid
WHERE partner = @p_partn
INTO @DATA(ls_but000).
DATA: lr_mo TYPE REF TO fsbp_memory_object,
lt_bp3100 TYPE TABLE OF bp3100,
ls_bp3100 TYPE bp3100.
"read BP3100 data from memory instance
lr_mo ?= fsbp_memory_factory=>get_instance(
i_partner = ls_but000-partner
i_table_name = if_fsbp_const_xo_objects=>mo_bp3100 ).
lr_mo->get_data_new( IMPORTING e_data_new = lt_bp3100 ).
ls_bp3100-mandt = '100'.
ls_bp3100-partner = ls_but000-partner.
ls_bp3100-criter = '3700'.
ls_bp3100-amnt = '1000'.
ls_bp3100-curr = 'EUR'.
ls_bp3100-addtype = '10'.
ls_bp3100-data_type = '10'.
APPEND ls_bp3100 TO lt_bp3100.
lr_mo->set_data_new( i_data_new = lt_bp3100 ).
lr_mo->validate( ).
lr_mo->save_data( ).
CALL FUNCTION 'FS_API_EXPL_SAVE'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
SELECT *
FROM scarr
WHERE carrid <> @( VALUE #( ) )
INTO TABLE @DATA(result).
New:
"VALUE is an IMPORTING parameter TYPE ANY
IF value IS SUPPLIED.
lo_monster_log->log_value( REF#( value ) ).
ENDIF.
Old:
DATA: lo_do_calue TYPE REF TO DATA.
"VALUE is an IMPORTING parameter TYPE ANY
IF value IS SUPPLIED.
CREATE DATA lo_do_value LIKE value.
GET REFERENCE OF value INTO lo_do_value.
lo_monster_log->log_value( lo_do_value ).
ENDIF.
cl_abap_context_info=>
get current uname or something like this in the hana cloud version
- fucntion
+ function
SM04
Transaction SAT
New:
CATCH zcx_excel INTO exception.
zcl_bc_screen_message=>output( text = exeption->get_text( ) ).
Check wether a user have authorization to use a transaction or not
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.