Add exit for CLAS CLIF source serialization (#2630)

* Add user exit for serialize_abap_clif_source

* Document CLIF serializer exit

* Add exit redirection for CLIF serializer

* Add link to example for CLIF serialization exit
This commit is contained in:
Fabian Lupa 2019-04-16 14:14:15 +02:00 committed by Lars Hvam
parent 36737331f0
commit d6dfa424ae
4 changed files with 24 additions and 1 deletions

View File

@ -43,3 +43,7 @@ Can be used to skip certian objects, or force a different object setup than curr
### GET_SSL_ID
Possibility to change the default `ANONYM` ssl id to something system specific
### CUSTOM_SERIALIZE_ABAP_CLIF
Allows for a custom serializer to be used for global classes' CLIF sources. See [#2321](https://github.com/larshp/abapGit/issues/2321) and [#2491](https://github.com/larshp/abapGit/pull/2491) for use cases.
This [example implementation](https://gist.github.com/flaiker/999c8165b89131608b05cd371529fef5) forces the old class serializer to be used for specific packages.

View File

@ -206,6 +206,11 @@ CLASS ZCL_ABAPGIT_OO_SERIALIZER IMPLEMENTATION.
METHOD serialize_abap_clif_source.
rt_source = zcl_abapgit_exit=>get_instance( )->custom_serialize_abap_clif( is_class_key ).
IF rt_source IS NOT INITIAL.
RETURN.
ENDIF.
TRY.
rt_source = serialize_abap_new( is_class_key ).
CATCH cx_sy_dyn_call_error.

View File

@ -15,7 +15,7 @@ ENDCLASS.
CLASS ZCL_ABAPGIT_EXIT IMPLEMENTATION.
CLASS zcl_abapgit_exit IMPLEMENTATION.
METHOD get_instance.
@ -143,4 +143,11 @@ CLASS ZCL_ABAPGIT_EXIT IMPLEMENTATION.
ENDTRY.
ENDMETHOD.
METHOD zif_abapgit_exit~custom_serialize_abap_clif.
TRY.
rt_source = gi_exit->custom_serialize_abap_clif( is_class_key ).
CATCH cx_sy_ref_is_initial cx_sy_dyn_call_illegal_method ##NO_HANDLER.
ENDTRY.
ENDMETHOD.
ENDCLASS.

View File

@ -46,4 +46,11 @@ INTERFACE zif_abapgit_exit
METHODS get_ssl_id
RETURNING
VALUE(rv_ssl_id) TYPE ssfapplssl .
METHODS custom_serialize_abap_clif
IMPORTING
is_class_key TYPE seoclskey
RETURNING
VALUE(rt_source) TYPE zif_abapgit_definitions=>ty_string_tt
RAISING
zcx_abapgit_exception.
ENDINTERFACE.