This file contains 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 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 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 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 convert. | |
DATA lv_packed TYPE p LENGTH 4. | |
FIELD-SYMBOLS <lv_hex> TYPE x. | |
lv_packed = iv_int. | |
ASSIGN lv_packed TO <lv_hex> CASTING TYPE x. | |
rv_xstr = <lv_hex>. | |
ENDMETHOD. |
This file contains 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 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 zcl_bcat_api_ecatt DEFINITION | |
PUBLIC | |
FINAL | |
CREATE PUBLIC . | |
PUBLIC SECTION. | |
CLASS-METHODS create_script . | |
CLASS-METHODS delete_container . | |
CLASS-METHODS delete_script . |
This file contains 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_stru1) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( 'VEKPVB' ) ). | |
DATA(lo_stru2) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( 'E1EDL37' ) ). | |
DATA(lt_components1) = lo_stru1->get_components( ). | |
DATA(lt_components2) = lo_stru2->get_components( ). | |
DATA(lt_list1) = lo_stru1->get_ddic_field_list( p_including_substructres = abap_true ). | |
DATA(lt_list2) = lo_stru2->get_ddic_field_list( p_including_substructres = abap_true ). | |
DATA(lv_count) = 0. | |
LOOP AT lt_list1 INTO DATA(ls_list1). |
This file contains 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~change_tadir. | |
* this cherry picks objects from different packages into a dummy package | |
* make sure to enable write protection for the repository | |
* and dont do this setup :) | |
TYPES: BEGIN OF ty_object_and_name, | |
type TYPE tadir-object, | |
name TYPE tadir-obj_name, | |
END OF ty_object_and_name. |
This file contains 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~http_client. | |
DATA: lv_ticket TYPE text4096, | |
ls_bapiret2 TYPE bapiret2. | |
* Or create RFC calling function module CREATE_RFC_REENTRANCE_TICKET | |
CALL FUNCTION '/PLMI/EASYDMS_CREATE_SSOTICKET' | |
DESTINATION 'SOMETHING' | |
IMPORTING | |
ev_ticket = lv_ticket | |
es_return = ls_bapiret2 |
This file contains 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
MERGE INTO schema.table t | |
USING | |
(SELECT ? field1, ? field2 FROM dual) s | |
ON | |
(t.field1 = s.field1) | |
WHEN MATCHED THEN | |
UPDATE SET t.field2 = s.field2 | |
WHEN NOT MATCHED THEN | |
INSERT (field1, field2) values (s.field1, s.field2) |