Note 1234562
Note 1234562
Note 1234562
REPORT ZNOTE_2173829.
TYPE-POOLS: seox, seoc, seok, seex, bcwbn, ststc, trmtd, trexe, scua, trlog.
TYPES: BEGIN OF
dd43v,typename(30),seckeyname(30),ddlanguage,seckeyunique,accessmode,kind,keydescri
ption(80),END OF dd43v,
BEGIN OF dd12fulltextinfo, full_text(1), langu_column(30),
mime_type_col(30),
mime_type(127),langu_detection(200),fast_preprocess,fuzzy_search_indx,search_only,
update_mode(10),configuration,phrase_indx_ratio TYPE
numc3,text_analysis(1),token_separators(50),END OF dd12fulltextinfo.
INITIALIZATION.
IF sy-repid NE myrepid.
SELECT SINGLE devclass FROM tadir INTO mydevclass WHERE pgmid EQ 'R3TR' AND
object EQ 'PROG' AND obj_name EQ sy-repid.
ENDIF.
TRANSLATE c_ddic_ref USING '_ '.
AT SELECTION-SCREEN OUTPUT.
IF sy-dynnr EQ selection_screen_1900.
CONCATENATE sy-repid '-' 'Note Implementation' INTO sy-lisel SEPARATED BY
space. "#EC * "1900
SET TITLEBAR 'POP' OF PROGRAM 'SAPLKKBL' WITH sy-lisel.
"1900
PERFORM show_instruction.
ENDIF.
FORM show_instruction.
DATA: l_ratio TYPE i.
l_ratio = 100 - ( 30 * 100 / sy-scols ).
IF g_docking IS INITIAL.
CREATE OBJECT g_docking
EXPORTING
repid = sy-repid
dynnr = sy-dynnr
side = cl_gui_docking_container=>dock_at_right
ratio = l_ratio
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
CREATE OBJECT g_html_viewer TYPE ('CL_GUI_HTML_VIEWER')
EXPORTING
parent = g_docking
EXCEPTIONS
cntl_error = 1
cntl_install_error = 2
dp_install_error = 3
dp_error = 4.
IF sy-subrc NE 0.
* Fehlerbehandlung
ENDIF.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2.
IF sy-subrc NE 0.
* Fehlerbehandlung
ENDIF.
ENDIF.
DATA: lt_html TYPE STANDARD TABLE OF abaptxt255, l_url(255).
APPEND '<html><body>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<br><br>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<h3>Instructions:</h3>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<ul>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<li>Execute the given steps one after the other.</li>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<li>If an error occurs repeat the same step again until the error is
solved.</li>' TO lt_html. "#EC NOTEXT "1900
APPEND '<li>It does not harm if a step is executed several times.</li>'
TO lt_html. "#EC NOTEXT "1900
APPEND '<li>Nearlly all popups can be closed by pressing ENTER.</li>'
TO lt_html. "#EC NOTEXT "1900
APPEND '</ul>'
TO lt_html. "#EC NOTEXT "1900
PERFORM dummy IN PROGRAM saplstrd IF FOUND. "load function group STRD
FIELD-SYMBOLS: <gt_confirmed_messages> TYPE STANDARD TABLE.
ASSIGN ('(SAPLSTRD)GT_CONFIRMED_MESSAGES') TO <gt_confirmed_messages>.
IF sy-subrc NE 0. "Note 1609940 not applied in current system
APPEND '<h3>Hint:</h3>' TO lt_html. "#EC NOTEXT "1900
APPEND 'Implement note 1609940 if you want to avoid messages ''Object can only
be created in SAP package'' (TR015)<br>' TO lt_html. "#EC NOTEXT
ENDIF.
APPEND '</ul>'
TO lt_html. "#EC NOTEXT "1900
DATA: but_sim(60), but_upd(60), but_gen(60), but_log(60).
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_simulate
text = 'Simulation' "#EC NOTEXT
IMPORTING
result = but_sim.
APPEND '<h3>Test Run:</h3>'
TO lt_html. "#EC NOTEXT "1900
APPEND 'You perform the test run to check the prerequisites and display the list
of objects to be updated.<br>' TO lt_html. "#EC NOTEXT "1900
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_change
text = 'Update' "#EC NOTEXT
IMPORTING
result = but_upd.
APPEND '<h3>Update & Activate:</h3>'
TO lt_html. "#EC NOTEXT "1900
APPEND 'You perform this step to update the objects and then to activate
them.<br>' TO lt_html. "#EC NOTEXT "1900
APPEND 'We recommend using the "online" mode to activate the objects. Only if
this activation times out, use the "batch" mode.<br>' TO lt_html. "#EC NOTEXT
"1900
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_protocol
text = 'Logs' "#EC NOTEXT
IMPORTING
result = but_log.
APPEND '<h3>Show Logs:</h3>'
TO lt_html. "#EC NOTEXT "1900
APPEND 'You can perform this step to display the logs of the previous steps.<br>'
TO lt_html. "#EC NOTEXT "1900
APPEND 'The first message of each log shows whether this belongs to a simulation,
update or generation.<br>' TO lt_html. "#EC NOTEXT "1900
APPEND 'Only the most recent log of each step is relevant. You can ignore errors
in older logs.<br>' TO lt_html. "#EC NOTEXT "1900
APPEND 'This step is optional.' TO lt_html. "#EC NOTEXT "1900
APPEND '</body></html>' TO lt_html. "#EC NOTEXT "1900
CALL METHOD g_html_viewer->('LOAD_DATA')
EXPORTING
type = 'text'
subtype = 'html'
IMPORTING
assigned_url = l_url
CHANGING
data_table = lt_html
EXCEPTIONS
dp_invalid_parameter = 1
dp_error_general = 2
cntl_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
CALL METHOD g_html_viewer->('SHOW_URL')
EXPORTING
url = l_url
EXCEPTIONS
cntl_error = 1.
ENDFORM. "show_docking_control
PRIVATE SECTION.
CLASS-METHODS mass_activation
IMPORTING
i_step TYPE i DEFAULT 1
i_inactive TYPE c OPTIONAL
i_ddmode TYPE ddmode DEFAULT 'O'
i_logname TYPE c
EXCEPTIONS
error.
CLASS-METHODS language_installed
IMPORTING
i_langu TYPE sylangu
RETURNING value(r_installed) TYPE xfeld.
ENDCLASS. "lcl_wb DEFINITION
*----------------------------------------------------------------------*
* CLASS lcl_dcm_to_po_bridge IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_wb IMPLEMENTATION.
METHOD init.
DATA: ls_balobj TYPE balobj.
CLEAR: gv_errors_occured, r_return_code, gv_progname_rept.
SET LOCALE LANGUAGE 'E'. "most text/message are only in EN hence avoid
mixture
"copied from CL_ADT_GUI_EVENT_DISPATCHER=>IS_ADT_ENVIRONMENT( ).
GET PARAMETER ID sadt_navigation FIELD gv_abap_in_eclipse.
DATA: l_system_type TYPE df41s-parent_obj.
CALL FUNCTION 'RPY_CHECK_SYSTEM_TYPE_30'
IMPORTING
system_type = l_system_type.
IF sy-repid EQ myrepid OR l_system_type EQ 'SAP'.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = 'SCWB'
EXCEPTIONS
ok = 0
OTHERS = 1.
ELSE.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = 'SNOTE'
EXCEPTIONS
ok = 0
OTHERS = 1.
ENDIF.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3
sy-msgv4.
gv_errors_occured = 'X'.
r_return_code = 1. RETURN.
ENDIF.
IF NOT showlogs IS INITIAL.
r_return_code = 2. RETURN.
ENDIF.
DATA: ls_log TYPE bal_s_log.
"prepare application log
ls_log-object = c_bal_object.
ls_log-subobject = c_bal_subobj.
ls_log-extnumber = sy-cprog.
ls_log-aldate = sy-datum.
ls_log-altime = sy-uzeit.
ls_log-aluser = sy-uname.
ls_log-alprog = sy-repid.
ls_log-altcode = sy-tcode.
SELECT SINGLE * FROM balobj INTO ls_balobj WHERE object EQ c_bal_object.
IF sy-subrc NE 0.
"create if missing
ls_balobj-object = c_bal_object.
INSERT balobj FROM ls_balobj.
ENDIF.
"create standard application log handle
IF gv_log_handle IS INITIAL. "will be refreshed in display_log
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = ls_log
IMPORTING
e_log_handle = gv_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 3.
RETURN.
ENDIF.
ENDIF.
EXPORT gv_log_handle FROM gv_log_handle TO MEMORY ID c_memory_id.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = space.
"Main check: Last changed by SAP -> Report came via SP / Upgrade
"Does not work if customer use user SAP to implement notes....
"==> no execution anymore.
IF sy-cprog NE myrepid.
SELECT SINGLE prog FROM d010sinf INTO sy-lisel
WHERE ( prog EQ sy-repid )
AND ( unam EQ 'SAP' OR "last changed by ...
unam EQ 'SAP*' OR
unam EQ space AND ( cnam EQ 'SAP' OR
cnam EQ 'SAP*' OR
cnam EQ space ) ).
IF sy-subrc EQ 0.
"If customer used user SAP to apply that report they have to comment out
the following 4 lines:
MESSAGE w666(01) WITH 'The neccessary changes already came' 'via support
package.' 'Report execution not required anymore.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 3.
RETURN.
ENDIF.
ENDIF.
IF sy-cprog(1) EQ '!'. "Executing inactive version
MESSAGE w666(01) WITH 'Please activate this report' sy-repid 'first.' INTO
sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 4. RETURN.
ENDIF.
IF sy-saprl < sapbasis.
MESSAGE w666(01) WITH 'This report was generated for SAP_BASIS' sapbasis 'but
current system has SAP_BASIS' sy-saprl INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
IF NOT i_note IS INITIAL.
* that that note is not already implemented
* this must not be the note containing the generated report for DDIC but a
follow-up note with the coding using that new DDIC
DATA l_status TYPE c.
CALL FUNCTION 'SCWB_NOTE_IMPL_STATUS_SIMPLE'
EXPORTING
iv_numm = i_note
IMPORTING
ev_status = l_status
EXCEPTIONS
OTHERS = 0.
CASE l_status.
WHEN 'E'.
MESSAGE w666(01) WITH 'SAP Note' i_note 'completely implemented;' 'Report
execution not required anymore.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 5. RETURN.
WHEN 'O'.
MESSAGE w666(01) WITH 'SAP Note' i_note 'is obsolete;' 'Report execution
not required anymore.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 6. RETURN.
WHEN OTHERS. "okay
DATA: ls_note TYPE bcwbn_note.
DATA: l_valid TYPE bcwbn_bool.
ls_note-key-numm = i_note.
CALL FUNCTION 'SCWB_NOTE_READ'
EXPORTING
iv_read_corr_instructions = 'X'
CHANGING
cs_note = ls_note
EXCEPTIONS
note_not_found = 1
language_not_found = 2
unreadable_text_format = 3
corr_instruction_not_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE w666(01) WITH 'SAP Note' i_note 'cannot be read;' 'Cannot check
validity.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
l_valid = 'X'.
ENDIF.
FIELD-SYMBOLS: <ls_corr> TYPE bcwbn_corr_instruction.
LOOP AT ls_note-corr_instructions ASSIGNING <ls_corr>.
IF NOT i_cinst IS INITIAL.
CHECK <ls_corr>-key-aleid = i_cinst.
ENDIF.
CALL FUNCTION 'SCWB_CINST_CHECK_VALID'
IMPORTING
ev_valid = l_valid
CHANGING
cs_corr_instruction = <ls_corr>
EXCEPTIONS
corr_inst_not_found = 1
inconsistent_delivery_data = 2
undefined = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO sy-lisel.
"#EC *
CALL METHOD log_message.
r_return_code = 7. RETURN.
ENDIF.
IF NOT l_valid IS INITIAL.
EXIT.
ENDIF.
ENDLOOP.
IF l_valid IS INITIAL.
MESSAGE e666(01) WITH 'Manual changes cannot be applied;' 'Correction
instruction invalid' 'for current patch level' INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 7. RETURN.
ENDIF.
ENDCASE.
ENDIF.
IF NOT testrun IS INITIAL.
MESSAGE w666(01) WITH 'Running in Test Mode' INTO sy-lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
ELSEIF NOT update IS INITIAL. "or UPDATE
MESSAGE i666(01) WITH 'Running in Update Mode' INTO sy-lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
ENDIF.
"Switch on SNOTE & SCWB mode
CALL FUNCTION 'SCWG_TOOLFLAG_SET'.
TRY.
CALL METHOD ('CL_CWB_RUNTIME')=>set_active.
CATCH cx_sy_dyn_call_illegal_class. "#EC NO_HANDLER
ENDTRY.
"Set goon for all regarding message TR015 if possible
DATA: BEGIN OF ls_msg,
id TYPE symsgid VALUE 'TR',
ty TYPE symsgty,
no TYPE symsgno VALUE '015',
END OF ls_msg.
PERFORM dummy IN PROGRAM saplstrd IF FOUND. "load function group STRD
FIELD-SYMBOLS: <gt_confirmed_messages> TYPE STANDARD TABLE.
ASSIGN ('(SAPLSTRD)GT_CONFIRMED_MESSAGES') TO <gt_confirmed_messages>.
IF sy-subrc EQ 0. "Note 1609940 applied in current system
ls_msg-no = 015. "TR015
READ TABLE <gt_confirmed_messages> TRANSPORTING NO FIELDS WITH KEY table_line
= ls_msg.
IF sy-subrc NE 0.
APPEND ls_msg TO <gt_confirmed_messages>.
ENDIF.
ls_msg-no = 693. "TR693
READ TABLE <gt_confirmed_messages> TRANSPORTING NO FIELDS WITH KEY table_line
= ls_msg.
IF sy-subrc NE 0.
APPEND ls_msg TO <gt_confirmed_messages>.
ENDIF.
ELSEIF l_system_type NE 'SAP'.
MESSAGE w666(01) WITH 'Implement note 1609940 if you want to avoid' 'messages
''Object can only be created' 'in SAP package (TR015)''' INTO sy-lisel. "#EC NOTEXT
CALL METHOD lcl_wb=>log_message.
ENDIF.
CALL METHOD add_to_transport "init static variables
EXPORTING
i_object = space
i_obj_name = space
EXCEPTIONS
OTHERS = 1.
ENDMETHOD. "init
METHOD get_object_text.
STATICS: lt_object_text TYPE TABLE OF ko100,
lt_doktypes TYPE TABLE OF dd07v.
DATA: ls_object_text TYPE ko100,
ls_doktype TYPE dd07v.
CHECK NOT i_object IS INITIAL.
IF lt_object_text IS INITIAL.
CALL FUNCTION 'TR_OBJECT_TABLE'
TABLES
wt_object_text = lt_object_text.
SORT lt_object_text BY object.
METHOD create_doma.
DATA: ls_dd01v TYPE dd01v,
lt_dd07v TYPE TABLE OF dd07v,
ls_dd07v TYPE dd07v,
l_update,
ls_domname LIKE LINE OF gr_domname VALUE 'IEQ'.
FIELD-SYMBOLS: <l_appendname> TYPE c,
<ls_dd07v> LIKE LINE OF lt_dd07v.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'DOMA'
i_obj_name = i_domname.
ls_domname-low = i_domname.
COLLECT ls_domname INTO gr_domname.
CALL FUNCTION 'DDIF_DOMA_GET'
EXPORTING
name = i_domname
langu = i_langu "reads all values, returns value without
language/text if text does not exist in i_langu
state = 'M' "newest version (e.g. inactive)
IMPORTING
dd01v_wa = ls_dd01v
TABLES
dd07v_tab = lt_dd07v
EXCEPTIONS
OTHERS = 0.
IF ls_dd01v IS INITIAL OR
ls_dd01v-ddtext NE i_ddtext OR
ls_dd01v-domname NE i_domname OR
ls_dd01v-datatype NE i_datatype OR
ls_dd01v-leng NE i_leng OR
i_outputlen NE 0 AND i_outputlen NE ls_dd01v-outputlen OR
i_outputlen EQ 0 AND i_leng NE ls_dd01v-outputlen OR
ls_dd01v-convexit NE i_convexit OR
ls_dd01v-decimals NE i_decimals OR
ls_dd01v-lowercase NE i_lowercase OR
ls_dd01v-signflag NE i_signflag OR
ls_dd01v-entitytab NE i_entitytab.
l_update = 'X'.
ENDIF.
ls_dd01v-domname = i_domname.
ls_dd01v-datatype = i_datatype.
ls_dd01v-leng = i_leng.
IF i_outputlen IS INITIAL.
ls_dd01v-outputlen = i_leng.
ELSE.
ls_dd01v-outputlen = i_outputlen.
ENDIF.
ls_dd01v-convexit = i_convexit.
ASSIGN ('LS_DD01V-APPENDNAME') TO <l_appendname>.
IF sy-subrc EQ 0.
<l_appendname> = i_appendname.
ENDIF.
ls_dd01v-ddlanguage = i_langu.
ls_dd01v-ddtext = i_ddtext.
ls_dd01v-domname = i_domname.
ls_dd01v-datatype = i_datatype.
ls_dd01v-leng = i_leng.
ls_dd01v-outputlen = i_outputlen.
ls_dd01v-convexit = i_convexit.
ls_dd01v-decimals = i_decimals.
ls_dd01v-lowercase = i_lowercase.
ls_dd01v-signflag = i_signflag.
ls_dd01v-entitytab = i_entitytab.
IF i_domvalue IS SUPPLIED. "INITIAL value shall be possible fix value
READ TABLE lt_dd07v ASSIGNING <ls_dd07v> WITH KEY domvalue_l = i_domvalue.
IF sy-subrc EQ 0 AND <ls_dd07v>-valpos NE i_valpos.
DELETE lt_dd07v INDEX sy-tabix. "remove value from wrong position.
LOOP AT lt_dd07v ASSIGNING <ls_dd07v>.
<ls_dd07v>-valpos = sy-tabix.
ENDLOOP.
sy-subrc = 1. "trigger insertion of value at correct position
ENDIF.
IF sy-subrc EQ 0.
"value exists -> compare text and high value
IF <ls_dd07v>-ddtext NE i_valtext OR
<ls_dd07v>-domvalue_h NE i_domvalue_h.
<ls_dd07v>-ddlanguage = i_langu.
<ls_dd07v>-ddtext = i_valtext.
<ls_dd07v>-domvalue_h = i_domvalue_h.
l_update = 'X'.
ENDIF.
ELSE.
"value does not exist -> insert
READ TABLE lt_dd07v TRANSPORTING NO FIELDS WITH KEY valpos = i_valpos.
IF sy-subrc EQ 0.
"insert new value and increase valpos of exiting entries
LOOP AT lt_dd07v ASSIGNING <ls_dd07v> WHERE valpos GE i_valpos.
ADD 1 TO <ls_dd07v>-valpos.
ENDLOOP.
ENDIF.
CLEAR ls_dd07v.
ls_dd07v-domname = i_domname.
ls_dd07v-domvalue_l = i_domvalue.
ls_dd07v-domvalue_h = i_domvalue_h.
IF i_valpos IS INITIAL.
DESCRIBE TABLE lt_dd07v.
ls_dd07v-valpos = sy-tfill + 1.
ELSE.
ls_dd07v-valpos = i_valpos.
ENDIF.
ls_dd07v-ddlanguage = i_langu.
ls_dd07v-ddtext = i_valtext.
APPEND ls_dd07v TO lt_dd07v.
SORT lt_dd07v BY valpos.
l_update = 'X'.
ENDIF.
IF NOT lt_dd07v[] IS INITIAL.
ls_dd01v-valexi = 'X'.
ENDIF.
ENDIF.
IF l_update IS INITIAL.
IF i_domvalue IS SUPPLIED.
MESSAGE i666(01) WITH 'No update necessary for fix value' i_domvalue INTO
sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
RETURN.
ENDIF.
DATA: l_funcname TYPE funcname,
l_text TYPE tftit-stext,
l_namespace TYPE rs38l-namespace,
l_area TYPE tlibg-area.
DATA: lt_import TYPE TABLE OF rsimp,
ls_import TYPE rsimp,
lt_export TYPE TABLE OF rsexp,
ls_export TYPE rsexp,
lt_source TYPE TABLE OF rssource.
IF NOT i_convexit IS INITIAL.
"check if function group exist
CALL FUNCTION 'RPY_EXISTENCE_CHECK_FUGR'
EXPORTING
name = i_function_group
EXCEPTIONS
not_exist = 1
OTHERS = 2.
IF sy-subrc NE 0 AND NOT i_function_group IN gr_fugrname.
MESSAGE e666(01) WITH 'Function group' i_function_group 'does not exist.'
INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
"check if function modules exist
DO 2 TIMES.
IF sy-index EQ 1.
CONCATENATE 'CONVERSION_EXIT_' i_convexit '_INPUT' INTO l_funcname. "#EC
NOTEXT
APPEND 'INPUT' TO lt_import. "#EC NOTEXT
APPEND 'OUTPUT' TO lt_export. "#EC NOTEXT
APPEND 'MOVE input TO output.' TO lt_source. "#EC NOTEXT
ELSE.
CONCATENATE 'CONVERSION_EXIT_' i_convexit '_OUTPUT' INTO l_funcname. "#EC
NOTEXT
ENDIF.
CALL FUNCTION 'FUNCTION_EXISTS'
EXPORTING
funcname = l_funcname
EXCEPTIONS
function_not_exist = 1
OTHERS = 0.
IF sy-subrc EQ 1.
"create empty function module on the fly
IF NOT testrun IS INITIAL.
MESSAGE s666(01) WITH 'Conversion exit function module' l_funcname
'will be created.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
CONTINUE.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_object = 'FUNC'
i_obj_name = l_funcname
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
l_text = l_funcname.
IF i_function_group+1 CA '/'.
ADD 2 TO sy-fdpos.
l_namespace = i_function_group(sy-fdpos).
l_area = i_function_group+sy-fdpos.
ELSE.
l_area = i_function_group.
ENDIF.
CALL FUNCTION 'RS_FUNCTIONMODULE_INSERT'
EXPORTING
funcname = l_funcname
function_pool = l_area
namespace = l_namespace
short_text = l_text
suppress_corr_check = ' '
suppress_language_check = 'X'
authority_check = 'X'
suppress_upgrade_check = 'X'
TABLES
import_parameter = lt_import
export_parameter = lt_export
source = lt_source
EXCEPTIONS
OTHERS = 1.
ENDIF.
IF sy-subrc EQ 0.
MESSAGE s666(01) WITH 'Search help exit function module' l_funcname
'has been created.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
CALL METHOD log_message.
RETURN.
ENDIF.
ENDIF.
ENDDO.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_object = 'DOMA'
i_obj_name = i_domname
i_devclass = i_devclass
i_langu = i_langu
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
"align redundant field DOMMASTER with TADIR-MASTERLANG
SELECT SINGLE masterlang FROM tadir INTO ls_dd01v-dommaster
WHERE pgmid EQ 'R3TR'
AND object EQ 'DOMA'
AND obj_name EQ i_domname.
CALL FUNCTION 'DDIF_DOMA_PUT'
EXPORTING
name = i_domname
dd01v_wa = ls_dd01v
TABLES
dd07v_tab = lt_dd07v
EXCEPTIONS
doma_not_found = 1
name_inconsistent = 2
doma_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE e108(do) WITH i_domname INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
MESSAGE i666(01) WITH 'Update successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
CALL METHOD register_inactive_object
EXPORTING
i_objtype = 'DOMA'
i_objname = i_domname.
ENDMETHOD. "create_doma
METHOD create_dtel.
DATA: ls_dd04v TYPE dd04v,
l_gotstate,
ls_rollname LIKE LINE OF gr_domname VALUE 'IEQ'.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'DTEL'
i_obj_name = i_rollname.
ls_rollname-low = i_rollname.
COLLECT ls_rollname INTO gr_rollname.
CALL FUNCTION 'DDIF_DTEL_GET'
EXPORTING
name = i_rollname
langu = i_langu
state = 'M' "newest version (e.g. inactive)
IMPORTING
dd04v_wa = ls_dd04v
gotstate = l_gotstate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0 AND
ls_dd04v-rollname EQ i_rollname AND
ls_dd04v-ddlanguage EQ i_langu AND
ls_dd04v-memoryid EQ i_memoryid AND
ls_dd04v-logflag EQ i_logflag AND
ls_dd04v-headlen EQ i_headlen AND
ls_dd04v-scrlen1 EQ i_scrlen1 AND
ls_dd04v-scrlen2 EQ i_scrlen2 AND
ls_dd04v-scrlen3 EQ i_scrlen3 AND
ls_dd04v-ddtext EQ i_ddtext AND
ls_dd04v-reptext EQ i_reptext AND
ls_dd04v-scrtext_m EQ i_scrtext_m AND
ls_dd04v-scrtext_l EQ i_scrtext_l AND
ls_dd04v-scrtext_s EQ i_scrtext_s AND
ls_dd04v-shlpname EQ i_shlpname AND
ls_dd04v-shlpfield EQ i_shlpfield AND
ls_dd04v-deffdname EQ i_deffdname AND
ls_dd04v-proxytype EQ i_proxytype AND
( ls_dd04v-domname NE space AND ls_dd04v-datatype NE 'REF' OR
ls_dd04v-refkind EQ i_refkind AND ls_dd04v-reftype EQ i_reftype ) AND
METHOD create_table_type.
DATA: ls_dd40v TYPE dd40v,
lt_dd42v TYPE tt_dd42v,
lt_dd43v TYPE tt_dd43v,
ls_ttypname LIKE LINE OF gr_ttypname VALUE 'IEQ'.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'TTYP'
i_obj_name = i_typename.
ls_ttypname-low = i_typename.
COLLECT ls_ttypname INTO gr_ttypname.
CALL FUNCTION 'DDIF_TTYP_GET'
EXPORTING
name = i_typename
state = 'M'
langu = i_langu "with text
IMPORTING
dd40v_wa = ls_dd40v
TABLES
dd42v_tab = lt_dd42v
* dd43v_tab = lt_dd43v
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc EQ 0 AND "exists
( ls_dd40v-ddtext = i_ddtext OR i_ddtext IS INITIAL ) AND
ls_dd40v-rowtype = i_rowtype AND
ls_dd40v-datatype = i_datatype AND
( ls_dd40v-leng = i_leng OR i_leng IS INITIAL ) AND
( ls_dd40v-decimals = i_decimals OR i_decimals IS INITIAL ) AND
ls_dd40v-rowkind = i_rowkind AND
ls_dd40v-accessmode = i_accessmode AND
ls_dd40v-keydef = i_keydef AND
ls_dd40v-keykind = i_keykind AND
ls_dd40v-generic = i_generic AND
ls_dd40v-proxytype = i_proxytype AND
lt_dd43v = it_dd43v AND
lt_dd42v = it_dd42v.
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
"basic consistency checks
IF i_rowkind EQ 'S'. "structure
READ TABLE gt_tabname TRANSPORTING NO FIELDS WITH KEY table_line = i_rowtype.
"new structure
IF sy-subrc NE 0.
SELECT SINGLE tabname FROM dd02l INTO sy-lisel WHERE tabname EQ i_rowtype.
"existing structure
ENDIF.
IF sy-subrc NE 0.
MESSAGE e666(01) WITH 'Structure' i_rowtype 'does not exist' INTO sy-lisel.
"#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
ENDIF.
"now create/update
ls_dd40v-typename = i_typename.
ls_dd40v-rowtype = i_rowtype.
ls_dd40v-rowkind = i_rowkind.
ls_dd40v-ttypkind = i_ttypkind.
ls_dd40v-range_ctyp = i_range_ctyp.
ls_dd40v-datatype = i_datatype.
ls_dd40v-leng = i_leng.
ls_dd40v-decimals = i_decimals.
ls_dd40v-accessmode = i_accessmode.
ls_dd40v-keydef = i_keydef.
ls_dd40v-keykind = i_keykind.
ls_dd40v-proxytype = i_proxytype.
ls_dd40v-generic = i_generic.
IF NOT i_ddtext IS INITIAL.
ls_dd40v-ddtext = i_ddtext.
ls_dd40v-ddlanguage = i_langu.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_object = 'TTYP'
i_langu = i_langu
i_obj_name = i_typename
i_devclass = i_devclass
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
CALL FUNCTION 'DDIF_TTYP_PUT'
EXPORTING
name = i_typename
dd40v_wa = ls_dd40v
TABLES
dd42v_tab = it_dd42v
* dd43v_tab = it_dd43v
EXCEPTIONS
ttyp_not_found = 1
name_inconsistent = 2
ttyp_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc NE 0.
CALL METHOD log_message.
RETURN.
ELSE.
MESSAGE i666(01) WITH 'Update successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
CALL METHOD register_inactive_object
EXPORTING
i_objtype = 'TTYP'
i_objname = i_typename.
ENDMETHOD. "create_table_type
METHOD create_table.
DATA: ls_dd02v TYPE dd02v,
ls_dd09l TYPE dd09l,
lt_dd03p TYPE TABLE OF dd03p,
lt_dd05m TYPE TABLE OF dd05m,
lt_dd08v TYPE TABLE OF dd08v,
lt_dd12v TYPE TABLE OF dd12v,
lt_dd17v TYPE TABLE OF dd17v,
lt_dd35v TYPE TABLE OF dd35v,
lt_dd36m TYPE TABLE OF dd36m,
l_treetype TYPE trobjtype,
l_technical_setting_changed,
ls_tabname LIKE LINE OF gr_tabname VALUE 'IEQ'.
DATA: BEGIN OF ls_dd09l_new, "field available release dependent
javaonly,
roworcolst,
END OF ls_dd09l_new.
DATA: BEGIN OF ls_dd02v_new,
is_gtt,
END OF ls_dd02v_new.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'TABD'
i_obj_name = i_tabname.
ls_tabname-low = i_tabname.
COLLECT ls_tabname INTO gr_tabname.
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
name = i_tabname
state = 'M' "newest version (e.g. inactive)
langu = i_langu
IMPORTING
* GOTSTATE = GOTSTATE
dd02v_wa = ls_dd02v
dd09l_wa = ls_dd09l
TABLES
dd03p_tab = lt_dd03p
dd05m_tab = lt_dd05m
dd08v_tab = lt_dd08v
dd12v_tab = lt_dd12v
dd17v_tab = lt_dd17v
dd35v_tab = lt_dd35v
dd36m_tab = lt_dd36m
EXCEPTIONS
OTHERS = 0.
"handling of fields which do no exist in all releases:
ls_dd09l_new-roworcolst = i_roworcolst. "default: make equal to avoid
unneccessary update
ls_dd09l_new-javaonly = i_javaonly. "default: make equal to avoid
unneccessary update
MOVE-CORRESPONDING ls_dd09l TO ls_dd09l_new. "overwrite default with actual
value if exists
ls_dd02v_new-is_gtt = i_is_gtt.
MOVE-CORRESPONDING ls_dd02v TO ls_dd02v_new. "overwrite default with actual
value if exists
IF ls_dd02v-tabclass EQ 'INTTAB'.
l_technical_setting_changed = space. "structures do not have technical
settings
ELSEIF ls_dd02v-contflag EQ i_contflag AND
ls_dd02v-buffered EQ i_buffered AND
ls_dd09l-tabkat EQ i_tabkat AND
ls_dd09l-tabart EQ i_tabart AND
ls_dd09l-pufferung EQ i_pufferung AND
ls_dd09l-bufallow EQ i_bufallow AND
ls_dd09l-schfeldanz EQ i_schfeldanz AND
ls_dd09l-protokoll EQ i_protokoll AND
ls_dd09l-uebersetz EQ i_uebersetz AND
ls_dd09l_new-javaonly EQ i_javaonly AND
( ls_dd09l_new-roworcolst EQ i_roworcolst OR i_roworcolst IS INITIAL ) AND
( ls_dd02v_new-is_gtt EQ i_is_gtt OR i_is_gtt IS INITIAL ) AND
ls_dd09l-speichpuff EQ i_speichpuff. "do not check javaonly field
l_technical_setting_changed = space.
ELSE.
l_technical_setting_changed = 'X'.
ENDIF.
IF ls_dd02v-tabname NE space AND "existing.
ls_dd02v-ddtext EQ i_ddtext AND
ls_dd02v-exclass EQ i_exclass AND
ls_dd02v-proxytype EQ i_proxytype AND
ls_dd02v-tabclass EQ i_tabclass AND
ls_dd02v-authclass EQ i_authclass AND
ls_dd02v-mainflag EQ i_mainflag AND
ls_dd02v-sqltab EQ i_sqltab AND
l_technical_setting_changed IS INITIAL.
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
"new table
ls_dd02v-tabname = i_tabname.
ls_dd02v-ddlanguage = i_langu.
ls_dd02v-exclass = i_exclass.
ls_dd02v-proxytype = i_proxytype.
ls_dd02v-tabclass = i_tabclass.
ls_dd02v-authclass = i_authclass.
ls_dd02v-mainflag = i_mainflag.
ls_dd02v-sqltab = i_sqltab.
IF i_ddtext IS INITIAL.
ls_dd02v-ddtext = i_tabname.
ELSE.
ls_dd02v-ddtext = i_ddtext.
ENDIF.
IF ls_dd02v-tabclass EQ 'CLUSTER' OR "only for real database tables
ls_dd02v-tabclass EQ 'POOL' OR
ls_dd02v-tabclass EQ 'TRANSP'.
ls_dd02v-contflag = i_contflag.
ls_dd02v-buffered = i_buffered.
ls_dd09l-tabname = i_tabname.
ls_dd09l-tabkat = i_tabkat.
ls_dd09l-tabart = i_tabart.
ls_dd09l-pufferung = i_pufferung.
ls_dd09l-bufallow = i_bufallow.
ls_dd09l-schfeldanz = i_schfeldanz.
ls_dd09l-protokoll = i_protokoll.
ls_dd09l-uebersetz = i_uebersetz.
ls_dd09l-speichpuff = i_speichpuff.
ls_dd09l_new-javaonly = i_javaonly.
ls_dd09l_new-roworcolst = i_roworcolst.
MOVE-CORRESPONDING ls_dd09l_new TO ls_dd09l.
ls_dd02v_new-is_gtt = i_is_gtt.
MOVE-CORRESPONDING ls_dd02v_new TO ls_dd02v.
l_treetype = 'TABL'.
ELSE.
l_treetype = 'CDS'.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_object = 'TABL'
i_langu = i_langu
i_obj_name = i_tabname
i_devclass = i_devclass
i_edtflag = i_edtflag
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
IF l_technical_setting_changed EQ 'X'.
CALL METHOD add_to_transport
EXPORTING
i_object = 'TABT'
i_langu = i_langu
i_obj_name = i_tabname
i_devclass = i_devclass
i_edtflag = i_edtflag
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
ENDIF.
"update redundant field masterlang with TADIR value
SELECT SINGLE masterlang FROM tadir INTO ls_dd02v-masterlang
WHERE pgmid EQ 'R3TR'
AND object EQ 'TABL'
AND obj_name EQ i_tabname.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
name = i_tabname
dd02v_wa = ls_dd02v
dd09l_wa = ls_dd09l
TABLES
dd03p_tab = lt_dd03p
dd05m_tab = lt_dd05m
dd08v_tab = lt_dd08v
dd35v_tab = lt_dd35v
dd36m_tab = lt_dd36m
EXCEPTIONS
tabl_not_found = 1
name_inconsistent = 2
tabl_inconsistent = 3
put_failure = 4
put_refused = 5
OTHERS = 6.
IF sy-subrc <> 0.
CALL METHOD log_message.
RETURN.
ENDIF.
MESSAGE i666(01) WITH 'Update successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
CALL METHOD register_inactive_object
EXPORTING
i_objtype = 'TABL'
i_treetype = l_treetype
i_objname = i_tabname.
ENDMETHOD. "create_table
METHOD add_field_to_table.
DATA: ls_dd02v TYPE dd02v,
ls_dd09l TYPE dd09l,
lt_dd03p TYPE TABLE OF dd03p,
ls_dd05m TYPE dd05m,
lt_dd05m TYPE TABLE OF dd05m,
ls_dd08v TYPE dd08v,
lt_dd08v TYPE TABLE OF dd08v,
lt_dd12v TYPE TABLE OF dd12v,
lt_dd17v TYPE TABLE OF dd17v,
lt_dd35v TYPE TABLE OF dd35v,
lt_dd36m TYPE TABLE OF dd36m,
l_tabix TYPE sytabix,
l_state TYPE ddgotstate,
l_include TYPE fieldname,
l_type TYPE rollname,
ls_tabname LIKE LINE OF gr_tabname VALUE 'IEQ'.
FIELD-SYMBOLS: <ls_dd03p> TYPE dd03p.
IF i_remove IS INITIAL.
sy-lisel = 'Add field(s) to table'. "#EC NOTEXT
ELSE.
sy-lisel = 'Remove field(s) from table'. "#EC NOTEXT
ENDIF.
CALL METHOD set_context
EXPORTING
i_langu = space
i_text = sy-lisel
i_object = 'TABD'
i_obj_name = i_tabname.
ls_tabname-low = i_tabname.
COLLECT ls_tabname INTO gr_tabname.
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
name = i_tabname
state = 'M' "newest version (e.g. inactive)
IMPORTING
dd02v_wa = ls_dd02v
dd09l_wa = ls_dd09l
TABLES
dd03p_tab = lt_dd03p
dd05m_tab = lt_dd05m
dd08v_tab = lt_dd08v
dd12v_tab = lt_dd12v
dd17v_tab = lt_dd17v
dd35v_tab = lt_dd35v
dd36m_tab = lt_dd36m
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc NE 0 OR ls_dd02v-tabname IS INITIAL. "not existing.
READ TABLE gr_tabname TRANSPORTING NO FIELDS WITH KEY low = i_tabname.
IF testrun IS INITIAL OR i_remove EQ 'X' OR sy-subrc NE 0. "'i_tabname NOT IN
gr_tabname' does not work since there might be database tables with sign = 'E'
MESSAGE e666(01) WITH 'Error while reading table' i_tabname INTO sy-lisel.
"#EC *
CALL METHOD log_message.
ENDIF.
RETURN.
ENDIF.
CASE ls_dd02v-tabclass.
WHEN 'CLUSTER' OR 'POOL' OR 'TRANSP'.
COLLECT ls_tabname INTO gr_dbtabname.
METHOD activate.
DATA: lt_dwinactiv TYPE TABLE OF dwinactiv,
lt_dwinactiv_ddic TYPE TABLE OF dwinactiv,
lv_answer,
l_logname TYPE ddprh-protname,
ls_job TYPE tbtcjob,
lv_rc TYPE sysubrc,
l_dref TYPE REF TO data,
l_message TYPE sy-lisel,
ls_tabname LIKE LINE OF gr_tabname.
DATA: lr_object TYPE RANGE OF dwinactiv-object,
lr_objname TYPE RANGE OF dwinactiv-obj_name.
DATA: lt_ascii TYPE TABLE OF soli,
lt_list TYPE TABLE OF abaplist,
lt_textpool TYPE TABLE OF textpool,
ls_textpool TYPE textpool.
FIELD-SYMBOLS: <ls_dwinactiv> LIKE LINE OF lt_dwinactiv.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = 'Activation'. "#EC *
IF testrun IS INITIAL.
"pre-check: no activation during SPDD phase TRINT_CHECK_LINCENSE_EXCEPTION
DATA: lt_upginfo TYPE TABLE OF uvers,
ls_upginfo TYPE uvers.
CALL FUNCTION 'UPG_GET_UPGRADE_INFO'
TABLES
tt_upginfo = lt_upginfo
EXCEPTIONS
OTHERS = 0.
SORT lt_upginfo BY enddate DESCENDING.
READ TABLE lt_upginfo INTO ls_upginfo INDEX 1.
IF ( ls_upginfo-putstatus = 'S' OR ls_upginfo-putstatus = 'U' ).
* no activation at all during downtime of system (SPDD)
MESSAGE w666(01) WITH 'No activation during SPDD.' 'Inactive versions have
been updated.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
DATA: l_objname TYPE trobj_name.
"activate GUI status "online" (one by one to avoid popup)
DATA: ls_guistatus LIKE LINE OF gr_guistatus.
LOOP AT gr_guistatus INTO ls_guistatus.
l_objname = ls_guistatus-low.
CALL FUNCTION 'RS_WORKING_OBJECT_ACTIVATE'
EXPORTING
object = 'CUAD'
obj_name = l_objname
activate_only_this_object = 'X'
object_saved = 'X'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
MESSAGE s137(ec) WITH l_objname INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
APPEND LINES OF gr_guistatus TO lr_objname. "non DDIC
APPEND LINES OF gr_domname TO lr_objname. "DDIC
APPEND LINES OF gr_rollname TO lr_objname. "DDIC
APPEND LINES OF gr_tabname TO lr_objname. "DDIC
APPEND LINES OF gr_shlpname TO lr_objname. "DDIC
APPEND LINES OF gr_viewname TO lr_objname. "DDIC
APPEND LINES OF gr_enqname TO lr_objname. "DDIC
APPEND LINES OF gr_ttypname TO lr_objname. "DDIC
APPEND LINES OF gr_indexes TO lr_objname. "DDIC
DELETE lr_objname WHERE sign EQ 'E'. "remove exclusions
IF NOT lr_objname[] IS INITIAL.
SELECT * FROM dwinactiv INTO TABLE lt_dwinactiv
WHERE object IN lr_object "EC Dummy
AND obj_name IN lr_objname.
IF gr_tabname[] IS NOT INITIAL.
"add partly active structures/tables
SELECT tabname AS obj_name FROM dd02l APPENDING CORRESPONDING FIELDS OF
TABLE lt_dwinactiv
WHERE tabname IN gr_tabname AND actflag EQ 'U'. "e.g. partly
active
LOOP AT lt_dwinactiv ASSIGNING <ls_dwinactiv> WHERE object IS INITIAL.
<ls_dwinactiv>-object = 'TABL'.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
"add all relevant inactive objects also to current user's worklist
"gets relevant if a different user is doing the activation.
"entries for all users will be deleted if any user activates the object
LOOP AT lt_dwinactiv ASSIGNING <ls_dwinactiv> WHERE uname NE sy-uname.
<ls_dwinactiv>-uname = sy-uname.
ENDLOOP.
INSERT dwinactiv FROM TABLE lt_dwinactiv ACCEPTING DUPLICATE KEYS.
LOOP AT lt_dwinactiv ASSIGNING <ls_dwinactiv>
WHERE object EQ 'DOMA' OR
object EQ 'DTEL' OR
object EQ 'TABL' OR
object EQ 'INDX' OR
object EQ 'XINX' OR
object EQ 'VIEW' OR
object EQ 'ENQU' OR
object EQ 'TTYP' OR
object EQ 'SHLP'.
DATA: l_obj_name TYPE e071-obj_name.
l_obj_name = <ls_dwinactiv>-obj_name.
DATA: lt_dd02v_inc TYPE TABLE OF dd02v,
ls_dd02v_inc TYPE dd02v,
l_auth_subrc TYPE sysubrc.
CALL FUNCTION 'RS_DD_CHECK_ACTIVATE'
EXPORTING
objtype = <ls_dwinactiv>-object
objname = l_obj_name
* i_no_ui = 'X' "not in all sap_basis releases
EXCEPTIONS
object_not_found = 0 "ignore invalid entries in DWINACTIV
OTHERS = 1.
IF sy-subrc EQ 0.
"check dependent database tables similar to DD_TABL_ACT
"==> shall be part of RS_DD_CHECK_ACTIVATE of DD_TABL_ACT
CALL FUNCTION 'DD_GET_INCLUDING_TABLES' "Get tables which are
EXPORTING "importing table TABNAME
tabname = <ls_dwinactiv>-obj_name(30)
TABLES
tabnames = lt_dd02v_inc.
CLEAR l_auth_subrc.
LOOP AT lt_dd02v_inc INTO ls_dd02v_inc.
l_obj_name = ls_dd02v_inc-tabname.
CALL FUNCTION 'RS_DD_CHECK_ACTIVATE'
EXPORTING
objtype = 'TABL'
objname = l_obj_name
* i_no_ui = 'X' "not in all sap_basis releases
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
l_auth_subrc = sy-subrc.
MESSAGE e666(01) WITH 'No authorization to activate database table'
<ls_dwinactiv>-obj_name '. Call transaction SU53 for details' INTO sy-lisel. "#EC *
CALL METHOD log_message.
EXIT.
ENDIF.
ENDLOOP.
sy-subrc = l_auth_subrc.
ENDIF.
IF sy-subrc EQ 0.
"DDIC always via RADMASG0
"move DDIC objects to separate worklist
APPEND <ls_dwinactiv> TO lt_dwinactiv_ddic.
DELETE lt_dwinactiv.
ELSE.
MESSAGE e666(01) WITH 'No authorization to activate' <ls_dwinactiv>-object
<ls_dwinactiv>-obj_name '. Call transaction SU53 for details' INTO sy-lisel. "#EC *
CALL METHOD log_message.
CASE <ls_dwinactiv>-object.
WHEN 'DOMA'. DELETE gr_domname WHERE low EQ <ls_dwinactiv>-obj_name.
WHEN 'DTEL'. DELETE gr_rollname WHERE low EQ <ls_dwinactiv>-obj_name.
WHEN 'TABL'.
DELETE gr_tabname WHERE low EQ <ls_dwinactiv>-obj_name.
DELETE gr_indxtab WHERE low EQ <ls_dwinactiv>-obj_name.
WHEN 'TTYP'. DELETE gr_ttypname WHERE low EQ <ls_dwinactiv>-obj_name.
WHEN 'SHLP'. DELETE gr_shlpname WHERE low EQ <ls_dwinactiv>-obj_name.
ENDCASE.
DELETE lt_dwinactiv.
ENDIF.
ENDLOOP.
IF lt_dwinactiv[] IS INITIAL AND lt_dwinactiv_ddic[] IS INITIAL AND
gv_repository_changed IS INITIAL.
IF testrun IS INITIAL.
IF sy-cprog EQ myrepid.
MESSAGE i666(01) WITH 'No activation neccessary' '' '' '' INTO sy-lisel.
"#EC *
ELSE.
MESSAGE i666(01) WITH 'No activation neccessary' '' '' ''. "#EC *
ENDIF.
CALL METHOD log_message.
ELSEIF sy-cprog EQ myrepid.
MESSAGE i666(01) WITH 'Press button Back (F3) to leave the simulation.' ''
'' '' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
IF gv_translation EQ 'X'.
MESSAGE i666(01) WITH 'Translation has been updated' '' '' '' INTO sy-
lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ELSEIF NOT gv_errors_occured IS INITIAL.
MESSAGE a666(01) WITH 'Activation was skipped because of errors' 'in previous
steps. Please try again.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSEIF NOT i_result_auth_check IS INITIAL.
MESSAGE e666(01) WITH 'No authorization to activate the DDIC changes.' 'Call
transaction SU53 for details' '' '' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE. "do the activation
IF NOT lt_dwinactiv[] IS INITIAL.
"1) activate non DDIC objects (e.g. CUAD) online
MESSAGE s357(scwn).
CALL FUNCTION 'RS_WORKING_OBJECT_ACTIVATE'
EXPORTING
dictionary_only = ' '
TABLES
objects = lt_dwinactiv
EXCEPTIONS
OTHERS = 5.
IF sy-subrc NE 0.
lv_answer = 'A'.
CALL METHOD log_message.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
LOOP AT lt_dwinactiv_ddic ASSIGNING <ls_dwinactiv> WHERE object EQ 'TABL' AND
obj_name EQ 'DOKIL'.
MESSAGE w666(01) WITH 'Please use SE11 to activate Database Table'
<ls_dwinactiv>-obj_name INTO sy-lisel. "#EC *
MESSAGE w666(01) WITH 'Please use SE11 to activate' 'Technical Settings of
Database Table' <ls_dwinactiv>-obj_name INTO sy-lisel. "#EC *
CALL METHOD log_message.
DELETE gr_tabname WHERE low EQ <ls_dwinactiv>-obj_name.
DELETE gr_dbtabname WHERE low EQ <ls_dwinactiv>-obj_name.
DELETE lt_dwinactiv_ddic.
ENDLOOP.
IF NOT lt_dwinactiv_ddic[] IS INITIAL AND lv_answer NE 'A'.
lv_answer = '1'.
* CALL FUNCTION 'POPUP_TO_CONFIRM'
* EXPORTING
* titlebar = 'Activation' "#EC NOTEXT
* text_question = 'How do you want to activate DDIC?' "#EC
NOTEXT
* text_button_1 = 'Online' "#EC NOTEXT
* text_button_2 = 'Batch' "#EC NOTEXT
* display_cancel_button = 'X'
* IMPORTING
* answer = lv_answer
* EXCEPTIONS
* OTHERS = 1.
* IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
* CALL METHOD log_message.
* ENDIF.
ENDIF.
IF sy-repid(2) EQ '%_'. "Temp. Subroutine Pool
l_logname = 'UDO'.
ELSEIF sy-repid(1) EQ '/'.
SPLIT sy-repid AT '/' INTO l_logname l_logname l_logname. "remove namespace
ELSE.
l_logname = sy-repid.
ENDIF.
CONCATENATE l_logname sy-datum sy-uzeit INTO l_logname SEPARATED BY '_'.
IF lv_answer EQ '1'. "online
"2a) activate DDIC online
IF sy-repid(2) EQ '%_'. "Temp. Subroutine Pool
l_logname = 'UDO'.
ELSEIF sy-repid(1) EQ '/'.
SPLIT sy-repid AT '/' INTO l_logname l_logname l_logname. "remove
namespace
ELSE.
l_logname = sy-repid.
ENDIF.
CALL METHOD lcl_wb=>save_log. "save log makes sense here in case that
activation dumps (e.g. time out)
CONCATENATE l_logname ':' sy-datum ':' sy-uzeit INTO l_logname.
DATA: lt_ddxtt_before TYPE TABLE OF ddxtt,
lt_ddxtt_after TYPE TABLE OF ddxtt,
ls_ddxtt TYPE ddxtt.
SELECT * FROM ddxtt INTO CORRESPONDING FIELDS OF TABLE lt_ddxtt_before.
"#EC CI_NOWHERE "usually empty, if not want need ALL entries
DATA: lt_swotice TYPE TABLE OF swotice.
IF activation_mode EQ '2'. "two step activation
CALL METHOD mass_activation "Step 1, only for two step activation
EXPORTING
i_step = 1
i_logname = space "no log, any error messages will appear in step 2
also
i_ddmode = 'T'
i_inactive = 'X'
EXCEPTIONS
error = 1.
ELSE.
CLEAR sy-subrc.
ENDIF.
IF sy-subrc EQ 0.
CALL METHOD mass_activation "Step 2, always
EXPORTING
i_step = 2
i_logname = l_logname
i_ddmode = 'O'
i_inactive = ' '
EXCEPTIONS
error = 1.
ENDIF.
DATA: l_act_subrc TYPE sy-subrc.
l_act_subrc = sy-subrc.
SELECT * FROM ddxtt INTO CORRESPONDING FIELDS OF TABLE lt_ddxtt_after. "#EC
CI_NOWHERE
LOOP AT lt_ddxtt_after INTO ls_ddxtt.
READ TABLE lt_ddxtt_before WITH KEY tabname = ls_ddxtt-tabname
modeflag = ls_ddxtt-modeflag
TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
"new entry in ddxtt
MESSAGE w666(01) WITH 'Unexpected entry in DDXTT:' ls_ddxtt-tabname
ls_ddxtt-modeflag INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
IF NOT lt_swotice[] IS INITIAL.
INSERT swotice FROM TABLE lt_swotice.
ENDIF.
CLEAR l_message.
IF l_act_subrc EQ 0.
LOOP AT gr_dbtabname INTO ls_tabname WHERE NOT low IS INITIAL.
"check DB object
SUBMIT rutdbchk WITH tabname EQ ls_tabname-low "#EC CI_SUBMIT
WITH showlist EQ 'X'
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_list
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = lt_ascii
listobject = lt_list
EXCEPTIONS
OTHERS = 0.
SET LOCALE LANGUAGE ' '.
READ TEXTPOOL 'RUTDBCHK' INTO lt_textpool LANGUAGE sy-langu.
SET LOCALE LANGUAGE 'E'.
IF lt_textpool IS INITIAL.
READ TEXTPOOL 'RUTDBCHK' INTO lt_textpool LANGUAGE 'D'. "masterlang
of RUTDBCHK
ENDIF.
"expected messages: text-021 and text-023
LOOP AT lt_textpool INTO ls_textpool WHERE key EQ '021' OR key EQ '023'
.
LOOP AT lt_ascii TRANSPORTING NO FIELDS WHERE table_line CS
ls_textpool-entry.
EXIT.
ENDLOOP.
IF sy-subrc NE 0.
MESSAGE e666(01) WITH 'Database object of table' ls_tabname-low 'is
inconsistent!' INTO l_message . "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
ENDLOOP.
LOOP AT gr_dbviewname INTO ls_tabname WHERE NOT low IS INITIAL.
"check DB object
SUBMIT rddviewc WITH viewname EQ ls_tabname-low "#EC CI_SUBMIT
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_list
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = lt_ascii
listobject = lt_list
EXCEPTIONS
OTHERS = 0.
"expected message:
MESSAGE s410(mc) INTO sy-lisel. "sy-lisel.
LOOP AT lt_ascii TRANSPORTING NO FIELDS WHERE table_line CS sy-lisel.
EXIT.
ENDLOOP.
IF sy-subrc NE 0. "success message not found
MESSAGE e666(01) WITH 'Database object of view' ls_tabname-low 'is
inconsistent!' INTO l_message. "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
APPEND LINES OF gr_ttypname TO gr_tabname.
APPEND LINES OF gr_rollname TO gr_tabname.
LOOP AT gr_tabname INTO ls_tabname WHERE NOT low IS INITIAL.
TRY.
CREATE DATA l_dref TYPE (ls_tabname-low).
CATCH cx_sy_create_data_error.
MESSAGE e666(01) WITH 'Data Type' ls_tabname-low 'is inconsistent'
INTO l_message. "#EC *
CALL METHOD log_message.
ENDTRY.
ENDLOOP.
IF l_message IS INITIAL.
CLEAR sy-subrc.
ELSE.
MESSAGE e666(01) WITH 'DDIC activation step 3 ended with errors.' INTO
sy-lisel. "#EC *
CALL METHOD log_message.
sy-subrc = 4.
ENDIF.
ENDIF.
IF sy-subrc EQ 0.
MESSAGE s666(01) WITH 'DDIC activation successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = 'Detailed Log'. "#EC *
MESSAGE i626(do) WITH 'Click this message to view' 'detailed activation
logs with name' l_logname INTO sy-lisel. "#EC *
CALL METHOD log_message.
"RADMASG0 does not remove DWINACTIV for XINX hence we cleanup here
DATA: ls_dwinactiv TYPE dwinactiv.
LOOP AT lt_dwinactiv_ddic INTO ls_dwinactiv WHERE object EQ 'XINX'.
DELETE FROM dwinactiv WHERE object EQ 'XINX' AND obj_name EQ
ls_dwinactiv-obj_name.
ENDLOOP.
ELSE.
"e.g. no authorization for activation or conversion of dependent database
tables
"make sure that the objects appear as inactive; corresponding are removed
by DDIC activation phase 1 although phase 2 or 3 may fail.
MODIFY dwinactiv FROM TABLE lt_dwinactiv_ddic.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = 'Detailed Log'. "#EC *
MESSAGE w626(do) WITH 'Click this message to view' 'detailed activation
logs with name' l_logname INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ELSEIF lv_answer EQ '2' .
"2b) activate DDIC objects via batch job
ls_job-jobname = sy-repid.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = ls_job-jobname
IMPORTING
jobcount = ls_job-jobcount
CHANGING
ret = lv_rc
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0 OR lv_rc NE 0.
MESSAGE e026(bt) WITH ls_job-jobname INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
IF activation_mode EQ '2'.
SUBMIT radmasg0 WITH domname IN gr_domname "#EC CI_SUBMIT
WITH rollname IN gr_rollname
WITH tabname IN gr_tabname
WITH indxtab IN gr_indxtab
WITH indxname IN gr_indxname
WITH viewname IN gr_viewname
WITH ttypname IN gr_ttypname
WITH shlpname IN gr_shlpname
WITH logname EQ l_logname
WITH logshow EQ 'X' "show log in SPOOL
WITH ddmode EQ 'T'
WITH inactive EQ 'X'
VIA JOB ls_job-jobname
NUMBER ls_job-jobcount
AND RETURN.
ENDIF.
"remove exclusions for next step
DELETE gr_tabname WHERE sign EQ 'E'.
DELETE gr_viewname WHERE sign EQ 'E'.
SUBMIT radmasg0 WITH domname IN gr_domname "#EC CI_SUBMIT
WITH rollname IN gr_rollname
WITH tabname IN gr_tabname
WITH indxtab IN gr_indxtab
WITH indxname IN gr_indxname
WITH viewname IN gr_viewname
WITH ttypname IN gr_ttypname
WITH shlpname IN gr_shlpname
WITH logname EQ l_logname
WITH logshow EQ 'X' "show log in SPOOL
WITH ddmode EQ 'O'
WITH inactive EQ ' '
VIA JOB ls_job-jobname
NUMBER ls_job-jobcount
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = ls_job-jobcount
jobname = ls_job-jobname
strtimmed = 'X'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
MESSAGE s305(ut) WITH ls_job-jobname INTO sy-lisel. "#EC *
CALL METHOD log_message.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = 'Detailed Log'. "#EC *
MESSAGE w666(01) WITH 'Use Report RADPROTB to view' 'activation log'
l_logname 'after job has finished in transaction SMX.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
MESSAGE e026(bt) WITH ls_job-jobname INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
DATA: l_langu TYPE langu.
LOOP AT gt_skipped_languages[] INTO l_langu.
SELECT SINGLE sptxt FROM t002t INTO sy-lisel WHERE spras EQ 'E' AND sprsl EQ
l_langu.
CONCATENATE '(' sy-lisel ')' INTO sy-lisel.
MESSAGE i666(01) WITH 'Language' l_langu sy-lisel 'is not installed and has
been skipped.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDLOOP.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = 'Method Execution'. "#EC *
CALL METHOD lcl_wb=>execute_method "e.g. OSOD, SCP2
EXPORTING
i_method = trmtd_after_imp.
"Refresh some fields
SET PARAMETER ID 'EUK' FIELD space.
EXPORT current_devclass FROM space TO MEMORY ID 'EUK'.
ENDMETHOD. "activate
METHOD mass_activation.
CONSTANTS: lc_active VALUE 'A'.
DATA: lt_log TYPE TABLE OF trlog, ls_log TYPE trlog.
IF i_step EQ 2.
"remove exclusions for step 2
DELETE gr_tabname WHERE sign EQ 'E'.
DELETE gr_viewname WHERE sign EQ 'E'.
ENDIF.
SUBMIT radmasg0 WITH domname IN gr_domname "#EC CI_SUBMIT
WITH rollname IN gr_rollname
WITH tabname IN gr_tabname
WITH indxtab IN gr_indxtab
WITH indxname IN gr_indxname
WITH viewname IN gr_viewname
WITH enquname IN gr_enqname
WITH ttypname IN gr_ttypname
WITH shlpname IN gr_shlpname
WITH logname EQ i_logname
WITH logshow EQ space
WITH inactive EQ i_inactive
WITH ddmode EQ i_ddmode
AND RETURN.
IMPORT act_rc TO sy-subrc FROM MEMORY ID 'ACRC'.
CHECK NOT i_logname IS INITIAL.
IF sy-subrc > 4. "4 is only warning
CHECK i_step NE 1. "messages of step 1 have to be ignored
MESSAGE e666(01) WITH 'DDIC activation step' i_step 'ended with errors:' INTO
sy-lisel. "#EC *
CALL METHOD log_message.
CALL FUNCTION 'TR_READ_LOG'
EXPORTING
iv_log_type = 'DB'
iv_logname_db = i_logname
TABLES
et_lines = lt_log
EXCEPTIONS
OTHERS = 0.
"append errors from activation log (idea for future: show all messages from
entire phase 004 and 005)
LOOP AT lt_log INTO ls_log WHERE severity EQ 'E' OR newsection EQ 'X'.
IF ls_log-newsection EQ 'X'.
IF ls_log-severity EQ 'E'. "error as first line in new section
sy-lisel = 'Activation'. "#EC NOTEXT
ELSE.
MESSAGE i666(01) WITH ls_log-line(50) ls_log-line+50(50) ls_log-
line+100 INTO sy-lisel. "#EC *
ENDIF.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = space
i_obj_name = sy-lisel.
ENDIF.
IF ls_log-severity EQ 'E'.
MESSAGE e666(01) WITH ls_log-line(50) ls_log-line+50(50) ls_log-line+100
INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
RAISE error.
ENDIF.
ENDMETHOD. "mass_activation
METHOD language_installed.
DATA: l_languages TYPE string.
CLEAR r_installed.
IF i_langu IS INITIAL OR gv_master_languages CS i_langu.
r_installed = 'X'.
ELSE.
CALL FUNCTION 'SYSTEM_INSTALLED_LANGUAGES'
IMPORTING
languages = l_languages
EXCEPTIONS
sapgparam_error = 1
OTHERS = 2.
IF sy-subrc NE 0 OR l_languages CS i_langu.
r_installed = 'X'.
ELSE.
COLLECT i_langu INTO gt_skipped_languages.
ENDIF.
ENDIF.
ENDMETHOD. "language_installed
METHOD create_logical_object.
DATA: lt_e071k TYPE TABLE OF e071k,
ls_e071k TYPE e071k,
lt_e071 TYPE TABLE OF e071,
ls_e071 TYPE e071,
lt_keys TYPE tr_keys,
dref TYPE REF TO data.
FIELD-SYMBOLS: <lt_table> TYPE STANDARD TABLE.
CALL METHOD set_context
EXPORTING
i_langu = space
i_object = i_object
i_obj_name = i_obj_name.
CALL METHOD lcl_wb=>add_to_transport
EXPORTING
i_object = i_object
i_obj_name = i_obj_name
i_devclass = i_devclass
i_langu = i_langu
EXCEPTIONS
simulation = 0
OTHERS = 1.
IF sy-subrc NE 0.
RAISE error.
ENDIF.
CHECK approved_logical_objects CS i_object.
IF testrun IS INITIAL.
CASE i_object.
WHEN 'IWPR'.
DATA: enqueue_/iwbep/e_sbdm_pr TYPE funcname VALUE
'ENQUEUE_/IWBEP/E_SBDM_PR',
lv_project(30), lv_user TYPE syuname.
lv_project = i_obj_name.
CALL FUNCTION enqueue_/iwbep/e_sbdm_pr
EXPORTING
mode_/iwbep/i_sbd_pr = 'X'
project = lv_project
_scope = '3'
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
WHEN 'SUCD'.
DATA: enqueue_e_sacf TYPE funcname VALUE 'ENQUEUE_E_SACF',
lv_scen_name(40). "scen_name.
lv_scen_name = i_obj_name.
CALL FUNCTION enqueue_e_sacf
EXPORTING
mode_tobj_chk_ctrl_dh = 'E'
name = lv_scen_name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
WHEN OTHERS.
CLEAR sy-subrc.
ENDCASE.
IF sy-subrc NE 0.
lv_user = sy-msgv1.
MESSAGE e666(01) WITH i_object i_obj_name 'is locked by user' lv_user INTO
sy-lisel. "#EC *
CALL METHOD log_message.
RAISE error.
ENDIF.
ENDIF.
ls_e071-object = i_object.
ls_e071-obj_name = i_obj_name.
CALL FUNCTION 'RESOLVE_LOGICAL_OBJECT'
EXPORTING
e071_entry = ls_e071
iv_languages = i_langu
TABLES
e071k_tab = lt_e071k
e071_tab = lt_e071
EXCEPTIONS
OTHERS = 0.
LOOP AT lt_e071k INTO ls_e071k.
AT NEW objname.
CLEAR lt_keys[].
ENDAT.
APPEND ls_e071k TO lt_keys.
AT END OF objname. "only once per table
"for other than masterlang only language dependent tables
IF i_langu NE i_masterlang.
SELECT SINGLE tobj_name FROM objsl INTO sy-lisel "fully buffered
WHERE objectname EQ i_object "e.g. CUS0
AND objecttype EQ c_logical_object
AND tobj_name EQ ls_e071k-objname "TABNAME
AND ( tobjkey LIKE '%/L/%' OR tobjkey LIKE '%/L' ).
CHECK sy-subrc EQ 0.
ENDIF.
DATA: l_whitelist TYPE string.
SELECT SINGLE tabname FROM objs INTO l_whitelist
WHERE objectname EQ i_object
AND objecttype EQ c_logical_object
AND tabname EQ ls_e071k-objname.
IF sy-subrc NE 0.
MESSAGE e666(01) WITH 'Cannot update table' ls_e071k-objname INTO sy-
lisel. "#EC *
CALL METHOD log_message.
CONTINUE.
ENDIF.
CREATE DATA dref TYPE STANDARD TABLE OF (ls_e071k-objname) WITH DEFAULT
KEY.
ASSIGN dref->* TO <lt_table>.
PERFORM get_table_key IN PROGRAM saplsrtt
TABLES <lt_table> lt_keys
USING ls_e071k-objname space sy-mandt space space
CHANGING sy-dbcnt. "#EC *
CHECK sy-dbcnt NE 0.
IF testrun IS INITIAL.
TRY.
CALL METHOD cl_abap_dyn_prg=>check_whitelist_str "1487337
EXPORTING
val = ls_e071k-objname
whitelist = l_whitelist
RECEIVING
val_str = ls_e071k-objname.
CATCH cx_abap_not_in_whitelist.
RETURN. "will never happen
ENDTRY.
DELETE (ls_e071k-objname) FROM TABLE <lt_table>. "#EC CI_DYNTAB.
gv_repository_changed = 'X'.
ENDIF.
ENDAT.
ENDLOOP.
ENDMETHOD. "create_logical_object
METHOD execute_method.
DATA: ls_e070 TYPE e070,
ls_e071 TYPE e071,
lt_e071 TYPE TABLE OF e071,
lt_e071k TYPE TABLE OF e071k,
ls_trkey TYPE trkey.
DATA: lt_result TYPE scts_cl_results.
DATA: lt_client TYPE trexe_t_client.
DATA: lt_trlog TYPE TABLE OF trlog,
ls_trlog TYPE trlog,
lv_trkorr TYPE trkorr,
lv_file TYPE tstrf01-file.
CHECK NOT i_method IS INITIAL.
"get AFTER_IMP method
SORT gt_trkey.
DELETE ADJACENT DUPLICATES FROM gt_trkey COMPARING obj_type obj_name.
LOOP AT gt_trkey INTO ls_trkey.
ls_e071-pgmid = 'R3TR'.
ls_e071-object = ls_trkey-obj_type.
ls_e071-obj_name = ls_trkey-obj_name.
APPEND ls_e071 TO lt_e071.
ENDLOOP.
CALL FUNCTION 'TRINT_FREE_MEMORY'.
CONCATENATE sy-sysid 'K' sy-datum '_' sy-uzeit INTO lv_trkorr.
CALL FUNCTION 'TR_INITIALIZE_LOG' "Build temporary log file like
DEV_20140415_142649.SNOTE
EXPORTING
acttype = '_'
* DIRTYPE = 'T'
sysname = 'SNOTE' "lv_sysname
trkorr = lv_trkorr
IMPORTING
file = lv_file
EXCEPTIONS
wrong_call = 1
OTHERS = 2.
ASSERT sy-subrc EQ 0.
COMMIT WORK. "save what we have reached so far
DATA: trint_call_after_imp_method TYPE funcname VALUE
'TRINT_CALL_AFTER_IMP_METHOD'.
IF sy-saprl >= '700'.
APPEND sy-mandt TO lt_result.
CALL FUNCTION trint_call_after_imp_method
EXPORTING
iv_trkorr = space
is_e070 = ls_e070
it_e071 = lt_e071[]
it_e071k = lt_e071k[]
iv_update_lockflag = '' "'X'
CHANGING
it_client = lt_result
EXCEPTIONS
error_message = 1.
ELSE.
APPEND sy-mandt TO lt_client.
CALL FUNCTION trint_call_after_imp_method
EXPORTING
iv_trkorr = space
is_e070 = ls_e070
it_e071 = lt_e071[]
it_e071k = lt_e071k[]
iv_update_lockflag = '' "'X'
it_client = lt_client
EXCEPTIONS
error_message = 1.
ENDIF.
IF sy-subrc NE 0.
CALL METHOD log_message.
ENDIF.
CALL FUNCTION 'TR_READ_LOG'
EXPORTING
iv_log_type = trlog_type_file
iv_logname_file = lv_file
TABLES
et_lines = lt_trlog
EXCEPTIONS
OTHERS = 0.
DELETE lt_trlog WHERE class EQ 'PU' AND number EQ '131'. "No objects requiring
post-import methods exist
"append messages from method execution log
LOOP AT lt_trlog INTO ls_trlog.
CONCATENATE '(' ls_trlog-class '~' ls_trlog-number ')' INTO sy-msgv4.
TRANSLATE sy-msgv4 USING '~ '.
MESSAGE i666(01) WITH ls_trlog-line(50) ls_trlog-line+50(50) ls_trlog-
line+100(31) sy-msgv4 INTO sy-lisel. "#EC *
IF ls_trlog-class EQ 'SCPR' AND ( ls_trlog-number EQ 707 OR ls_trlog-number
EQ 871 ).
ls_trlog-severity = 'W'. "increase severity for some messages
ENDIF.
sy-msgty = ls_trlog-severity.
CALL METHOD log_message.
ENDLOOP.
CALL FUNCTION 'TR_DELETE_LOG'
EXPORTING
iv_log_type = 'FILE'
iv_logname_file = lv_file
EXCEPTIONS
OTHERS = 0.
ENDMETHOD. "execute_method
METHOD create_table_entries.
CONSTANTS lc_approved_system_table TYPE tabname VALUE 'APPROVED_SYSTEM_TABLE'.
DATA: lt_ko200 TYPE TABLE OF ko200,
ls_ko200 TYPE ko200,
lt_e071k TYPE TABLE OF e071k,
ls_e071k TYPE e071k.
DATA: l_keylen TYPE sy-fleng,
ls_x030l TYPE x030l,
l_no_update,
l_object TYPE tadir-object,
l_approved_system_table.
FIELD-SYMBOLS: <ls_entry> TYPE any.
DATA: dref TYPE REF TO data.
IF i_logical_object IS INITIAL AND NOT it_entries[] IS INITIAL.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'TABU'
i_obj_name = i_tabname.
ENDIF.
IF i_logical_object EQ 'X'. "used in older version
SELECT SINGLE objectname INTO l_object FROM objs WHERE tabname EQ i_tabname
AND objecttype EQ 'L'.
ELSEIF i_logical_object IS NOT INITIAL.
l_object = i_logical_object.
ENDIF.
"Currently only a bunch of tables is supported:
" - client independent
" - system tables (S / E / W) and customizing of type G
" - key fields of data type char/numc
"--- basic checks
DATA: ls_dd02v TYPE dd02v,
lt_dd03p TYPE TABLE OF dd03p,
l_rfcdest TYPE rfcdest.
CALL FUNCTION 'DD_TABL_GET' DESTINATION l_rfcdest
EXPORTING
langu = space
tabl_name = i_tabname
IMPORTING
dd02v_wa_a = ls_dd02v
TABLES
dd03p_tab_n = lt_dd03p
EXCEPTIONS
system_failure = 98 MESSAGE sy-lisel
communication_failure = 99 MESSAGE sy-lisel
access_failure = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE e666(01) WITH 'Error reading table' i_tabname INTO sy-lisel. "#EC *
RETURN.
ENDIF.
IF ls_dd02v IS INITIAL.
CALL METHOD lcl_wb=>set_context( i_object = 'TABU' i_obj_name = i_tabname
i_langu = space i_no_message = 'X' ).
MESSAGE w666(01) WITH 'Table' i_tabname 'does not exist (yet).' INTO sy-
lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
CALL METHOD lcl_wb=>set_context( i_object = space i_obj_name = space i_langu
= space ).
ENDIF.
c_clidep = ls_dd02v-clidep.
c_contflag = ls_dd02v-contflag.
IF NOT ls_dd02v-clidep IS INITIAL.
IF i_logical_object EQ 'LODS' OR "approved_logical_objects
i_logical_object EQ 'LODE' OR
i_logical_object EQ 'LOIE' OR
i_logical_object EQ 'LODC' OR
i_logical_object EQ 'PCYS' OR
i_tabname(14) EQ '/FSPD/TCDIR_CA' OR
i_tabname(5) EQ 'APB_L' OR "LPDS??
i_tabname(12) EQ 'TBCA_PAY_GA_' OR
i_tabname(12) EQ 'TBCA_PAY_GA_' OR
i_tabname CP 'SMMW*PARAM*'.
"approved client dependent table
ELSE.
"do not allow update
IF NOT it_entries[] IS INITIAL. "not during initial call
MESSAGE e666(01) WITH 'Skipping table ' i_tabname 'because it is client
dependent.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
EXIT.
ENDIF.
ENDIF.
CASE ls_dd02v-contflag.
WHEN 'S' OR 'E' OR 'W'. "W for SCP2
"later: MODIFY (i_tabname) FROM TABLE it_entries.
WHEN 'G'.
"later: INSERT (i_tabname) FROM TABLE it_entries ACCEPTING DUPLICATE KEYS.
WHEN OTHERS. "'W' OR 'L' OR 'A' OR 'C'.
IF NOT it_entries[] IS INITIAL. "not during initial call
MESSAGE e666(01) WITH 'Skipping table ' i_tabname 'because of delivery
class' ls_dd02v-contflag INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
EXIT.
ENDCASE.
"dynamic check for simple client independent system tables
IF ls_dd02v-clidep IS INITIAL AND ls_dd02v-contflag CA 'SE'.
LOOP AT lt_dd03p TRANSPORTING NO FIELDS WHERE ( datatype NE 'CHAR' AND
datatype NE 'NUMC' AND
datatype NE 'LANG' AND
datatype NE 'DATS' AND
datatype(3) NE 'INT' )
OR ( datatype(3) EQ 'INT' AND
keyflag IS NOT INITIAL )
OR ( outputlen > 200 ).
EXIT.
ENDLOOP.
IF sy-subrc NE 0.
l_approved_system_table = 'X'.
ENDIF.
ENDIF.
CASE i_tabname.
"------- transported as TABU, update via MODIFY -> no deletions supported
WHEN 'TVIMF' OR "view
events
'TRESC' OR "reserved
namespace
'T100S' OR 'T100SA' OR "variable
messages
'BALOBJ' OR 'BALOBJT' OR 'BALSUB' OR 'BALSUBT' OR "CDAT
APPL_LOG Application log defintion (SLG0)
'TZFB' OR 'TZFBT' OR
'CRMCHKMSG' OR 'CRMCHKMSGT' OR
"Checkman/ATC customizing
'TC33' OR 'TC34' OR 'T354B' OR "Status
handling
'RSECACHK' OR
'TCLO'. "VDAT V_CLO Class
System
WHEN 'TOBJ' OR 'TOBJVOR' OR 'TOBJVORFLG' OR 'TOBJVORDAT'.
"SUSO
PERFORM prepare_table USING i_tabname 'OBJCT' it_entries CHANGING
l_no_update.
WHEN 'TACTZ'.
"SUSO
PERFORM prepare_table USING i_tabname 'BROBJ' it_entries CHANGING
l_no_update.
WHEN 'TOBJT'.
"SUSO text
PERFORM prepare_table USING i_tabname 'OBJECT LANGU' it_entries CHANGING
l_no_update.
METHOD add_to_transport.
STATICS: s_object LIKE i_object,
s_obj_name TYPE string,
s_msgty TYPE symsgty,
s_testrun LIKE testrun VALUE '-',
s_masterlang TYPE tadir-masterlang.
DATA: l_tadir_name TYPE tadir-obj_name,
l_tadir_object LIKE i_object,
l_new_devclass TYPE devclass,
l_object_name TYPE string,
l_object_class TYPE string,
l_extend,
l_global_lock,
ls_trkey TYPE trkey,
ls_t000 TYPE t000,
l_bcset_clients TYPE string.
CLEAR sy-subrc.
IF lcl_wb=>language_installed( i_langu ) IS INITIAL.
RAISE language_not_installed.
ENDIF.
IF i_object EQ 'TABU'.
DATA: lt_ko200 TYPE TABLE OF ko200, ls_ko200 TYPE ko200,
lt_e071k TYPE TABLE OF e071k, ls_e071k TYPE e071k.
ls_ko200-pgmid = ls_e071k-pgmid = 'R3TR'.
ls_ko200-object = ls_e071k-object = ls_e071k-mastertype = 'TABU'.
ls_ko200-obj_name = ls_e071k-objname = ls_e071k-mastername = i_obj_name.
ls_ko200-objfunc = 'K'.
ls_e071k-tabkey = i_tabkey.
APPEND ls_ko200 TO lt_ko200.
APPEND ls_e071k TO lt_e071k.
CALL FUNCTION 'TR_OBJECTS_CHECK'
TABLES
wt_ko200 = lt_ko200
* WT_E071K =
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CALL FUNCTION 'TR_OBJECTS_INSERT'
EXPORTING
wi_order = gv_trkorr
IMPORTING
we_order = gv_trkorr
TABLES
wt_ko200 = lt_ko200
wt_e071k = lt_e071k
EXCEPTIONS
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
ENDIF.
IF sy-subrc NE 0.
RAISE error.
ENDIF.
RETURN.
ELSEIF i_object NE s_object OR
i_obj_name NE s_obj_name OR
testrun NE s_testrun.
s_object = i_object.
s_obj_name = i_obj_name.
s_testrun = testrun.
CLEAR s_msgty.
CHECK i_object NE space.
CASE i_object.
WHEN 'REPT' OR 'FUNC' OR 'CUAD' OR 'DOCU'.
l_object_class = i_object.
l_object_name = i_obj_name.
IF i_object EQ 'DOCU'.
l_extend = 'X'. "no SMODILOG for DOCU
ENDIF.
WHEN 'DOCV' OR 'DOCT' OR 'DSYS' OR 'STCS' OR 'MSAG' OR 'SOTR'
OR 'IWPR' OR 'IWMO' OR 'IWSV' OR 'IWOM' OR 'IWSG' OR 'SICF' "SEGW
OR 'SFRN' OR 'CUS0' OR 'CUS1' OR 'CUS2'. "IMG
l_object_class = i_object.
l_object_name = i_obj_name.
l_global_lock = 'X'.
l_extend = 'X'.
l_tadir_name = i_obj_name.
WHEN 'MESS'.
l_object_class = 'T100'.
l_object_name = i_obj_name.
WHEN 'CLAS' OR 'FUGR' OR 'PARA' OR 'VCLS' OR 'AUTH' OR 'TRAN' OR 'SUSO' OR
'PROG'.
l_object_class = i_object.
l_object_name = i_obj_name.
l_tadir_name = i_obj_name.
l_global_lock = 'X'.
WHEN 'DOMA' OR 'DTEL' OR 'TABL' OR 'TABT' OR 'VIEW' OR 'INDX' OR 'XINX' OR
'TTYP' OR 'SHLP' OR 'ENQU'.
l_object_class = 'DICT'.
CONCATENATE i_object i_obj_name INTO l_object_name.
IF i_object NE 'INDX'. "correct name will be determined by
SCWB_GET_TADIR_REM
l_tadir_name = i_obj_name.
ENDIF.
WHEN 'DYNP'.
l_object_class = 'SCRP'.
l_object_name = i_obj_name.
WHEN 'TABU'.
WHEN OTHERS.
l_object_class = i_object.
l_object_name = i_obj_name.
SELECT SINGLE objectname FROM objh INTO sy-lisel
WHERE objectname EQ i_object
AND objecttype EQ 'L'.
IF sy-subrc EQ 0. "is a logical object
l_global_lock = 'X'.
l_extend = 'X'.
l_tadir_name = i_obj_name.
ENDIF.
ENDCASE.
"determine TADIR key and check for old TADIR entry
DATA: ls_e071 TYPE e071,
ls_tadir_key TYPE tadir,
ls_tadir_old TYPE tadir.
ls_e071-pgmid = 'LIMU'.
ls_e071-object = i_object.
ls_e071-obj_name = i_obj_name.
CALL FUNCTION 'SCWB_GET_TADIR_REM' "determines main object if i_object is a
part object, e.g REPT->PROG
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir = ls_tadir_old
es_tadir_key = ls_tadir_key.
IF ls_tadir_key IS INITIAL.
ls_e071-pgmid = 'R3TR'.
CALL FUNCTION 'SCWB_GET_TADIR_REM'
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir = ls_tadir_old
es_tadir_key = ls_tadir_key.
ENDIF.
IF ls_tadir_old-devclass IS INITIAL.
l_new_devclass = i_devclass.
ELSE.
l_new_devclass = ls_tadir_old-devclass.
ENDIF.
"create TADIR entry in advance avoid popup
IF NOT ls_tadir_key-obj_name IS INITIAL. "only if a name could be
determined, e.g. does not work for LIMU DOCU FU... if function group does not exist
yet
ASSERT l_tadir_name IS INITIAL OR ls_tadir_key-obj_name EQ l_tadir_name.
"compatibility check
s_masterlang = ls_tadir_old-masterlang.
IF ls_tadir_old IS INITIAL. "V3.52
IF l_object_class EQ 'DICT' AND "V3.52
i_object NE 'INDX'. "V3.52
l_global_lock = 'X'. "similar to MSDXXBAS_FORMS 463 "V3.52
ENDIF. "V3.52
ELSEIF i_edtflag EQ 'X'. "iv_no_standard_editor
"temporary disable check of tadir-edtflag
UPDATE tadir SET edtflag = ' '
WHERE pgmid EQ ls_tadir_key-pgmid
AND object EQ ls_tadir_key-object
AND obj_name EQ ls_tadir_key-obj_name.
l_extend = 'X'. "no SMODILOG because object can't be reset to standard
ENDIF. "V3.52
IF i_langu CA gv_master_languages.
IF ls_tadir_old IS INITIAL.
"for new objects check whether it exists globally to determine correct
package
DATA: ls_gtadir TYPE gtadir.
CALL FUNCTION 'TR_GTADIR_QUERY'
EXPORTING
iv_pgmid = ls_tadir_key-pgmid
iv_object = ls_tadir_key-object
iv_obj_name = ls_tadir_key-obj_name
IMPORTING
result = ls_gtadir
EXCEPTIONS
OTHERS = 0.
IF NOT ls_gtadir IS INITIAL AND testrun IS INITIAL.
CALL FUNCTION 'TRINT_TADIR_MODIFY'
EXPORTING
author = sy-uname
devclass = i_devclass "or from GTADIR
pgmid = ls_tadir_key-pgmid
object = ls_tadir_key-object
obj_name = ls_tadir_key-obj_name
masterlang = i_langu "no masterlang in GTADIR
srcsystem = ls_gtadir-srcsystem
change_masterlang = 'X'
* EDTFLAG = '~'
* GENFLAG = '~'
force_mode = space
EXCEPTIONS
OTHERS = 0.
ENDIF.
ENDIF.
"set correct language and package on first call per object
"skip this for other languages than EN/DE.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
* WI_DELETE_TADIR_ENTRY = ' '
wi_test_modus = testrun
wi_tadir_pgmid = ls_tadir_key-pgmid
wi_tadir_object = ls_tadir_key-object
wi_tadir_obj_name = ls_tadir_key-obj_name
wi_tadir_devclass = l_new_devclass
wi_tadir_masterlang = i_langu
EXCEPTIONS
devclass_not_existing = 90
obj_specification_not_unique = 91
pgmid_object_not_allowed = 92
masterlanguage_not_specified = 93
devclass_not_specified = 94
tadir_entry_not_existing = 1
tadir_entry_ill_type = 2
no_systemname = 3
no_systemtype = 4
original_system_conflict = 5
object_reserved_for_devclass = 6
object_exists_global = 7
object_exists_local = 8
object_is_distributed = 9
no_authorization_to_delete = 11
simultanious_set_remove_repair = 13
order_missing = 14
no_modification_of_head_syst = 15
specify_owner_unique = 19
loc_priv_objs_no_repair = 20
gtadir_not_reached = 21
object_locked_for_order = 22
change_of_class_not_allowed = 23
no_change_from_sap_to_tmp = 24
OTHERS = 25.
IF sy-subrc EQ 90.
READ TABLE gr_devclass WITH KEY low = i_devclass TRANSPORTING NO
FIELDS.
IF sy-subrc NE 0 OR testrun IS INITIAL.
CALL METHOD lcl_wb=>log_message.
s_msgty = 'E'.
ENDIF.
ELSEIF sy-subrc GT 90.
CALL METHOD lcl_wb=>log_message.
s_msgty = 'E'.
ENDIF.
ENDIF.
IF NOT i_devclass IS INITIAL.
"set correct package in memory
EXPORT current_devclass FROM i_devclass TO MEMORY ID 'EUK'.
SET PARAMETER ID 'EUK' FIELD i_devclass.
ENDIF.
ENDIF.
IF testrun IS INITIAL.
DATA: l_suppress_dialog.
IF i_devclass EQ '$TMP'. "perform all checks but suppress some popups
l_suppress_dialog = 'X'. "e.g. 'object can only be created in SAP
package' 'system setting does not allow....'
ENDIF.
CALL FUNCTION 'RS_CORR_INSERT' "and create TADIR-entry
EXPORTING
object = l_object_name
object_class = l_object_class
global_lock = l_global_lock
devclass = i_devclass
korrnum = gv_trkorr
master_language = i_langu
extend = l_extend
suppress_dialog = l_suppress_dialog "currently only set for local
objects
IMPORTING
korrnum = gv_trkorr
transport_key = ls_trkey
EXCEPTIONS
cancelled = 1
permission_failure = 2
unknown_objectclass = 3
OTHERS = 4.
IF sy-subrc NE 0.
s_msgty = 'E'.
ELSE.
"collect objects with update
COLLECT ls_trkey INTO gt_trkey.
"correct master language if neccessary
IF NOT ls_tadir_key IS INITIAL AND ls_tadir_old-masterlang IS INITIAL.
IF i_langu CA gv_master_languages.
IF ls_e071-pgmid EQ 'R3TR'.
UPDATE tadir SET masterlang = i_langu
WHERE pgmid EQ ls_tadir_key-pgmid
AND object EQ ls_tadir_key-object
AND obj_name EQ ls_tadir_key-obj_name
AND masterlang NE i_langu.
ELSE. "creation of LIMU where no TADIR existed before
* UPDATE tadir SET masterlang = space "clear language and let
SCWB/SNOTE set the correct language
DELETE FROM tadir
WHERE pgmid EQ ls_tadir_key-pgmid
AND object EQ ls_tadir_key-object
AND obj_name EQ ls_tadir_key-obj_name.
ENDIF.
s_masterlang = i_langu.
ENDIF.
ENDIF.
"set/restore tadir-edtflag
IF i_edtflag EQ 'X'. "iv_no_standard_editor
"temporary disable check of tadir-edtflag
UPDATE tadir SET edtflag = 'X'
WHERE pgmid EQ ls_tadir_key-pgmid
AND object EQ ls_tadir_key-object
AND obj_name EQ ls_tadir_key-obj_name.
ENDIF.
ENDIF.
ELSE.
CALL FUNCTION 'RS_CORR_CHECK'
EXPORTING
object = l_object_name
object_class = l_object_class
global_lock = l_global_lock
suppress_dialog = 'X' "e.g. 'object can only be created in SAP
package'
EXCEPTIONS
cancelled = 1
permission_failure = 2
unknown_objectclass = 3
OTHERS = 4.
IF sy-subrc NE 0.
CALL METHOD log_message.
s_msgty = 'E'.
ELSE.
s_msgty = 'W'.
ENDIF.
ENDIF.
ENDIF.
e_masterlang = s_masterlang.
CASE s_msgty.
WHEN 'E'.
MESSAGE e666(01) WITH 'Could not add to transport request' INTO sy-lisel.
"#EC *
CALL METHOD log_message.
RAISE error.
WHEN 'W'.
RAISE simulation.
ENDCASE.
ENDMETHOD. "add_to_transport
METHOD register_inactive_object.
DATA: l_obj_name TYPE e071-obj_name.
l_obj_name = i_objname.
CALL FUNCTION 'RS_INSERT_INTO_WORKING_AREA'
EXPORTING
object = i_objtype
obj_name = l_obj_name
EXCEPTIONS
OTHERS = 0.
IF i_treetype IS SUPPLIED.
CHECK i_treetype NE space.
CALL FUNCTION 'RS_TREE_OBJECT_PLACEMENT'
EXPORTING
type = i_treetype
object = l_obj_name.
ELSE.
CALL FUNCTION 'RS_TREE_OBJECT_PLACEMENT'
EXPORTING
type = i_objtype
object = l_obj_name.
ENDIF.
ENDMETHOD. "register_inactive_object
METHOD create_message.
DATA: lt_bdc TYPE TABLE OF bdcdata,
ls_bdc TYPE bdcdata,
ls_bdcp TYPE bdcdata,
ls_opt TYPE ctu_params.
DATA: ls_t100 TYPE t100,
ls_t100a TYPE t100a,
ls_t100u TYPE t100u,
ls_t100x TYPE t100x,
ls_t100o TYPE t100o,
lt_activity TYPE tt_activity,
l_obj_name TYPE dokil-object,
ls_msg_class LIKE LINE OF gr_msg_class VALUE 'IEQ'.
ls_msg_class-low = i_msgid.
COLLECT ls_msg_class INTO gr_msg_class.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'MESS'
i_obj_name = i_msgid
i_obj_name2 = i_msgno.
IF gv_abap_in_eclipse EQ 'X'.
MESSAGE e666(01) WITH 'Creation/Copy not possible in Eclipse.' 'Please use
SAPGUI.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
SELECT SINGLE * FROM t100a INTO ls_t100a
WHERE arbgb EQ i_msgid.
IF sy-subrc NE 0.
IF testrun IS INITIAL OR NOT i_msgid IN gr_msg_class.
MESSAGE e509(eu) WITH i_msgid INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
RETURN.
ENDIF.
SELECT SINGLE masterlang FROM tadir INTO ls_t100a-masterlang
WHERE pgmid EQ 'R3TR'
AND object EQ 'MSAG'
AND obj_name EQ i_msgid.
SELECT SINGLE * FROM t100 INTO ls_t100
WHERE sprsl EQ i_langu
AND arbgb EQ i_msgid
AND msgnr EQ i_msgno.
SELECT SINGLE * FROM t100u INTO ls_t100u
WHERE arbgb EQ i_msgid
AND msgnr EQ i_msgno.
SELECT SINGLE auth_check FROM t100x INTO CORRESPONDING FIELDS OF ls_t100x
WHERE arbgb EQ i_msgid
AND msgnr EQ i_msgno.
SELECT activity FROM t100o INTO TABLE lt_activity "#EC CI_GENBUFF
WHERE arbgb EQ i_msgid "#EC CI_SGLSELECT
AND msgnr EQ i_msgno.
IF i_text EQ ls_t100-text AND
i_auth_check EQ ls_t100x-auth_check AND
it_activity EQ lt_activity.
IF i_selfdef IS INITIAL AND ls_t100u-selfdef IS INITIAL OR
NOT i_selfdef IS INITIAL AND NOT ls_t100u-selfdef IS INITIAL.
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
ENDIF.
CALL FUNCTION 'DOCU_OBJECT_NAME_CONCATENATE'
EXPORTING
docu_id = 'NA'
element = i_msgid
addition = i_msgno
IMPORTING
object = l_obj_name
EXCEPTIONS
OTHERS = 0.
CALL METHOD add_to_transport
EXPORTING
i_object = 'MESS'
i_obj_name = l_obj_name
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
IF i_langu EQ ls_t100a-masterlang.
"create or change message and write into transport request
"if sy-langu is different from master language SE91 will switch to master
lang
ls_bdcp-program = 'SAPLWBMESSAGES'.
ls_bdcp-dynpro = '0100'.
ls_bdcp-dynbegin = 'X'.
APPEND ls_bdcp TO lt_bdc.
ls_bdc-fnam = 'RSDAG-ARBGB'.
ls_bdc-fval = i_msgid.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'MSG_NUMMER'.
ls_bdc-fval = i_msgno.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'RSDAG-MSGFLAG'.
ls_bdc-fval = 'X'.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'BDC_OKCODE'.
ls_bdc-fval = '=WB_EDIT'.
APPEND ls_bdc TO lt_bdc.
ls_bdcp-dynpro = '1000'.
ls_bdcp-dynbegin = 'X'.
APPEND ls_bdcp TO lt_bdc.
ls_bdc-fnam = 'BDC_SUBSCR'.
ls_bdc-fval = 'SAPLWBMESSAGES 0101SUB'.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'T100-TEXT(01)'.
ls_bdc-fval = i_text.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'LISTTAB-DOKU_FLAG(01)'.
IF i_selfdef IS INITIAL.
ls_bdc-fval = ' '.
ELSE.
ls_bdc-fval = 'X'.
ENDIF.
APPEND ls_bdc TO lt_bdc.
ls_bdc-fnam = 'BDC_OKCODE'.
ls_bdc-fval = '=WB_SAVE'.
APPEND ls_bdc TO lt_bdc.
ls_bdcp-dynpro = '1000'.
ls_bdcp-dynbegin = 'X'.
APPEND ls_bdcp TO lt_bdc.
ls_bdc-fnam = 'BDC_OKCODE'.
ls_bdc-fval = '=WB_BACK'.
APPEND ls_bdc TO lt_bdc.
ls_bdcp-dynpro = '0100'.
ls_bdcp-dynbegin = 'X'.
APPEND ls_bdcp TO lt_bdc.
ls_bdc-fnam = 'BDC_OKCODE'.
ls_bdc-fval = '=WB_BACK'.
APPEND ls_bdc TO lt_bdc.
ls_opt-dismode = 'E'.
ls_opt-racommit = 'X'.
ls_opt-nobinpt = 'X'.
ls_opt-nobiend = 'X'.
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = 'SE91'
EXCEPTIONS
ok = 0
not_ok = 2
OTHERS = 3.
IF sy-subrc NE 0.
CALL METHOD log_message.
ELSE.
CALL TRANSACTION 'SE91' USING lt_bdc OPTIONS FROM ls_opt. "#EC CI_CALLTA
ENDIF.
ELSE.
"update translation only
ls_t100-arbgb = i_msgid.
ls_t100-msgnr = i_msgno.
ls_t100-sprsl = i_langu.
ls_t100-text = i_text.
MODIFY t100 FROM ls_t100. "no activation needed
ENDIF.
IF i_auth_check EQ ls_t100x-auth_check OR i_auth_check IS NOT SUPPLIED.
ELSEIF i_auth_check IS INITIAL.
DELETE FROM t100x WHERE arbgb EQ i_msgid AND msgnr EQ i_msgno.
ELSE.
ls_t100x-arbgb = i_msgid.
ls_t100x-msgnr = i_msgno.
ls_t100x-auth_check = i_auth_check.
INSERT t100x FROM ls_t100x.
ENDIF.
IF it_activity NE lt_activity AND it_activity IS SUPPLIED.
DELETE FROM t100o WHERE arbgb EQ i_msgid AND msgnr EQ i_msgno.
LOOP AT it_activity INTO ls_t100o-activity.
ls_t100o-arbgb = i_msgid.
ls_t100o-msgnr = i_msgno.
INSERT t100o FROM ls_t100o.
ENDLOOP.
ENDIF.
MESSAGE i666(01) WITH 'Update successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_translation = 'X'.
gv_repository_changed = 'X'.
ENDMETHOD. "create_message
METHOD create_mess_docu.
DATA: l_docname TYPE thead-tdname.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'MESS'
i_obj_name = i_msgid
i_obj_name2 = i_msgno
i_text = 'Message Longtext'. "#EC NOTEXT
CONCATENATE 'NA' i_msgid i_msgno INTO l_docname.
IF et_lines IS SUPPLIED.
CALL METHOD lcl_wb=>create_other_docu
EXPORTING
i_devclass = i_devclass
i_docname = l_docname
i_langu = i_langu
i_dokstate = i_dokstate
i_selfdef = i_selfdef
i_line = i_line
IMPORTING
et_lines = et_lines.
ELSE.
CALL METHOD lcl_wb=>create_other_docu
EXPORTING
i_devclass = i_devclass
i_docname = l_docname
i_langu = i_langu
i_dokstate = i_dokstate
i_selfdef = i_selfdef
i_line = i_line.
ENDIF.
ENDMETHOD. "create_mess_docu
METHOD create_dtel_docu.
DATA: l_docname TYPE thead-tdname.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'DTEL'
i_obj_name = i_rollname
i_text = 'Data Element Longtext'. "#EC NOTEXT
CONCATENATE 'DE' i_rollname INTO l_docname.
IF et_lines IS SUPPLIED.
CALL METHOD lcl_wb=>create_other_docu
EXPORTING
i_devclass = i_devclass
i_docname = l_docname
i_langu = i_langu
i_dokstate = i_dokstate
i_selfdef = i_selfdef
i_line = i_line
IMPORTING
et_lines = et_lines.
ELSE.
CALL METHOD lcl_wb=>create_other_docu
EXPORTING
i_devclass = i_devclass
i_docname = l_docname
i_langu = i_langu
i_dokstate = i_dokstate
i_selfdef = i_selfdef
i_line = i_line.
ENDIF.
ENDMETHOD. "create_dtel_docu
METHOD create_other_docu.
STATICS: lt_line TYPE TABLE OF tline.
DATA: ls_head TYPE thead,
lt_line_old LIKE lt_line,
ls_line TYPE tline,
ls_tadir TYPE tadir,
lt_e071k TYPE TABLE OF e071k,
ls_ko200 TYPE ko200,
lv_masterlang TYPE tadir-masterlang,
l_dokstate TYPE dokstate,
lv_no_masterlang.
DATA: lt_sfreln TYPE TABLE OF sfreln,
lt_sfreim TYPE TABLE OF sfreim,
lt_sfreac TYPE TABLE OF sfreac,
lt_sfrecou TYPE TABLE OF sfrecou.
IF NOT i_line IS INITIAL.
"collect docu lines
ls_line = i_line.
SHIFT ls_line-tdline LEFT.
APPEND ls_line TO lt_line.
ELSEIF i_selfdef IS NOT INITIAL.
"self explanatory
CALL METHOD lcl_wb=>set_context
EXPORTING
i_langu = i_langu
i_object = 'DOCU'
i_obj_name = i_docname(2)
i_obj_name2 = i_docname+2
i_text = 'Documentation Status'. "#EC NOTEXT
IF testrun IS INITIAL.
CALL FUNCTION 'DOCU_SELFDEF_WRITE' "#EC *'
EXPORTING
object_id = i_docname(2)
object_name = i_docname+2(60) "FM expects CHAR60
selfdef = space "1st: deletion of DOKIL to avoid popup
in second step
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'DOCU_SELFDEF_WRITE' "#EC *'
EXPORTING
object_id = i_docname(2)
object_name = i_docname+2(60) "FM expects CHAR60
selfdef = i_selfdef "2nd: update DOKIL without popup "delete
docu?"
EXCEPTIONS
OTHERS = 0.
ENDIF.
ELSE.
"final call -> write DOCU
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'DOCU'
i_obj_name = i_docname(2)
i_obj_name2 = i_docname+2.
ls_head-tdobject = 'DOKU'.
ls_head-tdname = i_docname+2.
ls_head-tdid = i_docname(2).
ls_head-tdspras = i_langu.
ls_head-tdform = 'S_DOCU_SHOW'.
ls_head-tdstyle = 'S_DOCUS1'.
CALL FUNCTION 'DOCU_GET'
EXPORTING
id = ls_head-tdid(2)
object = ls_head-tdname(60)
langu = ls_head-tdspras
IMPORTING
dokstate = l_dokstate
TABLES
line = lt_line_old
EXCEPTIONS
OTHERS = 0.
IF et_lines IS SUPPLIED.
et_lines[] = lt_line[] = lt_line_old[].
RETURN.
ENDIF.
IF lt_line_old[] EQ lt_line AND l_dokstate EQ 'A'.
"no update necessary
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
REFRESH lt_line.
RETURN.
ENDIF.
CALL FUNCTION 'DOCU_TR_OBJECT_CHECK'
EXPORTING
object_id = ls_head-tdid(2)
object_name = ls_head-tdname(60)
TABLES
wt_e071k = lt_e071k
CHANGING
corr_entry = ls_ko200.
CALL METHOD add_to_transport "and create TADIR entry
EXPORTING
i_langu = i_langu
i_devclass = i_devclass
i_object = ls_ko200-object
i_obj_name = ls_ko200-obj_name
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
"determine current master language of docu object, may differ from master
language in TADIR
"CALL FUNCTION 'DOCU_GET_MASTERLANG' does not consider or return SELFDEF
hence we read by our own
DATA: ls_dokil TYPE dokil.
SELECT SINGLE * FROM dokil INTO ls_dokil WHERE id EQ ls_head-tdid "#EC
CI_GENBUFF "#EC CI_BYPASS
AND object EQ ls_head-tdname
AND typ EQ i_typ
AND masterlang EQ 'X'.
IF sy-subrc EQ 0 AND ls_dokil-selfdef IS INITIAL AND i_langu NE ls_dokil-
langu .
* "no master lang so far, take current language as master
lv_no_masterlang = 'X'. "language of selfdef entries usually is DE,
switch to a different master language is allowed
ENDIF.
"create new version
DATA l_dokversion TYPE dokhl-dokversion.
SELECT MAX( dokversion ) FROM dokhl INTO l_dokversion "#EC *
WHERE id = ls_head-tdid(2)
AND object = ls_head-tdname
AND langu = ls_head-tdspras.
ADD 1 TO l_dokversion.
ls_head-tdfdate = sy-datum.
ls_head-tdftime = sy-uzeit.
ls_head-tdfuser = sy-uname.
ls_head-tdldate = sy-datum.
ls_head-tdltime = sy-uzeit.
ls_head-tdluser = sy-uname.
IF ls_head-tdid EQ 'IN'. "Release note / oder DOCV
IF 1 = 0.
"Nachlesen der Releasenote-Attribute
"und umformen in zus�tzliche Zeilen in lt_line
"vergleiche Aufruf von DOCU_UPDATE, wenn man in der SE61 ein IN RELN
pflegt.
PERFORM index_descriptors IN PROGRAM saplsdoc. "#EC *
ENDIF.
"read current attributes
SELECT * FROM sfreln INTO TABLE lt_sfreln WHERE txtkey = i_docname+6.
"#EC CI_GENBUFF "#EC CI_BUFFJOIN "#EC CI_SGLSELECT
SELECT * FROM sfreim INTO TABLE lt_sfreim WHERE rel_cla EQ 'RELN' AND
rel_obj EQ i_docname+6. "#EC CI_GENBUFF "#EC CI_BUFFJOIN
SELECT * FROM sfreac INTO TABLE lt_sfreac WHERE rel_cla EQ 'RELN' AND
rel_obj EQ i_docname+6. "#EC CI_GENBUFF "#EC CI_BUFFJOIN
SELECT * FROM sfrecou INTO TABLE lt_sfrecou WHERE rel_cla EQ 'RELN' AND
rel_obj EQ i_docname+6. "#EC CI_GENBUFF "#EC CI_BUFFJOIN
ENDIF.
CALL FUNCTION 'DOCU_UPDATE' "this initializes attributes
EXPORTING
* ACTCLASS = ' '
head = ls_head
no_masterlang = lv_no_masterlang
state = i_dokstate
typ = i_typ
version = l_dokversion
TABLES
line = lt_line.
IF ls_head-tdid EQ 'IN'.
"restore those attributes which have been deleted bei DOCU_UPDATE
INSERT sfreln FROM TABLE lt_sfreln ACCEPTING DUPLICATE KEYS.
INSERT sfreim FROM TABLE lt_sfreim ACCEPTING DUPLICATE KEYS.
INSERT sfreac FROM TABLE lt_sfreac ACCEPTING DUPLICATE KEYS.
INSERT sfrecou FROM TABLE lt_sfrecou ACCEPTING DUPLICATE KEYS.
ENDIF.
MESSAGE i666(01) WITH 'Update successful' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
gv_translation = 'X'.
REFRESH lt_line.
ENDIF.
ENDMETHOD. "create_other_docu
METHOD create_program_text.
DATA: lt_textpool TYPE TABLE OF textpool,
lt_source TYPE TABLE OF abapsource,
l_text LIKE i_text.
FIELD-SYMBOLS: <ls_textpool> TYPE textpool.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'REPT'
i_obj_name = i_progname.
CALL FUNCTION 'RPY_PROGRAM_READ'
EXPORTING
language = i_langu
program_name = i_progname
with_includelist = space
only_texts = 'X'
read_latest_version = 'X'
with_lowercase = 'X'
TABLES
textelements = lt_textpool
source = lt_source "dummy for 46C
EXCEPTIONS
cancelled = 1
not_found = 2
permission_error = 3
OTHERS = 4.
IF sy-subrc EQ 2.
READ TEXTPOOL i_progname INTO lt_textpool LANGUAGE i_langu.
ELSEIF sy-subrc NE 0.
MESSAGE e666(01) WITH 'Error while reading program text' 'of program'
i_progname INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
l_text = i_text.
IF i_id EQ 'S' AND i_text(8) NE space AND i_text NE c_ddic_ref.
"if selection text does note begin with 8 space -> insert them
SHIFT l_text LEFT DELETING LEADING space.
SHIFT l_text RIGHT BY 8 PLACES.
ENDIF.
READ TABLE lt_textpool ASSIGNING <ls_textpool>
WITH KEY id = i_id
key = i_key.
IF sy-subrc EQ 0. "already exists
IF l_text EQ <ls_textpool>-entry AND
i_length EQ <ls_textpool>-length.
MESSAGE i666(01) WITH 'No update necessary for program text' i_key INTO sy-
lisel. "#EC *
CALL METHOD log_message.
RETURN. "nothing to do
ELSE.
"update extsing entry
<ls_textpool>-entry = l_text.
sy-fleng = strlen( l_text ).
IF i_length IS INITIAL OR i_length LT sy-fleng.
<ls_textpool>-length = strlen( l_text ).
ELSE.
<ls_textpool>-length = i_length.
ENDIF.
ENDIF.
ELSE.
"add new entry
* APPEND INITIAL LINE TO lt_textpool ASSIGNING <ls_textpool>.
APPEND INITIAL LINE TO lt_textpool. READ TABLE lt_textpool INDEX sy-tabix
ASSIGNING <ls_textpool>. "46C
<ls_textpool>-id = i_id.
<ls_textpool>-key = i_key.
<ls_textpool>-entry = l_text.
IF i_length IS INITIAL.
<ls_textpool>-length = strlen( l_text ).
ELSE.
<ls_textpool>-length = i_length.
ENDIF.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_devclass = i_devclass
i_langu = i_langu
i_object = 'REPT'
i_obj_name = i_progname
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
INSERT TEXTPOOL i_progname FROM lt_textpool LANGUAGE i_langu.
MESSAGE i666(01) WITH 'Update successful for program text' i_key INTO sy-lisel.
"#EC *
CALL METHOD log_message.
ENDMETHOD. "create_program_text
METHOD create_user_interface.
DATA: ls_adm TYPE rsmpe_adm,
lt_sta TYPE TABLE OF rsmpe_stat,
lt_fun TYPE TABLE OF rsmpe_funt,
lt_men TYPE TABLE OF rsmpe_men,
lt_mtx TYPE TABLE OF rsmpe_mnlt,
lt_act TYPE TABLE OF rsmpe_act,
lt_but TYPE TABLE OF rsmpe_but,
lt_pfk TYPE TABLE OF rsmpe_pfk,
lt_set TYPE TABLE OF rsmpe_staf,
lt_doc TYPE TABLE OF rsmpe_atrt,
lt_tit TYPE TABLE OF rsmpe_titt,
lt_biv TYPE TABLE OF rsmpe_buts,
lt_ctx TYPE TABLE OF rsmpe_ctx,
lt_texts TYPE TABLE OF rsmptexts,
l_state,
ls_tr_key TYPE trkey,
ls_guistatus LIKE LINE OF gr_guistatus VALUE 'IEQ'.
CALL METHOD set_context
EXPORTING
i_langu = i_langu
i_object = 'CUAD'
i_obj_name = i_progname.
ls_guistatus-low = i_progname.
COLLECT ls_guistatus INTO gr_guistatus.
l_state = 'I'.
DO 2 TIMES.
CALL FUNCTION 'RS_CUA_INTERNAL_FETCH'
EXPORTING
program = i_progname
language = i_langu
state = l_state "1. inactive, 2. active
IMPORTING
adm = ls_adm
TABLES
sta = lt_sta
fun = lt_fun
men = lt_men
mtx = lt_mtx
act = lt_act
but = lt_but
pfk = lt_pfk
set = lt_set
doc = lt_doc
tit = lt_tit
biv = lt_biv
EXCEPTIONS
not_found = 1
OTHERS = 99.
IF sy-subrc EQ 0 AND NOT lt_sta[] IS INITIAL.
EXIT. "DO.
ENDIF.
l_state = 'A'.
ENDDO.
IF is_adm-actcode IS INITIAL AND it_act[] IS NOT INITIAL OR "not passed by
caller
is_adm-mencode IS INITIAL AND it_men[] IS NOT INITIAL OR
is_adm-pfkcode IS INITIAL AND it_pfk[] IS NOT INITIAL.
DATA: ls_men TYPE rsmpe_men,
ls_act TYPE rsmpe_act,
ls_pfk TYPE rsmpe_pfk.
"determine consistent values on the fly based on input tables
CLEAR: ls_act, ls_men, ls_pfk.
LOOP AT it_act[] INTO ls_act WHERE code+6(14) IS INITIAL OR code(6) CO
'0123456789'.
CHECK ls_act-code GT is_adm-actcode.
is_adm-actcode = ls_act-code.
ENDLOOP.
LOOP AT it_men[] INTO ls_men WHERE code+6(14) IS INITIAL OR code(6) CO
'0123456789'.
CHECK ls_men-code GT is_adm-actcode.
is_adm-actcode = ls_men-code.
ENDLOOP.
LOOP AT it_pfk[] INTO ls_pfk WHERE code+6(14) IS INITIAL OR code(6) CO
'0123456789'.
CHECK ls_pfk-code GT is_adm-actcode.
is_adm-actcode = ls_pfk-code.
ENDLOOP.
is_adm-mod_langu = ls_adm-mod_langu. "keep current MOD_LANGU
ENDIF.
IF ls_adm EQ is_adm AND
lt_sta EQ it_sta AND
lt_fun EQ it_fun AND
lt_men EQ it_men AND
lt_mtx EQ it_mtx AND
lt_act EQ it_act AND
lt_but EQ it_but AND
lt_pfk EQ it_pfk AND
lt_set EQ it_set AND
lt_doc EQ it_doc AND
lt_tit EQ it_tit AND
lt_biv EQ it_biv.
MESSAGE i666(01) WITH 'No update necessary' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
"determine transport key
DATA: ls_e071 TYPE e071, ls_tadir TYPE tadir.
ls_tr_key-sub_type = 'CUAD'.
ls_tr_key-sub_name = i_progname.
ls_e071-pgmid = 'LIMU'.
ls_e071-object = 'CUAD'.
ls_e071-obj_name = i_progname.
CALL FUNCTION 'SCWB_GET_TADIR_REM'
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir_key = ls_tadir.
ls_tr_key-obj_type = ls_tadir-object.
ls_tr_key-obj_name = ls_tadir-obj_name.
"check if program exists
SELECT SINGLE name FROM trdir INTO sy-lisel WHERE name = i_progname.
IF sy-subrc NE 0.
MESSAGE i666(01) WITH 'GUI Definition can not be created yet.' INTO sy-lisel.
"#EC *
CALL METHOD log_message.
MESSAGE w666(01) WITH 'Please execute this report again when' ls_tr_key-
obj_type ls_tr_key-obj_name 'has been created.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
RETURN.
ENDIF.
CALL METHOD add_to_transport
EXPORTING
i_object = 'CUAD'
i_obj_name = i_progname
i_devclass = i_devclass
i_langu = i_langu
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
"determine current maintenance language (in case that status did exist before)
DATA: l_masterlang LIKE i_langu.
"EUDB-SPRSL is always D, EUDB-LANGU seems to be master language
SELECT SINGLE langu FROM eudb INTO l_masterlang "#EC CI_GENBUFF
WHERE ( relid EQ scua_c_relid_inactive OR
relid EQ scua_c_relid_active )
AND ( name EQ i_progname ).
IF sy-subrc NE 0.
l_masterlang = ls_tadir-masterlang.
ENDIF.
IF l_masterlang IS INITIAL.
l_masterlang = i_langu.
ENDIF.
IF i_langu = l_masterlang. "do only use for masterlanguage!
CALL FUNCTION 'RS_CUA_INTERNAL_WRITE'
EXPORTING
program = i_progname
language = i_langu
tr_key = ls_tr_key
adm = is_adm
state = 'I' "I = inactive A = activ
TABLES
sta = it_sta
fun = it_fun
men = it_men
mtx = it_mtx
act = it_act
but = it_but
pfk = it_pfk
set = it_set
doc = it_doc
tit = it_tit
biv = it_biv
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
CALL METHOD log_message.
RETURN.
ELSE.
CALL FUNCTION 'RS_CUA_INTERNAL_GENERATE'
EXPORTING
program = i_progname
EXCEPTIONS
OTHERS = 0.
METHOD create_transformation.
DATA: lr_xslt TYPE REF TO cl_o2_api_xsltdesc.
DATA: ls_xsltattr TYPE o2xsltattr.
DATA: ls_gotstate TYPE ddgotstate.
DATA: lv_par TYPE string.
DATA: l_masterlang TYPE masterlang.
STATICS: lv_src TYPE string,
lv_update_message.
DATA: lt_error_list TYPE o2xslterrt,
ls_error_list TYPE LINE OF o2xslterrt,
l_error_save.
CALL METHOD set_context
EXPORTING
i_no_message = update "no message during step update
i_langu = i_langu
i_object = 'XSLT'
i_obj_name = i_transformation.
l_error_save = gv_errors_occured. "save global status since it shall not be
influenced
CLEAR gv_errors_occured.
IF i_line NP '<<--->>*'. "marker for end of source code
IF i_line CP '<<...>>*'. "marker for line break
CONCATENATE lv_src i_line+7 INTO lv_src.
ELSE.
CONCATENATE lv_src cl_abap_char_utilities=>cr_lf i_line INTO lv_src.
ENDIF.
ELSE.
"finished creating code -> remove very first lv_src cr_lf
SHIFT lv_src LEFT BY 2 PLACES.
"determine masterlang for new/changed object
SELECT SINGLE masterlang FROM tadir INTO l_masterlang WHERE pgmid EQ 'R3TR'
AND object EQ 'XSLT' AND obj_name EQ i_transformation.
IF sy-subrc NE 0.
l_masterlang = i_langu.
ENDIF.
* check if NEW required DDIC objects are active to avoid STEP3 phase
IF update IS NOT INITIAL.
IF i_transformation = 'STC_TM_SESSION_EXTXML_2_HTML'.
CALL FUNCTION 'DDIF_DTEL_GET'
EXPORTING
name = 'STC_SESSION_FINALIZED_DESCR'
langu = 'E'
state = 'A' "active version
IMPORTING
gotstate = ls_gotstate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0 OR ls_gotstate IS INITIAL.
MESSAGE e666(01) WITH 'Data element ' 'STC_SESSION_FINALIZED_DESCR' '
not active' INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_errors_occured = 'X'.
ENDIF.
DATA lt_dd03p TYPE STANDARD TABLE OF dd03p.
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
name = 'STCTM_S_LOG'
state = 'A' "active
langu = 'E'
TABLES
dd03p_tab = lt_dd03p
EXCEPTIONS
OTHERS = 0.
READ TABLE lt_dd03p WITH KEY fieldname = 'SRC_OBJECT' TRANSPORTING NO
FIELDS.
IF sy-subrc <> 0.
MESSAGE e666(01) WITH 'Field SRC_OBJECT missing in structure
STCTM_S_LOG' INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_errors_occured = 'X'.
ENDIF.
READ TABLE lt_dd03p WITH KEY fieldname = 'SRC_LINE' TRANSPORTING NO
FIELDS.
IF sy-subrc <> 0.
MESSAGE e666(01) WITH 'Field SRC_OBJECT missing in structure SRC_LINE'
INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_errors_occured = 'X'.
ENDIF.
ELSEIF i_transformation = 'STC_TM_SESSION_EXTXML_2_SLA'.
CALL FUNCTION 'DDIF_DTEL_GET'
EXPORTING
name = 'STC_SESSION_FINALIZED_DESCR'
langu = 'E'
state = 'A' "active version
IMPORTING
gotstate = ls_gotstate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0 OR ls_gotstate IS INITIAL.
MESSAGE e666(01) WITH 'Data element ' 'STC_SESSION_FINALIZED_DESCR' '
not active' INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_errors_occured = 'X'.
ENDIF.
CALL FUNCTION 'DDIF_DTEL_GET'
EXPORTING
name = 'STC_TASK_SEMANTIC_ID'
langu = 'E'
state = 'A' "active version
IMPORTING
gotstate = ls_gotstate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0 OR ls_gotstate IS INITIAL.
MESSAGE e666(01) WITH 'Data element ' 'STC_TASK_SEMANTIC_ID' ' not
active' INTO sy-lisel. "#EC *
CALL METHOD log_message.
gv_errors_occured = 'X'.
ENDIF.
ENDIF.
ENDIF.
DATA: lv_temporary.
DO 2 TIMES.
ls_xsltattr-xsltdesc = i_transformation.
ls_xsltattr-devclass = i_devclass.
ls_xsltattr-langu = i_langu.
ls_xsltattr-descript = i_text.
CASE sy-index.
WHEN 1.
"first LOOP with temporary object
TRANSLATE ls_xsltattr-xsltdesc USING ' _'. "make a similar which does
not exist yet
ls_xsltattr-devclass = '$TMP'.
lv_temporary = 'X'.
WHEN 2.
CHECK gv_errors_occured IS INITIAL.
CHECK testrun IS INITIAL.
lv_temporary = space.
CALL METHOD add_to_transport
EXPORTING
i_object = 'XSLT'
i_obj_name = i_transformation
i_devclass = i_devclass
i_langu = i_langu
EXCEPTIONS
OTHERS = 1.
CHECK sy-subrc EQ 0.
ENDCASE.
"delete transformation if already there.
DATA: l_name TYPE cxsltdesc.
l_name = ls_xsltattr-xsltdesc.
CALL METHOD cl_o2_api_xsltdesc=>load
EXPORTING
p_xslt_desc = l_name "inactive version
p_desired_state = 'I'
IMPORTING
p_obj = lr_xslt
EXCEPTIONS
not_existing = 1
OTHERS = 5.
IF sy-subrc NE 0.
CALL METHOD cl_o2_api_xsltdesc=>load
EXPORTING
p_xslt_desc = l_name "active version
IMPORTING
p_obj = lr_xslt
EXCEPTIONS
not_existing = 1
OTHERS = 5.
ENDIF.
IF sy-subrc EQ 0.
CALL METHOD lr_xslt->set_changeable
EXPORTING
p_changeable = 'X'
EXCEPTIONS
OTHERS = 0.
CALL METHOD lr_xslt->delete
EXCEPTIONS
OTHERS = 0.
CALL METHOD lr_xslt->save
EXPORTING
i_suppress_corr_insert = lv_temporary
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
INTO sy-lisel.
CALL METHOD log_message.
ENDIF.
ENDIF.
"create the transformation
CALL METHOD cl_o2_api_xsltdesc=>create_new_from_string
EXPORTING
p_source = lv_src
p_attr = ls_xsltattr
p_gen_flag = ' '
IMPORTING
p_obj = lr_xslt
EXCEPTIONS
object_already_existing = 1
action_cancelled = 2
error_occured = 3
not_authorized = 4
undefined_name = 5
OTHERS = 6.
IF sy-subrc NE 0.
IF sy-subrc EQ 3.
MESSAGE e666(01) WITH 'Error during creation of' i_transformation INTO
sy-lisel. "#EC *
ELSE.
MESSAGE e666(01) WITH 'Transformation' i_transformation 'is locked by
another user' INTO sy-lisel. "#EC *
ENDIF.
CALL METHOD log_message.
ENDIF.
IF gv_errors_occured IS INITIAL.
"activate the transformation
CALL METHOD lr_xslt->activate "and save if neccessary
EXPORTING
i_suppress_corr_insert = lv_temporary
IMPORTING
e_error_list = lt_error_list
EXCEPTIONS
syntax_errors = 1
storage_error = 2
generate_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
LOOP AT lt_error_list INTO ls_error_list. "remark: LS_ERROR_LIST_TYPE
contains 1,2,3 rather than E,W
sy-fleng = strlen( i_transformation ). "#EC *
REPLACE ls_xsltattr-xsltdesc WITH i_transformation(sy-fleng) INTO
ls_error_list-text.
sy-msgv1 = ls_error_list-text. SHIFT ls_error_list-text LEFT BY 50
PLACES.
sy-msgv2 = ls_error_list-text. SHIFT ls_error_list-text LEFT BY 50
PLACES.
sy-msgv3 = ls_error_list-text. SHIFT ls_error_list-text LEFT BY 50
PLACES.
sy-msgv4 = ls_error_list-text.
MESSAGE e666(01) WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO sy-
lisel. "#EC *
CALL METHOD log_message.
ENDLOOP.
ENDIF.
ENDIF.
IF gv_errors_occured IS INITIAL.
IF lv_temporary EQ 'X'.
IF update IS NOT INITIAL.
MESSAGE s666(01) WITH 'Creation of' i_transformation 'successful'
INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
MESSAGE s666(01) WITH 'Check of' i_transformation 'successful' INTO
sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDIF.
ELSE.
IF NOT testrun IS INITIAL.
MESSAGE e666(01) WITH 'This problem may disappear after' 'successful
DDIC activation in update mode' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ELSE.
MESSAGE e666(01) WITH 'Could not activate' i_transformation INTO sy-
lisel. "#EC *
CALL METHOD log_message.
MESSAGE e666(01) WITH 'Run update mode once more' 'to create and
activate the XSLT' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDIF.
MESSAGE s666(01). "#EC *
IF NOT lr_xslt IS INITIAL.
IF NOT lv_temporary IS INITIAL.
"remove temporary object
CALL METHOD lr_xslt->save
EXPORTING
i_suppress_corr_insert = lv_temporary
EXCEPTIONS
OTHERS = 1.
CALL METHOD lr_xslt->delete
EXCEPTIONS
OTHERS = 1.
CALL METHOD lr_xslt->save
EXPORTING
i_suppress_corr_insert = lv_temporary
EXCEPTIONS
OTHERS = 1.
ELSE.
gv_repository_changed = 'X'.
ENDIF.
"reset lock
CALL METHOD lr_xslt->set_changeable
EXPORTING
p_changeable = ' '
EXCEPTIONS
OTHERS = 0.
ENDIF.
ENDDO.
"set correct master language
UPDATE tadir SET masterlang = l_masterlang WHERE pgmid EQ 'R3TR' AND object
EQ 'XSLT' AND obj_name EQ i_transformation.
CLEAR lv_src. "this clear will always be reached
ENDIF.
gv_errors_occured = l_error_save.
ENDMETHOD. "create_transformation
METHOD log_message.
DATA: ls_msg TYPE bal_s_msg,
ls_key TYPE adir_key.
IF sy-msgno IS INITIAL OR sy-msgid IS INITIAL.
MESSAGE i666(01) WITH 'unknown error' INTO sy-lisel. "#EC *
ENDIF.
MOVE-CORRESPONDING syst TO ls_msg.
IF i_object IS NOT INITIAL.
ls_key-object = i_object.
ls_key-obj_name = i_obj_name.
ls_msg-context-value = ls_key.
ls_msg-context-tabname = c_bal_context.
ENDIF.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = gv_log_handle
i_s_msg = ls_msg
EXCEPTIONS
OTHERS = 0.
IF ls_msg-msgty CA 'EA'.
gv_errors_occured = 'X'.
ENDIF.
ENDMETHOD. "log_message
METHOD display_log.
DATA: lt_log_handle TYPE bal_t_logh,
ls_profile TYPE bal_s_prof,
l_s_fcat TYPE bal_s_fcat,
lt_dfies TYPE TABLE OF dfies,
ls_dfies TYPE dfies.
DATA: lr_filter_client TYPE RANGE OF mandt,
ls_filter_client LIKE LINE OF lr_filter_client,
ls_filter TYPE bal_s_lfil,
lr_filter TYPE bal_s_extn, "range table
lr_extnumber TYPE bal_s_extn,
lt_log_header TYPE balhdr_t.
"Reset SNOTE & SCWB mode
CALL FUNCTION 'SCWG_TOOLFLAG_RESET'.
TRY.
CALL METHOD ('CL_CWB_RUNTIME')=>set_finished.
CATCH cx_sy_dyn_call_illegal_class. "#EC NO_HANDLER
ENDTRY.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'.
"if we come here the action (copy/read/generate/compare) has finshed without
dumps hence we reset the trace
"-------- build profile
IF 1 = 1.
"grid
CALL FUNCTION 'BAL_DSP_PROFILE_STANDARD_GET'
IMPORTING
e_s_display_profile = ls_profile
EXCEPTIONS
OTHERS = 0.
"Set profile
ls_profile-use_grid = 'X'.
ls_profile-tree_ontop = 'X'.
ls_profile-mess_mark = 'X'.
ls_profile-exp_level = 1.
ls_profile-show_all = 'X'.
ELSE.
"tree
CALL FUNCTION 'BAL_DSP_PROFILE_DETLEVEL_GET'
IMPORTING
e_s_display_profile = ls_profile
EXCEPTIONS
OTHERS = 0.
ENDIF.
"add own fields to field cat
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = c_bal_context
TABLES
dfies_tab = lt_dfies
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE a666(01) WITH 'Error in DDIF_FIELDINFO_GET for table:' c_bal_context.
"#EC *
ENDIF.
LOOP AT lt_dfies INTO ls_dfies WHERE fieldname EQ 'OBJECT'
OR fieldname EQ 'OBJ_NAME'.
l_s_fcat-ref_table = c_bal_context.
l_s_fcat-ref_field = ls_dfies-fieldname.
l_s_fcat-outputlen = ls_dfies-outputlen + 1.
* l_s_fcat-col_pos = 100 + sy-tabix. "most rigth columns
APPEND l_s_fcat TO ls_profile-mess_fcat.
ENDLOOP.
"set parameters for saving layout.
ls_profile-disvariant-report = sy-repid.
ls_profile-disvariant-handle = 'LOG'.
ls_profile-clbk_ucbf-userexitp = sy-repid.
ls_profile-clbk_ucbf-userexitf = 'BAL_CALLBACK_UCOMM'.
IF NOT testrun IS INITIAL.
ls_profile-title = 'Simulation log'. "#EC *
ELSEIF NOT update IS INITIAL.
ls_profile-title = 'Change Log'. "#EC *
ELSEIF gv_log_handle IS INITIAL.
ls_profile-title = 'All Logs'. "#EC *
CLEAR ls_profile-exp_level.
CLEAR ls_profile-show_all.
ls_profile-tree_ontop = 'X'.
ELSE.
ls_profile-title = 'Problem Log'. "#EC *
ls_profile-start_row = 5.
ls_profile-start_col = 5.
ls_profile-end_row = 30.
ls_profile-end_col = 160.
ENDIF.
IF sy-repid EQ myrepid.
CONCATENATE 'UDO -' ls_profile-title INTO ls_profile-title SEPARATED BY
space. "#EC *
ELSE.
CONCATENATE sy-repid '-' ls_profile-title INTO ls_profile-title SEPARATED BY
space. "#EC *
ENDIF.
"-------- find relevant logs
IF gv_log_handle IS INITIAL.
CHECK NOT i_db_search IS INITIAL.
CLEAR: ls_filter, lr_extnumber.
*- Search only log file of this application
lr_filter-sign = 'I'.
lr_filter-option = 'EQ'.
lr_filter-low = c_bal_object.
APPEND lr_filter TO ls_filter-object.
lr_filter-sign = 'I'.
lr_filter-option = 'EQ'.
lr_filter-low = c_bal_subobj.
APPEND lr_filter TO ls_filter-subobject.
IF sy-repid EQ myrepid.
"--------- Search only log files of UDO itself
CALL FUNCTION 'APPL_LOG_DISPLAY'
EXPORTING
object = c_bal_object
object_attribute = 0
subobject = c_bal_subobj
subobject_attribute = 0
external_number = ' '
external_number_attribute = 0
title_list_screen = ' '
title_selection_screen = ' '
date_from = sy-datum "#EC DOM_EQUAL
date_to = sy-datum "#EC DOM_EQUAL
time_to = '235959' "#EC DOM_EQUAL
external_number_display_length = 20
i_s_display_profile = ls_profile
i_variant_report = sy-repid
EXCEPTIONS
no_authority = 0.
RETURN.
ENDIF.
"--------- Search for log files of generated reports (also valid for copy)
lr_extnumber-low = sy-repid.
lr_extnumber-sign = 'I'.
lr_extnumber-option = 'EQ'.
APPEND lr_extnumber TO ls_filter-extnumber.
ls_filter_client-sign = 'I'.
ls_filter_client-option = 'EQ'.
ls_filter_client-low = sy-mandt.
APPEND ls_filter_client TO lr_filter_client.
SELECT * FROM balhdr CLIENT SPECIFIED "#EC CI_CLIENT "option for all
clients
INTO TABLE lt_log_header
WHERE mandant IN lr_filter_client "#EC CI_BUFFSUBQ
AND object IN ls_filter-object
AND subobject IN ls_filter-subobject
AND extnumber IN ls_filter-extnumber.
IF sy-subrc EQ 0.
"Load log files from database into memory
CALL FUNCTION 'BAL_DB_LOAD'
EXPORTING
i_t_log_header = lt_log_header
IMPORTING
e_t_log_handle = lt_log_handle
EXCEPTIONS
OTHERS = 0.
ENDIF.
ELSE.
APPEND gv_log_handle TO lt_log_handle.
ENDIF.
"-------- display the logs
DATA: ls_statistics TYPE bal_s_scnt.
IF i_no_save IS INITIAL.
CALL METHOD lcl_wb=>save_log.
ls_statistics-msg_cnt_al = 1.
ELSE.
CALL FUNCTION 'BAL_LOG_HDR_READ'
EXPORTING
i_log_handle = gv_log_handle
IMPORTING
e_statistics = ls_statistics
EXCEPTIONS
OTHERS = 0.
ENDIF.
IF ls_statistics-msg_cnt_al NE 0 AND sy-batch IS INITIAL.
CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
EXPORTING
i_t_log_handle = lt_log_handle
i_s_display_profile = ls_profile
i_amodal = space
EXCEPTIONS
OTHERS = 0.
ENDIF.
IF NOT i_no_save IS INITIAL.
CALL FUNCTION 'BAL_LOG_REFRESH'
EXPORTING
i_log_handle = gv_log_handle
EXCEPTIONS
OTHERS = 0.
"reset context
CALL METHOD set_context( EXPORTING i_langu = space i_object = space
i_obj_name = space ).
ENDIF.
CLEAR gv_log_handle.
ENDMETHOD. "display_log
METHOD save_log.
DATA: lt_log_handle TYPE bal_t_logh.
APPEND gv_log_handle TO lt_log_handle.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_t_log_handle = lt_log_handle
EXCEPTIONS
OTHERS = 0.
ENDMETHOD. "save_log
METHOD set_context.
STATICS: BEGIN OF lss_key, "save last key
i_object TYPE e071-object,
i_obj_name TYPE adir_key-obj_name,
i_obj_name2 TYPE adir_key-obj_name,
i_text TYPE string,
i_langu TYPE sylangu,
END OF lss_key.
DATA: ls_msg_defaults TYPE bal_s_mdef,
ls_context TYPE adir_key,
l_text(70),
l_mode TYPE string,
ls_key LIKE lss_key.
DATA: ls_e071 TYPE e071,
ls_tadir TYPE tadir,
ls_tadir_key TYPE tadir.
CHECK NOT lcl_wb=>language_installed( i_langu ) IS INITIAL.
IF sy-repid NE myrepid.
CONCATENATE i_object i_obj_name INTO l_text SEPARATED BY space.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = l_text.
ENDIF.
"trace current object to be able to know what was processed in case a dump
occurs
CONCATENATE space i_object i_obj_name INTO l_text SEPARATED BY '|'. "fromsys
not possible
ls_key-i_object = i_object.
ls_key-i_obj_name = i_obj_name.
ls_key-i_obj_name2 = i_obj_name2.
ls_key-i_text = i_text.
ls_key-i_langu = i_langu.
IF ls_key EQ lss_key. "check last key
"avoid double message like "add field to table"
RETURN.
ELSE.
lss_key = ls_key.
ENDIF.
ls_context-object = i_object.
CONCATENATE i_obj_name i_obj_name2 INTO ls_context-obj_name SEPARATED BY space.
ls_msg_defaults-log_handle = gv_log_handle.
ls_msg_defaults-context-value = ls_context.
ls_msg_defaults-context-tabname = c_bal_context.
CALL FUNCTION 'BAL_GLB_MSG_DEFAULTS_SET'
EXPORTING
i_s_msg_defaults = ls_msg_defaults
EXCEPTIONS
OTHERS = 0.
IF NOT i_no_message IS INITIAL.
EXIT.
ENDIF.
"try to check if object exists
IF NOT i_object IS INITIAL AND NOT i_obj_name IS INITIAL.
ls_e071-pgmid = 'R3TR'.
ls_e071-object = i_object.
ls_e071-obj_name = i_obj_name.
CALL FUNCTION 'SCWB_GET_TADIR_REM'
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir_key = ls_tadir_key
es_tadir = ls_tadir.
IF ls_tadir_key IS INITIAL.
ls_e071-pgmid = 'LIMU'.
CALL FUNCTION 'SCWB_GET_TADIR_REM'
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir_key = ls_tadir_key
es_tadir = ls_tadir.
ENDIF.
IF ls_tadir IS INITIAL.
l_mode = 'Create'. "#EC NOTEXT
ELSE.
l_mode = 'Change'. "#EC NOTEXT
"check if object has been manually modified by customer.
SELECT COUNT( * ) FROM adiraccess WHERE pgmid EQ ls_tadir-pgmid
AND object EQ ls_tadir-object
AND obj_name EQ ls_tadir-obj_name.
IF sy-dbcnt NE 0.
MESSAGE w666(01) WITH ls_tadir-object ls_tadir-obj_name 'was manually
changed before.' 'Please adjust manually afterwards' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDIF.
ENDIF.
IF i_text IS INITIAL.
CALL METHOD get_object_text
EXPORTING
i_object = i_object
i_obj_name = i_obj_name
RECEIVING
r_text = l_text.
CONCATENATE l_mode l_text INTO l_text SEPARATED BY space.
ELSE.
l_text = i_text.
ENDIF.
IF NOT l_text IS INITIAL.
IF NOT i_langu IS INITIAL.
MESSAGE s666(01) WITH l_text '( language' i_langu ')' INTO l_text. "#EC
NOTEXT
ENDIF.
CALL FUNCTION 'BAL_LOG_MSG_ADD_FREE_TEXT'
EXPORTING
i_msgty = i_msgty
i_text = l_text
EXCEPTIONS
OTHERS = 0.
ENDIF.
ENDMETHOD. "set_context
*&---------------------------------------------------------------------*
*& Form main
*&---------------------------------------------------------------------*
FORM main.
TRANSLATE c_ddic_ref USING '_ '. "initialization
DO. "1900
CALL SELECTION-SCREEN selection_screen_1900. "1900
IF sy-subrc NE 0. "1900
EXIT. "DO "1900
ENDIF. "1900
IF showlogs IS INITIAL.
CLEAR gv_trkorr. "Transport popup shall come once
IF lcl_wb=>init( i_note = '2173829' ) IS INITIAL. "<note which indicates that
report is not needed anymore>
IF NOT update IS INITIAL OR NOT testrun IS INITIAL.
PERFORM update_beforeact.
CALL METHOD lcl_wb=>activate.
PERFORM update_afteract.
ENDIF.
ENDIF.
ENDIF.
CALL METHOD lcl_wb=>display_log "one or all logs
EXPORTING
i_db_search = showlogs.
ENDDO. "1900
ENDFORM. "main
'<<...>>rl(../webdynpro/resources/sap.com/tc~wd~dispwda/global/sapIcons/s_s_ledi.gi
f?7.30.1.1.0) no-repeat 50% 50%;}', "#EC NOTEXT
'.hdrTitle {background-color:#FFFFFF; background:
url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_tradeshow_pl
us/c', "#EC NOTEXT
'<<...>>ommon/tray/blockheader_center.gif?7.30.1.1.0) repeat-x 0 0;}
table#COWrapper { border: none; border-collapse:', "#EC
NOTEXT
'collapse; width: 100%; height: 100%;} td.topBarRht { height: 30px; background-
color: #B6CFE6;} td.topBarLft { width: 360px; height: 30px', "#EC NOTEXT
'<<...>>; background-color: #B6CFE6; font-weight:bold;} table { margin:0px;
padding: 0 10px; border-collapse:collapse;', "#EC NOTEXT
'text-align:left; } table tr th { background-color:#C1D6EB; background-
image:url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/', "#EC
NOTEXT
'<<...>>themes/sap_tradeshow_plus/common/tray/blockheader_center.gif?7.30.1.1.0);
background-position:left top;', "#EC NOTEXT
'background-repeat:repeat-x; font-size: 16px; text-align:left; height:20px;
padding: 0 5px; } table tr td { padding: 0px 5px; font-size', "#EC NOTEXT
'<<...>>: 14px; } div#contentRht { float: left; width: 100%;} div#contentLft
{ float: left; width: 360px;} div.navWrapper {', "#EC NOTEXT
'float: left; width: 350px; margin: 15px 0 20px 0; font-size: 14px; background-
color: #DFEBF5; } div.navFldr { float: left; margin: 5px 5', "#EC NOTEXT
'<<...>>px 0 5px; font-weight: bold; width: 300px;} div.navContentWrapper
{ margin: 0; padding: 0; float: left; width:', "#EC
NOTEXT
'inherit;} div.navLink { margin-top: 5px; float: left; height: 21px; padding-
left: 10px; font-weight: normal; } span.arrow { float: left', "#EC NOTEXT
'<<...>>; width: 11px; height: 11px; cursor: pointer; } span.arrowClosed
{ background:', "#EC
NOTEXT
'url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_tradeshow_p
lus/common/saptable/ico12_branch_closed.gif) no-repea', "#EC NOTEXT
'<<...>>t 0 50%; } span.arrowOpen { background:',
"#EC NOTEXT
'url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_tradeshow_p
lus/common/saptable/ico12_branch_open.gif) no-repea', "#EC NOTEXT
'<<...>>t 0 50%; } span.book { margin-left: 3px; float: left; width: 16px;
height: 16px; } span.openBook { background:', "#EC
NOTEXT
'url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/sapIcons/s_s_ledi.gif?
7.30.1.1.0) no-repeat 0 50%; } span.changeBook { background:', "#EC NOTEXT
'url(../webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_tradeshow_p
lus/common/saptable/ico12_leaf.gif) no-repeat 0 50%', "#EC NOTEXT
'<<...>>; } span.navLabel { margin-left: 3px; float: left; width: 250px; height:
20px; font-size: 100.01%; cursor: pointer;', "#EC NOTEXT
'color: #204BA2; } span.navLabel:hover { color:#FF7800; }
div.configObjectDetails,div.headerBar { margin: 0; padding: 20px 0 0 0; font-si',
"#EC NOTEXT
'<<...>>ze: 10pt; width: 100%; } div.configObjectDetails {display: none;}
.content { background-color: #DFEBF5; padding: 5px', "#EC
NOTEXT
'0px; } .h2{ font-size:15px; font-weight:bold; height:25px;} .h3{ font-size:15px;
font-weight:bold; height:20px; } hr { color:#204BA2', "#EC NOTEXT
'<<...>>; } div#CO_toc { height: 100%; margin: 0; padding: 20px 20px; display:
none;} div#CO_toc a{ text-decoration: underline;', "#EC NOTEXT
'color: #204BA2; cursor: pointer; } div#CO_toc a:hover { text-decoration:
underline; color: #FF7800; } div#toggleView { text-align:center', "#EC
NOTEXT
'<<...>>; color: navy; font-weight: bold; cursor: pointer; width: 80px;}
div#toggleView a{ text-decoration: none;', "#EC
NOTEXT
'color:#204BA2;} div#toggleView a:hover{ text-decoration: underline;
color:#FF7800;} a.buildLinks {color:#204BA2; font-size: 14px; text-d', "#EC
NOTEXT
'<<...>>ecoration: none;} a.buildLinks:hover {color:#FF7800; text-decoration:
underline;}', "#EC NOTEXT
'',
"#EC NOTEXT
'h1{ font-size: 25px; font-weight: bold; }',
"#EC NOTEXT
'h2{ font-size: 15px; font-weight: bold; display:inline;}',
"#EC NOTEXT
'td.task { width: 50%; }',
"#EC NOTEXT
'td.exec { width: 50%; }',
"#EC NOTEXT
'td.message_id { width: 10%; }',
"#EC NOTEXT
'td.message_no { width: 5%; }',
"#EC NOTEXT
'td.message_typ { width: 5%; }',
"#EC NOTEXT
'td.fieldname { width: 20%; }',
"#EC NOTEXT
'th.header { width: 20%; font-size: 15px; }',
"#EC NOTEXT
'table.task { width: 100%; }',
"#EC NOTEXT
'table.exec { width: 100%; }',
"#EC NOTEXT
'.message { border-top-width: 0px; border-bottom-width: 1px; border-collapse:
collapse; width: 100%;}', "#EC NOTEXT
'</style>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </head>',
"#EC NOTEXT
' <body>',
"#EC NOTEXT
' <a name="TOP"/>',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_HEADER_INFO"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <table border="1" class="task">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SESSION_ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TEMPLATE_ID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/TEMPLATE_ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_STATUS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_FINALIZED"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/FINALIZED_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_CREATED_BY"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/CREATED_BY/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_CREATED_ON"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date"
select="$SESSION/CREATED_ON/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_CHANGED_BY"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/CHANGED_BY/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_CHANGED_ON"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date"
select="$SESSION/CHANGED_ON/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TM_VERSION"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/TM_VERSION/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_HEADER_INFO"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <table border="1" class="task">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_ID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SCENARIO/SCENARIO_ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_DESCRIPTION"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SCENARIO/SCENARIO_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_BASIC_SCEN_ID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SCENARIO/BASIC_SCEN_ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_BUILD_NO"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SCENARIO/BUILD_NO/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SCENARIO_APPL_COMPONENT"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SCENARIO/APPL_COMP/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:if test="(normalize-space($SESSION/USERNAME))
 or
(normalize-space($SESSION/SID))
 or', "#EC NOTEXT
'(normalize-space($SESSION/SYSNR))

or
(normalize-
space($SESSION/MANDT))

or
(normalize-space($SESSION/HOST))">',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <table border="1" class="task">',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_SESSION_ID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/EXT_SESSION_ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_USERNAME"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/USERNAME/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_SID"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_SYSNR"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/SYSNR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_CLIENT"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/MANDT/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_ECI_HOST"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="$SESSION/HOST/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASKLIST_OVERVIEW"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <table border="1" class="task">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_SEQUENCE_NUMBER"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_DESCRIPTION"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_NR"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_PHASE"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_COMPONENT"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_CHECK_STATUS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_EXECUTION_STATUS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:for-each select="$TASKLIST/TASK">',
"#EC NOTEXT
' <xsl:variable name="TASK" select="TASKNAME"/>',
"#EC NOTEXT
' <xsl:variable name="ID" select="LNR"/>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="position()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <a class="buildLinks" href="#{DESCRIPTION}_{$ID}">',
"#EC NOTEXT
' <xsl:value-of select="DESCRIPTION/text()"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="LNR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="PHASE_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="COMPONENT/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="CHECK_STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_INFO"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <table border="1" class="exec">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_IDENTIFIER"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_PERIOD"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_STATUS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <th class="header">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_DURATION"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:for-each select="$EXEC_INFO">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <a class="buildLinks" href="#{EXEC_ID}">',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="EXEC_ID/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="PERIOD_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_duration_to_seconds">',
"#EC NOTEXT
' <xsl:with-param name="l_duration" select="DURATION"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <table border="1" class="task" style="table-layout:auto">',
"#EC NOTEXT
' <xsl:if test="(normalize-space($TOP_TASKS))">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header" colspan="3">',
"#EC NOTEXT
' <xsl:value-of select="$T_TOP_TASKS_DURATION"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_DESCRIPTION"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_IDENTIFIER"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_DURATION"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:for-each select="$TOP_TASKS">',
"#EC NOTEXT
' <xsl:variable name="TASK" select="TASKNAME"/>',
"#EC NOTEXT
' <xsl:variable name="ID" select="LNR"/>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <a class="buildLinks" href="#{DESCRIPTION}_{$ID}">',
"#EC NOTEXT
' <xsl:value-of select="DESCRIPTION/text()"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <a class="buildLinks" href="#{EXEC_ID}">',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="EXEC_ID/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:call-template name="parse_duration_to_seconds">',
"#EC NOTEXT
' <xsl:with-param name="l_duration" select="DURATION"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <br/>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASKLIST_DETAILS"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <xsl:for-each select="$TASKLIST">',
"#EC NOTEXT
' <xsl:variable name="APPL_COMP" select="APPL_COMP"/>',
"#EC NOTEXT
' <xsl:variable name="TASK" select="TASK"/>',
"#EC NOTEXT
' <xsl:variable name="ID" select="TASK/LNR"/>',
"#EC NOTEXT
' <xsl:variable name="LOGLIST" select="LOG"/>',
"#EC NOTEXT
' <xsl:variable name="PARAMETERS" select="PARAMETER"/>',
"#EC NOTEXT
'',
"#EC NOTEXT
'',
"#EC NOTEXT
' <table border="1" class="task" style="table-layout:auto">',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th align="left" class="header" colspan="4">',
"#EC NOTEXT
' <a name="{$TASK/DESCRIPTION}_{$ID}">',
"#EC NOTEXT
' <xsl:value-of select="position()"/>.',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_ID"/>:',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:value-of select="$TASK/DESCRIPTION/text()"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="task" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_APPL_COMPONENT"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="task" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="TASK/APPL_COMP/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_ID"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="TASK/TASKNAME/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_NR"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$TASK/LNR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_PHASE"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$TASK/PHASE_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_COMPONENT"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$TASK/COMPONENT/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_CHECK_STATUS"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$TASK/CHECK_STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_EXECUTION_STATUS"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$TASK/STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:if test="(normalize-space($PARAMETERS))">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header" colspan="4">',
"#EC NOTEXT
' <xsl:value-of select="$T_PARAMETERS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td width="20%" colspan="1">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_PARAM_FIELDNAME"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td style="width:30%" colspan="1">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_PARAM_VALUE"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td width="30%" colspan="2">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_PARAM_DESCRIPTION"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <xsl:for-each select="$PARAMETERS/item">',
"#EC NOTEXT
' <xsl:variable name="DEFINITION"
select="DEFINITION/DDTEXT/text()"/>',
"#EC NOTEXT
' <xsl:variable name="VALUE" select="VALUE/item"/>',
"#EC NOTEXT
' <xsl:for-each select="$VALUE">',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="1">',
"#EC NOTEXT
' <xsl:value-of select="FIELDNAME/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td style="width:30%; word-break:break-all; word-
wrap:break-word" colspan="1">', "#EC
NOTEXT
' <xsl:value-of select="VALUE/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="fieldname" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$DEFINITION"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <table border="1" class="message">',
"#EC NOTEXT
' <xsl:if test="(normalize-space($LOGLIST))">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header" colspan="10">',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_LOG"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_IDENTIFIER"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_typ">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TYPE"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TEXT"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_ACTIVITY"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TIME"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_USERNAME"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_id">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_ID"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_no">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_NR"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td width="1%">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_SOURCE_OBJECT"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td width="1%">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_SOURCE_LINE"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:for-each select="$LOGLIST/STCTM_S_LOG">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="EXEC_ID/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_typ">',
"#EC NOTEXT
' <xsl:value-of select="TYPE/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="MESSAGE/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="ACTIVITY_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="TIMESTMP/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="TSTPNM/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_id">',
"#EC NOTEXT
' <xsl:value-of select="ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_no">',
"#EC NOTEXT
' <xsl:value-of select="NUMBER/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="SRC_OBJECT/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <xsl:if test="SRC_LINE/text()=0">',
"#EC NOTEXT
' <td/>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' <xsl:if test="SRC_LINE/text()>0">',
"#EC NOTEXT
' <td><xsl:value-of select="SRC_LINE/text()"/></td>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
' <a class="buildLinks" href="javascript:history.back()">',
"#EC NOTEXT
' <xsl:value-of select="$T_FUNCTION_BACK"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' <br/>',
"#EC NOTEXT
' <br/>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <h1>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_DETAILS"/>',
"#EC NOTEXT
' </h1>',
"#EC NOTEXT
' <xsl:for-each select="$EXEC_INFO">',
"#EC NOTEXT
' <xsl:variable name="EXEC_ID" select="EXEC_ID"/>',
"#EC NOTEXT
' <xsl:variable name="PERIOD_DESCR" select="PERIOD_DESCR"/>',
"#EC NOTEXT
' <xsl:variable name="STATUS_DESCR" select="STATUS_DESCR"/>',
"#EC NOTEXT
' <xsl:variable name="LOGLIST" select="LOG"/>',
"#EC NOTEXT
' <xsl:variable name="EXECTASKS" select="TASKS"/>',
"#EC NOTEXT
' <xsl:variable name="PERIOD" select="/PERIOD/text()"/>',
"#EC NOTEXT
' <table border="1" class="exec" style="table-layout:auto">',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th align="left" class="header" colspan="4">',
"#EC NOTEXT
' <a name="{EXEC_ID}">',
"#EC NOTEXT
' <xsl:value-of select="$PERIOD_DESCR/text()"/>:',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="EXEC_ID/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_USERNAME"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="USER/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_BATCH"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="BATCH_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_API"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="API_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_SID"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="SID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_CLIENT"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="CLNT/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_HOST"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="HOST/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_JOBNAME"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="JOBNAME/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_LAST_UPDATE"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="exec" colspan="2">',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date"
select="LAST_UPDATE/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$T_SESSION_STATUS"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td colspan="2">',
"#EC NOTEXT
' <xsl:value-of select="$STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <table border="1" class="message">',
"#EC NOTEXT
' <xsl:if test="(normalize-space($LOGLIST))">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header" colspan="6">',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_LOG"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="message_typ">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TYPE"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TEXT"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_TIME"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_USERNAME"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_id">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_ID"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_no">',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_MESSAGE_NR"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <xsl:for-each select="$LOGLIST/STCTM_S_LOG">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td class="message_typ">',
"#EC NOTEXT
' <xsl:value-of select="TYPE/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="MESSAGE/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:call-template name="parse_date_to_iso_format">',
"#EC NOTEXT
' <xsl:with-param name="l_date" select="TIMESTMP/text()"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <xsl:value-of select="TSTPNM/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_id">',
"#EC NOTEXT
' <xsl:value-of select="ID/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <td class="message_no">',
"#EC NOTEXT
' <xsl:value-of select="NUMBER/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
'',
"#EC NOTEXT
' <table border="1" class="task" style="table-layout:auto">',
"#EC NOTEXT
' <xsl:if test="(normalize-space($EXECTASKS))">',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <th class="header" colspan="5">',
"#EC NOTEXT
' <xsl:value-of select="$T_EXECUTION_TASKS"/>',
"#EC NOTEXT
' </th>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_DESCRIPTION"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <xsl:if test="PERIOD=''E'' or PERIOD=''C''">',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_CHECK_STATUS"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <xsl:if test="PERIOD=''E''">',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_TASK_EXECUTION_STATUS"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' <td>',
"#EC NOTEXT
' <b>',
"#EC NOTEXT
' <xsl:value-of select="$T_EXEC_DURATION"/>',
"#EC NOTEXT
' </b>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' <xsl:for-each select="$EXECTASKS/item">',
"#EC NOTEXT
' <xsl:variable name="TASK" select="TASKNAME"/>',
"#EC NOTEXT
' <xsl:variable name="ID" select="LNR"/>',
"#EC NOTEXT
' <xsl:variable name="PERIOD_ROW" select="../../PERIOD"/>',
"#EC NOTEXT
' <tr>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <a class="buildLinks" href="#{DESCRIPTION}_{$ID}">',
"#EC NOTEXT
' <xsl:value-of select="DESCRIPTION/text()"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <xsl:if test="$PERIOD_ROW=''E'' or $PERIOD_ROW=''C''">',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="CHECK_STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' <xsl:if test="$PERIOD_ROW=''E''">',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:value-of select="STATUS_DESCR/text()"/>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' <td align="left" nowrap="nowrap">',
"#EC NOTEXT
' <xsl:call-template name="parse_duration_to_seconds">',
"#EC NOTEXT
' <xsl:with-param name="l_duration" select="DURATION"/>',
"#EC NOTEXT
' </xsl:call-template>',
"#EC NOTEXT
' </td>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
' </tr>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
' </xsl:if>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </table>',
"#EC NOTEXT
' <a class="buildLinks" href="javascript:history.back()">',
"#EC NOTEXT
' <xsl:value-of select="$T_FUNCTION_BACK"/>',
"#EC NOTEXT
' </a>',
"#EC NOTEXT
' <br/>',
"#EC NOTEXT
' <br/>',
"#EC NOTEXT
' </xsl:for-each>',
"#EC NOTEXT
'',
"#EC NOTEXT
' </body>',
"#EC NOTEXT
' </html>',
"#EC NOTEXT
' </xsl:template>',
"#EC NOTEXT
'',
"#EC NOTEXT
'</xsl:transform>',
"#EC NOTEXT
'<<--->>'. "#EC NOTEXT
ENDFORM.
FORM update_beforeact.
gv_master_languages = 'E'. "#EC NOTEXT
APPEND 'STCTM_SX_PARAMETER' TO gt_tabname. "#EC NOTEXT
APPEND 'STCTM_S_LOG' TO gt_tabname. "#EC NOTEXT
APPEND 'STCTM_S_SESSION' TO gt_tabname. "#EC NOTEXT
APPEND 'STCTM_S_TASK' TO gt_tabname. "#EC NOTEXT
APPEND 'STCTT_S_DIFFERENT_PARAMETERS' TO gt_tabname. "#EC NOTEXT
APPEND 'STC_RS_TASK_ID' TO gt_tabname. "#EC NOTEXT
APPEND 'STC_RS_TASK_TYPE' TO gt_tabname. "#EC NOTEXT
APPEND 'STC_TEMPLATE' TO gt_tabname. "#EC NOTEXT
APPEND 'STC_RT_TASK_ID' TO gt_ttypname. "#EC NOTEXT
APPEND 'STC_RT_TASK_TYPE' TO gt_ttypname. "#EC NOTEXT
PERFORM update_01. " DOMD STC_EXEC_ACTIVITY
PERFORM update_02. " DOMD STC_EXEC_PERIOD
PERFORM update_03. " DTED STC_EXEC_ACTIVITY
PERFORM update_04. " DOCU DESTC_EXEC_ACTIVITY
PERFORM update_05. " DTED STC_EXEC_ACTIVITY_DESCR
PERFORM update_06. " DOCU DESTC_EXEC_ACTIVITY_DESCR
PERFORM update_07. " DTED STC_EXEC_PERIOD
PERFORM update_08. " DTED STC_EXEC_PERIOD_DESCR
PERFORM update_09. " DOCU DESTC_EXEC_PERIOD_DESCR
PERFORM update_10. " DTED STC_SESSION_FINALIZED_DESCR
PERFORM update_11. " DTED STC_TASK_SEMANTIC_DESCR
PERFORM update_12. " DTED STC_TASK_SEMANTIC_ID
PERFORM update_13. " TABD STCTM_S_LOG
PERFORM update_14. " TABD STCTM_S_SESSION
PERFORM update_15. " TABD STCTM_S_TASK
PERFORM update_16. " TABD STCTT_S_DIFFERENT_PARAMETERS
PERFORM update_17. " TABD STC_RS_TASK_ID
PERFORM update_18. " TABD STC_RS_TASK_TYPE
PERFORM update_19. " TTYD STC_RT_TASK_ID
PERFORM update_20. " TTYD STC_RT_TASK_TYPE
PERFORM update_21. " DOCU CLCL_STCTM_DUMMY_TASK
PERFORM update_22. " REPT CL_STCTM_LOG_DISPLAY==========CP
PERFORM update_23. " REPT CL_STCTM_PREPROCESSOR=========CP
PERFORM update_24. " REPT CL_STCTM_UTILITIES============CP
PERFORM update_25. " REPT CL_STCTT_COMPLEX==============CP
PERFORM update_26. " REPT CL_STCTT_VARIABLE_PARAMETERS==CP
PERFORM update_27. " DOCU CLCL_STCTT_VARIABLE_PARAMETERS
PERFORM update_28. " DOCU CLCL_STCTT_WITH_REF_TO_TASKLIST
PERFORM update_29. " REPT LSTC_TM_FUNCTIONST99
PERFORM update_30. " REPT SAPLSTC_TM_FUNCTIONS
PERFORM update_31. " REPT STC_SCN_MAINTAIN
PERFORM update_32. " CUAD STC_SCN_MAINTAIN
PERFORM update_33. " REPT STC_TEST_REPORT_UI_DIFF_PARAM
PERFORM update_34. " REPT STC_TM_SESSION_BEGIN
PERFORM update_35. " MESS STC037
PERFORM update_36. " MESS STC_API004
PERFORM update_37. " MESS STC_API005
PERFORM update_38. " MESS STC_TASK024
PERFORM update_39. " DOCU NASTC_TASK024
PERFORM update_40. " MESS STC_TASK030
PERFORM update_41. " MESS STC_TASK041
PERFORM update_42. " MESS STC_TASK046
PERFORM update_43. " MESS STC_TASK057
PERFORM update_44. " MESS STC_TASK058
PERFORM update_45. " DOCU NASTC_TASK058
PERFORM update_46. " MESS STC_TASK059
PERFORM update_47. " DOCU NASTC_TASK059
PERFORM update_48. " MESS STC_TASK060
PERFORM update_49. " DOCU NASTC_TASK060
PERFORM update_50. " MESS STC_TASK061
PERFORM update_51. " MESS STC_TASK062
PERFORM update_52. " DOCU NASTC_TASK062
PERFORM update_53. " MESS STC_TASK063
PERFORM update_54. " DOCU NASTC_TASK063
PERFORM update_55. " MESS STC_TASK064
PERFORM update_56. " MESS STC_TASK065
PERFORM update_57. " MESS STC_TASK066
PERFORM update_58. " MESS STC_TASK067
PERFORM update_59. " MESS STC_TASK068
PERFORM update_60. " MESS STC_TASK069
PERFORM update_61. " MESS STC_TASK070
PERFORM update_62. " MESS STC_TASK071
PERFORM update_63. " MESS STC_TASK072
PERFORM update_64. " MESS STC_TASK073
PERFORM update_65. " MESS STC_TASK074
PERFORM update_66. " MESS STC_TASK075
PERFORM update_67. " MESS STC_TASK076
PERFORM update_68. " MESS STC_TASK077
PERFORM update_69. " MESS STC_TASK078
PERFORM update_70. " DOCU NASTC_TASK078
PERFORM update_71. " MESS STC_TASK079
PERFORM update_72. " DOCU NASTC_TASK079
PERFORM update_73. " MESS STC_TASK080
PERFORM update_74. " MESS STC_TASK081
PERFORM update_75. " MESS STC_TASK082
PERFORM update_76. " MESS STC_TEST018
PERFORM update_77. " MESS STC_TEST019
PERFORM update_78. " DOCU NASTC_TM210
PERFORM update_79. " MESS STC_TM281
PERFORM update_80. " DOCU NASTC_TM281
PERFORM update_81. " MESS STC_TM363
PERFORM update_82. " DOCU NASTC_TM363
PERFORM update_83. " MESS STC_TM364
PERFORM update_84. " MESS STC_TM365
PERFORM update_85. " MESS STC_TM366
PERFORM update_86. " MESS STC_TM367
PERFORM update_87. " MESS STC_TM368
PERFORM update_88. " MESS STC_TM369
PERFORM update_89. " MESS STC_TM370
PERFORM update_90. " MESS STC_TM371
PERFORM update_91. " MESS STC_TM372
PERFORM update_92. " MESS STC_TM373
PERFORM update_93. " MESS STC_TM374
PERFORM update_94. " MESS STC_TM375
PERFORM update_95. " MESS STC_TM376
PERFORM update_96. " MESS STC_TM377
PERFORM update_97. " MESS STC_TM378
PERFORM update_98. " MESS STC_TM379
PERFORM update_99. " MESS STC_TM380
PERFORM update_100. " MESS STC_TM381
PERFORM update_101. " MESS STC_TM382
PERFORM update_102. " MESS STC_TM383
PERFORM update_103. " MESS STC_TM384
PERFORM update_104. " MESS STC_TM385
PERFORM update_105. " DOCU NASTC_TM385
PERFORM update_106. " MESS STC_TM386
PERFORM update_107. " DOCU NASTC_TM386
PERFORM update_108. " MESS STC_TM387
PERFORM update_109. " MESS STC_TASK083
PERFORM update_110. " DOCU NASTC_TASK083
PERFORM update_111. " DOCU TXSTCTT_VARIABLE_PARAMETERS
PERFORM update_112. " DOCU TXSTCTT_WITH_REF_TO_TASKLIST
PERFORM update_113. " DOCU TXSTC_TEST_TASKLIST_044
PERFORM update_114. " STCS STC_TEST_TASKLIST_043
PERFORM update_115. " STCS STC_TEST_TASKLIST_044
PERFORM update_118. " TABU BALSUB ( STC/CONTENT )
PERFORM update_119. " TABU BALSUBT ( STC/CONTENT )
ENDFORM.
FORM update_afteract.
PERFORM update_116. " XSLT STC_TM_SESSION_EXTXML_2_HTML
PERFORM update_117. " XSLT STC_TM_SESSION_EXTXML_2_SLA
ENDFORM.
START-OF-SELECTION.
PERFORM main.