Skip to content

Instantly share code, notes, and snippets.

View urcm's full-sized avatar
🎯
Focusing

urcm

🎯
Focusing
View GitHub Profile
data: gt_material type table of bapi1191_mtk_c,
gt_task type table of bapi1191_tsk_c,
gt_reference type table of bapi1191_ref_opr_c,
gt_return type table of bapiret2,
gt_operation type table of bapi1191_opr_c.
data: gs_material type bapi1191_mtk_c,
gs_task type bapi1191_tsk_c,
gs_reference type bapi1191_ref_opr_c,
@urcm
urcm / arithmetische_func.abap
Last active February 26, 2023 15:25
arithmetische Functionen
*data: lv_num type p length 8 decimals 4 value '-1234.5678'.
data: lv_num type decfloat16 value '-12.56'.
write :/ 'abs: ' , abs( lv_num ). " absolute positive value 12.56
write :/ 'sign: ' , sign( lv_num ). " sign of - or +, when - = -1, when + = +1
write :/ 'ceil: ' , ceil( lv_num ). " larger integer value -12
write :/ 'floor: ' , floor( lv_num ). " smaller integer value -13
write :/ 'trunc: ' , trunc( lv_num ). " predecimal part -12
write :/ 'frac: ' , frac( lv_num ). " decimal part -0.56
type-pools: icon.
data: gt_icon type standard table of icon.
start-of-selection.
select * from icon into table gt_icon up to 300 rows.
loop at gt_icon assigning field-symbol(<fs_icon>).
write :/ conv string( <fs_icon>-id ), <fs_icon>-name, <fs_icon>-internal+1(6).
endloop.
data event_catcher(1) type c.
selection-screen:
begin of screen 400 as window title l_title,
begin of line,
pushbutton 2(10) but_test user-command button_clicked,
end of line,
end of screen 400.
@urcm
urcm / include_structure_in_types.abap
Created January 17, 2022 22:13
abap useful code snippets
types : begin of ty_scarr.
include type scarr.
types : status type char20,
end of ty_scarr.
data: gt_scarr type table of ty_scarr.
data: go_alv type ref to cl_salv_table.
data: col_opt type ref to cl_salv_columns_table.
data: column type ref to cl_salv_column.