Skip to content

Instantly share code, notes, and snippets.

@fabianlupa
Created January 15, 2017 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabianlupa/6c6c01cc2386bc65f7217061974c7c5b to your computer and use it in GitHub Desktop.
Save fabianlupa/6c6c01cc2386bc65f7217061974c7c5b to your computer and use it in GitHub Desktop.
Additional ADT code templates
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="ABAP" deleted="false" description="Exception class" enabled="true" name="exc">"! ${descr}
CLASS ${enclosing_object} DEFINITION
PUBLIC
INHERITING FROM ${base}
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
CONSTANTS:
BEGIN OF gc_no_arguments,
msgid TYPE symsgid VALUE '${msgid}',
msgno TYPE symsgno VALUE '${msgno}',
attr1 TYPE scx_attrname VALUE '',
attr2 TYPE scx_attrname VALUE '',
attr3 TYPE scx_attrname VALUE '',
attr4 TYPE scx_attrname VALUE '',
END OF gc_no_arguments.
INTERFACES:
if_t100_message.
METHODS:
"! @parameter is_textid | Textid
"! @parameter ix_previous | Previous exception
constructor IMPORTING is_textid LIKE if_t100_message=&gt;t100key OPTIONAL
ix_previous LIKE previous OPTIONAL.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ${enclosing_object} IMPLEMENTATION.
METHOD constructor.
super-&gt;constructor( previous = ix_previous ).
CLEAR me-&gt;textid.
IF is_textid IS INITIAL.
if_t100_message~t100key = gc_no_arguments.
ELSE.
if_t100_message~t100key = is_textid.
ENDIF.
ENDMETHOD.
ENDCLASS.</template><template autoinsert="true" context="ABAP" deleted="false" description="Include file header" enabled="true" name="incl">*----------------------------------------------------------------------*
***INCLUDE ${enclosing_object}.
*----------------------------------------------------------------------*
</template><template autoinsert="true" context="ABAP" deleted="false" description="Message dummy" enabled="true" name="msgd">MESSAGE ${msgtyno}(${msgid}) WITH ${msgv} INTO DATA(${lv_dummy}) ##NEEDED.
</template><template autoinsert="true" context="ABAP" deleted="false" description="Message to text" enabled="true" name="msgtotext">MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO DATA(${lv_msg_text}).
</template><template autoinsert="true" context="ABAP" deleted="false" description="Initialize object services" enabled="true" name="osInit">cl_os_system=&gt;init_and_set_modes( i_external_commit = ${oscon_false}&#13;
i_update_mode = ${oscon_dmode_update_task} ).</template><template autoinsert="true" context="ABAP" deleted="false" description="Report header" enabled="true" name="repHead">*&amp;--------------------------------------------------------------------*
*&amp; Program ${enclosing_object}
*&amp; Author ${author}
*&amp; Short description ${shortText}
*&amp;--------------------------------------------------------------------*
*&amp; Date ${year}-${month}-${day}
*&amp; Last change ${year}-${month}-${day}
*&amp;--------------------------------------------------------------------*
*&amp; Change protocol
*&amp; Date User Description
*&amp; ____-__-__ ____________ ______________________________________
*&amp;--------------------------------------------------------------------*</template></templates>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment