Académique Documents
Professionnel Documents
Culture Documents
*----------------------------------------------------------------------*
* CLASS ZCX_SAPLINK DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcx_saplink DEFINITION
INHERITING FROM cx_static_check
CREATE PUBLIC
.
PUBLIC SECTION.
METHODS constructor
IMPORTING
!textid LIKE textid OPTIONAL
!previous LIKE previous OPTIONAL
!msg TYPE string DEFAULT '44F7518323DB08BC02000000A7E42BB6'
!object TYPE string OPTIONAL .
*"* protected components of class ZCX_SAPLINK
*"* do not include other source files here!!!
PROTECTED SECTION.
*"* private components of class ZCX_SAPLINK
*"* do not include other source files here!!!
PRIVATE SECTION.
ENDCLASS. "ZCX_SAPLINK DEFINITION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink DEFINITION
CREATE PUBLIC
ABSTRACT
.
PUBLIC SECTION.
TYPES:
BEGIN OF gts_version_info,
* Change this if import or export is incompatible to older major versions or if
enhancements are so important to force the new version of the plugin
* Please comment changes in major version in class documentation
zsaplink_plugin_major_version TYPE i,
* Change this if bugfixes are being done but the basic structure and im- and
exportbehaviour don't change. Reset to 0 when incrementing major version
* Please comment changes in minor version in class documentation
zsaplink_plugin_minor_version TYPE i,
* Change this if cosmetic changes are being done or if internal handling
changed but no change to import- or exportbehaviour
* ( i.e. speeding up the plugin will fall into this ). Reset to 0 when
incrementeing major or minor version
zsaplink_plugin_build_version TYPE i,
*
zsaplink_plugin_info1 TYPE string, " Plugin info - part 1 -
See demoimplementation how this may be used
zsaplink_plugin_info2 TYPE string, " Plugin info - part 2
zsaplink_plugin_info3 TYPE string, " Plugin info - part 3
zsaplink_plugin_info4 TYPE string, " Plugin info - part 4
zsaplink_plugin_info5 TYPE string, " Plugin info - part 5
END OF gts_version_info .
CLASS-METHODS getobjectinfofromixmldoc
IMPORTING
!ixmldocument TYPE REF TO if_ixml_document
EXPORTING
!objtypename TYPE string
!objname TYPE string
RAISING
zcx_saplink .
CLASS-METHODS convertstringtoixmldoc
IMPORTING
value(xmlstring) TYPE string
RETURNING
value(ixmldocument) TYPE REF TO if_ixml_document .
CLASS-METHODS convertixmldoctostring
IMPORTING
!ixmldocument TYPE REF TO if_ixml_document
RETURNING
value(xmlstring) TYPE string .
CLASS-METHODS get_version_info_static
IMPORTING
!iv_classname TYPE clike
RETURNING
value(rs_version_info) TYPE gts_version_info .
METHODS createobjectfromixmldoc
ABSTRACT
IMPORTING
!ixmldocument TYPE REF TO if_ixml_document
!devclass TYPE devclass DEFAULT '$TMP'
!overwrite TYPE flag OPTIONAL
RETURNING
value(name) TYPE string
RAISING
zcx_saplink .
METHODS createixmldocfromobject
ABSTRACT
RETURNING
value(ixmldocument) TYPE REF TO if_ixml_document
RAISING
zcx_saplink .
METHODS createstringfromobject
RETURNING
value(string) TYPE string
RAISING
zcx_saplink .
METHODS constructor
IMPORTING
!name TYPE string .
METHODS uploadxml
FINAL
IMPORTING
!xmldata TYPE string .
CLASS-METHODS getplugins
CHANGING
value(objecttable) TYPE table .
METHODS checkexists
ABSTRACT
RETURNING
value(exists) TYPE flag .
METHODS valuehelp
IMPORTING
!i_objtype TYPE string
RETURNING
value(e_objname) TYPE string .
CLASS-METHODS checkobject
IMPORTING
!i_ixmldocument TYPE REF TO if_ixml_document
EXPORTING
!e_objtype TYPE string
!e_objname TYPE string
!e_pluginexists TYPE flag
!e_objectexists TYPE flag
!e_targetobject TYPE REF TO zsaplink .
METHODS get_version_info
RETURNING
value(rs_version_info) TYPE gts_version_info .
*"* protected components of class ZSAPLINK
*"* do not include other source files here!!!
PROTECTED SECTION.
METHODS deleteobject
ABSTRACT
RAISING
zcx_saplink .
CLASS-METHODS setattributesfromstructure
IMPORTING
!node TYPE REF TO if_ixml_element
!structure TYPE data .
CLASS-METHODS getstructurefromattributes
IMPORTING
!node TYPE REF TO if_ixml_element
!preserveversion TYPE flag OPTIONAL
CHANGING
!structure TYPE data .
METHODS createxmlstring
FINAL
RETURNING
value(xml) TYPE string .
CLASS-METHODS buildtablefromstring
IMPORTING
!source TYPE string
RETURNING
value(sourcetable) TYPE table_of_strings .
CLASS-METHODS buildsourcestring
IMPORTING
!sourcetable TYPE rswsourcet OPTIONAL
!pagetable TYPE o2pageline_table OPTIONAL
RETURNING
value(sourcestring) TYPE string .
METHODS getobjecttype
ABSTRACT
RETURNING
value(objecttype) TYPE string .
METHODS createotrfromnode
IMPORTING
value(node) TYPE REF TO if_ixml_element
!devclass TYPE devclass DEFAULT '$TMP'
EXPORTING
!concept TYPE sotr_text-concept
RAISING
zcx_saplink .
METHODS createnodefromotr
IMPORTING
!otrguid TYPE sotr_conc
RETURNING
value(node) TYPE REF TO if_ixml_element .
*"* private components of class ZSAPLINK
*"* do not include other source files here!!!
PRIVATE SECTION.
TYPES:
BEGIN OF t_objecttable,
classname TYPE string,
object TYPE ko100-object,
text TYPE ko100-text,
END OF t_objecttable .
METHODS create_alias_method
CHANGING
!xt_aliases_method TYPE seoo_aliases_r .
METHODS create_clsdeferrd
CHANGING
!xt_clsdeferrds TYPE seot_clsdeferrds_r .
METHODS create_intdeferrd
CHANGING
!xt_intdeferrds TYPE seot_intdeferrds_r .
METHODS create_otr
IMPORTING
value(node) TYPE REF TO if_ixml_element
!devclass TYPE devclass DEFAULT '$TMP'
EXPORTING
!concept TYPE sotr_text-concept
RAISING
zcx_saplink .
METHODS create_typepusage
CHANGING
!xt_typepusages TYPE seot_typepusages_r .
METHODS get_alias_method
IMPORTING
!it_methods TYPE abap_methdescr_tab
CHANGING
!xo_rootnode TYPE REF TO if_ixml_element .
METHODS get_clsdeferrd
CHANGING
!xo_rootnode TYPE REF TO if_ixml_element .
METHODS get_intdeferrd
CHANGING
!xo_rootnode TYPE REF TO if_ixml_element .
METHODS get_otr
IMPORTING
!otrguid TYPE sotr_conc
RETURNING
value(node) TYPE REF TO if_ixml_element .
METHODS get_typepusage
CHANGING
!xo_rootnode TYPE REF TO if_ixml_element .
*"* private components of class ZSAPLINK_OO
*"* do not include other source files here!!!
PRIVATE SECTION.
ENDCLASS. "ZSAPLINK_OO DEFINITION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK_CLASS DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink_class DEFINITION
INHERITING FROM zsaplink_oo
CREATE PUBLIC
.
PUBLIC SECTION.
TYPE-POOLS abap .
DATA mv_steamroller TYPE abap_bool VALUE abap_false. "#EC NOTEXT
METHODS checkexists
REDEFINITION .
METHODS createixmldocfromobject
REDEFINITION .
METHODS createobjectfromixmldoc
REDEFINITION .
METHODS get_version_info
REDEFINITION .
*"* protected components of class ZSAPLINK_CLASS
*"* do not include other source files here!!!
PROTECTED SECTION.
METHODS create_documentation .
METHODS create_method_documentation
IMPORTING
!node TYPE REF TO if_ixml_element .
METHODS create_sections .
METHODS create_textpool .
METHODS findimplementingclass
IMPORTING
!methodname TYPE string
!startclass TYPE string OPTIONAL
RETURNING
value(classname) TYPE string .
METHODS get_documentation
CHANGING
!rootnode TYPE REF TO if_ixml_element .
METHODS get_method_documentation
IMPORTING
!method_key TYPE seocpdkey
CHANGING
!rootnode TYPE REF TO if_ixml_element .
METHODS get_sections
CHANGING
!rootnode TYPE REF TO if_ixml_element .
METHODS get_textpool
CHANGING
!rootnode TYPE REF TO if_ixml_element .
METHODS deleteobject
REDEFINITION .
METHODS getobjecttype
REDEFINITION .
*"* private components of class ZSAPLINK_CLASS
*"* do not include other source files here!!!
PRIVATE SECTION.
ENDCLASS. "ZSAPLINK_CLASS DEFINITION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK_PROGRAM DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink_program DEFINITION
INHERITING FROM zsaplink
FINAL
CREATE PUBLIC
.
PUBLIC SECTION.
METHODS checkexists
REDEFINITION .
METHODS createixmldocfromobject
REDEFINITION .
METHODS createobjectfromixmldoc
REDEFINITION .
METHODS createstringfromobject
REDEFINITION .
*"* protected components of class ZSAPLINK_PROGRAM
*"* do not include other source files here!!!
PROTECTED SECTION.
METHODS deleteobject
REDEFINITION .
METHODS getobjecttype
REDEFINITION .
*"* private components of class ZSAPLINK_PROGRAM
*"* do not include other source files here!!!
PRIVATE SECTION.
METHODS get_source
RETURNING
value(progsource) TYPE rswsourcet .
METHODS update_wb_tree .
METHODS create_textpool
IMPORTING
!textpoolnode TYPE REF TO if_ixml_element .
METHODS dequeue_abap
RAISING
zcx_saplink .
METHODS get_textpool
RETURNING
value(textnode) TYPE REF TO if_ixml_element .
METHODS create_documentation
IMPORTING
!docnode TYPE REF TO if_ixml_element .
METHODS create_source
IMPORTING
!source TYPE table_of_strings
!attribs TYPE trdir .
METHODS enqueue_abap
RAISING
zcx_saplink .
METHODS get_documentation
RETURNING
value(docnode) TYPE REF TO if_ixml_element .
METHODS transport_copy
IMPORTING
!author TYPE syuname
!devclass TYPE devclass
RAISING
zcx_saplink .
METHODS get_dynpro
RETURNING
value(dynp_node) TYPE REF TO if_ixml_element .
METHODS create_dynpro
IMPORTING
!dynp_node TYPE REF TO if_ixml_element .
METHODS get_pfstatus
RETURNING
value(pfstat_node) TYPE REF TO if_ixml_element .
METHODS create_pfstatus
IMPORTING
!pfstat_node TYPE REF TO if_ixml_element .
ENDCLASS. "ZSAPLINK_PROGRAM DEFINITION
*----------------------------------------------------------------------*
* CLASS ZCX_SAPLINK IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zcx_saplink IMPLEMENTATION.
METHOD constructor.
CALL METHOD super->constructor
EXPORTING
textid = textid
previous = previous.
IF textid IS INITIAL.
me->textid = zcx_saplink .
ENDIF.
me->msg = msg .
me->object = object .
ENDMETHOD. "CONSTRUCTOR
ENDCLASS. "ZCX_SAPLINK IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink IMPLEMENTATION.
METHOD buildsourcestring.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA stemp TYPE string.
DATA pageline TYPE o2pageline.
IF sy-subrc = 0.
e_pluginexists = 'X'.
CREATE OBJECT e_targetobject
TYPE
(l_objline-classname)
EXPORTING
name = e_objname.
e_objectexists = e_targetobject->checkexists( ).
ENDIF.
ENDMETHOD. "checkobject
METHOD constructor.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
objname = name.
TRANSLATE objname TO UPPER CASE.
ixml = cl_ixml=>create( ).
xmldoc = ixml->create_document( ).
streamfactory = ixml->create_stream_factory( ).
ENDMETHOD. "CONSTRUCTOR
METHOD convertixmldoctostring.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA _ixml TYPE REF TO if_ixml.
DATA _encoding TYPE REF TO if_ixml_encoding.
DATA _streamfactory TYPE REF TO if_ixml_stream_factory.
DATA _outputstream TYPE REF TO if_ixml_ostream.
DATA _renderer TYPE REF TO if_ixml_renderer.
DATA _tempstring TYPE string.
DATA _tempstringx TYPE xstring.
DATA _printxmldoc TYPE REF TO cl_xml_document.
DATA _rc TYPE sysubrc.
_ixml = cl_ixml=>create( ).
_encoding = _ixml->create_encoding(
byte_order = if_ixml_encoding=>co_none
character_set = 'utf-8' ).
_streamfactory = _ixml->create_stream_factory( ).
_outputstream = _streamfactory->create_ostream_xstring( _tempstringx ).
_outputstream->set_encoding( encoding = _encoding ).
_renderer = _ixml->create_renderer(
document = ixmldocument
ostream = _outputstream
).
_renderer->set_normalizing( ).
_rc = _renderer->render( ).
CREATE OBJECT _printxmldoc.
_rc = _printxmldoc->parse_string( _tempstring ).
xmlstring = _tempstring.
ENDMETHOD. "CONVERTIXMLDOCTOSTRING
METHOD convertstringtoixmldoc.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA ixml TYPE REF TO if_ixml.
DATA streamfactory TYPE REF TO if_ixml_stream_factory.
DATA istream TYPE REF TO if_ixml_istream.
DATA ixmlparser TYPE REF TO if_ixml_parser.
DATA xmldoc TYPE REF TO if_ixml_document.
node = rootnode.
ENDMETHOD. "CREATENODEFROMOTR
METHOD createotrfromnode.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA txtnode TYPE REF TO if_ixml_element.
DATA filter TYPE REF TO if_ixml_node_filter.
DATA iterator TYPE REF TO if_ixml_node_iterator.
* ewH:issue 33--> in 6.40 and above, you cannot pass a default concept
* (otr) guid, so we will always create new
* CALL FUNCTION 'SOTR_GET_CONCEPT'
* EXPORTING
* concept = sotrHeader-concept
** IMPORTING
** HEADER =
** TABLES
** ENTRIES =
* EXCEPTIONS
* NO_ENTRY_FOUND = 1
* OTHERS = 2
* .
* IF sy-subrc <> 1.
** delete OTR if exists already
* CALL FUNCTION 'SOTR_DELETE_CONCEPT'
* EXPORTING
* concept = sotrHeader-concept
* EXCEPTIONS
* NO_AUTHORIZATION = 1
* NO_ENTRY_FOUND = 2. "who cares
** CONCEPT_USED = 3
** NO_MASTER_LANGUAGE = 4
** NO_SOURCE_SYSTEM = 5
** NO_TADIR_ENTRY = 6
** ERROR_IN_CORRECTION = 7
** USER_CANCELLED = 8
** OTHERS = 9
** .
* if sy-subrc = 1.
* raise exception type zcx_saplink
* exporting textid = zcx_saplink=>not_authorized.
* endif.
* ENDIF.
* create OTR
sotrpaket-paket = devclass.
CALL FUNCTION 'SOTR_CREATE_CONCEPT'
EXPORTING
paket = sotrpaket
crea_lan = sotrheader-crea_lan
alias_name = sotrheader-alias_name
* CATEGORY =
object = objecttype
entries = sotrtexttable
* FLAG_CORRECTION_ENTRY =
* IN_UPDATE_TASK =
* CONCEPT_DEFAULT = sotrHeader-concept "ewH:33
IMPORTING
concept = concept "ewH:33
EXCEPTIONS
package_missing = 1
crea_lan_missing = 2
object_missing = 3
paket_does_not_exist = 4
alias_already_exist = 5
object_type_not_found = 6
langu_missing = 7
identical_context_not_allowed = 8
text_too_long = 9
error_in_update = 10
no_master_langu = 11
error_in_concept_id = 12
alias_not_allowed = 13
tadir_entry_creation_failed = 14
internal_error = 15
error_in_correction = 16
user_cancelled = 17
no_entry_found = 18
OTHERS = 19.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMETHOD. "CREATEOTRFROMNODE
METHOD createstringfromobject.
ENDMETHOD. "CREATESTRINGFROMOBJECT
METHOD createxmlstring.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA streamfactory TYPE REF TO if_ixml_stream_factory.
DATA outputstream TYPE REF TO if_ixml_ostream.
DATA renderer TYPE REF TO if_ixml_renderer.
DATA tempstring TYPE string.
DATA printxmldoc TYPE REF TO cl_xml_document.
DATA rc TYPE sysubrc.
streamfactory = ixml->create_stream_factory( ).
outputstream = streamfactory->create_ostream_cstring( tempstring ).
renderer = ixml->create_renderer(
document = xmldoc ostream = outputstream ).
rc = renderer->render( ).
CREATE OBJECT printxmldoc.
rc = printxmldoc->parse_string( tempstring ).
xml = tempstring.
ENDMETHOD. "CREATEXMLSTRING
METHOD getobjectinfofromixmldoc.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA rootnode TYPE REF TO if_ixml_node.
DATA rootattr TYPE REF TO if_ixml_named_node_map.
DATA attrnode TYPE REF TO if_ixml_node.
DATA nodename TYPE string.
rootnode ?= ixmldocument->get_root_element( ).
* Check whether got a valid ixmldocument
IF rootnode IS NOT BOUND.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>incorrect_file_format.
ENDIF.
REFRESH objecttable.
tabletypeline-object = objtype.
APPEND tabletypeline TO tabletypesin.
CALL FUNCTION 'TRINT_OBJECT_TABLE'
TABLES
tt_types_in = tabletypesin
tt_types_out = tabletypesout.
CLEAR structure.
attributelist = node->get_attributes( ).
nodeiterator = attributelist->create_iterator( ).
attributenode = nodeiterator->get_next( ).
WHILE attributenode IS NOT INITIAL.
name = attributenode->get_name( ).
IF name = 'VERSION' AND preserveversion IS INITIAL. "ewh:issue 45
* if name = 'VERSION'.
value = '0'.
ELSE.
value = attributenode->get_value( ).
ENDIF.
ASSIGN COMPONENT name OF STRUCTURE structure TO <value>.
IF sy-subrc = 0.
<value> = value.
ENDIF.
attributenode = nodeiterator->get_next( ).
ENDWHILE.
* .-"-.
* .'=^=^='.
* /=^=^=^=^=\
*:^=SAPLINK=^;
*|^ EASTER ^|
*:^=^EGG^=^=^:
* \=^=^=^=^=/
* `.=^=^=.'
* `~~~`
* Don't like the way we did something?
* Help us fix it! Tell us what you think!
* http://saplink.org
ENDMETHOD. "GETSTRUCTUREFROMATTRIBUTES
METHOD get_version_info.
*--------------------------------------------------------------------*
* Please use the following 6 lines of code when versioning a
* SAPLINK-Plugin. See documentation of Type GTS_VERSION_INFO
* what should be put here
*--------------------------------------------------------------------*
rs_version_info-zsaplink_plugin_major_version = 0. " Default for all child
classes, that have not been updated to return a version info.
rs_version_info-zsaplink_plugin_minor_version = 0. " Default for all child
classes, that have not been updated to return a version info.
rs_version_info-zsaplink_plugin_build_version = 0. " Default for all child
classes, that have not been updated to return a version info.
TRY.
CREATE OBJECT lo_zsaplink TYPE (iv_classname)
EXPORTING
name = 'Not needed for versio info'.
rs_version_info = lo_zsaplink->get_version_info( ).
CATCH cx_root. " Don't pass version info for unknown or abstract classes
ENDTRY.
ENDMETHOD. "get_version_info_static
METHOD setattributesfromstructure.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA int TYPE i.
int = int.
DATA structdescr TYPE REF TO cl_abap_structdescr.
DATA acomponent TYPE abap_compdescr.
FIELD-SYMBOLS <fieldvalue> TYPE any.
DATA rc TYPE sysubrc.
DATA sname TYPE string.
DATA svalue TYPE string.
ENDMETHOD. "UPLOADXML
METHOD valuehelp.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA l_object_type TYPE euobj-id.
DATA objname(40) TYPE c.
l_object_type = i_objtype.
e_objname = objname.
ENDMETHOD. "VALUEHELP
ENDCLASS. "ZSAPLINK IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK_OO IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink_oo IMPLEMENTATION.
METHOD create_alias_method.
DATA: filter TYPE REF TO if_ixml_node_filter,
iterator TYPE REF TO if_ixml_node_iterator,
node TYPE REF TO if_ixml_element.
ENDMETHOD. "CREATE_ALIAS_METHOD
METHOD create_clsdeferrd.
DATA: filter TYPE REF TO if_ixml_node_filter,
iterator TYPE REF TO if_ixml_node_iterator,
node TYPE REF TO if_ixml_element.
DATA: ls_clsdeferrd LIKE LINE OF xt_clsdeferrds.
ENDMETHOD. "CREATE_CLSDEFERRD
METHOD create_intdeferrd.
DATA: filter TYPE REF TO if_ixml_node_filter,
iterator TYPE REF TO if_ixml_node_iterator,
node TYPE REF TO if_ixml_element.
ENDMETHOD. "CREATE_INTDEFERRD
METHOD create_otr.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA txtnode TYPE REF TO if_ixml_element.
DATA filter TYPE REF TO if_ixml_node_filter.
DATA iterator TYPE REF TO if_ixml_node_iterator.
* ewH:issue 33--> in 6.40 and above, you cannot pass a default concept
* (otr) guid, so we will always create new
* CALL FUNCTION 'SOTR_GET_CONCEPT'
* EXPORTING
* concept = sotrHeader-concept
** IMPORTING
** HEADER =
** TABLES
** ENTRIES =
* EXCEPTIONS
* NO_ENTRY_FOUND = 1
* OTHERS = 2
* .
* IF sy-subrc <> 1.
** delete OTR if exists already
* CALL FUNCTION 'SOTR_DELETE_CONCEPT'
* EXPORTING
* concept = sotrHeader-concept
* EXCEPTIONS
* NO_AUTHORIZATION = 1
* NO_ENTRY_FOUND = 2. "who cares
** CONCEPT_USED = 3
** NO_MASTER_LANGUAGE = 4
** NO_SOURCE_SYSTEM = 5
** NO_TADIR_ENTRY = 6
** ERROR_IN_CORRECTION = 7
** USER_CANCELLED = 8
** OTHERS = 9
** .
* if sy-subrc = 1.
* raise exception type zcx_saplink
* exporting textid = zcx_saplink=>not_authorized.
* endif.
* ENDIF.
* create OTR
sotrpaket-paket = devclass.
CALL FUNCTION 'SOTR_CREATE_CONCEPT'
EXPORTING
paket = sotrpaket
crea_lan = sotrheader-crea_lan
alias_name = sotrheader-alias_name
* CATEGORY =
object = objecttype
entries = sotrtexttable
* FLAG_CORRECTION_ENTRY =
* IN_UPDATE_TASK =
* CONCEPT_DEFAULT = sotrHeader-concept "ewH:33
IMPORTING
concept = concept "ewH:33
EXCEPTIONS
package_missing = 1
crea_lan_missing = 2
object_missing = 3
paket_does_not_exist = 4
alias_already_exist = 5
object_type_not_found = 6
langu_missing = 7
identical_context_not_allowed = 8
text_too_long = 9
error_in_update = 10
no_master_langu = 11
error_in_concept_id = 12
alias_not_allowed = 13
tadir_entry_creation_failed = 14
internal_error = 15
error_in_correction = 16
user_cancelled = 17
no_entry_found = 18
OTHERS = 19.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMETHOD. "CREATE_OTR
METHOD create_typepusage.
DATA: filter TYPE REF TO if_ixml_node_filter,
iterator TYPE REF TO if_ixml_node_iterator,
node TYPE REF TO if_ixml_element,
source TYPE string.
ENDMETHOD. "GET_ALIAS_METHOD
METHOD get_clsdeferrd.
DATA: lt_clsdeferrds TYPE seot_clsdeferrds_r,
lo_clsdeferrds TYPE REF TO if_ixml_element,
ls_clsdeferrd TYPE seot_typepusage_r.
ls_classkey-clsname = objname.
ls_classkey-clsname = objname.
ENDMETHOD. "GET_INTDEFERRD
METHOD get_otr.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA rootnode TYPE REF TO if_ixml_element.
DATA txtnode TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
node = rootnode.
ENDMETHOD. "GET_OTR
METHOD get_typepusage.
DATA: lt_typepusages TYPE seot_typepusages_r,
lo_typepusages TYPE REF TO if_ixml_element,
ls_typepusage TYPE seot_typepusage_r.
ls_classkey-clsname = objname.
ENDMETHOD. "GET_TYPEPUSAGE
ENDCLASS. "ZSAPLINK_OO IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK_CLASS IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink_class IMPLEMENTATION.
METHOD checkexists.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA classkey TYPE seoclskey.
DATA not_active TYPE seox_boolean.
classkey-clsname = objname.
IF sy-subrc <> 2.
exists = 'X'.
ENDIF.
ENDMETHOD. "CHECKEXISTS
METHOD createixmldocfromobject.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA localimplementation TYPE REF TO if_ixml_element.
DATA localtypes TYPE REF TO if_ixml_element.
DATA localmacros TYPE REF TO if_ixml_element.
DATA rootnode TYPE REF TO if_ixml_element.
DATA reportlist TYPE STANDARD TABLE OF string.
DATA includename TYPE program.
DATA _classname TYPE seoclsname.
DATA reportstring TYPE string.
DATA rc TYPE sysubrc.
DATA classdescr TYPE REF TO cl_abap_classdescr.
DATA typedescr TYPE REF TO cl_abap_typedescr.
DATA methoddescr TYPE abap_methdescr.
DATA methodnode TYPE REF TO if_ixml_element.
DATA parameternode TYPE REF TO if_ixml_element.
DATA sourcenode TYPE REF TO if_ixml_element.
DATA exceptionnode TYPE REF TO if_ixml_element.
DATA exceptionlist TYPE seos_exceptions_r.
DATA anexception TYPE vseoexcep.
DATA inheritancenode TYPE REF TO if_ixml_element.
DATA redefnode TYPE REF TO if_ixml_element.
_classname = objname.
classkey-clsname = objname.
* setObjectType( ).
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_found
object = objname.
WHEN 2.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'class deleted'.
WHEN 3.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'interfaces not supported'.
WHEN 4.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'class is modeled only'.
ENDCASE.
ENDIF.
TRY.
CALL METHOD cl_abap_classdescr=>describe_by_name
EXPORTING
p_name = objname
RECEIVING
p_descr_ref = typedescr
EXCEPTIONS
type_not_found = 1.
IF sy-subrc = 0.
classdescr ?= typedescr.
ELSE.
ENDIF.
CATCH cx_root.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDTRY.
IF sy-subrc = 0.
superclassname = superclass->get_relative_name( ).
IF NOT superclassname CS 'OBJECT'.
superclasskey-clsname = objname.
superclasskey-refclsname = superclassname.
CALL FUNCTION 'SEO_INHERITANC_GET'
EXPORTING
inhkey = superclasskey
IMPORTING
inheritance = inheritanceprops
redefinitions = redefines.
setattributesfromstructure( node = rootnode structure =
inheritanceprops ).
ENDIF.
ENDIF.
lt_implementings_copy = it_implementings.
LOOP AT it_implementings INTO wa_implementings.
CLEAR: ls_intfkey.
ls_intfkey-clsname = wa_implementings-refclsname.
CALL FUNCTION 'SEO_INTERFACE_TYPEINFO_GET'
EXPORTING
intkey = ls_intfkey
IMPORTING
comprisings = lt_comprisings.
LOOP AT lt_comprisings ASSIGNING <ls_comprisings>.
DELETE lt_implementings_copy WHERE refclsname = <ls_comprisings>-
refclsname.
ENDLOOP.
ENDLOOP.
includename =
cl_oo_classname_service=>get_local_testclasses_include( _classname ).
READ REPORT includename INTO reportlist.
" If sy-subrc = 0 the local test classes do exist
localtestclassesexist = sy-subrc.
IF localtestclassesexist = 0.
localtestclasses = xmldoc->create_element( 'localTestClasses' ).
reportstring = buildsourcestring( sourcetable = reportlist ).
rc = localtestclasses->if_ixml_node~set_value( reportstring ).
ENDIF.
*/***EVP - End of Added Logic for Local Test Classes ---------------*/
*| |
*\--------------------------------------------------------------------/
rc = rootnode->append_child( localimplementation ).
rc = rootnode->append_child( localtypes ).
rc = rootnode->append_child( localmacros ).
*/***EVP - Added Logic for Local Test Classes -------------------*/
IF localtestclassesexist = 0.
rc = rootnode->append_child( localtestclasses ).
ENDIF.
*/***EVP - End of Added Logic for Local Test Classes ------------*/
**// Rich: Start
get_textpool( CHANGING rootnode = rootnode ).
get_documentation( CHANGING rootnode = rootnode ).
**// Rich: End
get_typepusage( CHANGING xo_rootnode = rootnode ).
get_clsdeferrd( CHANGING xo_rootnode = rootnode ).
get_intdeferrd( CHANGING xo_rootnode = rootnode ).
*// ewH: begin of logic for interface methods & inheritance redesign-->
* inheritances & redefinitions: old source removed-recover w/subversion
CALL FUNCTION 'SEO_INHERITANC_READ'
EXPORTING
clskey = classkey
IMPORTING
inheritance = inheritance
redefinitions = redefinitions
EXCEPTIONS
class_not_existing = 1
OTHERS = 2.
IF methoddescr-is_redefined = 'X'.
methodnode = xmldoc->create_element( 'method' ).
MOVE-CORRESPONDING clsmethkey TO methodproperties.
*// ewh: begin of forward compatibility hack, can be removed for next
*// major release-->
READ TABLE redefinitions INTO redefinition
WITH KEY mtdname = methoddescr-name.
IF sy-subrc = 0.
methodproperties-clsname = redefinition-refclsname.
ENDIF.
*//<--ewH: end of forward compatibility hack
setattributesfromstructure( node = methodnode structure =
methodproperties ).
ELSE.
CALL FUNCTION 'SEO_METHOD_GET'
EXPORTING
mtdkey = clsmethkey
IMPORTING
method = methodproperties
EXCEPTIONS
not_existing = 1.
IF sy-subrc = 0.
methodnode = xmldoc->create_element( 'method' ).
setattributesfromstructure( node = methodnode structure =
methodproperties ).
* parameters
LOOP AT methoddescr-parameters INTO paramdescr.
CLEAR paramproperties.
parameternode = xmldoc->create_element( 'parameter' ).
paramkey-cmpname = clsmethkey-cmpname.
paramkey-sconame = paramdescr-name.
paramkey-clsname = objname.
CALL FUNCTION 'SEO_PARAMETER_GET'
EXPORTING
parkey = paramkey
version = '1'
IMPORTING
parameter = paramproperties.
setattributesfromstructure( node = parameternode
structure = paramproperties ).
rc = methodnode->append_child( parameternode ).
ENDLOOP.
* exceptions
CALL FUNCTION 'SEO_METHOD_SIGNATURE_GET'
EXPORTING
mtdkey = clsmethkey
version = '1'
IMPORTING
exceps = exceptionlist.
LOOP AT exceptionlist INTO anexception.
exceptionnode = xmldoc->create_element( 'exception' ).
setattributesfromstructure( node = exceptionnode
structure = anexception ).
rc = methodnode->append_child( exceptionnode ).
ENDLOOP.
ENDIF. "method found
ENDIF. "is_redefined?
* source
CALL METHOD cl_oo_classname_service=>get_method_include
EXPORTING
mtdkey = methodkey
RECEIVING
result = includename
EXCEPTIONS
method_not_existing = 1.
IF sy-subrc = 0.
READ REPORT includename INTO reportlist.
reportstring = buildsourcestring( sourcetable = reportlist ).
sourcenode = xmldoc->create_element( 'source' ).
rc = sourcenode->if_ixml_node~set_value( reportstring ).
rc = methodnode->append_child( sourcenode ).
ENDIF.
** StartInsert Rich - Handle method documenation
get_method_documentation( EXPORTING method_key = methodkey
CHANGING rootnode = methodnode ).
** EndInsert Rich - Handle method documenation
rc = rootnode->append_child( methodnode ).
ENDIF. "is_interface?
ENDLOOP.
* create alias info for load.
get_alias_method( EXPORTING it_methods = classdescr->methods
CHANGING xo_rootnode = rootnode ).
* append root node to xmldoc
rc = xmldoc->append_child( rootnode ).
ixmldocument = xmldoc.
*// <--ewH: end of logic for interface methods & inheritance redesign
ENDMETHOD. "createixmldocfromobject
METHOD createobjectfromixmldoc.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA rootnode TYPE REF TO if_ixml_element.
DATA classkey TYPE seoclskey.
DATA filter TYPE REF TO if_ixml_node_filter.
DATA iterator TYPE REF TO if_ixml_node_iterator.
DATA node TYPE REF TO if_ixml_element.
DATA otrnode TYPE REF TO if_ixml_element.
DATA filter2 TYPE REF TO if_ixml_node_filter.
DATA iterator2 TYPE REF TO if_ixml_node_iterator.
DATA superclass TYPE vseoextend-clsname.
DATA superclasskey TYPE vseoextend.
DATA methodsourcenode TYPE REF TO if_ixml_node.
DATA sourcenode TYPE REF TO if_ixml_node.
DATA source TYPE string.
DATA sourcetable TYPE TABLE OF string.
DATA methodkey TYPE seocpdkey.
DATA node2 TYPE REF TO if_ixml_element.
DATA _objtype TYPE string.
DATA aobjname TYPE e071-obj_name.
DATA inheritancenode TYPE REF TO if_ixml_element.
DATA redefnode TYPE REF TO if_ixml_element.
DATA includename TYPE program.
DATA mtdkey TYPE seocpdkey.
e_devclass = devclass.
_objtype = getobjecttype( ).
e_overwrite = overwrite.
xmldoc = ixmldocument.
rootnode = xmldoc->find_from_name( _objtype ).
node2 ?= iterator2->get_next( ).
ENDWHILE.
node ?= iterator->get_next( ).
ENDWHILE.
*//<--rrq: End of Added Logic for events
node ?= iterator->get_next( ).
CONTINUE.
ENDIF.
*// <--ewH: break in backward compatibility hack - 2Bcontinued below
node2 ?= iterator2->get_next( ).
ENDWHILE.
filter2 = node->create_filter_name( 'exception' ).
iterator2 = node->create_iterator_filtered( filter2 ).
node2 ?= iterator2->get_next( ).
WHILE node2 IS NOT INITIAL.
CALL METHOD getstructurefromattributes
EXPORTING
node = node2
CHANGING
structure = wa_exceps.
APPEND wa_exceps TO ch_exceps.
node2 ?= iterator2->get_next( ).
ENDWHILE.
APPEND wa_methods TO ch_methods.
node ?= iterator->get_next( ).
ENDWHILE.
*// <--ewH: end redesign method/inheritances
*// ewh: continuation of backward compatibility hack-->
* IF ( ch_redefinitions IS NOT INITIAL OR superclass-clsname
* IS NOT INITIAL ) and ch_inheritance is initial.
* CALL FUNCTION 'SEO_INHERITANC_CREATE_F_DATA'
* EXPORTING
* save = ' '
* CHANGING
* inheritance = superclasskey
* redefinitions = ch_redefinitions.
* ENDIF.
*// <--ewH: end of backward compatibility hack
node ?= iterator->get_next( ).
ENDWHILE.
*// <--ewH: end create interface methods
* local implementation
DATA _classname TYPE seoclsname.
_classname = objname.
sourcenode = xmldoc->find_from_name( 'localImplementation' ).
IF sourcenode IS NOT INITIAL.
source = sourcenode->get_value( ).
e_locals_imp = buildtablefromstring( source ).
ENDIF.
* local types
sourcenode = xmldoc->find_from_name( 'localTypes' ).
IF sourcenode IS NOT INITIAL.
source = sourcenode->get_value( ).
e_locals_def = buildtablefromstring( source ).
ENDIF.
* local macros
sourcenode = xmldoc->find_from_name( 'localMacros' ).
IF sourcenode IS NOT INITIAL.
source = sourcenode->get_value( ).
e_locals_mac = buildtablefromstring( source ).
ENDIF.
* We don't need the sections for now. Code moved by Rene
create_sections( ).
name = objname.
*ewH:insert pub, prot, and priv sections manually to keep any direct
* attribute/type definitions
aobjname = classkey-clsname.
**public
sourcenode = xmldoc->find_from_name( 'publicSection' ).
IF sourcenode IS NOT INITIAL.
includename = cl_oo_classname_service=>get_pubsec_name( _classname ).
source = sourcenode->get_value( ).
sourcetable = buildtablefromstring( source ).
INSERT REPORT includename FROM sourcetable EXTENSION TYPE
srext_ext_class_public STATE 'I'.
ENDIF.
**protected
sourcenode = xmldoc->find_from_name( 'protectedSection' ).
IF sourcenode IS NOT INITIAL.
includename = cl_oo_classname_service=>get_prosec_name( _classname ).
source = sourcenode->get_value( ).
sourcetable = buildtablefromstring( source ).
INSERT REPORT includename FROM sourcetable EXTENSION TYPE
srext_ext_class_protected STATE 'I'.
ENDIF.
**private
sourcenode = xmldoc->find_from_name( 'privateSection' ).
IF sourcenode IS NOT INITIAL.
includename = cl_oo_classname_service=>get_prisec_name( _classname ).
source = sourcenode->get_value( ).
sourcetable = buildtablefromstring( source ).
INSERT REPORT includename FROM sourcetable EXTENSION TYPE
srext_ext_class_private STATE 'I'.
ENDIF.
*/***EVP - Added Logic for Local Test Classes -------------------*/
**local test classes
sourcenode = xmldoc->find_from_name( 'localTestClasses' ).
IF sourcenode IS NOT INITIAL.
DATA clskey TYPE seoclskey.
source = sourcenode->get_value( ).
sourcetable = buildtablefromstring( source ).
clskey-clsname = _classname.
CALL FUNCTION 'SEO_CLASS_GENERATE_LOCALS'
EXPORTING
clskey = clskey
force = overwrite
locals_testclasses = sourcetable
EXCEPTIONS
not_existing = 1
model_only = 2
locals_not_generated = 3
locals_not_initialised = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
*/***EVP - End Of Added Logic for Local Test Classes -------------------*/
create_documentation( ).
**// Rich: End
ENDMETHOD. "CREATEOBJECTFROMIXMLDOC
METHOD create_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA txtline_node TYPE REF TO if_ixml_element.
DATA txtline_filter TYPE REF TO if_ixml_node_filter.
DATA txtline_iterator TYPE REF TO if_ixml_node_iterator.
REFRESH lt_lines.
language = lang_node->get_attribute( name = c_xml_key_spras ).
obj_langu = language.
lang_node ?= lang_iterator->get_next( ).
ENDWHILE.
ENDMETHOD. "CREATE_DOCUMENTATION
METHOD create_method_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA txtline_node TYPE REF TO if_ixml_element.
DATA txtline_filter TYPE REF TO if_ixml_node_filter.
DATA txtline_iterator TYPE REF TO if_ixml_node_iterator.
DATA: methdocnode TYPE REF TO if_ixml_element.
* If no class method name, then there was no class method documenation, just
return.
IF classmeth_name IS INITIAL.
RETURN.
ENDIF.
REFRESH lt_lines.
language = lang_node->get_attribute( name = 'SPRAS' ).
obj_langu = language.
lang_node ?= lang_iterator->get_next( ).
ENDWHILE.
ENDMETHOD. "CREATE_METHOD_DOCUMENTATION
METHOD create_sections.
*ewH-not sure how this type_source param works. type sources can come
* from private or protected sections, but there is no way to pass
* these separately into the class create FM. After debugging into
* FM->clif_save_all->generate_classpool it treats the source table
* as one, so I am not sure how to get it to differentiate between
* private and protected sections. If only one section has types
* defined, the FM call works, otherwise all hell breaks loose. To
* solve the problem for now, we will just do an insert report for
* the sections after the class creation, since that's all the FM
* does in the end anyway. Wow, this is a really long comment, but
* I dont want to have to try to remember what the hell was going
* on here later...sorry. :)
*insert code for publicSection
* sourcenode = xmldoc->find_from_name( 'publicSection' )
* IF sourcenode IS NOT INITIAL.
* source = sourcenode->get_value( ).
* ch_type_source = buildtablefromstring( source ).
* ENDIF.
**insert code for pivateSection
* sourcenode = xmldoc->find_from_name( 'privateSection' ).
* IF sourcenode IS NOT INITIAL.
* source = sourcenode->get_value( ).
* ch_type_source_temp = buildtablefromstring( source ).
* append lines of ch_type_source_temp to ch_type_source.
* ENDIF.
**insert code for ProtectedSection
* sourcenode = xmldoc->find_from_name( 'protectedSection' ).
* IF sourcenode IS NOT INITIAL.
* source = sourcenode->get_value( ).
* ch_type_source_temp = buildtablefromstring( source ).
* append lines of ch_type_source_temp to ch_type_source.
* ENDIF.
ENDMETHOD. "CREATE_SECTIONS
METHOD create_textpool.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA textpooltable TYPE STANDARD TABLE OF textpool.
DATA textpoolrow TYPE textpool.
DATA langiterator TYPE REF TO if_ixml_node_iterator.
DATA filter TYPE REF TO if_ixml_node_filter.
DATA textfilter TYPE REF TO if_ixml_node_filter.
DATA textiterator TYPE REF TO if_ixml_node_iterator.
DATA textpoolnode TYPE REF TO if_ixml_element.
DATA langnode TYPE REF TO if_ixml_element.
DATA atextnode TYPE REF TO if_ixml_element.
DATA _objname TYPE trobj_name.
DATA obj_name TYPE seoclsname.
DATA lang TYPE spras.
DATA langnodeexists TYPE flag.
* data logonLanguageExists type flag. " del #255 - seemingly not
used
DATA _state(1) TYPE c.
DATA classpoolname TYPE program.
DATA lv_original_language TYPE sylangu. " ins #255
*--------------------------------------------------------------------*
* Ticket #255 - Error importing texts when logon language different
* then original language of class
*--------------------------------------------------------------------*
textpoolnode = xmldoc->find_from_name( 'CLAS' ). " ins #255
lv_original_language = textpoolnode->get_attribute( 'LANGU' )." ins #255
SET LANGUAGE lv_original_language. " ins #255
" Gregor Wolf: With this all languages from the Nugget/Slinkee are imported
obj_name = objname.
classpoolname = cl_oo_classname_service=>get_classpool_name( obj_name ).
_objname = classpoolname.
clskey-clsname = objname.
CALL FUNCTION 'SEO_CLASS_DELETE_W_DEPS'
EXPORTING
clskey = clskey
EXCEPTIONS
not_existing = 1
is_interface = 2
not_deleted = 3
db_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 1.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_found.
WHEN 2.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'interfaces not supported'.
WHEN 3.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'class not deleted'.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDCASE.
ENDIF.
ENDMETHOD. "DELETEOBJECT
METHOD findimplementingclass.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA methodkey TYPE seocmpkey.
DATA methodproperties TYPE vseomethod.
DATA classdescr TYPE REF TO cl_abap_classdescr.
DATA superclass TYPE REF TO cl_abap_typedescr.
DATA superclassname TYPE string.
IF startclass IS INITIAL.
methodkey-clsname = objname.
ELSE.
methodkey-clsname = startclass.
ENDIF.
methodkey-cmpname = methodname.
ENDMETHOD. "GETOBJECTTYPE
METHOD get_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA languagenode TYPE REF TO if_ixml_element.
DATA docnode TYPE REF TO if_ixml_element.
DATA txtlines_node TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
DATA _objtype TYPE string.
_objname = objname.
rc = rootnode->append_child( docnode ).
ENDMETHOD. "GET_DOCUMENTATION
METHOD get_method_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA languagenode TYPE REF TO if_ixml_element.
DATA docnode TYPE REF TO if_ixml_element.
DATA txtlines_node TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
DATA _objtype TYPE string.
_objname = method_key.
rc = rootnode->append_child( docnode ).
ENDMETHOD. "GET_METHOD_DOCUMENTATION
METHOD get_sections.
DATA publicsection TYPE REF TO if_ixml_element.
DATA protectedsection TYPE REF TO if_ixml_element.
DATA privatesection TYPE REF TO if_ixml_element.
DATA includename TYPE program.
DATA reportstring TYPE string.
**/--------------------------------------------------------------------\
**| |
* includename = cl_oo_classname_service=>get_pubsec_name( _classname ).
* READ REPORT includename INTO reportlist.
* publicsection = xmldoc->create_element( 'publicSection' ).
*
* reportstring = buildsourcestring( sourcetable = reportlist ).
* rc = publicsection->if_ixml_node~set_value( reportstring ).
* CLEAR reportstring.
**|--------------------------------------------------------------------|
* includename = cl_oo_classname_service=>get_prosec_name( _classname ).
* READ REPORT includename INTO reportlist.
* protectedsection = xmldoc->create_element( 'protectedSection' ).
* reportstring = buildsourcestring( sourcetable = reportlist ).
* rc = protectedsection->if_ixml_node~set_value( reportstring ).
* CLEAR reportstring.
**|--------------------------------------------------------------------|
* includename = cl_oo_classname_service=>get_prisec_name( _classname ).
* READ REPORT includename INTO reportlist.
* privatesection = xmldoc->create_element( 'privateSection' ).
* reportstring = buildsourcestring( sourcetable = reportlist ).
* rc = privatesection->if_ixml_node~set_value( reportstring ).
* rc = rootnode->append_child( publicsection ).
* rc = rootnode->append_child( protectedsection ).
* rc = rootnode->append_child( privatesection ).
ENDMETHOD. "GET_SECTIONS
METHOD get_textpool.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA atext TYPE REF TO if_ixml_element.
DATA textpooltable TYPE STANDARD TABLE OF textpool.
DATA textpoolrow TYPE textpool.
DATA languagelist TYPE instlang.
DATA alanguage TYPE spras.
DATA _objname TYPE seoclsname.
DATA rc TYPE i.
DATA stemp TYPE string.
DATA languagenode TYPE REF TO if_ixml_element.
DATA textnode TYPE REF TO if_ixml_element.
DATA classpoolname TYPE program.
DATA firstloop TYPE flag.
_objname = objname.
firstloop = abap_true.
rc = rootnode->append_child( textnode ).
ENDMETHOD. "GET_TEXTPOOL
METHOD get_version_info.
ENDMETHOD. "get_version_info
ENDCLASS. "ZSAPLINK_CLASS IMPLEMENTATION
*----------------------------------------------------------------------*
* CLASS ZSAPLINK_PROGRAM IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS zsaplink_program IMPLEMENTATION.
METHOD checkexists.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
SELECT SINGLE name FROM trdir INTO objname WHERE name = objname.
IF sy-subrc = 0.
exists = 'X'.
ENDIF.
ENDMETHOD. "CHECKEXISTS
METHOD createixmldocfromobject.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA rootnode TYPE REF TO if_ixml_element.
DATA sourcenode TYPE REF TO if_ixml_element.
DATA textpoolnode TYPE REF TO if_ixml_element.
DATA docnode TYPE REF TO if_ixml_element.
DATA dynpronode TYPE REF TO if_ixml_element.
DATA statusnode TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
DATA progattribs TYPE trdir.
DATA progsource TYPE rswsourcet.
DATA sourcestring TYPE string.
DATA _objtype TYPE string.
_objtype = getobjecttype( ).
rootnode = xmldoc->create_element( _objtype ).
sourcenode = xmldoc->create_element( 'source' ).
SELECT SINGLE * FROM trdir INTO progattribs WHERE name = objname.
IF sy-subrc = 0.
setattributesfromstructure( node = rootnode structure = progattribs ).
progsource = me->get_source( ).
sourcestring = buildsourcestring( sourcetable = progsource ).
rc = sourcenode->if_ixml_node~set_value( sourcestring ).
textpoolnode = get_textpool( ).
rc = rootnode->append_child( textpoolnode ).
docnode = get_documentation( ).
rc = rootnode->append_child( docnode ).
dynpronode = get_dynpro( ).
rc = rootnode->append_child( dynpronode ).
statusnode = get_pfstatus( ).
rc = rootnode->append_child( statusnode ).
rc = rootnode->append_child( sourcenode ).
rc = xmldoc->append_child( rootnode ).
ixmldocument = xmldoc.
ELSE.
CLEAR ixmldocument.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_found
object = objname.
ENDIF.
ENDMETHOD. "CREATEIXMLDOCFROMOBJECT
METHOD createobjectfromixmldoc.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA rootnode TYPE REF TO if_ixml_element.
DATA progattribs TYPE trdir.
DATA sourcenode TYPE REF TO if_ixml_element.
DATA textnode TYPE REF TO if_ixml_element.
DATA docnode TYPE REF TO if_ixml_element.
DATA dynpnode TYPE REF TO if_ixml_element.
DATA statnode TYPE REF TO if_ixml_element.
DATA source TYPE string.
DATA sourcetable TYPE table_of_strings.
DATA _objname(30) TYPE c.
DATA aobjname TYPE trobj_name.
DATA _objtype TYPE string.
DATA checkexists TYPE flag.
_objtype = getobjecttype( ).
xmldoc = ixmldocument.
rootnode = xmldoc->find_from_name( _objtype ).
CALL METHOD getstructurefromattributes
EXPORTING
node = rootnode
CHANGING
structure = progattribs.
objname = progattribs-name.
checkexists = checkexists( ).
IF checkexists IS NOT INITIAL.
IF overwrite IS INITIAL.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>existing.
ELSE.
* delete object for new install
deleteobject( ).
ENDIF.
ENDIF.
enqueue_abap( ).
transport_copy( author = progattribs-cnam devclass = devclass ).
sourcenode = rootnode->find_from_name( 'source' ).
source = sourcenode->get_value( ).
sourcetable = buildtablefromstring( source ).
create_source( source = sourcetable attribs = progattribs ).
textnode = rootnode->find_from_name( 'textPool' ).
create_textpool( textnode ).
docnode = rootnode->find_from_name( 'programDocumentation' ).
create_documentation( docnode ).
dynpnode = rootnode->find_from_name( 'dynpros' ).
create_dynpro( dynpnode ).
statnode = rootnode->find_from_name( 'pfstatus' ).
create_pfstatus( statnode ).
dequeue_abap( ).
update_wb_tree( ).
*endif.
* successful install
name = objname.
ENDMETHOD. "CREATEOBJECTFROMIXMLDOC
METHOD createstringfromobject.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA progsource TYPE rswsourcet.
progsource = me->get_source( ).
string = buildsourcestring( sourcetable = progsource ).
ENDMETHOD. "CREATESTRINGFROMOBJECT
METHOD create_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA txtline_node TYPE REF TO if_ixml_element.
DATA txtline_filter TYPE REF TO if_ixml_node_filter.
DATA txtline_iterator TYPE REF TO if_ixml_node_iterator.
DATA lang_node TYPE REF TO if_ixml_element.
DATA lang_filter TYPE REF TO if_ixml_node_filter.
DATA lang_iterator TYPE REF TO if_ixml_node_iterator.
REFRESH lt_lines.
language = lang_node->get_attribute( name = 'SPRAS' ).
obj_langu = language.
lang_node ?= lang_iterator->get_next( ).
ENDWHILE.
ENDMETHOD. "CREATE_DOCUMENTATION
METHOD create_dynpro.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
TYPES: BEGIN OF tdyn_head_temp.
INCLUDE TYPE d020s.
TYPES: dtext TYPE d020t-dtxt.
TYPES: END OF tdyn_head_temp.
_objname = objname.
dynpros_node = dynp_node.
CHECK dynpros_node IS NOT INITIAL.
xdyn_head = xdyn_head_temp.
xdyn_text = xdyn_head_temp-dtext.
dynpro_node ?= dynpro_iterator->get_next( ).
ENDWHILE.
ENDMETHOD. "CREATE_DYNPRO
METHOD create_pfstatus.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA: ista TYPE TABLE OF rsmpe_stat,
ifun TYPE TABLE OF rsmpe_funt,
imen TYPE TABLE OF rsmpe_men,
imtx TYPE TABLE OF rsmpe_mnlt,
iact TYPE TABLE OF rsmpe_act,
ibut TYPE TABLE OF rsmpe_but,
ipfk TYPE TABLE OF rsmpe_pfk,
iset TYPE TABLE OF rsmpe_staf,
idoc TYPE TABLE OF rsmpe_atrt,
itit TYPE TABLE OF rsmpe_titt,
ibiv TYPE TABLE OF rsmpe_buts.
_objname = objname.
stat_node = pfstat_node.
CHECK stat_node IS NOT INITIAL.
xtrkey-obj_type = 'PROG'.
xtrkey-obj_name = _program.
xtrkey-sub_type = 'CUAD'.
xtrkey-sub_name = _program.
IF sy-subrc <> 0.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDIF.
ENDMETHOD. "CREATE_PFSTATUS
METHOD create_source.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
ENDMETHOD. "CREATE_SOURCE
METHOD create_textpool.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA textpooltable TYPE STANDARD TABLE OF textpool.
DATA textpoolrow TYPE textpool.
DATA langiterator TYPE REF TO if_ixml_node_iterator.
DATA filter TYPE REF TO if_ixml_node_filter.
DATA textfilter TYPE REF TO if_ixml_node_filter.
DATA textiterator TYPE REF TO if_ixml_node_iterator.
DATA langnode TYPE REF TO if_ixml_element.
DATA atextnode TYPE REF TO if_ixml_element.
DATA _objname TYPE trobj_name.
DATA lang TYPE spras.
DATA langnodeexists TYPE flag.
DATA logonlanguageexists TYPE flag.
DATA _state(1) TYPE c.
_objname = objname.
CHECK textpoolnode IS NOT INITIAL.
REFRESH textpooltable.
textiterator = langnode->create_iterator( ).
atextnode ?= textiterator->get_next( ).
*For some reason the 1st one is blank... not sure why.
atextnode ?= textiterator->get_next( ).
WHILE atextnode IS NOT INITIAL.
CALL METHOD getstructurefromattributes
EXPORTING
node = atextnode
CHANGING
structure = textpoolrow.
APPEND textpoolrow TO textpooltable.
atextnode ?= textiterator->get_next( ).
ENDWHILE.
IF textpooltable IS NOT INITIAL.
lang = langnode->get_attribute( 'SPRAS' ).
IF lang = sy-langu.
logonlanguageexists = 'X'.
_state = 'I'.
ELSE.
* seems that if a textpool is inserted as inactive for language
* other than the logon language, it is lost upon activation
* not sure inserting as active is best solution,but seems to work
_state = 'A'.
ENDIF.
INSERT TEXTPOOL _objname
FROM textpooltable
LANGUAGE lang
STATE _state.
ENDIF.
langnode ?= langiterator->get_next( ).
ENDWHILE.
ENDMETHOD. "CREATE_TEXTPOOL
METHOD deleteobject.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA program TYPE sy-repid.
program = objname.
ENDMETHOD. "DELETEOBJECT
METHOD dequeue_abap.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
CALL FUNCTION 'RS_ACCESS_PERMISSION'
EXPORTING
global_lock = 'X'
mode = 'FREE'
object = objname
object_class = 'ABAP'
EXCEPTIONS
canceled_in_corr = 1
enqueued_by_user = 3
enqueue_system_failure = 4
locked_by_author = 5
illegal_parameter_values = 6
no_modify_permission = 7
no_show_permission = 8
permission_failure = 9.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 7 OR 8 OR 9.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_authorized.
WHEN 5.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'object locked'.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDCASE.
ENDIF.
ENDMETHOD. "DEQUEUE_ABAP
METHOD enqueue_abap.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
CALL FUNCTION 'RS_ACCESS_PERMISSION'
EXPORTING
* authority_check = authority_check
global_lock = 'X'
mode = 'INSERT'
* master_language = trdir-rload
object = objname
object_class = 'ABAP'
* importing
* transport_key = trkey_global
* new_master_language = trdir-rload
* devclass = devclass_local
EXCEPTIONS
canceled_in_corr = 1
enqueued_by_user = 3
enqueue_system_failure = 4
locked_by_author = 5
illegal_parameter_values = 6
no_modify_permission = 7
no_show_permission = 8
permission_failure = 9.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 7 OR 8 OR 9.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_authorized.
WHEN 5.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>error_message
msg = 'object locked'.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDCASE.
ENDIF.
ENDMETHOD. "ENQUEUE_ABAP
METHOD getobjecttype.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
objecttype = 'PROG'. "ABAP Program
ENDMETHOD. "GETOBJECTTYPE
METHOD get_documentation.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA languagenode TYPE REF TO if_ixml_element.
DATA txtlines_node TYPE REF TO if_ixml_element.
DATA rc TYPE sysubrc.
DATA _objtype TYPE string.
_objname = objname.
ENDMETHOD. "GET_DOCUMENTATION
METHOD get_dynpro.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
TYPES: BEGIN OF tdynp,
prog TYPE d020s-prog,
dnum TYPE d020s-dnum,
END OF tdynp.
_objname = objname.
CHECK sy-subrc = 0.
ENDLOOP.
ENDMETHOD. "GET_DYNPRO
METHOD get_pfstatus.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA: ista TYPE TABLE OF rsmpe_stat,
ifun TYPE TABLE OF rsmpe_funt,
imen TYPE TABLE OF rsmpe_men,
imtx TYPE TABLE OF rsmpe_mnlt,
iact TYPE TABLE OF rsmpe_act,
ibut TYPE TABLE OF rsmpe_but,
ipfk TYPE TABLE OF rsmpe_pfk,
iset TYPE TABLE OF rsmpe_staf,
idoc TYPE TABLE OF rsmpe_atrt,
itit TYPE TABLE OF rsmpe_titt,
ibiv TYPE TABLE OF rsmpe_buts.
_objname = objname.
_program = objname.
CHECK sy-subrc = 0.
ENDIF.
ENDIF.
ENDMETHOD. "GET_PFSTATUS
METHOD get_source.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
_objname = me->objname.
READ REPORT _objname INTO progsource.
ENDMETHOD. "GET_SOURCE
METHOD get_textpool.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
DATA atext TYPE REF TO if_ixml_element.
DATA textpooltable TYPE STANDARD TABLE OF textpool.
DATA textpoolrow TYPE textpool.
DATA languagelist TYPE instlang.
DATA alanguage TYPE spras.
DATA _objname(30) TYPE c.
DATA rc TYPE i.
DATA stemp TYPE string.
DATA languagenode TYPE REF TO if_ixml_element.
DATA firstloop TYPE flag.
_objname = objname.
firstloop = abap_true.
ENDMETHOD. "GET_TEXTPOOL
METHOD transport_copy.
*/---------------------------------------------------------------------\
*| This file is part of SAPlink. |
*| |
*| Copyright 2014 SAPlink project members |
*| |
*| Licensed under the Apache License, Version 2.0 (the "License"); |
*| you may not use this file except in compliance with the License. |
*| You may obtain a copy of the License at |
*| |
*| http://www.apache.org/licenses/LICENSE-2.0 |
*| |
*| Unless required by applicable law or agreed to in writing, software |
*| distributed under the License is distributed on an "AS IS" BASIS, |
*| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
*| implied. |
*| See the License for the specific language governing permissions and |
*| limitations under the License. |
*\---------------------------------------------------------------------/
CALL FUNCTION 'RS_CORR_INSERT'
EXPORTING
author = author
global_lock = 'X'
object = objname
object_class = 'ABAP'
devclass = devclass
* KORRNUM = CORRNUMBER_LOCAL
master_language = sy-langu
* PROGRAM = PROGRAM_LOCAL
mode = 'INSERT'
* IMPORTING
* AUTHOR = UNAME
* KORRNUM = CORRNUMBER_LOCAL
* DEVCLASS = DEVCLASS_LOCAL
EXCEPTIONS
cancelled = 1
permission_failure = 2
unknown_objectclass = 3.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN 2.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>not_authorized.
WHEN OTHERS.
RAISE EXCEPTION TYPE zcx_saplink
EXPORTING
textid = zcx_saplink=>system_error.
ENDCASE.
ENDIF.
ENDMETHOD. "TRANSPORT_COPY
METHOD update_wb_tree.
pname-program = me->objname.
ENDMETHOD. "UPDATE_WB_TREE
ENDCLASS. "ZSAPLINK_PROGRAM IMPLEMENTATION
START-OF-SELECTION.
CLEAR tempxmlstring.
PERFORM uploadxmlfromlm USING nuggfil tempxmlstring.
PERFORM convertstringtoixmldoc USING tempxmlstring CHANGING ixmlnugget.
PERFORM installnugget USING ixmlnugget overwrt.
*/--------------------------------------------------------------------\
*| Selection screen events |
INITIALIZATION.
filecom = 'Installation Nugget'.
checkcom = 'Overwrite Originals'.
*\--------------------------------------------------------------------/
*/--------------------------------------------------------------------\
*| Forms from the SAPLink Installer |
*| |
FORM uploadxmlfromlm USING p_filename xmlstring TYPE string .
DATA retfiletable TYPE filetable.
DATA retrc TYPE sysubrc.
DATA retuseraction TYPE i.
DATA temptable TYPE table_of_strings.
DATA temptable_bin TYPE TABLE OF x255.
DATA filelength TYPE i.
DATA l_filename TYPE string.
l_filename = p_filename.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN' " File Type Binary
IMPORTING
filelength = filelength
CHANGING
data_tab = temptable_bin
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
CASE sy-subrc.
WHEN '1'.
PERFORM writemessage USING 'E' 'File Open Error'.
WHEN OTHERS.
PERFORM writemessage USING 'E' 'Unknown Error occured'.
ENDCASE.
ENDIF.
CALL FUNCTION 'SCMS_BINARY_TO_STRING'
EXPORTING
input_length = filelength
IMPORTING
text_buffer = xmlstring
TABLES
binary_tab = temptable_bin.
IF sy-subrc <> 0.
" Just catch the sy-subrc when there was nothing replaced
sy-subrc = 0.
ENDIF.
* call method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
* exporting
* FILENAME = l_fileName
* changing
* data_tab = tempTable.
* PERFORM createstring USING temptable CHANGING xmlstring.
ENDFORM. "uploadXMLFromLM
*\--------------------------------------------------------------------/
FORM createstring
USING
temptable TYPE table_of_strings
CHANGING
bigstring TYPE string.
ENDFORM. "createString
*/----------------------------------------------------------------------
*/--------------------------------------------------------------------\
*| Forms from the SAPLink Root Class |
FORM convertstringtoixmldoc
USING
i_xmlstring TYPE string
CHANGING
ixmldocument TYPE REF TO if_ixml_document.
xmlstring = i_xmlstring.
" Make sure to convert Windows Line Break to Unix as
" this linebreak is used to get a correct import
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf
IN xmlstring WITH cl_abap_char_utilities=>newline.
ixml = cl_ixml=>create( ).
xmldoc = ixml->create_document( ).
streamfactory = ixml->create_stream_factory( ).
istream = streamfactory->create_istream_string( xmlstring ).
ixmlparser = ixml->create_parser( stream_factory = streamfactory
istream = istream
document = xmldoc ).
ixmlparser->parse( ).
ixmldocument = xmldoc.
ENDFORM. "CONVERTSTRINGTOIXMLDOC
*| |
*| |
FORM getobjectinfofromixmldoc
USING ixmldocument TYPE REF TO if_ixml_document
CHANGING objtypename TYPE string objname TYPE string.
DATA rootnode TYPE REF TO if_ixml_node.
DATA rootattr TYPE REF TO if_ixml_named_node_map.
DATA attrnode TYPE REF TO if_ixml_node.
DATA nodename TYPE string.
rootnode ?= ixmldocument->get_root_element( ).
ENDFORM. "GETOBJECTInfoFROMIXMLDOC
*/--------------------------------------------------------------------\
*| Nugget Class |
FORM installnugget
USING xmldoc TYPE REF TO if_ixml_document overwrite TYPE c.
TYPES: BEGIN OF t_objecttable,
classname TYPE string,
object TYPE ko100-object,
text TYPE ko100-text,
END OF t_objecttable.
ixml = cl_ixml=>create( ).
namefilter = xmldoc->create_filter_name( name = 'nugget' ).
parentfilter = xmldoc->create_filter_parent( namefilter ).
iterator = xmldoc->create_iterator_filtered( parentfilter ).
currentnode ?= iterator->get_next( ).
WHILE currentnode IS NOT INITIAL.
CLEAR exists.
ixmldocument = ixml->create_document( ).
newnode = currentnode->clone( ).
rval = ixmldocument->append_child( newnode ).
objectexists = l_targetobject->checkexists( ).
ELSE.
TRY.
l_installobject = l_targetobject->createobjectfromixmldoc(
ixmldocument = ixmldocument
overwrite = overwrt ).
*/----------------------confirmOverwrite------------------------------\
FORM confirmoverwrite USING l_objinfo TYPE string
CHANGING l_answer TYPE flag.
CLEAR l_answer.
l_title = 'Overwrite confirm. Proceed with CAUTION!'.
WRITE p_msg.
ENDFORM. "WriteMessage