clear PRESP and PWORK in IEXT serialization + cleanup (#1987)

* clear PRESP and PWORK

clear username fields PRESP and PWORK

* remove unused FM exceptions

if sy-subrc is analysed (only <> 0) no detailed FM exceptions are needed, only OTHERS

* set PRESP and PWORK on deserialization

PRESP and PWORK is not set to SY-UNAME by default so set it explicitly
This commit is contained in:
Domi Bigl 2018-10-09 12:24:26 +02:00 committed by Lars Hvam
parent 2eae0b10f8
commit 2644624985

View File

@ -46,10 +46,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
IMPORTING
pe_attributes = ls_attributes
EXCEPTIONS
object_not_found = 1
db_error = 2
no_authority = 3
OTHERS = 4.
OTHERS = 1.
rv_user = ls_attributes-plast.
@ -67,13 +64,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
EXPORTING
pi_cimtyp = mv_extension
EXCEPTIONS
object_not_found = 1
lock_error = 2
action_not_possible = 3
transport_error = 4
db_error = 5
no_authority = 6
OTHERS = 7.
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
@ -94,6 +85,8 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
cg_data = ls_extension ).
MOVE-CORRESPONDING ls_extension-attributes TO ls_attributes.
ls_attributes-presp = cl_abap_syst=>get_user_name( ).
ls_attributes-pwork = ls_attributes-presp.
CALL FUNCTION 'EXTTYPE_CREATE'
EXPORTING
@ -103,15 +96,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
TABLES
pt_syntax = ls_extension-t_syntax
EXCEPTIONS
object_not_found = 1
object_exists = 2
action_not_possible = 3
syntax_error = 4
segment_error = 5
transport_error = 6
db_error = 7
no_authority = 8
OTHERS = 9.
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
@ -126,10 +111,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
EXPORTING
pi_cimtyp = mv_extension
EXCEPTIONS
object_not_found = 1
db_error = 2
no_authority = 3
OTHERS = 4.
OTHERS = 1.
rv_bool = boolc( sy-subrc = 0 ).
@ -177,10 +159,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
TABLES
using_tab = lt_bdcdata
EXCEPTIONS
system_failure = 1
communication_failure = 2
resource_failure = 3
OTHERS = 4.
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
@ -201,10 +180,7 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
TABLES
pt_syntax = ls_extension-t_syntax
EXCEPTIONS
object_not_found = 1
db_error = 2
no_authority = 3
OTHERS = 4.
OTHERS = 1.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
@ -215,7 +191,9 @@ CLASS zcl_abapgit_object_iext IMPLEMENTATION.
ls_extension-attributes-credate,
ls_extension-attributes-cretime,
ls_extension-attributes-ldate,
ls_extension-attributes-ltime.
ls_extension-attributes-ltime,
ls_extension-attributes-pwork,
ls_extension-attributes-presp.
io_xml->add( iv_name = 'IEXT'
ig_data = ls_extension ).