Está en la página 1de 75

REPORT SAP_APPL_606-616_NOTE_2622326_SAPMF05A.

* Generated by SAP_LOCAL_DOWNPORT_ASSISTANT Version 7.12 on 05.11.2018 with option


ALL

* The individual coding starts at 'FORM update_01.' ( line 3.062 )


* Review FORM update & FORM genview to see a complete list of changed objects

* Generation done for objects found in one of the following transports:


* EBSK338478
* EBSK340792

CONSTANTS: activation_mode VALUE '2', "1 = one step, 2 = two step


myrepid TYPE progname VALUE 'SAP_LOCAL_DOWNPORT_ASSISTANT',
step3_object TYPE sy-lisel VALUE 'Will be processed in step 3
(GENVIEW)', "#EC NOTEXT
sapbasis TYPE sy-saprl VALUE '731 '. "SAP_BASIS release for
which the report was generated; in lower releases it might get problems

DATA: approved_logical_objects TYPE string. "filled in initialization.

DATA: BEGIN OF gc_objtext,


translation TYPE ddtext VALUE 'Translation', "#EC NOTEXT
blacklisted TYPE ddtext VALUE 'Blacklisted (note 2249880)', "#EC
NOTEXT
longtext TYPE ddtext VALUE '. Read Long Text!', "#EC NOTEXT
"DOCU
docu_status TYPE ddtext VALUE 'Documentation Status', "#EC NOTEXT
"REPT
report_title TYPE ddtext VALUE 'Report Title', "#EC NOTEXT
report_text TYPE ddtext VALUE 'Report Texts', "#EC NOTEXT
report_text_title TYPE ddtext VALUE 'Report Texts/Title', "#EC NOTEXT
ddic_ref TYPE ddtext VALUE '<DDIC Reference>', "#EC NOTEXT
"TABL
database_table TYPE ddtext VALUE 'Database Table', "#EC NOTEXT
database_sadl TYPE ddtext VALUE 'Database Table (SADL)', "#EC NOTEXT
global_temp_table TYPE ddtext VALUE 'Global Temporary Table', "#EC NOTEXT
idoc_segment TYPE ddtext VALUE 'IDOC Segment Structure', "#EC NOTEXT
structure TYPE ddtext VALUE 'Structure', "#EC NOTEXT
append TYPE ddtext VALUE 'Append', "#EC NOTEXT
frozen TYPE ddtext VALUE 'Structure (frozen)', "#EC NOTEXT
"INDX
database_index TYPE ddtext VALUE 'Database Index', "#EC NOTEXT
extension_index TYPE ddtext VALUE 'Extension Index', "#EC NOTEXT
full_text_index TYPE ddtext VALUE '(FTI)', "#EC NOTEXT
"VIEW
ddlsqlview TYPE ddtext VALUE 'DDL SQL View', "#EC NOTEXT
ddlsource TYPE ddtext VALUE 'DDL Source', "#EC NOTEXT
"TOBJ
log_transp_obj TYPE ddtext VALUE 'Definition of a Logical transport
object', "#EC NOTEXT
view_variant TYPE ddtext VALUE 'Definition of a Maintenance Object
(View Variant)', "#EC NOTEXT
"METH
amdp TYPE ddtext VALUE 'Method (AMDP)', "#EC NOTEXT
"CINC
unit_test TYPE ddtext VALUE 'Class Include (Unit Tests)', "#EC
NOTEXT
"REPS
esh_modeler TYPE ddtext VALUE 'Enterprise Search', "#EC NOTEXT
"CUAD
guititlelist TYPE ddtext VALUE '- GUI Title List', "#EC NOTEXT
guifunctionlist TYPE ddtext VALUE '- GUI Function List', "#EC NOTEXT
guistatus TYPE ddtext VALUE '- GUI Status', "#EC NOTEXT
"FUNC
shlp_exit TYPE ddtext VALUE 'Search Help Exit', "#EC NOTEXT
"ECTD
testdatavariant TYPE ddtext VALUE '- Test Data Variant', "#EC NOTEXT
"ENHO
empty TYPE ddtext VALUE 'Empty', "#EC NOTEXT
badi_impl TYPE ddtext VALUE 'BADI Implementation', "#EC NOTEXT
notfound TYPE ddtext VALUE 'Not found', "#EC NOTEXT
unknown TYPE ddtext VALUE 'Unknown', "#EC NOTEXT
section TYPE ddtext VALUE 'Enh. Section', "#EC NOTEXT
section_multi TYPE ddtext VALUE 'Enh. Section (multiple)', "#EC NOTEXT
point TYPE ddtext VALUE 'Enh. Point', "#EC NOTEXT
point_multi TYPE ddtext VALUE 'Enh. Point (multiple)', "#EC NOTEXT
point_imp TYPE ddtext VALUE 'Implicit Enh. Point', "#EC NOTEXT
overwrite TYPE ddtext VALUE 'Overwrite Exit', "#EC NOTEXT
parameter TYPE ddtext VALUE 'Parameter Enh.', "#EC NOTEXT
"TABU
imgtree TYPE ddtext VALUE 'IMG Tree Structure', "#EC NOTEXT
areamenu TYPE ddtext VALUE 'Area Menu', "#EC NOTEXT
wagetype TYPE ddtext VALUE 'Table Contents (Wagetype)', "#EC
NOTEXT
"DMEE
dmee TYPE ddtext VALUE 'DME Engine', "#EC NOTEXT
dmeex TYPE ddtext VALUE 'DME Engine Extended', "#EC NOTEXT
"STATUS
done TYPE ddtext VALUE 'Done', "#EC NOTEXT
marked TYPE ddtext VALUE 'Marked', "#EC NOTEXT
invalid TYPE ddtext VALUE 'Invalidated', "#EC NOTEXT
open TYPE ddtext VALUE 'Open', "#EC NOTEXT
END OF gc_objtext.

TYPE-POOLS: seox, seoc, seok, seex, bcwbn, ststc, trmtd, trexe, scua, trlog.

TYPES: t_switch_id TYPE char30, "sfw_switch_id does not exist in SAP_BASIS 640
t_bfunction TYPE char30, "sfw_bfunction does not exist in SAP_BASIS 640
t_fuzzy_similarity(2) TYPE p DECIMALS 2, "DDFUZZY_SIMILARITY does not exist
in SAP_BASIS 640
BEGIN OF t_dd30v_new, autosuggest, fuzzy_search, fuzzy_similarity TYPE
t_fuzzy_similarity, END OF t_dd30v_new,
* t_sfw_switch TYPE sfw_switch,
* BEGIN OF t_sfw_switch, switch_id TYPE t_switch_id, version, author TYPE
as4user, createdon TYPE as4date, changedby TYPE as4user, changedon TYPE as4date,
* x_combi, x_ddic, timestamp TYPE timestamp, switch_nr
TYPE int2, END OF t_sfw_switch, "SFW_SWITCH
BEGIN OF t_bf_sw, switch_id TYPE t_switch_id, version, bfunction TYPE
t_bfunction, no_check, END OF t_bf_sw, "SFW_BF_SW
BEGIN OF t_sfw_package, switch_id TYPE t_switch_id, version, devclass TYPE
devclass, enhname(30), END OF t_sfw_package, "SFW_PACKAGE
BEGIN OF t_sfw_viewfield, viewname(30), fieldname(30), version,
switch_id(30), END OF t_sfw_viewfield,
BEGIN OF t_permission, client_pak(30), intf_name(30), err_sever(4), END OF
t_permission, "has to be in sync with structure permission
BEGIN OF t_ddldependency, ddlname(40), objectname(30), state, objecttype(4),
END OF t_ddldependency,
BEGIN OF t_hrdsys_docu, line_content(5), tdformat TYPE tdformat, tdline TYPE
tdline, END OF t_hrdsys_docu, "HRDSYS_DOCU_ITAB
t_molga TYPE char2, "MOLGA
t_otype TYPE char5, "HRDSYS_OTYPE
t_oname TYPE char20, "HRDSYS_ONAME
* t_phio_objid TYPE sdok_docid, "XYAb
BEGIN OF t_loio_h, id TYPE sdok_loid, otype TYPE sdok_prv_l, oname TYPE
sdok_prv_l, molga TYPE sdok_prv_s, END OF t_loio_h,
BEGIN OF t_loio, otype TYPE t_otype, molga TYPE t_molga, oname TYPE t_oname,
END OF t_loio,
BEGIN OF
dd43v,typename(30),seckeyname(30),ddlanguage,seckeyunique,accessmode,kind,keydescri
ption(80),END OF dd43v,
BEGIN OF dd12fulltextinfo, full_text, 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,token_separators(50),END OF dd12fulltextinfo.

TYPES: BEGIN OF t_pak_projects, mandt TYPE mandt, project_guid TYPE sysuuid_x,


project_id(24), short_text_en(40), short_text_de(40), inactive, fetch_date TYPE d,
END OF t_pak_projects.

TYPES: BEGIN OF t_img_list,


level TYPE bmstnode-node_level,
text TYPE bmstnode-text,
activity TYPE cus_imgach-activity,
tcode TYPE cus_imgach-tcode,
objecttype TYPE cus_actobj-objecttype,
objectname TYPE cus_actobj-objectname,
tcodeact TYPE cus_actobj-tcode,
extension TYPE bmstnode-extension,
switch TYPE t_switch_id,
END OF t_img_list.
TYPES: tt_dd05m TYPE TABLE OF dd05m,
tt_dd17v TYPE TABLE OF dd17v,
tt_dd26e TYPE TABLE OF dd26e,
tt_dd26v TYPE TABLE OF dd26v,
tt_dd27p TYPE TABLE OF dd27p,
tt_dd27v TYPE TABLE OF dd27v,
tt_dd28v TYPE TABLE OF dd28v,
tt_dd30v TYPE TABLE OF dd30v,
tt_dd30tv TYPE TABLE OF dd30tv,
tt_dd31v TYPE TABLE OF dd31v,
tt_dd32v TYPE TABLE OF dd32v,
tt_dd32p TYPE TABLE OF dd32p,
tt_dd33v TYPE TABLE OF dd33v,
tt_dd36m TYPE TABLE OF dd36m,
tt_dd42v TYPE TABLE OF dd42v,
tt_dd43v TYPE TABLE OF dd43v,
tt_e071k TYPE TABLE OF e071k,
tt_permission TYPE TABLE OF t_permission,
tt_hrdsys_docu TYPE TABLE OF t_hrdsys_docu,
tt_bfunction TYPE TABLE OF t_bfunction,
tt_activity TYPE TABLE OF t100o-activity,
tt_tline TYPE TABLE OF tline,
tt_tstca TYPE TABLE OF tstca,
tt_langu TYPE TABLE OF sylangu,
tt_ltdxdata TYPE TABLE OF ltdxdata,
tt_ltdxt TYPE TABLE OF ltdxt,
tt_ltdxd TYPE TABLE OF ltdxd,
tt_sta TYPE TABLE OF rsmpe_stat,
tt_fun TYPE TABLE OF rsmpe_funt,
tt_men TYPE TABLE OF rsmpe_men,
tt_mtx TYPE TABLE OF rsmpe_mnlt,
tt_act TYPE TABLE OF rsmpe_act,
tt_but TYPE TABLE OF rsmpe_but,
tt_pfk TYPE TABLE OF rsmpe_pfk,
tt_set TYPE TABLE OF rsmpe_staf,
tt_doc TYPE TABLE OF rsmpe_atrt,
tt_tit TYPE TABLE OF rsmpe_titt,
tt_biv TYPE TABLE OF rsmpe_buts,
tt_dypara TYPE TABLE OF rpy_dypara,
tt_d022s TYPE TABLE OF d022s,
tt_bao6163 TYPE TABLE OF bao6163,
* tt_img_tree TYPE TABLE OF BMREF_TC.
tt_img_tree TYPE TABLE OF bmstnode,
tt_img_list TYPE TABLE OF t_img_list,
tt_ttrees TYPE TABLE OF ttrees.

TYPES: BEGIN OF ty_dd02l_new, "new fields in DD02l (not yet SAPBASIS 731)
is_gtt,
END OF ty_dd02l_new.

DATA: gr_devclass TYPE RANGE OF devclass,


gr_domname TYPE RANGE OF domname WITH HEADER LINE,
gr_rollname TYPE RANGE OF rollname,
gr_tabname TYPE RANGE OF tabname, "structures and database tables
gs_tabname LIKE LINE OF gr_tabname VALUE 'IEQ',
gr_dbtabname TYPE RANGE OF tabname, "all database tables
gr_dbviewname TYPE RANGE OF viewname, "all database views
gt_tabname TYPE TABLE OF tabname,
gr_fugrname TYPE RANGE OF rs38l_area,
gr_indexes TYPE RANGE OF trobj_name,
gr_indxtab TYPE RANGE OF tabname,
gr_indxname TYPE RANGE OF indexid,
gr_shlpname TYPE RANGE OF shlpname WITH HEADER LINE,
gr_enqname TYPE RANGE OF enqname,
gr_viewname TYPE RANGE OF viewname,
gr_ttypname TYPE RANGE OF ttypename,
gt_ttypname TYPE TABLE OF ttypename,
gr_guistatus TYPE RANGE OF progname,
gr_switchname TYPE RANGE OF t_switch_id,
gr_msg_class TYPE RANGE OF msgid,
gv_trkorr TYPE trkorr,
gt_trkorr TYPE TABLE OF trkorr,
gt_trkey TYPE TABLE OF trkey,
gv_translation,
gv_abap_in_eclipse,
gv_objects_with_snote_check TYPE string, "object types with delivery method
Report/Snote
gv_master_languages TYPE string, "texts in those languages are always
inserted, other languages only if they are installed
gt_skipped_languages TYPE TABLE OF sylangu,
gv_repository_changed,
gv_errors_occured,
gv_unit_test,
gv_string TYPE string,
gv_uname TYPE syuname,
gv_langu TYPE sylangu,
gv_log_handle TYPE balloghndl,
gv_progname_rept TYPE progname,
mydevclass TYPE devclass.

CONSTANTS: c_bal_object TYPE balobj_d VALUE 'SNOTE',


c_bal_subobj TYPE balsubobj VALUE space,
c_bal_context TYPE tabname VALUE 'ADIR_KEY',
c_include6 TYPE fieldname VALUE '.INCLU', ".INCLUDE or .INCLU--AP
or .INCLU-_BY
c_crlf TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf,
c_type_ref_to TYPE datatype_d VALUE 'REF',
c_memory_id(40) VALUE myrepid,
c_memory_pilot(40) VALUE '%UDO_PILOT_USERS',
c_traceid TYPE memoryid VALUE '%/UDO/LAST_OBJECT',
c_logical_object VALUE 'L',
c_internal TYPE tadir-object VALUE 'ITAB'.

CONSTANTS: gc_report TYPE text15 VALUE 'Report', "#EC NOTEXT


gc_mixed LIKE gc_report VALUE 'Report/SNote', "#EC NOTEXT
gc_local LIKE gc_report VALUE 'Local', "#EC NOTEXT
gc_snote LIKE gc_report VALUE 'SNote', "#EC NOTEXT
gc_workaround LIKE gc_report VALUE 'Workaround', "#EC NOTEXT
gc_manual LIKE gc_report VALUE 'Manual Instr. ', "#EC NOTEXT
gc_bcset LIKE gc_report VALUE 'Manual/BC-Set', "#EC NOTEXT
gc_ignore LIKE gc_report VALUE '-', "#EC NOTEXT
gc_generate LIKE gc_report VALUE 'Generation', "#EC NOTEXT
gc_suppack LIKE gc_report VALUE 'Supp.Pack.', "#EC NOTEXT
gc_dest_init TYPE rfcdest VALUE 'MISSING INITIALIZATION'. "#EC NOTEXT

"the following texts are also hard coded in ZRB_UDO_ADJUST!!!!


CONSTANTS: gc_test_mode TYPE string VALUE 'Running in Test Mode', "#EC NOTEXT
gc_update_mode TYPE string VALUE 'Running in Update Mode', "#EC NOTEXT
gc_genview_mode TYPE string VALUE 'Executing Step Generation'. "#EC
NOTEXT

CONSTANTS: BEGIN OF gc_dok,


data_element TYPE dok_id VALUE 'DE',
dtel_suppl TYPE dok_id VALUE 'DZ',
independent TYPE dok_id VALUE 'DT',
message TYPE dok_id VALUE 'NA',
function TYPE dok_id VALUE 'FU',
class TYPE dok_id VALUE 'CL',
class_method TYPE dok_id VALUE 'CO',
class_attrib TYPE dok_id VALUE 'CA',
class_event TYPE dok_id VALUE 'CE',
class_type TYPE dok_id VALUE 'CT',
interface TYPE dok_id VALUE 'IF',
intf_method TYPE dok_id VALUE 'IO',
intf_attrib TYPE dok_id VALUE 'IA',
intf_event TYPE dok_id VALUE 'IE',
intf_type TYPE dok_id VALUE 'IT',
release_note TYPE dok_id VALUE 'IN',
general_text TYPE dok_id VALUE 'TX',
hyper_text TYPE dok_id VALUE 'HY', "DSYS
auth_object TYPE dok_id VALUE 'UO',
extension_index TYPE dok_id VALUE 'XI',
hrdsys TYPE dok_id VALUE 'HR', "only used in UDO
END OF gc_dok.
DATA: akb_get_tadir TYPE funcname VALUE 'AKB_GET_TADIR', "#EC NOTEXT
sadt_navigation TYPE memoryid VALUE 'SADT_NAVIGATION', "#EC NOTEXT
show_genview. "show parameter GENVIEW on generated report

DATA: g_custom_container TYPE REF TO cl_gui_custom_container,


g_docking TYPE REF TO cl_gui_docking_container,
g_html_viewer TYPE REF TO object.

CONSTANTS selection_screen_1900 TYPE sydynnr VALUE 1900. "dummy for navigation


SELECTION-SCREEN BEGIN OF SCREEN 1900. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) testrun1 FOR FIELD testrun. "1900
PARAMETERS testrun RADIOBUTTON GROUP exec. "1900
SELECTION-SCREEN COMMENT 12(83) testrun2 FOR FIELD testrun. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) update1 FOR FIELD update. "1900
PARAMETERS update RADIOBUTTON GROUP exec. "1900
SELECTION-SCREEN COMMENT 12(83) update2 FOR FIELD update. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) genview1 FOR FIELD genview. "1900
PARAMETERS genview RADIOBUTTON GROUP exec. "1900
SELECTION-SCREEN COMMENT 12(83) genview2 FOR FIELD genview. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN SKIP 1. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) showlog1 FOR FIELD showlogs. "1900
PARAMETERS showlogs RADIOBUTTON GROUP exec. "1900
SELECTION-SCREEN COMMENT 12(83) showlog2 FOR FIELD showlogs. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) tse54ia FOR FIELD se54ia MODIF ID sup. "1900
PARAMETERS se54ia AS CHECKBOX MODIF ID sup. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN BEGIN OF LINE. "1900
SELECTION-SCREEN COMMENT 1(6) tse54im FOR FIELD se54im MODIF ID sup. "1900
PARAMETERS se54im AS CHECKBOX MODIF ID sup. "1900
SELECTION-SCREEN END OF LINE. "1900
SELECTION-SCREEN END OF SCREEN 1900. "1900

DATA: c_ddic_ref TYPE textpool-entry VALUE 'D_______.'.

INITIALIZATION. "2/3
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
EXPORTING
tcode = sy-tcode "dummy for ATC, real check will happen in method
lcl_wb=>init
EXCEPTIONS
ok = 0
OTHERS = 1.
CHECK sy-subrc EQ 0.

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 '_ '.
* "Initialize texts for selection screen 1900 "#EC
NOTEXT "1900
testrun1 = 'Step 1'. "#EC NOTEXT "1900
testrun2 = 'Test Run'. "#EC NOTEXT "1900
update1 = 'Step 2'. "#EC NOTEXT "1900
update2 = 'Update & Activate'. "#EC NOTEXT "1900
genview1 = 'Step 3'. "#EC NOTEXT "1900
genview2 = 'Generate Maintenance Dialogs'. "#EC NOTEXT "1900
showlog1 = 'Info'. "#EC NOTEXT "1900
showlog2 = 'Show Logs'. "#EC NOTEXT
"1900
tse54im = `Ignore message 'Perform adjustment first'`. "#EC NOTEXT
"1900
tse54ia = `Perform 'Generation of views' interactively`. "#EC NOTEXT
"1900

AT SELECTION-SCREEN OUTPUT.

PERFORM selection_screen_output IN PROGRAM (sy-repid) IF FOUND.

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.
IF sy-dynnr EQ '1800'.
PERFORM show_help IN PROGRAM (myrepid) IF FOUND.
ENDIF.

*&---------------------------------------------------------------------*
*& Form bal_callback_ucomm
*&---------------------------------------------------------------------*
FORM bal_callback_ucomm CHANGING c_state TYPE bal_s_cbuc. "#EC CALLED
DATA: ls_msg TYPE bal_s_msg,
l_date(8),
ls_tadir TYPE adir_key,
ls_limu_key TYPE bcwbn_limu_key.

CASE c_state-ucomm.
WHEN '%LONGTEXT' OR '&IC1'.
CALL FUNCTION 'BAL_LOG_MSG_READ'
EXPORTING
i_s_msg_handle = c_state-list_msgh
IMPORTING
e_s_msg = ls_msg
EXCEPTIONS
OTHERS = 0.
ls_tadir = ls_msg-context-value.
MOVE-CORRESPONDING ls_tadir TO ls_limu_key.
IF ls_msg-msgid EQ 'DO' AND ls_msg-msgno EQ '626'.
"MESSAGE i626(do) WITH 'Click this message to view' 'detailed activation
logs with name' l_logname INTO sy-lisel. "#EC *
SPLIT ls_msg-msgv3 AT ':' INTO sy-lisel l_date.
SUBMIT radprotb WITH protname EQ ls_msg-msgv3 "#EC CI_SUBMIT
WITH date EQ l_date
* with TIME
* with USER
AND RETURN.
c_state-ucomm_exec = 'X'.
ELSEIF c_state-ucomm EQ '&IC1' AND c_state-list_field = 'OBJ_NAME' AND
ls_tadir-obj_name IS NOT INITIAL. "double click on object name
CHECK NOT ls_tadir-object IS INITIAL.
CALL FUNCTION 'RS_TOOL_ACCESS'
EXPORTING
operation = 'SHOW'
object_name = ls_tadir-obj_name
object_type = ls_tadir-object
EXCEPTIONS
error_message = 1 "needed to skip error message, e.g. non existing
SOTT
OTHERS = 1.
CHECK sy-subrc EQ 0.
c_state-ucomm_exec = 'X'.
ELSEIF c_state-ucomm EQ '&IC1' AND c_state-list_field = 'OBJECT' AND
ls_tadir-object IS NOT INITIAL. "double click on object type
PERFORM show_object_type IN PROGRAM (myrepid) USING ls_limu_key space IF
FOUND.
c_state-ucomm_exec = 'X'.
ELSEIF ls_msg-msgid EQ '00' AND ls_msg-msgno EQ '398'. "dummy message with
long text icon
CASE ls_tadir-object.
WHEN space.
PERFORM show_url IN PROGRAM (myrepid) USING
'https://wiki.wdf.sap.corp/wiki/display/~d028497/FAQ' IF FOUND. "FAQ SAP name
space
c_state-ucomm_exec = 'X'.
WHEN 'PROG'.
PERFORM show_url IN PROGRAM (myrepid) USING
'https://wiki.wdf.sap.corp/wiki/display/~d028497/FAQ' IF FOUND. "FAQ SAP name
space
c_state-ucomm_exec = 'X'.
WHEN OTHERS. "'TABU', 'VIED', 'TABD', 'DEVC'
PERFORM show_object_type IN PROGRAM (myrepid) USING ls_limu_key space
IF FOUND. "-> special hints on object type page
c_state-ucomm_exec = 'X'.
ENDCASE.
ENDIF.
ENDCASE.
ENDFORM. "bal_callback_ucomm

*&---------------------------------------------------------------------*
*& Form bdc_field
*&---------------------------------------------------------------------*
DEFINE bdc_field.
clear: ls_bdc.
ls_bdc-fnam = &1.
ls_bdc-fval = &2.
append ls_bdc to lt_bdc.
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*& Form bdc_field
*&---------------------------------------------------------------------*
DEFINE bdc_screen.
clear ls_bdc.
ls_bdc-program = &1.
ls_bdc-dynpro = &2.
ls_bdc-dynbegin = 'X'.
append ls_bdc to lt_bdc.
END-OF-DEFINITION.

*&---------------------------------------------------------------------*
*& Form prepare_table
*&---------------------------------------------------------------------*
FORM prepare_table USING i_tabname TYPE tabname
i_key_fields TYPE string
it_entries TYPE STANDARD TABLE
CHANGING e_no_update.

DATA: lt_key_fields TYPE TABLE OF fieldname,


l_key_field TYPE fieldname,
l_where TYPE ddf4sqlstm,
lt_where TYPE TABLE OF ddf4sqlstm,
l_value LIKE l_where,
dref TYPE REF TO data.

FIELD-SYMBOLS: <lt_entries> TYPE STANDARD TABLE,


<ls_entry> TYPE any,
<l_field> TYPE any.

IF it_entries[] IS INITIAL. "entire deletion not supported


e_no_update = 'X'.
RETURN.
ENDIF.

READ TABLE it_entries[] INDEX 1 ASSIGNING <ls_entry>.

SPLIT i_key_fields AT space INTO TABLE lt_key_fields.


LOOP AT lt_key_fields INTO l_key_field.
ASSIGN COMPONENT l_key_field OF STRUCTURE <ls_entry> TO <l_field>.
IF <l_field> IS INITIAL.
MESSAGE a666(01) WITH 'Key field is initial:' i_tabname l_key_field. "#EC *
ENDIF.
l_value = <l_field>. CONDENSE l_value NO-GAPS. "convert to left-aligned
character
CONCATENATE l_where l_key_field '~EQ ''' l_value '''' INTO l_where. TRANSLATE
l_where USING '~ '.
APPEND l_where TO lt_where.
l_where = 'AND~'. "next line starts with AND
ENDLOOP.

CREATE DATA dref LIKE it_entries.


ASSIGN dref->* TO <lt_entries>.

SELECT * FROM (i_tabname) INTO TABLE <lt_entries> WHERE (lt_where) ORDER BY


PRIMARY KEY. "#EC CI_DYNTAB "#EC CI_DYNWHERE
IF it_entries[] EQ <lt_entries>[].
"MESSAGE s666(01) WITH 'No update neccessary' INTO sy-lisel. "#EC *
"CALL METHOD lcl_wb=>log_message.
e_no_update = 'X'.
RETURN.
ELSEIF NOT <lt_entries>[] IS INITIAL AND testrun IS INITIAL.
"remove all current entries before inserting the new ones
DELETE (i_tabname) FROM TABLE <lt_entries>. "#EC CI_DYNTAB. "#EC CI_DYNWHERE
ENDIF.
ENDFORM. "prepare_table

*&---------------------------------------------------------------------*
*& Form show_instruction
*&---------------------------------------------------------------------*
FORM show_instruction.

LOOP AT SCREEN.
IF screen-group1 EQ 'SUP'.
screen-output = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

IF show_genview IS INITIAL.
"hide GENVIEW
LOOP AT SCREEN.
IF screen-name CS 'GENVIEW'.
screen-input = 0.
screen-invisible = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

* "get current screen size


* l_size = sy-scols - 15. "selection screen needx 15 columns
* CALL METHOD cl_gui_cfw=>compute_metric_from_dynp
* CALL METHOD cl_gui_cfw=>compute_pixel_from_metric

DATA: l_ratio TYPE i VALUE 85.


IF sy-scols NE 0.
l_ratio = 100 - ( 30 * 100 / sy-scols ).
ENDIF.

IF g_docking IS NOT INITIAL.


* CALL METHOD g_docking->set_extension
* EXPORTING
* extension = l_size
* EXCEPTIONS
* OTHERS = 0.
ELSE.
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.
CHECK sy-subrc EQ 0. "simply leave in case of any problem

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.
CHECK sy-subrc EQ 0. "simply leave in case of any problem

CALL METHOD cl_gui_cfw=>flush


EXCEPTIONS
cntl_system_error = 1
cntl_error = 2.
CHECK sy-subrc EQ 0. "simply leave in case of any problem
ENDIF.

DATA: lt_html TYPE STANDARD TABLE OF abaptxt255,


l_url(255).

"http://www.w3schools.com/html/default.asp

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>Nearly 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 '<li>See also note <a


href="https://service.sap.com/sap/support/notes/2133603/">2133603</a>.</li>'
TO lt_html. "#EC NOTEXT "1900
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
* info = 'Search for Translation System' "#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
* info = 'Search for Translation System' "#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

IF show_genview IS NOT INITIAL.


CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = icon_generate
text = 'Generation' "#EC NOTEXT
IMPORTING
result = but_gen.
APPEND '<h3>Generate:</h3>' TO
lt_html. "#EC NOTEXT "1900
APPEND 'Generate Maintenance Dialogs.<br>' TO lt_html. "#EC NOTEXT "1900
APPEND 'In this step the maintenance dialogs are generated. Perform this step
only after the <i>Update & Activate</i> step is completed successfully.<br>' TO
lt_html. "#EC NOTEXT "1900
ENDIF.

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.
CHECK sy-subrc EQ 0.

CHECK gv_unit_test IS INITIAL.

CALL METHOD g_html_viewer->('SHOW_URL')


EXPORTING
url = l_url
* frame = l_frame
EXCEPTIONS
cntl_error = 0. "simply ignore any problem

ENDFORM. "show_docking_control

*----------------------------------------------------------------------*
* CLASS lcl_wb DEFINITION
*----------------------------------------------------------------------*
CLASS lcl_wb DEFINITION.
PUBLIC SECTION.

CLASS-METHODS init
IMPORTING
value(i_note) TYPE c OPTIONAL "note which indicates that report
is not needed anymore
value(i_cinst) TYPE cwbcialeid OPTIONAL "correction instruction which
describes the validity of the report
RETURNING
value(r_return_code) TYPE sysubrc.

CLASS-METHODS get_object_text
IMPORTING
i_object TYPE e071-object "e.g. TABD
i_obj_name TYPE c OPTIONAL "for DOCU
RETURNING value(r_text) TYPE string.

CLASS-METHODS create_program_text
IMPORTING
i_devclass TYPE devclass OPTIONAL "needed if report texts are created
before the program exists
i_progname TYPE progname
i_masterlang TYPE masterlang OPTIONAL "optional for downwards
compatibility
i_langu TYPE sylangu DEFAULT 'E' "Default EN
i_id TYPE textpool-id DEFAULT 'I' "I = Text element, S =
Selection Text, R = Title
i_key TYPE textpool-key "space for title
i_text TYPE textpool-entry DEFAULT c_ddic_ref
i_length TYPE textpool-length OPTIONAL. "can be defaulted from length
of text

CLASS-METHODS execute_method
IMPORTING
i_method TYPE c. "AFTER_IMP or BEFORE_EXP

CLASS-METHODS add_to_transport
IMPORTING
i_object TYPE e071-object "e.g. TABD
i_obj_name TYPE c "flexible number of characters
i_skip_snote_check TYPE c OPTIONAL
i_tabkey TYPE e071k-tabkey OPTIONAL "only for TABU
i_edtflag TYPE edtflag OPTIONAL "X = not editable via standard
tools
i_devclass TYPE devclass OPTIONAL
i_langu TYPE sylangu OPTIONAL
value(i_masterlang) TYPE masterlang OPTIONAL "will be defaulted with
i_langu
EXPORTING
e_masterlang TYPE tadir-masterlang
EXCEPTIONS
error
simulation
language_not_installed.

CLASS-METHODS log_message
IMPORTING i_object TYPE e071-object OPTIONAL
i_obj_name TYPE c OPTIONAL
i_probclass TYPE balprobcl OPTIONAL.

CLASS-METHODS display_log
IMPORTING
i_db_search TYPE xfeld OPTIONAL "search logs on db
i_no_save TYPE xfeld OPTIONAL.

CLASS-METHODS save_log.

CLASS-METHODS set_context
IMPORTING i_object TYPE e071-object
i_skip_snote_check TYPE c OPTIONAL
i_obj_name TYPE c
i_obj_name2 TYPE c OPTIONAL
i_msgty TYPE symsgty DEFAULT 'I'
i_text TYPE c OPTIONAL
i_no_message TYPE c OPTIONAL
i_masterlang TYPE masterlang OPTIONAL
i_langu TYPE sylangu
EXPORTING
e_covered_by_snote TYPE c.

CLASS-METHODS snote_support
IMPORTING i_object TYPE e071-object
RETURNING value(r_supported) TYPE xfeld.

CLASS-METHODS activate
IMPORTING i_result_auth_check TYPE sysubrc OPTIONAL.

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_frcact TYPE c OPTIONAL
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_wb IMPLEMENTATION
*----------------------------------------------------------------------*
CLASS lcl_wb IMPLEMENTATION.

METHOD init.

DATA: ls_balobj TYPE balobj.

CLEAR: gv_errors_occured, r_return_code, gv_progname_rept.

"INITIALIZATION. "3/3
TRANSLATE c_ddic_ref USING '_ '. "initialization

CONCATENATE 'AOBJ''CHDO''IWPR''IWMO''IWSV''SUCD''SUSC''SUSK''DIOB''DTRF''DROU'
'DTRC''BSVO''BSVI''BSVV''SCP2''TOBJ''PCLA''DTMT''DTMU''DTMR''DTMS'
'PSCS''PMKS''PFCS''POCS''PCYS''LODS''LODE''LOIE''LODC''SHI3''SHI5'
'SHI6''ECTD''ELEM''SICF''SRFR''SRFS''SRFQ''SAJT''SAJC''SXCI''IOBJ'
'TRAN''DELM''PDTS''PDWS''PDAC''CFDA''CFDB''CFDC''CFDE''CFDF''CFDG'
'CFDO''CFDS''CFDT''FSEL''DMEE''DMEA''SBDL''SBDP''SSB6''WAPD''FTGL'
'BMFR''SSB5''IWVB''SUSH''SUSI''NROB''IWVB''SRFA''SOBJ'
INTO approved_logical_objects SEPARATED BY `'`.

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.
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 = 'PROG'
i_obj_name = sy-repid
i_no_message = abap_true.
"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 "#EC CI_NOORDER
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 ) "created by ...
).
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.

"CL_WHATSUP_HEADER_UI->PBO_CONTROL
* data lo_header type ref to cl_whatsup_header.
*
* lo_header = cl_whatsup_header=>get_instance( ).
*
* ms_header-product = lo_header->get_product( ).
* ms_header-upgrade_type = lo_header->get_upgrade_type( ).
* ms_header-upgrade_scenario = lo_header->get_upgrade_scenario( ).
* ms_header-upgrade_system = lo_header->get_execution_system( ).
* ms_header-dbsys = sy-dbsys.
*
* ms_header-current_phase = lo_header->get_current_phase( ).
*
* lo_header->get_release( importing ev_srcrel = ms_header-srcrelease
* ev_1shdrel = ms_header-1shdrelease
* ev_tgtrel = ms_header-tgtrelease ).
*
*
* lo_header->get_summanifest( importing ev_os_version = ms_header-os_version
* ev_comp_mode = ms_header-comp_mode
* ev_release = ms_header-release
* ev_support_package = ms_header-
support_package
* ev_patchlv = ms_header-patchlv
* ev_branch = ms_header-branch
* ev_ass_time = ms_header-
ass_time ).

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 sapbasis NE '?' AND sy-saprl LT sapbasis. "customer might have same or
higher SAP_BASIS than dev system but lower is not allowed
MESSAGE e666(01) WITH 'This report is valid for SAP_BASIS' sapbasis 'but
current system has SAP_BASIS' sy-saprl INTO sy-lisel. "#EC *
CALL METHOD log_message.
r_return_code = 5. RETURN. "stop immediately
ENDIF.

CALL METHOD set_context


EXPORTING
i_langu = space
i_object = space
i_obj_name = space.

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.
ENDIF.
IF NOT l_valid IS INITIAL.
EXIT.
ENDIF.
ENDLOOP.
IF l_valid IS INITIAL.
MESSAGE w666(01) WITH 'Correction instruction not valid' 'for current
patch level.' 'Report execution not required anymore.' 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 gc_test_mode INTO sy-lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
ELSEIF NOT update IS INITIAL. "or UPDATE & GENVIEW
MESSAGE i666(01) WITH gc_update_mode INTO sy-lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
ELSEIF NOT genview IS INITIAL. "only GENVIEW
MESSAGE i666(01) WITH gc_genview_mode INTO sy-lisel. "#EC *
CALL METHOD lcl_wb=>log_message.
ENDIF.

"Switch on SNOTE & SCWB mode


CALL FUNCTION 'SCWG_TOOLFLAG_SET'.
IF l_system_type EQ 'SAP'.
CALL FUNCTION 'TR_P_COP_SWICH_OFF'.
ENDIF.
TRY. CALL METHOD ('CL_CWB_RUNTIME')=>set_active. CATCH
cx_sy_dyn_call_illegal_class. ENDTRY. ">=SAPBASIS640

"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 i666(01) WITH 'Implement note 1609940 if you want to avoid' 'annoying
message ''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 = 0.

ENDMETHOD. "init

METHOD get_object_text.

STATICS: lt_object_text TYPE TABLE OF ko100,


lt_doktypes TYPE TABLE OF dd07v,
ls_objt TYPE objt.

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.

CALL FUNCTION 'DDIF_DOMA_GET'


EXPORTING
name = 'DOK_ID'
langu = sy-langu
TABLES
dd07v_tab = lt_doktypes
EXCEPTIONS
OTHERS = 0.
SORT lt_doktypes BY domvalue_l.
ENDIF.

CASE i_object.
WHEN 'DOCU'.
IF i_obj_name CP 'FU*'.
SPLIT i_obj_name AT space INTO sy-lisel sy-lisel. "check if name
containes two words.
IF sy-lisel IS INITIAL.
r_text = 'Documentation Function Module'. "#EC NOTEXT
ELSE.
r_text = 'Documentation Function Module Parameter'. "#EC NOTEXT
ENDIF.
ELSE.
READ TABLE lt_doktypes INTO ls_doktype BINARY SEARCH
WITH KEY domvalue_l = i_obj_name(2).
IF sy-subrc EQ 0.
CONCATENATE 'Documentation' ls_doktype-ddtext INTO r_text SEPARATED BY
space. "#EC NOTEXT
ELSE.
r_text = 'Documentation'. "#EC NOTEXT
ENDIF.
ENDIF.
WHEN 'FUNH'.
r_text = 'Function Module Release Status'. "#EC NOTEXT
WHEN 'PROC'.
r_text = 'HDB Stored Procedure'. "#EC NOTEXT
WHEN 'ALVV'.
r_text = 'ALV Standard Variant'. "#EC NOTEXT
WHEN 'DDLS'.
r_text = gc_objtext-ddlsource.
WHEN 'TDAT'.
IF i_obj_name NE ls_objt-objectname.
SELECT SINGLE * FROM objt INTO ls_objt WHERE language EQ sy-langu AND
objectname EQ i_obj_name. "#EC CI_NOORDER
ENDIF.
r_text = ls_objt-ddtext.
WHEN OTHERS.
READ TABLE lt_object_text INTO ls_object_text BINARY SEARCH
WITH KEY object = i_object. "ignore PGMID!
IF sy-subrc EQ 0.
r_text = ls_object_text-text.
ENDIF.
ENDCASE.

CASE i_obj_name.
WHEN 'TNODEIMG' OR 'TNODEIMGT'.
r_text = gc_objtext-imgtree.
WHEN 'TMENU01' OR 'TMENU01T' OR 'TMENU01R'.
r_text = gc_objtext-areamenu.
ENDCASE.

ENDMETHOD. "get_object_text
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 (copied from


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 switches "online" (one by one to avoid popup)
DATA: ls_switchname LIKE LINE OF gr_switchname.
LOOP AT gr_switchname INTO ls_switchname.
l_objname = ls_switchname-low.
CALL FUNCTION 'RS_WORKING_OBJECT_ACTIVATE'
EXPORTING
object = 'SFSW'
obj_name = l_objname
dictionary_only = 'X' "must be set for switches
activate_only_this_object = 'X'
object_saved = 'X'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc EQ 0.
MESSAGE s199(sfw) WITH l_objname INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
ENDLOOP.
"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.
READ TABLE gr_tabname WITH KEY sign = 'I' TRANSPORTING NO FIELDS.
IF sy-subrc EQ 0. "do not add objects if range gr_tabname contains no
entries or only entries with SIGN = 'E'
"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
permission_error = 1
canceled = 2
object_not_found = 3
definition_error = 4
invalid_parameter = 5
OTHERS = 6.
CASE sy-subrc.
WHEN 0.
CONTINUE.
WHEN 1.
MESSAGE e666(01) WITH 'No authorization to activate database table'
<ls_dwinactiv>-obj_name '. Call transaction SU53 for details' INTO sy-lisel. "#EC *
WHEN 4.
MESSAGE e666(01) WITH 'Technical Settings are missing for table'
l_obj_name INTO sy-lisel. "#EC *
WHEN OTHERS.
MESSAGE e666(01) WITH 'Error during activation of table'
<ls_dwinactiv>-obj_name INTO sy-lisel. "#EC *
ENDCASE.
l_auth_subrc = sy-subrc.
CALL METHOD log_message.
EXIT. "LOOP
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 'INDX' OR 'XINX'. DELETE gr_indxname WHERE low EQ <ls_dwinactiv>-
obj_name.
WHEN 'VIEW'. DELETE gr_viewname WHERE low EQ <ls_dwinactiv>-obj_name.
WHEN 'ENQU'. DELETE gr_enqname 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 = ' '
* cwb_mode = 'X'
* UI_DECOUPLED = 'X' "as of SAPBASIS740
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'.
IF NOT gv_unit_test IS INITIAL OR NOT genview IS INITIAL.
lv_answer = '1'. "force online activation
ELSE.
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.
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 gr_tabname[] IS NOT INITIAL.
* SELECT * FROM swotice INTO TABLE lt_swotice WHERE tabname IN gr_tabname.
* IF sy-subrc EQ 0.
* DELETE swotice FROM TABLE lt_swotice.
* ENDIF.
ENDIF.
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_frcact = 'X' "force activation od dependent objects
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 EQ 0.
DELETE lt_ddxtt_after.
ELSE.
"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 lt_ddxtt_after[] IS NOT INITIAL.
DELETE ddxtt FROM TABLE lt_ddxtt_after. "delete unexpected entries
ENDIF.

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.
">=SAPBASIS640
CREATE DATA l_dref TYPE (ls_tabname-low).
CATCH cx_sy_create_data_error.
">=SAPBASIS640
MESSAGE e666(01) WITH 'Data Type' ls_tabname-low 'is inconsistent'
INTO l_message. "#EC * ">=SAPBASIS640
CALL METHOD log_message. ">=SAPBASIS640
ENDTRY.
">=SAPBASIS640
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
WITH frcact EQ i_frcact

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 e099(ut) WITH ls_log-line(50) ls_log-line+50(50) ls_log-line+100
INTO sy-lisel. "#EC *
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 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. ">=SAPBASIS700
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.

FIELD-SYMBOLS: <ls_method_call> TYPE trmtd_method_call.

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.

* CALL FUNCTION 'APPEND_PROTOCOL'. "here error occurs depending on previous


statements

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.
">=SAPBASIS700
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
">=SAPBASIS700
it_client = lt_result
">=SAPBASIS700
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 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_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_masterlang NE space AND i_langu NE i_masterlang. "translation -> no


snote_check
ELSEIF i_skip_snote_check IS INITIAL AND lcl_wb=>snote_support( i_object ) IS
NOT INITIAL.
RAISE error. "do not perform changes to object, since it is covered by SNote
ENDIF.

IF gv_errors_occured EQ 'X'.
MESSAGE w666(01) WITH 'Skipped because of error in previous object' INTO sy-
lisel. "#EC *
CALL METHOD log_message.
RAISE error.
ELSEIF 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 'SCP1'.
WHEN 'SCP2'.
"check if there is any BCSet client.
SELECT mandt FROM t000 INTO ls_t000 WHERE ccorigcont EQ 'X'. "AND
cccategory EQ 'C' <- sometimes not customized as C but T, e.g. E27
CONCATENATE l_bcset_clients ls_t000-mandt INTO l_bcset_clients
SEPARATED BY space.
ENDSELECT.
IF NOT l_bcset_clients IS INITIAL.
"check if current client is a BCSet client
IF l_bcset_clients NS sy-mandt.
MESSAGE e666(01) WITH 'BCSets can only be changed in one' 'of the
following clients:' l_bcset_clients INTO sy-lisel. "#EC *
CALL METHOD log_message.
s_msgty = 'E'.
ENDIF.
ENDIF.
ENDCASE.
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
original system
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-srcsystem IS INITIAL AND testrun IS INITIAL.
CALL FUNCTION 'TRINT_TADIR_MODIFY'
EXPORTING
author = sy-uname
devclass = i_devclass
pgmid = ls_tadir_key-pgmid
object = ls_tadir_key-object
obj_name = ls_tadir_key-obj_name
masterlang = i_langu
srcsystem = ls_gtadir-srcsystem
change_masterlang = 'X'
* EDTFLAG = '~'
* GENFLAG = '~'
force_mode = space
created_on = sy-datum ">=SAPBASIS702
check_date = sy-datum ">=SAPBASIS702
* CHECK_CFG = '~' ">=SAPBASIS702
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. "did not work in ERW, was not possible to


copy local objects
* 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
* AUTHOR = ' '
* GENFLAG = ' '
* PROGRAM = ' '
* OBJECT_CLASS_SUPPORTS_MA = ' '
* MOD_LANGU = ' '
* ACTIVATION_CALL = ' '
IMPORTING
korrnum = gv_trkorr
* ORDERNUM =
* NEW_CORR_ENTRY =
* AUTHOR =
transport_key = ls_trkey
* NEW_EXTEND =
EXCEPTIONS
cancelled = 1
permission_failure = 2
unknown_objectclass = 3
OTHERS = 4.
IF sy-subrc NE 0.
IF sy-subrc EQ 1.
MESSAGE e406(42) INTO sy-lisel. "action cancelled
ENDIF.
CALL METHOD log_message.
s_msgty = 'E'.
gv_errors_occured = 'X'. "no change in further objects, skip activation
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. "do not use i_masterlang as long
as i_masterlang is optional
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.
ELSEIF i_devclass NE '$TMP'.
"creation of LIMU where no TADIR existed before
** UPDATE tadir SET masterlang = space "clear language and let
SCWB/SNOTE set the correct language "erasing masterlang not enough->delete tadir?
"deactivated because copy PINF lost TADIR here: (20161124)
* 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' "testrun -> at least 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.

IF gv_trkorr IS NOT INITIAL.


READ TABLE gt_trkorr WITH KEY table_line = gv_trkorr TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
APPEND gv_trkorr TO gt_trkorr.
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 create_program_text.

DATA: lt_textpool TYPE TABLE OF textpool,


lt_source TYPE TABLE OF abapsource,
l_text LIKE i_text,
ls_e071 TYPE e071,
ls_tadir TYPE tadir.

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.
IF i_progname NE gv_progname_rept. "show following message only once
MESSAGE i666(01) WITH 'Report Texts can not be created yet.' INTO sy-lisel.
"#EC *
CALL METHOD log_message.
ls_e071-pgmid = 'LIMU'.
ls_e071-object = 'REPT'.
ls_e071-obj_name = i_progname.
CALL FUNCTION 'SCWB_GET_TADIR_REM'
EXPORTING
is_e071 = ls_e071
IMPORTING
es_tadir_key = ls_tadir.
MESSAGE w666(01) WITH 'Please execute this report again when' ls_tadir-
object ls_tadir-obj_name 'has been created.' INTO sy-lisel. "#EC *
CALL METHOD log_message.
ENDIF.
gv_progname_rept = i_progname.
RETURN.
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 existing 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 OR i_progname EQ myrepid.
TRY.
">=SAPBASIS640
CALL FUNCTION 'RPY_TEXTELEMENTS_INSERT' "other funcs in version 00047
EXPORTING
development_class = i_devclass
language = i_langu
program_name = i_progname
temporary = 'X' "transport check was already done
transport_number = space
r2_flag = space
TABLES
source = lt_textpool
EXCEPTIONS "#EC FB_RC
cancelled = 1
permission_error = 2
program_not_exists = 3
OTHERS = 4.
CATCH cx_root. "e.g. CX_SY_DYN_CALL_ILLEGAL_FUNC
">=SAPBASIS640
MESSAGE e666(01) WITH 'Error in function RPY_TEXTELEMENTS_INSERT.'
'Implement Note 1842889' INTO sy-lisel. "#EC * ">=SAPBASIS640
sy-subrc = 9.
">=SAPBASIS640
ENDTRY.
">=SAPBASIS640
IF sy-subrc EQ 0.
IF i_key IS INITIAL.
MESSAGE i666(01) WITH 'Update successful for program title' i_key INTO sy-
lisel. "#EC *
ELSE.
MESSAGE i666(01) WITH 'Update successful for program text' i_key INTO sy-
lisel. "#EC *
ENDIF.
CALL METHOD log_message.
ELSE.
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.
IF i_key IS INITIAL.
MESSAGE e666(01) WITH 'Update failed for program title' i_key INTO sy-
lisel. "#EC *
ELSE.
MESSAGE e666(01) WITH 'Update failed for program text' i_key INTO sy-
lisel. "#EC *
ENDIF.
CALL METHOD log_message.
ENDIF.

ENDMETHOD. "create_program_text

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 e666(01) WITH 'unknown error' INTO sy-lisel. "#EC *
ENDIF.
IF i_probclass IS INITIAL.
CASE sy-msgty. "change problem class (default is 4)
WHEN 'E' OR 'A'.
ls_msg-probclass = '2'.
WHEN 'W'.
ls_msg-probclass = '3'.
ENDCASE.
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'.
IF i_object IS INITIAL OR 'REPT''AVAS''VARI' NS i_object. "uncritical
objects
gv_errors_occured = 'X'. "will prevent activation step
ENDIF.
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'.
CALL FUNCTION 'TR_P_COP_SWICH_ON'.
TRY. CALL METHOD ('CL_CWB_RUNTIME')=>set_finished. CATCH
cx_sy_dyn_call_illegal_class. ENDTRY. ">=SAPBASIS640

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
langu = space "no texts
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'.
* ls_profile-clbk_ucom-userexitp = sy-repid.
* ls_profile-clbk_ucom-userexitf = 'BAL_CALLBACK_UCOMM'.
* ls_profile-ext_push1-active = 'X'.
* ls_profile-ext_push1-def-text = 'DDIC'.
* ls_profile-ext_push1-def-icon_id = icon_history.
* ls_profile-ext_push1-def-icon_text = 'DDIC'.
* ls_profile-ext_push1-def-quickinfo = 'DDIC Activation log'.

IF NOT testrun IS INITIAL.


ls_profile-title = 'Simulation log'. "#EC *
ELSEIF NOT update IS INITIAL.
ls_profile-title = 'Change Log'. "#EC *
ELSEIF NOT genview IS INITIAL.
ls_profile-title = 'View Generation 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.
* ls_profile-TREE_ONTOP = space.
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.

* CALL FUNCTION 'BAL_DB_SEARCH' "only searches current client


* EXPORTING
* i_client = sy-mandt
* i_s_log_filter = ls_filter
* IMPORTING
* e_t_log_header = lt_log_header
* EXCEPTIONS
* log_not_found = 1
* no_filter_criteria = 2
* OTHERS = 3.

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 gv_unit_test IS INITIAL 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,
s_covered_by_snote.

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"
e_covered_by_snote = s_covered_by_snote.
RETURN.
ELSE.
lss_key = ls_key.
CLEAR: e_covered_by_snote, s_covered_by_snote.
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.


RETURN.
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 i_masterlang NE space AND i_langu NE i_masterlang. "translation -> no
snote_check
l_text = 'Update translation'.
ELSEIF i_skip_snote_check IS INITIAL AND NOT
lcl_wb=>snote_support( i_object ) IS INITIAL.
l_text = 'Covered by SNOTE'.
e_covered_by_snote = s_covered_by_snote = 'X'.
* return. "to supress any skip message
ENDIF.
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
i_probclass = '3'
EXCEPTIONS
OTHERS = 0.
ENDIF.

ENDMETHOD. "set_context

METHOD snote_support.

STATICS: s_note_2459558.
DATA: l_object LIKE i_object.

CLEAR r_supported.

CHECK sy-cprog NE myrepid. "no check during copy with UDO

l_object = i_object.
CASE i_object.
WHEN 'DOMA' OR 'DTEL' OR 'TABL' OR 'ENQU' OR 'VIEW' OR 'TTYP' OR 'SHLP'.
l_object+3 = 'D'. "e.g. DTEL -> DTED
ENDCASE.

CHECK gv_objects_with_snote_check CS l_object.

IF s_note_2459558 IS INITIAL.
s_note_2459558 = '-'.
TRY.
"check if note 2459558 is applied
PERFORM filter_supobjtype_by_sys_patch IN PROGRAM saplscwo IF FOUND.
"call with missing parameter!
CATCH cx_root.
s_note_2459558 = 'X'. "runtime error -> FORM was found -> Note 2459558 is
available
ENDTRY.
ENDIF.
CHECK s_note_2459558 EQ 'X'. "do the check only if note is applied

CALL FUNCTION 'SCWB_CHECK_OBJTYPE_SUPPORTED'


EXPORTING
iv_exe_mode = 'N' "SNOTE
iv_objtype = l_object
IMPORTING
ev_supported = r_supported.

ENDMETHOD. "snote_support

ENDCLASS. "lcl_wb IMPLEMENTATION


*----------------------------------------------------------------------*
* CLASS ltc_testrun DEFINITION
*----------------------------------------------------------------------*
CLASS ltc_testrun DEFINITION FOR TESTING ">=SAPBASIS702
DURATION MEDIUM RISK LEVEL HARMLESS. ">=SAPBASIS702
PUBLIC SECTION. ">=SAPBASIS702
METHODS: execute FOR TESTING. ">=SAPBASIS702
ENDCLASS. ">=SAPBASIS702

*----------------------------------------------------------------------*
* CLASS ltc_testrun IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS ltc_testrun IMPLEMENTATION. ">=SAPBASIS702
METHOD execute. ">=SAPBASIS702
">=SAPBASIS702
CHECK sy-repid NE myrepid. ">=SAPBASIS702
">=SAPBASIS702
CLEAR: gt_trkorr, gv_trkorr. ">=SAPBASIS702
testrun = 'X'. ">=SAPBASIS702
update = space. ">=SAPBASIS702
genview = space. ">=SAPBASIS702
">=SAPBASIS702
gv_unit_test = 'X'. ">=SAPBASIS702
">=SAPBASIS702
PERFORM show_instruction. ">=SAPBASIS702
">=SAPBASIS702
CHECK sy-saprl GE '754'. "full test only in S4 infinity ">=SAPBASIS702
">=SAPBASIS702
DATA: lt_e070 TYPE TABLE OF e070. ">=SAPBASIS702
APPEND 'DUMMY' TO lt_e070. ">=SAPBASIS702
PERFORM prepare_table USING 'E070' 'TRKORR' ">=SAPBASIS702
lt_e070 CHANGING sy-lisel. ">=SAPBASIS702
">=SAPBASIS702
CALL METHOD lcl_wb=>init. ">=SAPBASIS702
PERFORM update. ">=SAPBASIS702
PERFORM genview. ">=SAPBASIS702
">=SAPBASIS702
CALL METHOD lcl_wb=>activate. ">=SAPBASIS702
">=SAPBASIS702
IF gv_errors_occured NE space. ">=SAPBASIS702
CALL METHOD cl_abap_unit_assert=>fail ">=SAPBASIS702
EXPORTING ">=SAPBASIS702
msg = 'Error occured' "#EC NOTEXT ">=SAPBASIS702
level = if_aunit_constants=>fatal ">=SAPBASIS702
quit = if_aunit_constants=>no. ">=SAPBASIS702
ENDIF. ">=SAPBASIS702
ENDMETHOD. "execute ">=SAPBASIS702
">=SAPBASIS702
ENDCLASS. "ltc_units IMPLEMENTATION ">=SAPBASIS702

*&---------------------------------------------------------------------*
*& Form main
*&---------------------------------------------------------------------*
FORM main.

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: gt_trkorr, gv_trkorr. "Transport popup shall come once
IF lcl_wb=>init( i_note = '' ) IS INITIAL. "<note which indicates that report
is not needed anymore>
IF NOT update IS INITIAL OR NOT testrun IS INITIAL.
PERFORM update.
CALL METHOD lcl_wb=>activate.
ENDIF.
IF NOT genview IS INITIAL OR NOT testrun IS INITIAL.
PERFORM genview.
ENDIF.
ENDIF.
ENDIF.
CALL METHOD lcl_wb=>display_log "one or all logs
EXPORTING
i_db_search = showlogs.
IF sy-cprog NE myrepid.
SUBMIT (sy-repid) "start from scratch with initial global variables
WITH testrun = testrun WITH update = update WITH genview = genview.
ENDIF.
ENDDO. "1900

ENDFORM. "main

FORM update_01. " REPT SAPMF05A ( DE , source: EBS )


CALL METHOD lcl_wb=>create_program_text "#EC *
EXPORTING
i_progname = 'SAPMF05A'
i_devclass = 'FBAS'
i_masterlang = 'D'
i_langu = 'D':
i_id = 'I'
i_key = '001'
i_text = 'Verrechnungszeile nicht gefunden ;;'
"#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = '002'
i_text = 'Verrechnungszeile ausgeziffert ;;'
"#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = '003'
i_text = 'Diskontbeleg hat falschen W�hrungsschluessel ;;'
"#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = '004'
i_text = 'Verrechnungszeile hat falschen Betrag ;;'
"#EC NOTEXT
i_length = '55',
i_id = 'I'
i_key = '005'
i_text = 'Kontoart ist nicht ''S'' ;;'
"#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = '006'
i_text = 'Verrechnungszeile hat falsches Soll/Haben-Kennzeichen;;'
"#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = '007'
i_text = 'sonstige Positionen ;;' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = '008'
i_text = 'INTERN ;;' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = '009'
i_text = 'Position ;;' "#EC NOTEXT
i_length = '17',

i_id = 'I'
i_key = '010'
i_text = 'Keine' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '011'
i_text = 'Kontokorrent-Konto' "#EC NOTEXT
i_length = '18',

i_id = 'I'
i_key = '012'
i_text = 'F�lligkeitsdatum' "#EC NOTEXT
i_length = '16',

i_id = 'I'
i_key = '013'
i_text = 'Belegnummer' "#EC NOTEXT
i_length = '11',

i_id = 'I'
i_key = '014'
i_text = 'Zuordnung' "#EC NOTEXT
i_length = '9',

i_id = 'I'
i_key = '015'
i_text = 'Betrag' "#EC NOTEXT
i_length = '6',

i_id = 'I'
i_key = '016'
i_text = 'Valutadatum' "#EC NOTEXT
i_length = '11',

i_id = 'I'
i_key = '017'
i_text = 'Gesch�ftsbereich' "#EC NOTEXT
i_length = '16',

i_id = 'I'
i_key = '018'
i_text = 'Abbrechen Belegposition' "#EC NOTEXT
i_length = '23',

i_id = 'I'
i_key = '019'
i_text = 'Ntzp:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '020'
i_text = 'Best:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '021'
i_text = 'Proj:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '022'
i_text = 'Auft:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '023'
i_text = 'Anla:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '024'
i_text = 'Kost:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '025'
i_text = 'Gsbe:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '026'
i_text = 'Debitor' "#EC NOTEXT
i_length = '7',

i_id = 'I'
i_key = '027'
i_text = 'Kreditor' "#EC NOTEXT
i_length = '8',
i_id = 'I'
i_key = '028'
i_text = 'Die Belegposition ist unvollst�ndig;;' "#EC NOTEXT
i_length = '37',

i_id = 'I'
i_key = '029'
i_text = 'Soll die Position ignoriert werden?;;' "#EC NOTEXT
i_length = '37',

i_id = 'I'
i_key = '030'
i_text = 'Bearbeitung beenden' "#EC NOTEXT
i_length = '19',

i_id = 'I'
i_key = '031'
i_text = 'Kdau:;;' "#EC NOTEXT
i_length = '7',

i_id = 'I'
i_key = '032'
i_text = 'Wollen Sie die Bearbeitung beenden?;;' "#EC NOTEXT
i_length = '37',

i_id = 'I'
i_key = '033'
i_text = 'Originalbeleg ablegen' "#EC NOTEXT
i_length = '21',

i_id = 'I'
i_key = '034'
i_text = 'M�chten Sie angezeigten Orig.Beleg' "#EC NOTEXT
i_length = '34',

i_id = 'I'
i_key = '035'
i_text = 'zur Buchung $1 $2 ablegen ?' "#EC NOTEXT
i_length = '27',

i_id = 'I'
i_key = '036'
i_text = 'Beleg l�schen' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = '037'
i_text = 'Beleg $ wirklich l�schen ?' "#EC NOTEXT
i_length = '29',

i_id = 'I'
i_key = '038'
i_text = 'Steuerinformationen: Position' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '039'
i_text = 'Steuerinformationen: Beleg' "#EC NOTEXT
i_length = '30',
i_id = 'I'
i_key = '040'
i_text = 'Debitoren' "#EC NOTEXT
i_length = '9',

i_id = 'I'
i_key = '041'
i_text = 'Kreditoren' "#EC NOTEXT
i_length = '10',

i_id = 'I'
i_key = '042'
i_text = 'Anlagen' "#EC NOTEXT
i_length = '7',

i_id = 'I'
i_key = '043'
i_text = 'Positionen' "#EC NOTEXT
i_length = '10',

i_id = 'I'
i_key = '044'
i_text = 'Positionen in Belegw�hrung' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '045'
i_text = 'Positionen in Hausw�hrung' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '046'
i_text = 'Positionen in Konzernw�hrg' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '047'
i_text = 'Positionen in Gesellschaftsw�hrung' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '048'
i_text = 'Positionen in Hartw�hrung' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '049'
i_text = 'Positionen in Indexw�hrung' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '050'
i_text = 'Zusatzangaben' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = '051'
i_text = 'Daten zum Anlagenabgang werden nicht gemerkt' "#EC NOTEXT
i_length = '70',

i_id = 'I'
i_key = '053'
i_text = 'Beleg merken' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = '054'
i_text = 'Belegw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '055'
i_text = 'Hausw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '056'
i_text = 'Konzernw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '057'
i_text = 'Gesellschaftsw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '058'
i_text = 'Hartw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '059'
i_text = 'Indexw�hrung' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '060'
i_text = 'alle Buchungskreise' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '061'
i_text = 'Beleg trotzdem merken ?' "#EC NOTEXT
i_length = '23',

i_id = 'I'
i_key = '062'
i_text = 'letzter Text' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '063'
i_text = 'letzter Text mit Best�tigung' "#EC NOTEXT
i_length = '28',

i_id = 'I'
i_key = '065'
i_text = ' BS GsBe Konto' "#EC NOTEXT
i_length = '42',

i_id = 'I'
i_key = '066'
i_text = ' &CUR Betrag Mws-Btr' "#EC NOTEXT
i_length = '42',

i_id = 'I'
i_key = '067'
i_text = ' BS GsBe Konto Bukrs' "#EC NOTEXT
i_length = '46',

i_id = 'I'
i_key = '068'
i_text = 'Spalten�berschrift zu Variante &VAR fehlt' "#EC NOTEXT
i_length = '41',

i_id = 'I'
i_key = '069'
i_text = 'Rechnungspr�fung' "#EC NOTEXT
i_length = '16',

i_id = 'I'
i_key = '070'
i_text = 'Kreditor-Buchung' "#EC NOTEXT
i_length = '16',

i_id = 'I'
i_key = '071'
i_text = 'Immo:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '072'
i_text = 'Angabe im Avis:' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '073'
i_text = 'Kdau:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '074'
i_text = 'Regulierer' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = '075'
i_text = 'Zahlungsempf' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = '076'
i_text = 'Prct:' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = '077'
i_text = 'Autom. Ausgleich SAPF124' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '078'
i_text = 'Autom. Ausgleich SAPF124E' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '079'
i_text = ' &CUR Betrag Mws-Btr' "#EC NOTEXT
i_length = '38',

i_id = 'I'
i_key = '080'
i_text = 'Position automatisch erzeugt' "#EC NOTEXT
i_length = '29',

i_id = 'I'
i_key = '081'
i_text = 'Anlagenunternummer' "#EC NOTEXT
i_length = '18',

i_id = 'I'
i_key = '145'
i_text = 'Positionen in Hausw�hrung/KonzBewtg' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '146'
i_text = 'Positionen in KonzW�hrg/KonzBewtg' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '155'
i_text = 'Hausw�hrung/KonzBewtg' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '156'
i_text = 'Konzernw�hrung/KonzBewtg' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '245'
i_text = 'Positionen in Hausw�hrung/PrctBewtg' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '246'
i_text = 'Positionen in KonzW�hrg/PrctBewtg' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '255'
i_text = 'Hausw�hrung/PrctBewtg' "#EC NOTEXT
i_length = '25',
i_id = 'I'
i_key = '256'
i_text = 'Konzernw�hrung/PrctBewtg' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '300'
i_text = '�bernahme Kontiervorlagen' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '301'
i_text = 'Es sind & Kontiervorlage(n) vorhanden.' "#EC NOTEXT
i_length = '60',

i_id = 'I'
i_key = '302'
i_text = 'M�chten Sie die Kontiervorlage(n) �bernehmen?' "#EC NOTEXT
i_length = '60',

i_id = 'I'
i_key = '500'
i_text = 'Erfassungsvarianten f�r Positionen' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '501'
i_text = 'Kontiervorlagen f�r Positionen' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '502'
i_text = 'Gemerkte Belege' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '503'
i_text = 'Variante 1' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '504'
i_text = 'Variante 2' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '505'
i_text = 'Variante 3' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '506'
i_text = 'Arbeitsvorlagen' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '507'
i_text = 'Beleg merken...' "#EC NOTEXT
i_length = '20',
i_id = 'I'
i_key = '508'
i_text = 'als Kontiervorlage sichern...' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '509'
i_text = 'Kontiervorlage l�schen' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = '510'
i_text = 'Sachkontenbeleg erfassen' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = '511'
i_text = 'Vorerfasste Belege' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '512'
i_text = 'Sachkontenbeleg vorerfassen' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '513'
i_text = 'Vollst�ndige Belege' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '514'
i_text = 'Es werden alle Kontiervorlagen entfernt !' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '515'
i_text = 'Soll die ausgew�hlte Aktion ausgef�hrt werden ?' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '517'
i_text = 'Es werden alle Erfassungsvarianten entfernt !' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '518'
i_text = 'Alle Erfassungsvarianten entfernen' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = '519'
i_text = 'Alle Kontiervorlagen entfernen' "#EC NOTEXT
i_length = '40',

i_id = 'I'
i_key = '520'
i_text = 'Vorerfasste Belege f�r Ledger-Gr.' "#EC NOTEXT
i_length = '44',

i_id = 'I'
i_key = '521'
i_text = 'Vollst�ndige Belege f�r Ledger-Gr.' "#EC NOTEXT
i_length = '44',

i_id = 'I'
i_key = '701'
i_text = 'Buchungskreis-Saldo' "#EC NOTEXT
i_length = '19',

i_id = 'I'
i_key = '900'
i_text = 'Hinzuf�gen' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '901'
i_text = 'Korrigieren' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '902'
i_text = 'Anzeigen' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '910'
i_text = 'Sachkontenposition' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '911'
i_text = 'Debitorenposition' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '912'
i_text = 'Kreditorenposition' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '913'
i_text = 'Anlagenposition' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '914'
i_text = 'Kopfdaten' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '915'
i_text = '�bersicht' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '916'
i_text = 'Sachkontenpositionen' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = '917'
i_text = 'Einstieg' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = '920'
i_text = 'Zusatzangaben' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = '930'
i_text = '& erfassen' "#EC NOTEXT
i_length = '10',

i_id = 'I'
i_key = '950'
i_text = 'Ausw�hlen Anforderungen' "#EC NOTEXT
i_length = '23',

i_id = 'I'
i_key = '951'
i_text = 'Ausw�hlen Anzahlungen' "#EC NOTEXT
i_length = '21',

i_id = 'I'
i_key = '952'
i_text = 'Ausw�hlen Buchungen' "#EC NOTEXT
i_length = '19',

i_id = 'I'
i_key = '953'
i_text = 'Selektieren Offene Posten' "#EC NOTEXT
i_length = '25',

i_id = 'I'
i_key = '954'
i_text = 'Eingeben Selektionsbedingungen' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = '955'
i_text = 'Ausw�hlen Wechselpositionen' "#EC NOTEXT
i_length = '27',

i_id = 'I'
i_key = '956'
i_text = 'Belegkopf f�r neuen Buchungskreis' "#EC NOTEXT
i_length = '33',

i_id = 'I'
i_key = '957'
i_text = 'Positionen erfassen' "#EC NOTEXT
i_length = '19',

i_id = 'I'
i_key = '958'
i_text = 'Zusatzkomponenten...;;' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'AUF'
i_text = 'Auftrag' "#EC NOTEXT
i_length = '7',

i_id = 'I'
i_key = 'BE1'
i_text = 'Wechselanforderungen' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = 'BKT'
i_text = 'Belegkopftext' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = 'DIF'
i_text = 'Differenzzeile' "#EC NOTEXT
i_length = '14',

i_id = 'I'
i_key = 'DIV'
i_text = 'Anzeigevariante / Darstellungsform' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'E01'
i_text = 'Struktur an' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'E02'
i_text = 'Struktur aus' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'E03'
i_text = 'Neuen Buchungskreis eingeben' "#EC NOTEXT
i_length = '35',

i_id = 'I'
i_key = 'E04'
i_text = 'Bereits erfa�te Daten gehen verloren' "#EC NOTEXT
i_length = '45',

i_id = 'I'
i_key = 'E05'
i_text = 'Wollen Sie fortfahren ?' "#EC NOTEXT
i_length = '28',

i_id = 'I'
i_key = 'E06'
i_text = 'Debitorenrechnung' "#EC NOTEXT
i_length = '20',
i_id = 'I'
i_key = 'E07'
i_text = 'Debitorengutschrift' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'E08'
i_text = 'erfassen' "#EC NOTEXT
i_length = '10',

i_id = 'I'
i_key = 'E09'
i_text = 'bearbeiten' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = 'E10'
i_text = 'Kreditorenrechnung' "#EC NOTEXT
i_length = '21',

i_id = 'I'
i_key = 'E11'
i_text = 'Kreditorengutschrift' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'E12'
i_text = 'Saldo ungleich Null' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'E13'
i_text = 'Saldo gleich Null' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'E14'
i_text = 'Saldo noch nicht ermittelt' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = 'E20'
i_text = 'Es sind keine Fehler vorhanden' "#EC NOTEXT
i_length = '37',

i_id = 'I'
i_key = 'E21'
i_text = 'Fehlerprotokoll' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = 'E22'
i_text = 'Kein Lieferant gefunden !' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = 'E23'
i_text = '�nderung der Einstellungen' "#EC NOTEXT
i_length = '30',
i_id = 'I'
i_key = 'E24'
i_text = 'vorerfassen' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'F01'
i_text = 'Kreditorenrechnung erfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'F02'
i_text = 'Kreditorengutschrift erfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'F03'
i_text = 'Debitorenrechnung erfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'F04'
i_text = 'Debitorengutschrift erfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'F05'
i_text = 'Sachkontenbeleg erfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'F06'
i_text = 'Sachkontenbeleg f�r Ledger-Gruppe erfassen: Buchungskreis &4'
"#EC NOTEXT
i_length = '60',

i_id = 'I'
i_key = 'F07'
i_text = ' Sachkontenbeleg f�r Ledger-Gruppe vorerfassen: Buchungskreis
&4' "#EC NOTEXT
i_length = '65',

i_id = 'I'
i_key = 'F08'
i_text = ' f�r Ledger-Gruppe' "#EC NOTEXT
i_length = '24',

i_id = 'I'
i_key = 'F11'
i_text = 'Kreditorenrechnung vorerfassen: Buchungskreis &4' "#EC
NOTEXT
i_length = '100',

i_id = 'I'
i_key = 'F12'
i_text = 'Kreditorengutschrift vorerfassen: Buchungskreis &4' "#EC
NOTEXT
i_length = '100',
i_id = 'I'
i_key = 'F13'
i_text = 'Debitorenrechnung vorerfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '100',

i_id = 'I'
i_key = 'F14'
i_text = 'Debitorengutschrift vorerfassen: Buchungskreis &4' "#EC
NOTEXT
i_length = '100',

i_id = 'I'
i_key = 'F15'
i_text = 'Sachkontenbeleg vorerfassen: Buchungskreis &4' "#EC NOTEXT
i_length = '100',

i_id = 'I'
i_key = 'F21'
i_text = 'Vorerfasste Kreditorenrechnung &1 &2 &3 bearbeiten' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F22'
i_text = 'Vorerfasste Kreditorengutschrift &1 &2 &3 bearbeiten' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F23'
i_text = 'Vorerfasste Debitorenrechnung &1 &2 &3 bearbeiten' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F24'
i_text = 'Vorerfasste Debitorengutschrift &1 &2 &3 bearbeiten' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F25'
i_text = 'Vorerfassten Sachkontenbeleg &1 &2 &3 bearbeiten' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F31'
i_text = 'Vorerfasste Kreditorenrechnung &1 &2 &3 anzeigen' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F32'
i_text = 'Vorerfasste Kreditorengutschrift &1 &2 &3 anzeigen' "#EC
NOTEXT
i_length = '55',
i_id = 'I'
i_key = 'F33'
i_text = 'Vorerfasste Debitorenrechnung &1 &2 &3 anzeigen' "#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F34'
i_text = 'Vorerfasste Debitorengutschrift &1 &2 &3 anzeigen' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F35'
i_text = 'Vorerfassten Sachkontenbeleg &1 &2 &3 anzeigen' "#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F36'
i_text = 'Vorerfassten Sachkontenbeleg &1 &2 &3 freigeben' "#EC NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F37'
i_text = 'Vorerfasste Debitorenrechnung &1 &2 &3 freigeben' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'F38'
i_text = 'Vorerfasste Kreditorenrechnung &1 &2 &3 freigeben' "#EC
NOTEXT
i_length = '55',

i_id = 'I'
i_key = 'GPS'
i_text = 'Gegenpositionen &' "#EC NOTEXT
i_length = '50',

i_id = 'I'
i_key = 'GSB'
i_text = 'Gesch�ftsbereich' "#EC NOTEXT
i_length = '16',

i_id = 'I'
i_key = 'INV'
i_text = ' Rechnen mit invertiertem Kurs erlaubt' "#EC NOTEXT
i_length = '38',

i_id = 'I'
i_key = 'KST'
i_text = 'Kostenstelle' "#EC NOTEXT
i_length = '12',

i_id = 'I'
i_key = 'MAT'
i_text = 'Material' "#EC NOTEXT
i_length = '8',

i_id = 'I'
i_key = 'MEN'
i_text = 'Menge' "#EC NOTEXT
i_length = '5',

i_id = 'I'
i_key = 'NPL'
i_text = 'Netzplan' "#EC NOTEXT
i_length = '8',

i_id = 'I'
i_key = 'ORT'
i_text = 'Ort' "#EC NOTEXT
i_length = '3',

i_id = 'I'
i_key = 'PER'
i_text = 'Personalnummer' "#EC NOTEXT
i_length = '14',

i_id = 'I'
i_key = 'PFA'
i_text = 'Postfach:' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'PRC'
i_text = 'Profit-Center' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = 'PRO'
i_text = 'Projekt' "#EC NOTEXT
i_length = '7',

i_id = 'I'
i_key = 'SIP'
i_text = 'Simulation vorerfasster Beleg:' "#EC NOTEXT
i_length = '65',

i_id = 'I'
i_key = 'SL1'
i_text = 'Beleg/Referenz/ZahlgsReferenz' "#EC NOTEXT
i_length = '30',

i_id = 'I'
i_key = 'SL2'
i_text = 'Beleg/Referenz' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = 'STR'
i_text = 'Strasse und Hausnummer' "#EC NOTEXT
i_length = '22',

i_id = 'I'
i_key = 'T01'
i_text = 'Ausw�hlen gemerkter Beleg' "#EC NOTEXT
i_length = '30',
i_id = 'I'
i_key = 'T02'
i_text = 'M�chten Sie die Bearbeitung fortsetzen' "#EC NOTEXT
i_length = '70',

i_id = 'I'
i_key = 'T03'
i_text = 'angelegt am' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = 'T04'
i_text = 'angelegt von' "#EC NOTEXT
i_length = '20',

i_id = 'I'
i_key = 'TXT'
i_text = 'Positionstext' "#EC NOTEXT
i_length = '13',

i_id = 'I'
i_key = 'VAL'
i_text = 'Valutadatum' "#EC NOTEXT
i_length = '11',

i_id = 'I'
i_key = 'W00'
i_text = 'Betrag' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W11'
i_text = 'Hausw�hr/KzBew' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W12'
i_text = 'Hausw�hr/PrcBew' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W30'
i_text = 'Betrag Konzw�hr' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W31'
i_text = 'Konzw�hr/KzBew' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W32'
i_text = 'Konzw�hr/PrcBew' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W40'
i_text = 'Betrag Hartw�hr' "#EC NOTEXT
i_length = '15',
i_id = 'I'
i_key = 'W50'
i_text = 'Betrag Indexw�h' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'W60'
i_text = 'Betrag GesW�hrg' "#EC NOTEXT
i_length = '15',

i_id = 'I'
i_key = 'XBL'
i_text = 'Referenznummer' "#EC NOTEXT
i_length = '14',

i_id = 'I'
i_key = 'ZBD'
i_text = 'Zahlungsbedingung' "#EC NOTEXT
i_length = '17',

i_id = 'I'
i_key = 'ZUO'
i_text = 'Zuordnung' "#EC NOTEXT
i_length = '18'.

ENDFORM.

FORM genview.

ENDFORM.

FORM update.

gv_master_languages = 'D'. "#EC NOTEXT


gv_objects_with_snote_check = ''. "#EC NOTEXT

PERFORM update_01. " REPT SAPMF05A ( DE , source: EBS )

ENDFORM.

START-OF-SELECTION.
PERFORM main.