Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo hugo-dc

View GitHub Profile
View grupo_de_vendedores_value_help.abap
DATA:
ti_tvgrt LIKE tvgrt OCCURS 0 WITH HEADER LINE.
DATA: t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_value OCCURS 0,
vkgrp LIKE tvgrt-vkgrp,
buzei LIKE tvgrt-bezei.
DATA: END OF t_value.
@hugo-dc
hugo-dc / recommended.abap
Last active Sep 27, 2015
Campo en selection screen como recomendado
View recommended.abap
View ranges.abap
begin of bukrs occurs 0,
SIGN(1) type c, " I= Include E=Exclude
OPTION(2) type c, " EQ= Equals BT= Between NE= Not Equals
LOW like bukrs,
HIGH like bukrs,
end of bukrs.
@hugo-dc
hugo-dc / messtab.abap
Last active Sep 29, 2015
Messtsab messages
View messtab.abap
MESSAGE ID messtab1-msgid
TYPE messtab1-msgtyp
NUMBER messtab1-msgnr
WITH messtab1-msgv1 messtab1-msgv2 messtab1-msgv3
messtab1-msgv4.
LOOP AT MESSTAB.
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
View field-symbols.abap
REPORT ztest.
DATA:
v_01 TYPE i VALUE '5',
v_02 TYPE i VALUE '10'.
FIELD-SYMBOLS: <value> TYPE i.
ASSIGN ('V_02') TO <value>.
@hugo-dc
hugo-dc / wp_changer.py
Created Feb 13, 2012
Change desktop wallpaper on Windows
View wp_changer.py
import ctypes
ctypes.windll.user32.SystemParametersInfoA(20, 0, "myimage.jpg" , 0)
View unit_test_skel.abap
CLASS class_name DEFINITION FOR TESTING.
"#AU Risk_level Harmless
"#AU Duration Short
PRIVATE SECTION.
METHODS test_something FOR TESTING.
METHODS test_something_else FOR TESTING.
ENDCLASS.
CLASS class_name IMPLEMENTATION.
@hugo-dc
hugo-dc / assertions.abap
Created Mar 21, 2012
ABAP Unit Test Assertions
View assertions.abap
class:
cl_aunit_assert
methods:
ASSERT_EQUALS
Validates the equality of two data objects
ASSERT_BOUND
Asserts the validity of the reference of a reference variable
ASSERT_NOT_BOUND
Asserts whether the reference of a reference variable is invalid
@hugo-dc
hugo-dc / matchcode.abap
Created Mar 29, 2012
Matchcode for Dynpro field
View matchcode.abap
* At dynpro logic, after PAI
PROCESS ON VALUE-REQUEST.
FIELD zconcent_k-folio MODULE matchcode_module.
* wherever you want
MODULE matchcode_module INPUT.
DATA: t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
@hugo-dc
hugo-dc / first_line_tc.abap
Created Mar 29, 2012
Go to the first line of table control
View first_line_tc.abap
* in a PAI module
PERFORM compute_scrolling_in_tc USING 'TABLE_CONTROL_NAME'
'P--'.