🤷♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT zfoobar5. | |
CLASS lcl_mapping DEFINITION. | |
PUBLIC SECTION. | |
INTERFACES zif_abapgit_ajson_mapping. | |
ENDCLASS. | |
CLASS lcl_mapping IMPLEMENTATION. | |
METHOD zif_abapgit_ajson_mapping~to_abap. | |
ENDMETHOD. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* GUID v4 implementation in ABAP | |
* Also see SAP note 2619546 ! | |
* https://answers.sap.com/questions/11928657/generating-uuid-in-abap.html | |
* http://www.cryptosys.net/pki/uuid-rfc4122.html | |
* https://tools.ietf.org/html/rfc4122#page-14 | |
DATA guid TYPE c LENGTH 36. | |
DATA hex TYPE x LENGTH 16. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSTANTS lc_tabname TYPE c LENGTH 16 VALUE 'ZHVAM_CUST'. | |
DATA obj TYPE REF TO object. | |
DATA lr_ddfields TYPE REF TO data. | |
FIELD-SYMBOLS <any> TYPE any. | |
FIELD-SYMBOLS <fieldname> TYPE simple. | |
FIELD-SYMBOLS <ddfields> TYPE ANY TABLE. | |
DATA names TYPE STANDARD TABLE OF abap_compname WITH DEFAULT KEY. | |
TRY. | |
CALL METHOD ('XCO_CP_ABAP_DICTIONARY')=>('DATABASE_TABLE') | |
EXPORTING |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLASS ltcl_test DEFINITION FOR TESTING DURATION SHORT RISK LEVEL HARMLESS FINAL. | |
PRIVATE SECTION. | |
DATA mo_cut TYPE REF TO zcl_unit_test. | |
METHODS setup. | |
METHODS calc FOR TESTING RAISING cx_static_check. | |
ENDCLASS. | |
CLASS ltcl_test IMPLEMENTATION. | |
METHOD setup. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* raise exception from BAPIRET2, | |
RAISE EXCEPTION TYPE zcx_foobar | |
MESSAGE ID ls_return-id | |
NUMBER ls_return-number | |
WITH ls_return-message_v1 | |
ls_return-message_v2 | |
ls_return-message_v3 | |
ls_return-message_v4. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* create a return order given sales order | |
* and update the return order with order reason | |
DATA lv_vbeln TYPE vbak-vbeln. | |
DATA lt_return TYPE STANDARD TABLE OF bapiret2 WITH EMPTY KEY. | |
DATA ls_header_in TYPE bapisdh1. | |
DATA ls_header_inx TYPE bapisdh1x. | |
CALL FUNCTION 'BAPI_SALESDOCUMENT_COPY' | |
EXPORTING |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
METHOD zif_abapgit_exit~wall_message_repo. | |
DATA(lv_url) = is_repo_meta-url. | |
DATA(lo_agent) = zcl_abapgit_factory=>get_http_agent( ). | |
IF zcl_abapgit_login_manager=>get( lv_url ) IS NOT INITIAL. | |
lo_agent->global_headers( )->set( | |
iv_key = 'Authorization' | |
iv_val = zcl_abapgit_login_manager=>get( lv_url ) ). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA(lo_ddl) = NEW zcl_abapgit_object_tabl_ddl( ). | |
SELECT obj_name FROM tadir WHERE pgmid = 'R3TR' AND object = 'TABL' AND masterlang = 'E' INTO TABLE @DATA(lt_tadir). | |
LOOP AT lt_tadir INTO DATA(ls_tadir). | |
* IF ls_tadir-obj_name <> 'SOMETHING'. | |
* CONTINUE. | |
* ENDIF. | |
IF sy-tabix MOD 10 = 0. | |
cl_progress_indicator=>progress_indicate( | |
i_text = |{ sy-tabix }/{ lines( lt_tadir ) }| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONSTANTS lc_iterations TYPE i VALUE 5000. | |
DATA hex TYPE x LENGTH 4. | |
DATA str TYPE string. | |
GET RUN TIME FIELD DATA(lv_start). | |
DO lc_iterations TIMES. | |
hex = '11223344'. | |
str = hex. | |
str = reverse( str ). | |
hex = str. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT zlocals. | |
DATA lt_locals TYPE STANDARD TABLE OF i WITH DEFAULT KEY. | |
FIELD-SYMBOLS <val> TYPE i. | |
DATA: BEGIN OF ls_locals, | |
val1 TYPE i, | |
val2 TYPE i, | |
val3 TYPE i, | |
val4 TYPE i, | |
val5 TYPE i, |