*&---------------------------------------------------------------------* *& Report Name : /EUTIN/VALIDATE_TEXTS *& Title : Validate short texts *& Developer : EUTINM - 20190628 *& Development Class : /EUTIN/TOOLS *& Description : *& Validate existence of maintained entries for requested languages of *& objects assigned to a specific package. *& *& 1. Cross-client Development Objects = Repository Objects *& Object Type Text Table(s) *& Class CLAS SEOCLASSTX, SEOCOMPOTX, SEOSUBCOTX, TEXTPOOL, D020T, D021T, (TRDIRT) *& Package DEVC TDEVCT *& Domain DOMA DD01T, DD07T *& Data Element DTEL DD04T *& Lock Object ENQU DD25T *& Function Group FUGR TLIBT, TFTIT, FUNCT, TFDIRT, TEXTPOOL, D020T, D021T, RSMPTEXTS, (D347T) *& Interface INTF SEOCLASSTX, SEOCOMPOTX, SEOSUBCOTX, TEXTPOOL, D020T, D021T, (TRDIRT) *& Message Class MSAG T100, T100T, (T100A) *& Program/Module-/Subroutine Pool PROG TRDIRT, TEXTPOOL, D020T, D021T, RSMPTEXTS, (VARIT, D347T) *& Search Help SHLP DD30T *& ICF Service SICF ICFSERVICE, ICFDOCU, (ICFALIAS) *& Smart Forms Formulars SSFO STXFTXTV *& Table/Structures TABL DD02T, DD03T, DD12T *& Transaction Code TRAN TSTCT *& Table Type TTYP DD40T *& Viewcluster VCLS VCLDIRT, VCLSTRUCT *& View VIEW DD25T *& BSP Application WAPA O2APPLT, O2PAGDIRT, O2PAGPART *& Document ID **** DOKHL,DOKIL *& *& ----------------------------------------------------------------- *& - not yet implemented, but planned ------------------------------ *& ----------------------------------------------------------------- *& Object Type Text Table(s) *& Transport Object TOBJ OBJT *& Web Dynpro Application WDYA WDY_APPLICATIONT *& Web Dynpro Component WDYN SOTR_TEXT, WDY_COMPONENTT, WDY_CONTROLLERT, *& WDY_CTLR_COMPOT, WDY_CTLR_PARAMT, WDY_IOBOUND_PLGT, *& WDY_PLUG_PARAMT, WDY_VIEW_CNTRT, WDY_VIEWT *& Web Services WEBI SOTR_TEXT *& *& ----------------------------------------------------------------- *& - not supported ------------------------------------------------- *& ----------------------------------------------------------------- *& Object Type Text Table(s) *& Info MIME Repository Object SMIM SMIMCONT1, SMIMLOIO, SMIMLOIOT, SMIMPHF, *& SMIMPHHR, SMIMPHIO, SMIMPHPR, SMIMPHRE, *& SMIMPHRI *& *& 2. Client-dependent Customizing Objects *& Object Type Text Table(s) *& Application Log SDAT APPL_LOG: BALOBJT, BALSUBT *& Authorization Group TABU TBRGT *& Roles ACGR AGR_TEXTS, AGR_HIERT, AGR_MINIT, AGR_TCDTXT *& *& ----------------------------------------------------------------- *& - not yet implemented, but planned ------------------------------ *& ----------------------------------------------------------------- *& Object Type Text Table(s) *& *& ----------------------------------------------------------------- *& - not supported ------------------------------------------------- *& ----------------------------------------------------------------- *& Object Type Text Table(s) *& *&---------------------------------------------------------------------* *& CHANGE HISTORY *&---------------------------------------------------------------------* *& Date Description *&---------------------------------------------------------------------* *& *& *& *&---------------------------------------------------------------------* REPORT /eutin/validate_texts. *---------------------------------------------------------------------- *--- global data declarations *---------------------------------------------------------------------- TYPE-POOLS: abap. TYPES: BEGIN OF ts_objects, object TYPE tadir-object, obj_name TYPE tadir-obj_name, END OF ts_objects, BEGIN OF ts_tabname, devclass TYPE tadir-devclass, ctext TYPE tdevct-ctext, tabname TYPE dd02l-tabname, tabtext TYPE dd02t-ddtext, fieldname TYPE dd03l-fieldname, fietext TYPE dd03t-ddtext, rollname TYPE dd03l-rollname, roltext TYPE dd04t-ddtext, domname TYPE dd03l-domname, domtext TYPE dd01t-ddtext, datatype TYPE dd03l-datatype, leng TYPE dd03l-leng, END OF ts_tabname, BEGIN OF ts_output, object TYPE tadir-object, obj_name TYPE tadir-obj_name, subrc TYPE sy-subrc, langu TYPE sy-langu, shorttext TYPE bapidescr, END OF ts_output, BEGIN OF ts_quantity, object TYPE tadir-object, obj_name TYPE tadir-obj_name, sub_name TYPE tadir-obj_name, su2_name TYPE tadir-obj_name, tfill TYPE sy-tfill, err_ind TYPE abap_bool, err_text TYPE string, tabix TYPE c LENGTH 5, langu_en TYPE sy-langu, stext_en TYPE string, langu_de TYPE sy-langu, stext_de TYPE string, END OF ts_quantity, tt_objects TYPE STANDARD TABLE OF ts_objects WITH DEFAULT KEY, tt_tabname TYPE STANDARD TABLE OF ts_tabname WITH DEFAULT KEY, tt_quantity TYPE STANDARD TABLE OF ts_quantity WITH DEFAULT KEY, tt_output TYPE STANDARD TABLE OF ts_output WITH DEFAULT KEY. CONSTANTS: con_title TYPE syst-title VALUE 'Validate short texts', con_devclass TYPE tdevc-devclass VALUE '#', con_tabname TYPE dd02l-tabname VALUE '#', con_fieldname TYPE dd03l-fieldname VALUE '#', con_fietext TYPE dd03t-ddtext VALUE '#', con_rollname TYPE dd03l-rollname VALUE '#', con_roltext TYPE dd04t-ddtext VALUE '#', con_domname TYPE dd03l-domname VALUE '#', con_domtext TYPE dd01t-ddtext VALUE '#', con_datatype TYPE dd03l-datatype VALUE '#', con_leng TYPE dd03l-leng VALUE '0', con_cmptype TYPE seocompo-cmptype VALUE '0', con_brobj TYPE tbrg-brobj VALUE '#', con_brgru TYPE tbrg-brgru VALUE '#', con_length TYPE i VALUE 2. "min. length of characters in texts DATA: gt_quantity TYPE tt_quantity. *---------------------------------------------------------------------- *--- macro definitions *---------------------------------------------------------------------- DEFINE add_to_range. CLEAR ls_&1. ls_&1-sign = &2. ls_&1-option = &3. ls_&1-low = &4. ls_&1-high = &5. INSERT ls_&1 INTO TABLE lt_&1. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error: INSERT' 'lt_&1' ls_&1 sy-subrc. ENDIF. END-OF-DEFINITION. CLASS lcl_handle_events DEFINITION DEFERRED. *---------------------------------------------------------------------* * CLASS lcl_handle_events DEFINITION *---------------------------------------------------------------------* * Define a local class for handling events of cl_salv_table *---------------------------------------------------------------------* CLASS lcl_handle_events DEFINITION FINAL. PUBLIC SECTION. METHODS: on_double_click FOR EVENT double_click OF cl_salv_events_table IMPORTING row column. ENDCLASS. "lcl_handle_events DEFINITION *---------------------------------------------------------------------* * CLASS lcl_handle_events IMPLEMENTATION *---------------------------------------------------------------------* * Implement the events for handling the events of cl_salv_table *---------------------------------------------------------------------* CLASS lcl_handle_events IMPLEMENTATION. METHOD on_double_click. PERFORM event_on_double_click USING row column. ENDMETHOD. "on_double_click ENDCLASS. "lcl_handle_events IMPLEMENTATION *---------------------------------------------------------------------- *--- selection screen 1000 *---------------------------------------------------------------------- SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE sel. PARAMETERS: p_sel01 RADIOBUTTON GROUP sel USER-COMMAND $$$dummy_sel$$$. SELECTION-SCREEN BEGIN OF BLOCK s01 WITH FRAME TITLE s01. SELECTION-SCREEN END OF BLOCK s01. PARAMETERS: p_sel02 RADIOBUTTON GROUP sel DEFAULT 'X'. SELECTION-SCREEN BEGIN OF BLOCK s02 WITH FRAME TITLE s02. SELECTION-SCREEN END OF BLOCK s02. SELECTION-SCREEN BEGIN OF BLOCK s10 WITH FRAME TITLE s10. SELECT-OPTIONS: s_devcl FOR con_devclass, s_table FOR con_tabname MODIF ID s01, s_field FOR con_fieldname MODIF ID s01, s_ftext FOR con_fietext MODIF ID s01, s_rolln FOR con_rollname MODIF ID s01, s_froll FOR con_roltext MODIF ID s01, s_domai FOR con_domname MODIF ID s01, s_fdoma FOR con_domtext MODIF ID s01, s_datat FOR con_datatype MODIF ID s01, s_lengt FOR con_leng MODIF ID s01. SELECTION-SCREEN END OF BLOCK s10. SELECTION-SCREEN BEGIN OF BLOCK s11 WITH FRAME TITLE s11. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN PUSHBUTTON (20) gc_but1 USER-COMMAND sel_all MODIF ID s02. SELECTION-SCREEN PUSHBUTTON (20) gc_but2 USER-COMMAND unsel_all MODIF ID s02. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN BEGIN OF BLOCK sab WITH FRAME TITLE sab. PARAMETERS: p_devc AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_doma AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_dtel AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_tabl AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_ttyp AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_shlp AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_vcls AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_view AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_msag AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_msag$$$, p_poin AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_prog AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_prog$$$, p_clas AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_clas$$$, p_intf AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_intf$$$. SELECTION-SCREEN BEGIN OF BLOCK scl WITH FRAME TITLE scl. SELECT-OPTIONS: s_cmptyp FOR con_cmptype MODIF ID scl. SELECTION-SCREEN END OF BLOCK scl. PARAMETERS: p_fugr AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_sicf AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_ssfo AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_wapa AS CHECKBOX DEFAULT ' ' MODIF ID s02. * p_wdyn AS CHECKBOX DEFAULT ' ' MODIF ID s02, * p_webi AS CHECKBOX DEFAULT ' ' MODIF ID s02, SELECTION-SCREEN END OF BLOCK sab. SELECTION-SCREEN BEGIN OF BLOCK scu WITH FRAME TITLE scu. PARAMETERS: p_tran AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_doks AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_alog AS CHECKBOX DEFAULT ' ' MODIF ID s02, p_augr AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_augr$$$. SELECTION-SCREEN BEGIN OF BLOCK sag WITH FRAME TITLE sag. SELECT-OPTIONS: s_brobj FOR con_brobj MODIF ID sag, s_brgru FOR con_brgru MODIF ID sag. SELECTION-SCREEN END OF BLOCK sag. PARAMETERS: p_acgr AS CHECKBOX DEFAULT ' ' MODIF ID s02 USER-COMMAND $$$dummy_intf$$$. SELECTION-SCREEN BEGIN OF BLOCK sac WITH FRAME TITLE sac. PARAMETERS: p_tctx AS CHECKBOX DEFAULT ' ' MODIF ID sac. SELECTION-SCREEN END OF BLOCK sac. SELECTION-SCREEN END OF BLOCK scu. SELECTION-SCREEN END OF BLOCK s11. SELECTION-SCREEN BEGIN OF BLOCK s12 WITH FRAME TITLE s12. PARAMETERS: p_err RADIOBUTTON GROUP s12 MODIF ID s02 USER-COMMAND $$$dummy_output$$$, p_list RADIOBUTTON GROUP s12 MODIF ID s02 DEFAULT 'X', p_len TYPE i DEFAULT con_length. SELECTION-SCREEN END OF BLOCK s12. SELECTION-SCREEN END OF BLOCK sel. *---------------------------------------------------------------------- *--- Event INITIALIZATION *---------------------------------------------------------------------- INITIALIZATION. PERFORM init. *---------------------------------------------------------------------- *--- Event PROCESS BEFORE OUTPUT on screen 1000 *---------------------------------------------------------------------- AT SELECTION-SCREEN OUTPUT. PERFORM pbo_1000. *---------------------------------------------------------------------- *--- Event PROCESS AFTER INPUT on screen 1000 *---------------------------------------------------------------------- AT SELECTION-SCREEN. PERFORM pai_1000. *---------------------------------------------------------------------- *--- Event START-OF-SELECTION *---------------------------------------------------------------------- START-OF-SELECTION. PERFORM main. *&---------------------------------------------------------------------* *& Form INIT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM init. DATA: ls_devcl LIKE LINE OF s_devcl, ls_cmptyp LIKE LINE OF s_cmptyp, ls_brobj LIKE LINE OF s_brobj, ls_brgru LIKE LINE OF s_brgru. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *--- define texts for selection screen 1000 sy-title = con_title. sel = 'Selections'. s01 = 'Validate existing texts and translations'. s02 = 'Search for text tables'. s10 = 'Select Options'. s11 = 'Object Types'. s12 = 'Output Options'. sab = 'ABAP Repository'. scu = 'Customizing Entries'. scl = 'Special selection on classes/class interfaces'. sag = 'Special selection on authorization groups'. sac = 'Special selection on roles'. gc_but1 = 'Select all'. gc_but2 = 'Unselect all'. %_p_sel01_%_app_%-text = 'Search'. %_s_devcl_%_app_%-text = 'Package'. %_s_table_%_app_%-text = 'Table Name'. %_s_field_%_app_%-text = 'Field Name'. %_s_ftext_%_app_%-text = 'Field Name Text'. %_s_rolln_%_app_%-text = 'Data Element'. %_s_froll_%_app_%-text = 'Data Element Text'. %_s_domai_%_app_%-text = 'Domain'. %_s_fdoma_%_app_%-text = 'Domian Text'. %_s_datat_%_app_%-text = 'Data Type'. %_s_lengt_%_app_%-text = 'Length'. %_p_sel02_%_app_%-text = 'Validate'. %_p_devc_%_app_%-text = 'Package'. %_p_doma_%_app_%-text = 'Domain'. %_p_dtel_%_app_%-text = 'Data Element'. %_p_tabl_%_app_%-text = 'Table/Structure'. %_p_ttyp_%_app_%-text = 'Table Type'. %_p_shlp_%_app_%-text = 'Search Help'. %_p_vcls_%_app_%-text = 'View Cluster'. %_p_view_%_app_%-text = 'View/Lock Object'. %_p_msag_%_app_%-text = 'Message Class'. %_p_poin_%_app_%-text = 'Message Text ends with "."'. %_p_prog_%_app_%-text = 'Program/Mod./Sub.Pool.'. %_p_clas_%_app_%-text = 'Class'. %_p_intf_%_app_%-text = 'Interface'. %_s_cmptyp_%_app_%-text = 'Component Type'. %_p_fugr_%_app_%-text = 'Function Group'. %_p_tran_%_app_%-text = 'Transaction'. %_p_sicf_%_app_%-text = 'ICF Services'. %_p_ssfo_%_app_%-text = 'Smart Forms Formulars'. %_p_wapa_%_app_%-text = 'Business Server Pages (BSP)'. * %_p_wdyn_%_app_%-text = 'WebDynpro'. * %_p_webi_%_app_%-text = 'WebService'. %_p_doks_%_app_%-text = 'Document IDs'. %_p_alog_%_app_%-text = 'Application Log'. %_p_augr_%_app_%-text = 'Authorization Group'. %_s_brobj_%_app_%-text = 'Authorization Object'. %_s_brgru_%_app_%-text = 'Authorization Group'. %_p_acgr_%_app_%-text = 'Roles'. %_p_tctx_%_app_%-text = 'Role Long Description'. %_p_err_%_app_%-text = 'List of missing texts'. %_p_len_%_app_%-text = 'Min. length of texts'. %_p_list_%_app_%-text = 'List of existing texts'. *--- default relevant packages CLEAR: s_devcl[], s_devcl, ls_devcl. ls_devcl-sign = 'I'. ls_devcl-option = 'CP'. ls_devcl-low = '/EUTIN/*'. INSERT ls_devcl INTO TABLE s_devcl. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FORM INIT' 'INSERT S_DEVCL' sy-subrc. ENDIF. *--- default component type of class / class interface CLEAR: s_cmptyp[], s_cmptyp, ls_cmptyp. ls_cmptyp-sign = 'E'. ls_cmptyp-option = 'BT'. ls_cmptyp-low = '0'. ls_cmptyp-high = '3'. INSERT ls_cmptyp INTO TABLE s_cmptyp. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FORM INIT' 'INSERT S_CMPTYP' sy-subrc. ENDIF. *--- default relevant authorization object and group CLEAR: s_brobj[], s_brobj, ls_brobj. ls_brobj-sign = 'I'. ls_brobj-option = 'EQ'. ls_brobj-low = 'S_TABU_DIS'. INSERT ls_brobj INTO TABLE s_brobj. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FORM INIT' 'INSERT S_BROBJ' sy-subrc. ENDIF. CLEAR: s_brgru[], s_brgru, ls_brgru. ls_brgru-sign = 'I'. ls_brgru-option = 'CP'. ls_brgru-low = '/E*'. INSERT ls_brgru INTO TABLE s_brgru. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FORM INIT' 'INSERT S_BRGRU' sy-subrc. ENDIF. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " INIT *&---------------------------------------------------------------------* *& Form PBO_1000 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM pbo_1000. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT SCREEN. CASE screen-group1. WHEN 'S01'. IF p_sel01 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. WHEN 'S02'. IF p_sel02 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ELSE. IF screen-name CP '*P_POIN*' AND p_msag NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. ENDIF. WHEN 'S12'. IF p_sel02 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ELSEIF p_err NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. WHEN 'SCL'. IF p_sel02 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ELSE. IF p_clas NE abap_true AND p_intf NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. ENDIF. WHEN 'SAG'. IF p_sel02 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ELSE. IF p_augr NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. ENDIF. WHEN 'SAC'. IF p_sel02 NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ELSE. IF p_acgr NE abap_true. screen-input = 0. screen-active = 0. MODIFY SCREEN. ENDIF. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " PBO_1000 *&---------------------------------------------------------------------* *& Form PAI_1000 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM pai_1000. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CASE sy-ucomm. WHEN 'SEL_ALL'. p_devc = abap_true. p_doma = abap_true. p_dtel = abap_true. p_tabl = abap_true. p_ttyp = abap_true. p_shlp = abap_true. p_vcls = abap_true. p_view = abap_true. p_msag = abap_true. p_prog = abap_true. p_clas = abap_true. p_intf = abap_true. p_fugr = abap_true. p_sicf = abap_false. p_ssfo = abap_true. p_wapa = abap_true. * p_wdyn = abap_true. * p_webi = abap_true. p_tran = abap_true. p_doks = abap_true. p_alog = abap_true. p_augr = abap_true. p_acgr = abap_true. WHEN 'UNSEL_ALL'. p_devc = abap_false. p_doma = abap_false. p_dtel = abap_false. p_tabl = abap_false. p_ttyp = abap_false. p_shlp = abap_false. p_vcls = abap_false. p_view = abap_false. p_msag = abap_false. p_prog = abap_false. p_clas = abap_false. p_intf = abap_false. p_fugr = abap_false. p_sicf = abap_false. p_ssfo = abap_false. p_wapa = abap_false. * p_wdyn = abap_false. * p_webi = abap_false. p_tran = abap_false. p_doks = abap_false. p_alog = abap_false. p_augr = abap_false. p_acgr = abap_false. WHEN OTHERS. RETURN. ENDCASE. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " PAI_1000 *&---------------------------------------------------------------------* *& Form MAIN *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* FORM main. DATA: lt_objects TYPE tt_objects, lt_tabname TYPE tt_tabname, lt_quantity TYPE tt_quantity, lt_output TYPE tt_output. FIELD-SYMBOLS: LIKE LINE OF lt_quantity. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sy-title = con_title. CLEAR: gt_quantity[], lt_quantity[], lt_output[]. CASE abap_true. WHEN p_sel01. PERFORM get_relevant_tables CHANGING lt_tabname[]. *--- output options PERFORM alv_output USING lt_tabname[]. WHEN p_sel02. PERFORM get_objects CHANGING lt_objects[]. IF p_devc EQ abap_true. *--- check package: tables TDEVCT PERFORM check_texts_devc USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_doma EQ abap_true. *--- check domain: tables DD01T, DD07T PERFORM check_texts_doma USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_dtel EQ abap_true. *--- check data element: tables DD04T PERFORM check_texts_dtel USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_tabl EQ abap_true. *--- check table/structure: tables DD02T, DD03T, DD12T PERFORM check_texts_tabl USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_ttyp EQ abap_true. *--- check table type: table DD40T PERFORM check_texts_ttyp USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_shlp EQ abap_true. *--- check search help: tables DD30T PERFORM check_texts_shlp USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_vcls EQ abap_true. *--- check viewcluster: table VCLDIRT, VCLSTRUCT PERFORM check_texts_vcls USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_view EQ abap_true. *--- check view/lock object: tables DD25T PERFORM check_texts_view USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_msag EQ abap_true. *--- check message class: tables T100, T100T, (T100A) PERFORM check_texts_msag USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_prog EQ abap_true. *--- check program/module pool/subroutine pool: tables TRDIRT, TEXTPOOL, D020T, D021T, RSMPTEXTS, (VARIT, D347T) PERFORM check_texts_prog USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_clas EQ abap_true. *--- check class: tables SEOCLASSTX, SEOCOMPOTX, SEOSUBCOTX, TEXTPOOL, D020T, D021T, (TRDIRT) PERFORM check_texts_clas_intf USING lt_objects[] 'CLAS' CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_intf EQ abap_true. *--- check class interface: tables SEOCLASSTX, SEOCOMPOTX, SEOSUBCOTX, TEXTPOOL, D020T, D021T, (TRDIRT) PERFORM check_texts_clas_intf USING lt_objects[] 'INTF' CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_fugr EQ abap_true. *--- check function group: tables TLIBT, TFTIT, FUNCT, TFDIRT, TEXTPOOL, D020T, D021T, RSMPTEXTS, (D347T) PERFORM check_texts_fugr USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_tran EQ abap_true. *--- check transaction code: tables TSTCT PERFORM check_texts_tran USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_sicf EQ abap_true. *--- check ICF Services: tables ICFSERVICE, ICFDOCU, (ICFALIAS) PERFORM check_texts_sicf USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_ssfo EQ abap_true. *--- check Smart Forms Formulars: tables STXFTXTV PERFORM check_texts_ssfo USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_wapa EQ abap_true. *--- check BSP application: tables O2APPLT, O2PAGDIRT, O2PAGPART PERFORM check_texts_wapa USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. * IF p_wdyn EQ abap_true. **--- TODO!!! **--- check WebDynpros: tables (planned) * PERFORM check_texts_dtel USING lt_objects[] * CHANGING lt_quantity[] lt_output[]. * ENDIF. * IF p_webi EQ abap_true. **--- TODO!!! **--- check WebServices: tables (planned) * PERFORM check_texts_dtel USING lt_objects[] * CHANGING lt_quantity[] lt_output[]. * ENDIF. IF p_doks EQ abap_true. *--- check Document IDs: tables DOKHL, DOKIL PERFORM check_texts_doks USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_alog EQ abap_true. *--- check Application Logs: tables BALOBJT, BALSUBT PERFORM check_texts_sdat USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_augr EQ abap_true. *--- check Authorization Groups: tables TBRGT PERFORM check_texts_agrp USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. IF p_acgr EQ abap_true. *--- check Roles: tables AGR_TEXTS, AGR_HIERT, AGR_MINIT, AGR_TCDTXT PERFORM check_texts_acgr USING lt_objects[] CHANGING lt_quantity[] lt_output[]. ENDIF. SORT lt_quantity ASCENDING. LOOP AT lt_quantity ASSIGNING WHERE ( tabix EQ 1 OR tabix EQ 2 ) AND ( langu_en EQ space OR langu_de EQ space ). -err_ind = abap_true. IF -langu_en IS INITIAL AND -langu_de IS INITIAL. -err_text = 'EN and DE is missing'. ELSEIF -langu_en IS INITIAL. -err_text = 'EN is missing'. ELSE. "ls_quantity-langu_de IS INITIAL. -err_text = 'DE is missing'. ENDIF. ENDLOOP. UNASSIGN . IF p_err EQ abap_true. DELETE lt_quantity WHERE err_ind NE abap_true. *--- Special handling for transaction code: *--- In case no language entry exist the short description is taken directly from transaction code! *--- Ignore message "EN and DE is missing"! DELETE lt_quantity WHERE sub_name EQ 'AGR_TCDTXT' AND langu_en IS INITIAL AND langu_de IS INITIAL. ENDIF. *--- output options CASE abap_true. WHEN p_list. IF lt_quantity[] IS NOT INITIAL. gt_quantity[] = lt_quantity[]. CLEAR lt_quantity[]. PERFORM alv_quantity USING gt_quantity[] '[All Texts]'. ELSE. MESSAGE 'Nothing found. Check your selection.' TYPE 'S' DISPLAY LIKE 'E'. ENDIF. WHEN p_err. DELETE lt_quantity WHERE err_ind NE abap_true. IF lt_quantity[] IS NOT INITIAL. gt_quantity[] = lt_quantity[]. CLEAR lt_quantity[]. PERFORM alv_quantity USING gt_quantity[] '[Missing]'. ELSE. MESSAGE 'Nothing found. All texts seems to exist in EN and DE.' TYPE 'S'. ENDIF. WHEN OTHERS. MESSAGE 'Unknown output option' TYPE 'E'. ENDCASE. WHEN OTHERS. RETURN. ENDCASE. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " MAIN *&---------------------------------------------------------------------* *& Form GET_RELEVANT_TABLES *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * <--ET_TABNAME[] text *----------------------------------------------------------------------* FORM get_relevant_tables CHANGING et_tabname TYPE tt_tabname. DATA: lt_range_tabname TYPE RANGE OF dd02l-tabname, ls_range_tabname LIKE LINE OF lt_range_tabname. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: et_tabname[], lt_range_tabname[], ls_range_tabname. *--- define relevant name ranges for table names add_to_range range_tabname 'I' 'CP' 'AGR_*' ' '. add_to_range range_tabname 'I' 'CP' 'BAL*' ' '. add_to_range range_tabname 'I' 'CP' 'DD*' ' '. add_to_range range_tabname 'I' 'CP' 'O2*' ' '. add_to_range range_tabname 'I' 'CP' 'T*' ' '. add_to_range range_tabname 'I' 'CP' 'SEO*' ' '. add_to_range range_tabname 'I' 'CP' 'O2*' ' '. add_to_range range_tabname 'I' 'CP' 'V*' ' '. SELECT a~devclass b~ctext c~tabname d~ddtext c~fieldname e~ddtext c~rollname f~ddtext c~domname g~ddtext c~datatype c~leng INTO TABLE et_tabname FROM tadir AS a LEFT OUTER JOIN tdevct AS b ON b~devclass EQ a~devclass AND b~spras EQ sy-langu INNER JOIN dd02l AS t ON t~tabname EQ a~obj_name INNER JOIN dd03l AS c ON c~tabname EQ t~tabname AND c~as4local EQ t~as4local AND c~as4vers EQ t~as4vers LEFT OUTER JOIN dd02t AS d ON d~tabname EQ t~tabname AND d~ddlanguage EQ sy-langu AND d~as4local EQ t~as4local AND d~as4vers EQ t~as4vers LEFT OUTER JOIN dd03t AS e ON e~tabname EQ c~tabname AND e~ddlanguage EQ sy-langu AND e~as4local EQ c~as4local AND e~fieldname EQ c~fieldname LEFT OUTER JOIN dd04t AS f ON f~rollname EQ c~rollname AND f~ddlanguage EQ sy-langu AND f~as4local EQ c~as4local AND f~as4vers EQ c~as4vers LEFT OUTER JOIN dd01t AS g ON g~domname EQ c~domname AND g~ddlanguage EQ sy-langu AND g~as4local EQ c~as4local AND g~as4vers EQ c~as4vers WHERE a~devclass IN s_devcl AND a~pgmid EQ 'R3TR' AND a~object EQ 'TABL' AND a~obj_name IN s_table AND t~as4local EQ 'A' AND t~as4vers EQ '0000' AND c~fieldname IN s_field AND c~rollname IN s_rolln AND c~domname IN s_domai AND c~datatype IN s_datat AND c~leng IN s_lengt. IF et_tabname[] IS INITIAL. MESSAGE 'Nothing found' TYPE 'S'. RETURN. ENDIF. DELETE et_tabname WHERE NOT fietext IN s_ftext. DELETE et_tabname WHERE NOT roltext IN s_froll. DELETE et_tabname WHERE NOT domtext IN s_fdoma. IF et_tabname[] IS INITIAL. MESSAGE 'Nothing found' TYPE 'S'. ENDIF. SORT et_tabname ASCENDING. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " GET_RELEVANT_TABLES *&---------------------------------------------------------------------* *& Form ALV_QUANTITY *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_QUANTITY[] text * -->IV_TABNAME text *----------------------------------------------------------------------* FORM alv_quantity USING it_quantity TYPE tt_quantity iv_tabname TYPE dd02l-tabname. DATA: lr_table TYPE REF TO cl_salv_table, lr_events TYPE REF TO cl_salv_events_table, lr_handle_events TYPE REF TO lcl_handle_events, lr_functions_list TYPE REF TO cl_salv_functions_list, lr_columns_table TYPE REF TO cl_salv_columns_table, lr_column_table TYPE REF TO cl_salv_column_table, lr_display_settings TYPE REF TO cl_salv_display_settings, lv_title TYPE lvc_title, lv_tfill TYPE sytfill. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF it_quantity[] IS INITIAL. MESSAGE 'Nothing selected/found' TYPE 'S'. RETURN. ENDIF. TRY. *--- create ALV table cl_salv_table=>factory( IMPORTING r_salv_table = lr_table CHANGING t_table = it_quantity[] ). *--- register local event handler for special events lr_events = lr_table->get_event( ). CREATE OBJECT lr_handle_events. SET HANDLER lr_handle_events->on_double_click FOR lr_events. *--- activate all standard functions lr_functions_list = lr_table->get_functions( ). lr_functions_list->set_all( if_salv_c_bool_sap=>true ). *--- set optimized column size lr_columns_table = lr_table->get_columns( ). lr_columns_table->set_optimize( abap_true ). *--- set column header lr_column_table ?= lr_columns_table->get_column( 'SUB_NAME' ). lr_column_table->set_short_text( 'Subobject' ). lr_column_table->set_medium_text( 'Subobject' ). lr_column_table->set_long_text( 'Subobject Name' ). lr_column_table ?= lr_columns_table->get_column( 'SU2_NAME' ). lr_column_table->set_short_text( 'Subsubobj.' ). lr_column_table->set_medium_text( 'Subsubobject' ). lr_column_table->set_long_text( 'Subsubobject Name' ). lr_column_table ?= lr_columns_table->get_column( 'SU2_NAME' ). lr_column_table->set_short_text( 'Subsubobj.' ). lr_column_table->set_medium_text( 'Subsubobject' ). lr_column_table->set_long_text( 'Subsubobject Name' ). lr_column_table ?= lr_columns_table->get_column( 'TABIX' ). lr_column_table->set_short_text( 'Index' ). lr_column_table->set_medium_text( 'Index' ). lr_column_table->set_long_text( 'Index' ). lr_column_table ?= lr_columns_table->get_column( 'TFILL' ). lr_column_table->set_short_text( 'Quantity' ). lr_column_table->set_medium_text( 'Quantity' ). lr_column_table->set_long_text( 'Quantity' ). lr_column_table ?= lr_columns_table->get_column( 'ERR_IND' ). lr_column_table->set_short_text( 'Error' ). lr_column_table->set_medium_text( 'Error' ). lr_column_table->set_long_text( 'Error' ). lr_column_table ?= lr_columns_table->get_column( 'ERR_TEXT' ). lr_column_table->set_short_text( 'Message' ). lr_column_table->set_medium_text( 'Message' ). lr_column_table->set_long_text( 'Message' ). lr_column_table ?= lr_columns_table->get_column( 'LANGU_EN' ). lr_column_table->set_short_text( 'English' ). lr_column_table->set_medium_text( 'Englishe' ). lr_column_table->set_long_text( 'English' ). lr_column_table ?= lr_columns_table->get_column( 'STEXT_EN' ). lr_column_table->set_short_text( 'Text' ). lr_column_table->set_medium_text( 'Description' ). lr_column_table->set_long_text( 'Description' ). lr_column_table ?= lr_columns_table->get_column( 'LANGU_DE' ). lr_column_table->set_short_text( 'German' ). lr_column_table->set_medium_text( 'German' ). lr_column_table->set_long_text( 'German' ). lr_column_table ?= lr_columns_table->get_column( 'STEXT_DE' ). lr_column_table->set_short_text( 'Text' ). lr_column_table->set_medium_text( 'Description' ). lr_column_table->set_long_text( 'Description' ). *--- set zebra layout lr_display_settings = lr_table->get_display_settings( ). lr_display_settings->set_striped_pattern( abap_true ). *--- set title DESCRIBE TABLE it_quantity LINES lv_tfill. MESSAGE s252(s#) WITH 'Content of table' iv_tabname 'selected lines:' lv_tfill INTO lv_title. lr_display_settings->set_list_header( lv_title ). *--- display table lr_table->display( ). CATCH cx_salv_msg. MESSAGE 'Exception CX_SALV_MSG' TYPE 'E'. CATCH cx_salv_not_found. MESSAGE 'Exception CX_SALV_NOT_FOUND' TYPE 'E'. CATCH cx_salv_data_error. MESSAGE 'Exception CX_SALV_DATA_ERROR' TYPE 'E'. CATCH cx_salv_existing. MESSAGE 'Exception CX_SALV_EXISTING' TYPE 'E'. CATCH cx_root. MESSAGE 'Exception CX_ROOT' TYPE 'E'. ENDTRY. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " ALV_QUANTITY *&---------------------------------------------------------------------* *& Form ALV_OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_VALUES[] text *----------------------------------------------------------------------* FORM alv_output USING it_values TYPE ANY TABLE. DATA: lr_table TYPE REF TO cl_salv_table, lr_functions_list TYPE REF TO cl_salv_functions_list, lr_columns_table TYPE REF TO cl_salv_columns_table, lr_display_settings TYPE REF TO cl_salv_display_settings, lv_title TYPE lvc_title, lv_tfill TYPE sytfill. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IF it_values[] IS INITIAL. RETURN. ENDIF. TRY. *--- create ALV table cl_salv_table=>factory( IMPORTING r_salv_table = lr_table CHANGING t_table = it_values[] ). *--- activate all standard functions lr_functions_list = lr_table->get_functions( ). lr_functions_list->set_all( if_salv_c_bool_sap=>true ). *--- set optimized column size lr_columns_table = lr_table->get_columns( ). lr_columns_table->set_optimize( abap_true ). *--- set zebra layout lr_display_settings = lr_table->get_display_settings( ). lr_display_settings->set_striped_pattern( abap_true ). *--- set title DESCRIBE TABLE it_values LINES lv_tfill. MESSAGE s252(s#) WITH 'The following tables may define texts' 'to be checked. Selected lines:' lv_tfill space INTO lv_title. lr_display_settings->set_list_header( lv_title ). *--- display table lr_table->display( ). CATCH cx_salv_msg. MESSAGE 'Exception CX_SALV_MSG' TYPE 'E'. CATCH cx_salv_not_found. MESSAGE 'Exception CX_SALV_NOT_FOUND' TYPE 'E'. CATCH cx_salv_data_error. MESSAGE 'Exception CX_SALV_DATA_ERROR' TYPE 'E'. CATCH cx_salv_existing. MESSAGE 'Exception CX_SALV_EXISTING' TYPE 'E'. CATCH cx_root. MESSAGE 'Exception CX_ROOT' TYPE 'E'. ENDTRY. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " ALV_OUTPUT *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_DEVC *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_devc USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF tdevct WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'DEVC'. CLEAR: lt_table[], lt_quantity[]. SELECT a~devclass b~spras b~ctext INTO TABLE lt_table FROM tdevc AS a LEFT OUTER JOIN tdevct AS b ON b~devclass EQ a~devclass WHERE a~devclass EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table ASCENDING BY devclass spras. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW devclass. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -spras. WHEN 'E'. ls_quantity-object = 'DEVC'. ls_quantity-obj_name = -devclass. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -ctext. WHEN 'D'. ls_quantity-object = 'DEVC'. ls_quantity-obj_name = -devclass. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -ctext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_DEVC *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_DOMA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_doma USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF dd01t WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF dd07t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'DOMA'. CLEAR: lt_table1[], lt_table2[], lt_quantity[]. SELECT a~domname b~ddlanguage a~as4local a~as4vers b~ddtext INTO TABLE lt_table1 FROM dd01l AS a LEFT OUTER JOIN dd01t AS b ON b~domname EQ a~domname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~domname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000'. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table1 ASCENDING BY domname ddlanguage. CLEAR ls_quantity. LOOP AT lt_table1 ASSIGNING . AT NEW domname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOMA - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'DOMA'. ls_quantity-obj_name = -domname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'DOMA'. ls_quantity-obj_name = -domname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOMA - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table1[], lt_table2[]. SELECT a~domname b~ddlanguage a~as4local b~valpos a~as4vers b~ddtext b~domval_ld b~domval_hd b~domvalue_l INTO TABLE lt_table2 FROM dd01l AS a LEFT OUTER JOIN dd07t AS b ON b~domname EQ a~domname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~domname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000'. IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table2 ASCENDING BY domname valpos ddlanguage. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -domname. ls_quantity_new-sub_name = -valpos. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOMA - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. IF -ddtext IS NOT INITIAL OR -domval_ld IS NOT INITIAL OR -domval_hd IS NOT INITIAL OR -domvalue_l IS NOT INITIAL. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'DOMA'. ls_quantity-obj_name = -domname. ls_quantity-sub_name = -valpos. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. CONCATENATE -ddtext -domval_ld -domval_hd -domvalue_l INTO ls_quantity-stext_en SEPARATED BY ' | '. WHEN 'D'. ls_quantity-object = 'DOMA'. ls_quantity-obj_name = -domname. ls_quantity-sub_name = -valpos. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. CONCATENATE -ddtext -domval_ld -domval_hd -domvalue_l INTO ls_quantity-stext_de SEPARATED BY ' | '. WHEN OTHERS. CONTINUE. ENDCASE. ENDIF. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOMA - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_DOMA *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_DTEL *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_dtel USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF dd04t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'DTEL'. CLEAR: lt_table[], lt_quantity[]. SELECT a~rollname b~ddlanguage a~as4local a~as4vers b~ddtext b~reptext b~scrtext_s b~scrtext_m b~scrtext_l INTO TABLE lt_table FROM dd04l AS a LEFT OUTER JOIN dd04t AS b ON b~rollname EQ a~rollname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~rollname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000'. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. SORT lt_table ASCENDING BY rollname ddlanguage. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW rollname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DTEL - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'DTEL'. ls_quantity-obj_name = -rollname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. CONCATENATE -ddtext -reptext -scrtext_s -scrtext_m -scrtext_l INTO ls_quantity-stext_en SEPARATED BY ' | '. WHEN 'D'. ls_quantity-object = 'DTEL'. ls_quantity-obj_name = -rollname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. CONCATENATE -ddtext -reptext -scrtext_s -scrtext_m -scrtext_l INTO ls_quantity-stext_de SEPARATED BY ' | '. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DTEL - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_DTEL *&---------------------------------------------------------------------* *& Form GET_OBJECTS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * <--ET_OBJECTS[] text *----------------------------------------------------------------------* FORM get_objects CHANGING et_objects TYPE tt_objects. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR et_objects[]. SELECT object obj_name INTO TABLE et_objects FROM tadir WHERE devclass IN s_devcl ORDER BY object obj_name. IF sy-subrc NE 0. CLEAR et_objects[]. ENDIF. IF p_list EQ abap_false. CLEAR p_list. ENDIF. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " GET_OBJECTS *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_TABL *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_tabl USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF dd02t WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF dd03t WITH DEFAULT KEY, lt_table3 TYPE STANDARD TABLE OF dd12t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2, LIKE LINE OF lt_table3. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'TABL'. CLEAR: lt_table1[], lt_table2[], lt_table3[], lt_quantity[]. SELECT a~tabname b~ddlanguage a~as4local a~as4vers b~ddtext INTO TABLE lt_table1 FROM dd02l AS a LEFT OUTER JOIN dd02t AS b ON b~tabname EQ a~tabname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~tabname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000'. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table1 ASCENDING BY tabname ddlanguage. CLEAR ls_quantity. LOOP AT lt_table1 ASSIGNING . AT NEW tabname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -tabname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -tabname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table1[], lt_table2[]. SELECT a~tabname c~ddlanguage a~as4local a~fieldname c~ddtext INTO TABLE lt_table2 FROM dd03l AS a INNER JOIN dd03l AS b ON b~tabname EQ a~tabname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers LEFT OUTER JOIN dd03t AS c ON c~tabname EQ b~tabname AND c~as4local EQ b~as4local AND c~fieldname EQ b~fieldname WHERE a~tabname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000'. IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table2 ASCENDING BY tabname fieldname ddlanguage. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -tabname. ls_quantity_new-sub_name = -fieldname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -tabname. ls_quantity-sub_name = -fieldname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -tabname. ls_quantity-sub_name = -fieldname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table2[], lt_table3[]. SELECT b~ddlanguage a~tabname b~indexname a~as4local a~as4vers b~ddtext INTO TABLE lt_table3 FROM dd02l AS a LEFT OUTER JOIN dd12t AS b ON b~sqltab EQ a~tabname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~tabname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000' AND a~sqltab EQ ''. IF sy-subrc NE 0. CLEAR lt_table3[]. ENDIF. SELECT b~ddlanguage a~sqltab b~indexname a~as4local a~as4vers b~ddtext APPENDING TABLE lt_table3 FROM dd02l AS a LEFT OUTER JOIN dd12t AS b ON b~sqltab EQ a~sqltab AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~tabname EQ -obj_name AND a~as4local EQ 'A' AND a~as4vers EQ '0000' AND a~sqltab NE ''. IF sy-subrc NE 0. *--- ignore this error, as many database tables do not use different names on SQL level! CLEAR lt_table2[]. ENDIF. DELETE lt_table3 WHERE indexname EQ ''. DELETE lt_table3 WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table3 ASCENDING BY sqltab indexname ddlanguage. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table3 ASSIGNING . ls_quantity_new-obj_name = -sqltab. ls_quantity_new-su2_name = -indexname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -sqltab. ls_quantity-sub_name = 'INDEX'. ls_quantity-su2_name = -indexname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'TABL'. ls_quantity-obj_name = -sqltab. ls_quantity-sub_name = 'INDEX'. ls_quantity-su2_name = -indexname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TABL - COLLECT' 'LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_table3[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_TABL *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_TTYP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_ttyp USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF dd40t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'TTYP'. CLEAR: lt_table[], lt_quantity[]. SELECT a~typename b~ddlanguage a~as4local b~ddtext INTO TABLE lt_table FROM dd40l AS a LEFT OUTER JOIN dd40t AS b ON b~typename EQ a~typename AND b~as4local EQ a~as4local WHERE a~typename EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table ASCENDING BY typename ddlanguage. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW typename. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TTYP - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'TTYP'. ls_quantity-obj_name = -typename. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'TTYP'. ls_quantity-obj_name = -typename. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TTYP - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_TTYP *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_SHLP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_shlp USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF dd30t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'SHLP'. CLEAR: lt_table[], lt_quantity[]. SELECT a~shlpname b~ddlanguage a~as4local b~ddtext INTO TABLE lt_table FROM dd30l AS a LEFT OUTER JOIN dd30t AS b ON b~shlpname EQ a~shlpname AND b~as4local EQ a~as4local WHERE a~shlpname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table ASCENDING BY shlpname ddlanguage. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW shlpname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SHLP - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'SHLP'. ls_quantity-obj_name = -shlpname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'SHLP'. ls_quantity-obj_name = -shlpname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SHLP - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_SHLP *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_VCLS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_vcls USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table_1 TYPE STANDARD TABLE OF vcldirt WITH DEFAULT KEY, lt_table_2 TYPE STANDARD TABLE OF vclstruct WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table_1, LIKE LINE OF lt_table_2. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'VCLS'. CLEAR: lt_table_1[], lt_table_2[], lt_quantity[]. *--- viewcluster directory text table SELECT b~spras a~vclname b~text INTO TABLE lt_table_1 FROM vcldir AS a LEFT OUTER JOIN vcldirt AS b ON b~vclname EQ a~vclname WHERE a~vclname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table_1[]. ENDIF. DELETE lt_table_1 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table_1 ASCENDING BY vclname spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table_1 ASSIGNING . ls_quantity_new-obj_name = -vclname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VCLS - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'VCLS'. ls_quantity-obj_name = -vclname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'VCLS'. ls_quantity-obj_name = -vclname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table_1[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VCLS - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. *--- viewcluster directory text table SELECT b~spras a~vclname b~object b~objecttext INTO TABLE lt_table_2 FROM vcldir AS a LEFT OUTER JOIN vclstruct AS b ON b~vclname EQ a~vclname WHERE a~vclname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table_2[]. ENDIF. DELETE lt_table_2 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table_2 ASCENDING BY vclname object spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table_2 ASSIGNING . ls_quantity_new-obj_name = -vclname. ls_quantity_new-sub_name = -object. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VCLS - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'VCLS'. ls_quantity-obj_name = -vclname. ls_quantity-sub_name = -object. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -objecttext. WHEN 'D'. ls_quantity-object = 'VCLS'. ls_quantity-obj_name = -vclname. ls_quantity-sub_name = -object. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -objecttext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table_2[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VCLS - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table_1[], lt_table_2[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_VCLS *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_VIEW *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_view USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF dd25t WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'VIEW'. CLEAR: lt_table[], lt_quantity[]. SELECT b~ddlanguage a~viewname a~as4local a~as4vers b~ddtext INTO TABLE lt_table FROM dd25l AS a LEFT OUTER JOIN dd25t AS b ON b~viewname EQ a~viewname AND b~as4local EQ a~as4local AND b~as4vers EQ a~as4vers WHERE a~viewname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE ddlanguage NE 'D' AND ddlanguage NE 'E'. SORT lt_table ASCENDING BY viewname ddlanguage. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table ASSIGNING . ls_quantity_new-obj_name = -viewname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VIEW - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -ddlanguage. WHEN 'E'. ls_quantity-object = 'VIEW'. ls_quantity-obj_name = -viewname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -ddlanguage. ls_quantity-stext_en = -ddtext. WHEN 'D'. ls_quantity-object = 'VIEW'. ls_quantity-obj_name = -viewname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -ddlanguage. ls_quantity-stext_de = -ddtext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VIEW - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_VIEW *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_MSAG *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_msag USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF t100t WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF t100 WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity, lv_selfdef TYPE t100u-selfdef, lv_dokil_object TYPE dokil-object. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'MSAG'. CLEAR: lt_table1[], lt_table2[], lt_quantity[]. SELECT * INTO TABLE lt_table1 FROM t100t WHERE arbgb EQ ( SELECT arbgb FROM t100a WHERE arbgb EQ -obj_name ). IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table1 ASCENDING BY arbgb sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table1 ASSIGNING . ls_quantity_new-obj_name = -arbgb. IF ls_quantity-obj_name NE ls_quantity_new-obj_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -stext. WHEN 'D'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -stext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table1[], lt_table2[]. SELECT b~sprsl a~arbgb b~msgnr b~text INTO TABLE lt_table2 FROM t100t AS a LEFT OUTER JOIN t100 AS b ON b~arbgb EQ a~arbgb WHERE a~arbgb EQ ( SELECT arbgb FROM t100a WHERE arbgb EQ -obj_name ). IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table2 ASCENDING BY arbgb msgnr sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -arbgb. ls_quantity_new-sub_name = -msgnr. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. IF p_err EQ abap_true AND -text IS INITIAL. *--- check on inconsistency: The short text describes the object sufficiently SELECT SINGLE selfdef INTO lv_selfdef FROM t100u WHERE arbgb EQ -arbgb AND msgnr EQ -msgnr. IF sy-subrc EQ 0. CASE lv_selfdef. WHEN space "Space: object requires documentation OR '1' "Object does not appear in a screen OR '2'. "Not yet documented CALL FUNCTION 'DOCU_OBJECT_NAME_CONCATENATE' EXPORTING docu_id = 'NA' element = -arbgb addition = -msgnr IMPORTING object = lv_dokil_object. SELECT SINGLE object INTO lv_dokil_object FROM dokil WHERE id EQ 'NA' AND object EQ lv_dokil_object AND langu EQ -sprsl AND typ EQ 'E'. IF sy-subrc NE 0. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Required longtext has not been maintained'. ENDIF. WHEN '3'. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Empty message text but flag "The short text describes the object sufficiently" is set'. WHEN OTHERS. CLEAR: ls_quantity-err_ind, ls_quantity-err_text. ENDCASE. ENDIF. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-sub_name = -msgnr. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-sub_name = -msgnr. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. IF p_poin IS NOT INITIAL. *--- determine all messages ending with a period "." SELECT * INTO TABLE lt_table2 FROM t100 WHERE arbgb EQ ( SELECT arbgb FROM t100a WHERE arbgb EQ -obj_name ) AND text LIKE '%.'. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table2 WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table2 ASCENDING BY arbgb msgnr sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -arbgb. ls_quantity_new-sub_name = -msgnr. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-sub_name = -msgnr. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Message text in T100 ends with "."'. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'MSAG'. ls_quantity-obj_name = -arbgb. ls_quantity-sub_name = -msgnr. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Message text in T100 ends with "."'. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table2[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'MSAG - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_MSAG *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_PROG *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_prog USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF trdirt WITH DEFAULT KEY, lt_textpool TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_de TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_en TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_screen TYPE STANDARD TABLE OF d021t WITH DEFAULT KEY, lt_screen_key TYPE STANDARD TABLE OF rsmptexts WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity, lv_length TYPE i, lv_report_title TYPE abap_bool. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_screen, LIKE LINE OF lt_screen_key. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'PROG'. CLEAR: lt_table[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_screen[], lt_screen_key[], lt_quantity[]. *--- report title of executable reports, module pools and/or subroutine pools *--- class pools (CLAS) and function groups (FUGR) are handled separately SELECT a~name b~sprsl b~text INTO TABLE lt_table FROM trdir AS a LEFT OUTER JOIN trdirt AS b ON b~name EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name AND subc IN ('1','M','S') ) . IF sy-subrc NE 0. CONTINUE. ENDIF. DELETE lt_table WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table ASCENDING BY name sprsl. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -name. ls_quantity-sub_name = 'TRDIRT'. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -name. ls_quantity-sub_name = 'TRDIRT'. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. *--- report variant SELECT a~name b~langu b~vtext INTO TABLE lt_table FROM trdir AS a LEFT OUTER JOIN varit AS b ON b~report EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name AND subc IN ('1','M','S') ) . IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table ASCENDING BY name sprsl. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -name. ls_quantity-sub_name = 'VARIT'. "<== VARIT-VARIANT?? ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -name. ls_quantity-sub_name = 'VARIT'. "<== VARIT-VARIANT?? ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. *--- textpool containing texts of text elements, selection texts and list headings SELECT SINGLE subc INTO lv_report_title FROM trdir WHERE name EQ -obj_name. IF sy-subrc NE 0 OR lv_report_title NE '1'. *--- object is not of relevant type "executable program": report tilte must not be maintained lv_report_title = abap_true. ELSE. *--- object is of relevant type "executable program": report tilte must be maintained lv_report_title = abap_false. ENDIF. CLEAR: lt_textpool[], lt_textpool_de[], lt_textpool_en[]. READ TEXTPOOL -obj_name LANGUAGE 'E' INTO lt_textpool_en. IF sy-subrc EQ 0. SORT lt_textpool_en ASCENDING BY id key. APPEND LINES OF lt_textpool_en TO lt_textpool. ENDIF. READ TEXTPOOL -obj_name LANGUAGE 'D' INTO lt_textpool_de. IF sy-subrc EQ 0. SORT lt_textpool_de ASCENDING BY id key. APPEND LINES OF lt_textpool_de TO lt_textpool. ENDIF. IF lv_report_title EQ abap_false. DELETE lt_textpool WHERE id EQ 'R'. "there must not be a report title for classes of class interfaces! ENDIF. SORT lt_textpool ASCENDING BY id key. DELETE ADJACENT DUPLICATES FROM lt_textpool COMPARING id key. LOOP AT lt_textpool ASSIGNING . CLEAR ls_quantity. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -obj_name. CONCATENATE 'TEXTPOOL' -id -key INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. READ TABLE lt_textpool_en ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_en = 'E'. ls_quantity-stext_en = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. READ TABLE lt_textpool_de ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_de = 'D'. ls_quantity-stext_de = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDLOOP. UNASSIGN . CLEAR lt_textpool[]. *--- screen short description CLEAR: lt_screen[]. SELECT b~prog b~dynr b~lang b~dtxt INTO CORRESPONDING FIELDS OF TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d020t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name AND subc IN ('1','M','S') ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE dtxt CP 'SEL_SCREEN * INFO:*'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-obj_name = -prog. CONCATENATE 'D020T' -dynr INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -prog. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -prog. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #8' sy-subrc. ENDIF. ENDIF. *--- screen key word texts CLEAR: lt_screen[]. SELECT b~prog b~dynr b~lang b~fldn b~dtxt INTO TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d021t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name AND subc IN ('1','M','S') ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE fldn CP '%_*_%_'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr fldn lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-obj_name = -prog. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #9' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -prog. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -prog. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'PROG - COLLECT' 'LT_QUANTITY #11' sy-subrc. ENDIF. ENDIF. *--- GUI Status - screen key word texts CLEAR: lt_screen_key[]. SELECT b~progname b~sprsl b~obj_type b~obj_code b~sub_code b~texttype b~text INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a LEFT OUTER JOIN rsmptexts AS b ON b~progname EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name AND subc IN ('1','M','S') ) . IF sy-subrc NE 0. CLEAR lt_screen_key[]. ENDIF. DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen_key ASSIGNING . ls_quantity_new-obj_name = -progname. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #12' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -progname. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'PROG'. ls_quantity-obj_name = -progname. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen_key[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #13' sy-subrc. ENDIF. ENDIF. ***--- GUI Title ==> already covered by D020T ** CLEAR: lt_screen_key[]. ** SELECT b~progname b~sprsl b~obj_code b~text ** INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a ** LEFT OUTER JOIN d347t AS b ON b~progname EQ a~name ** WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ -obj_name ** AND subc IN ('1','M','S') ) . ** IF sy-subrc NE 0. ** CLEAR lt_screen_key[]. ** ENDIF. ** DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. ** SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. ** CLEAR: ls_quantity, ls_quantity_new. ** LOOP AT lt_screen_key ASSIGNING . ** ls_quantity_new-obj_name = -progname. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity_new-sub_name SEPARATED BY ' | '. ** IF ls_quantity-obj_name NE ls_quantity_new-obj_name ** OR ls_quantity_new-sub_name NE ls_quantity_new-sub_name. ** IF ls_quantity IS NOT INITIAL. ** COLLECT ls_quantity INTO lt_quantity. ** IF sy-subrc NE 0. ** MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #14' sy-subrc. ** ENDIF. ** ENDIF. ** CLEAR ls_quantity. ** ENDIF. ** CASE -sprsl. ** WHEN 'E'. ** ls_quantity-object = 'PROG'. ** ls_quantity-obj_name = -progname. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ** ls_quantity-tfill = 1. ** ls_quantity-tabix = 1. ** ls_quantity-langu_en = -sprsl. ** ls_quantity-stext_en = -text. ** lv_length = strlen( -text ). ** IF -text CO ' .?' OR lv_length LT p_len. ** ls_quantity-err_ind = abap_true. ** ls_quantity-err_text = 'Description is missing or too short!'. ** ENDIF. ** WHEN 'D'. ** ls_quantity-object = 'PROG'. ** ls_quantity-obj_name = -progname. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ** ls_quantity-tfill = 1. ** ls_quantity-tabix = 1. ** ls_quantity-langu_de = -sprsl. ** ls_quantity-stext_de = -text. ** lv_length = strlen( -text ). ** IF -text CO ' .?' OR lv_length LT p_len. ** ls_quantity-err_ind = abap_true. ** ls_quantity-err_text = 'Description is missing or too short!'. ** ENDIF. ** WHEN OTHERS. ** CONTINUE. ** ENDCASE. ** ENDLOOP. ** UNASSIGN . ** CLEAR lt_screen_key[]. ** IF ls_quantity IS NOT INITIAL. ** COLLECT ls_quantity INTO lt_quantity. ** IF sy-subrc NE 0. ** MESSAGE e252(s#) WITH 'Unexpected error:' 'DEVC - COLLECT' 'LT_QUANTITY #15' sy-subrc. ** ENDIF. ** ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_screen[], lt_screen_key[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_PROG *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_CLAS_INTF *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * -->IV_OBJECT text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_clas_intf USING it_objects TYPE tt_objects iv_object TYPE e071-object CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF seoclasstx WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF seocompotx WITH DEFAULT KEY, lt_table3 TYPE STANDARD TABLE OF seosubcotx WITH DEFAULT KEY, lt_textpool TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_de TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_en TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_screen TYPE STANDARD TABLE OF d021t WITH DEFAULT KEY, lt_screen_key TYPE STANDARD TABLE OF rsmptexts WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity, lv_length TYPE i, lv_progname TYPE reposrc-progname. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2, LIKE LINE OF lt_table3, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_screen, LIKE LINE OF lt_screen_key. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ iv_object. CLEAR: lt_table1[], lt_table2[], lt_table3[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_screen[], lt_screen_key[], lt_quantity[]. *--- short description class/interface SELECT a~clsname b~langu b~descript INTO TABLE lt_table1 FROM seoclass AS a LEFT OUTER JOIN seoclasstx AS b ON b~clsname EQ a~clsname WHERE a~clsname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table1 ASCENDING BY clsname langu. CLEAR ls_quantity. LOOP AT lt_table1 ASSIGNING . AT NEW clsname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -langu. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -descript. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -descript. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table1[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. *--- short description class/interface component SELECT a~clsname a~cmpname b~langu b~descript INTO TABLE lt_table2 FROM seocompo AS a LEFT OUTER JOIN seocompotx AS b ON b~clsname EQ a~clsname AND b~cmpname EQ a~cmpname WHERE a~clsname EQ -obj_name AND a~cmptype IN s_cmptyp. IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table2 ASCENDING BY clsname cmpname langu. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -clsname. CONCATENATE 'SEOCOMPOTX' -cmpname INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. CONCATENATE 'SEOCOMPOTX' -cmpname INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. CASE -langu. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. CONCATENATE 'SEOCOMPOTX' -cmpname INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -descript. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. CONCATENATE 'SEOCOMPOTX' -cmpname INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -descript. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table2[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. *--- class/interface subcomponent short description SELECT a~clsname a~cmpname b~sconame b~langu b~descript INTO TABLE lt_table3 FROM seocompo AS a LEFT OUTER JOIN seosubcotx AS b ON b~clsname EQ a~clsname AND b~cmpname EQ a~cmpname WHERE a~clsname EQ -obj_name AND a~cmptype IN s_cmptyp. IF sy-subrc NE 0. CLEAR lt_table3[]. ENDIF. DELETE lt_table3 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table3 ASCENDING BY clsname cmpname sconame langu. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table3 ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -clsname. CONCATENATE 'SEOSUBCOTX' -cmpname INTO ls_quantity_new-sub_name SEPARATED BY ' | '. ls_quantity_new-su2_name = -sconame. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -langu. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. CONCATENATE 'SEOSUBCOTX' -cmpname INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-su2_name = -sconame. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -descript. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -clsname. CONCATENATE 'SEOSUBCOTX' -cmpname INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-su2_name = -sconame. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -descript. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table3[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #9' sy-subrc. ENDIF. ENDIF. *--- textpool CLEAR: lt_textpool[], lt_textpool_de[], lt_textpool_en[]. lv_progname = -obj_name. TRANSLATE lv_progname USING ' ='. lv_progname+30 = 'CP'. READ TEXTPOOL lv_progname LANGUAGE 'E' INTO lt_textpool_en. IF sy-subrc EQ 0. SORT lt_textpool_en ASCENDING BY id key. APPEND LINES OF lt_textpool_en TO lt_textpool. ENDIF. READ TEXTPOOL lv_progname LANGUAGE 'D' INTO lt_textpool_de. IF sy-subrc EQ 0. SORT lt_textpool_de ASCENDING BY id key. APPEND LINES OF lt_textpool_en TO lt_textpool. ENDIF. DELETE lt_textpool WHERE id EQ 'R'. "there must not be a report title for classes of class interfaces! SORT lt_textpool ASCENDING BY id key. DELETE ADJACENT DUPLICATES FROM lt_textpool COMPARING id key. CLEAR ls_quantity. LOOP AT lt_textpool ASSIGNING . CLEAR ls_quantity. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'TEXTPOOL' -id -key INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. READ TABLE lt_textpool_en ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_en = 'E'. ls_quantity-stext_en = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. READ TABLE lt_textpool_de ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_de = 'D'. ls_quantity-stext_de = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #10' sy-subrc. ENDIF. ENDLOOP. UNASSIGN . CLEAR lt_textpool[]. *--- screen short description CLEAR: lt_screen[]. lv_progname+31(1) = '%'. SELECT b~prog b~dynr b~lang b~dtxt INTO CORRESPONDING FIELDS OF TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d020t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name LIKE lv_progname AND subc IN ('J','K') ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE dtxt CP 'SEL_SCREEN * INFO:*'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #11' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #13' sy-subrc. ENDIF. ENDIF. *--- screen key word texts CLEAR: lt_screen[]. SELECT b~prog b~dynr b~lang b~fldn b~dtxt INTO TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d021t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name LIKE lv_progname AND subc IN ('J','K') ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE fldn CP '%_*_%_'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #14' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #16' sy-subrc. ENDIF. ENDIF. *--- screen short description CLEAR: lt_screen_key[]. SELECT b~progname b~sprsl b~obj_type b~obj_code b~sub_code b~texttype b~text INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a LEFT OUTER JOIN rsmptexts AS b ON b~progname EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name LIKE lv_progname AND subc IN ('J','K') ) . IF sy-subrc NE 0. CLEAR lt_screen_key[]. ENDIF. DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen_key ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #17' sy-subrc. ENDIF. CLEAR ls_quantity. ENDIF. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen_key[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #17' sy-subrc. ENDIF. ENDIF. *--- GUI Title ==> already covered by D020T CLEAR: lt_screen_key[]. SELECT b~progname b~sprsl b~obj_code b~text INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a LEFT OUTER JOIN d347t AS b ON b~progname EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name LIKE lv_progname AND subc IN ('J','K') ) . IF sy-subrc NE 0. CLEAR lt_screen_key[]. ENDIF. DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen_key ASSIGNING . ls_quantity_new-object = iv_object. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'D347T' -obj_code INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #17' sy-subrc. ENDIF. CLEAR ls_quantity. ENDIF. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = iv_object. ls_quantity-obj_name = -obj_name. CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen_key[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' iv_object '- COLLECT LT_QUANTITY #18' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_table3[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_screen[], lt_screen_key[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_CLAS_INTF *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_FUGR *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_fugr USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. TYPES: BEGIN OF ts_funcname, funcname TYPE funct-funcname, END OF ts_funcname. DATA: lt_table1 TYPE STANDARD TABLE OF tlibt WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF tftit WITH DEFAULT KEY, lt_textpool TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_de TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_textpool_en TYPE STANDARD TABLE OF textpool WITH DEFAULT KEY, lt_funct TYPE STANDARD TABLE OF funct WITH DEFAULT KEY, lt_screen TYPE STANDARD TABLE OF d021t WITH DEFAULT KEY, lt_screen_key TYPE STANDARD TABLE OF rsmptexts WITH DEFAULT KEY, lt_funcname TYPE STANDARD TABLE OF ts_funcname WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity, ls_funcname LIKE LINE OF lt_funcname, lv_progname TYPE reposrc-progname, lv_namespace TYPE rs38l-namespace, lv_length TYPE i, lv_include TYPE rs38l-include. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_textpool, LIKE LINE OF lt_funct, LIKE LINE OF lt_screen, LIKE LINE OF lt_screen_key. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'FUGR'. CLEAR: lt_table1[], lt_table2[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_funct[], lt_screen[], lt_screen_key[], lt_funcname[], lt_quantity[]. SELECT b~spras a~area b~areat INTO TABLE lt_table1 FROM tlibg AS a LEFT OUTER JOIN tlibt AS b ON b~area EQ a~area WHERE a~area EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table1 ASCENDING BY area spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table1 ASSIGNING . ls_quantity_new-obj_name = -area. IF ls_quantity-obj_name NE ls_quantity_new-obj_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -area. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -areat. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -area. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -areat. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. LOOP AT lt_table1 ASSIGNING . CLEAR lt_table2[]. SELECT c~spras b~funcname c~stext INTO TABLE lt_table2 FROM enlfdir AS a INNER JOIN tfdir AS b ON b~funcname EQ a~funcname LEFT OUTER JOIN tftit AS c ON c~funcname EQ a~funcname WHERE a~area EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table2 ASCENDING BY funcname spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -area. ls_quantity_new-sub_name = -funcname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. ls_funcname-funcname = -funcname. INSERT ls_funcname INTO TABLE lt_funcname. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - INSERT' 'LT_FUNCNAME' sy-subrc. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -area. ls_quantity-sub_name = -funcname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -stext. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -area. ls_quantity-sub_name = -funcname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -stext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. ENDLOOP. UNASSIGN . *--- function module short texts CLEAR lt_funct[]. SORT lt_funcname ASCENDING BY funcname. DELETE ADJACENT DUPLICATES FROM lt_funcname COMPARING funcname. IF lt_funcname[] IS NOT INITIAL. SELECT * INTO TABLE lt_funct FROM funct FOR ALL ENTRIES IN lt_funcname WHERE funcname EQ lt_funcname-funcname. IF sy-subrc NE 0. CLEAR lt_funct[]. ENDIF. DELETE lt_funct WHERE spras NE 'D' AND spras NE 'E'. SORT lt_funct BY funcname parameter kind version spras DESCENDING. DELETE ADJACENT DUPLICATES FROM lt_funct COMPARING funcname parameter kind version spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_funct ASSIGNING . ls_quantity_new-object = 'FUGR'. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'FUNCT' -funcname -parameter -kind -version INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'FUNCT' -funcname -parameter -kind -version INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -stext. lv_length = strlen( -stext ). IF -stext CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'FUNCT' -funcname -parameter -kind -version INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -stext. lv_length = strlen( -stext ). IF -stext CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. UNASSIGN . CLEAR lt_funct[]. ENDIF. *--- textpool lv_progname = -obj_name. CLEAR: lv_namespace, lv_include. CALL FUNCTION 'RS_PROGNAME_SPLIT' EXPORTING progname_with_namespace = lv_progname IMPORTING namespace = lv_namespace progname_without_namespace = lv_include EXCEPTIONS delimiter_error = 1 OTHERS = 2. IF sy-subrc EQ 0. CONCATENATE lv_namespace 'SAPL' lv_include INTO lv_progname. CONDENSE lv_progname NO-GAPS. CLEAR: lt_textpool[], lt_textpool_en[], lt_textpool_de[]. READ TEXTPOOL lv_progname LANGUAGE 'E' INTO lt_textpool_en. IF sy-subrc EQ 0. SORT lt_textpool_en ASCENDING BY id key. APPEND LINES OF lt_textpool_en TO lt_textpool. ENDIF. READ TEXTPOOL lv_progname LANGUAGE 'D' INTO lt_textpool_de. IF sy-subrc EQ 0. SORT lt_textpool_de ASCENDING BY id key. APPEND LINES OF lt_textpool_de TO lt_textpool. ENDIF. SORT lt_textpool ASCENDING BY id key. DELETE ADJACENT DUPLICATES FROM lt_textpool COMPARING id key. LOOP AT lt_textpool ASSIGNING . CLEAR ls_quantity. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE -id -key INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. READ TABLE lt_textpool_en ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_en = 'E'. ls_quantity-stext_en = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. UNASSIGN . READ TABLE lt_textpool_de ASSIGNING WITH KEY id = -id key = -key BINARY SEARCH. IF sy-subrc EQ 0. ls_quantity-langu_de = 'D'. ls_quantity-stext_de = -entry. lv_length = strlen( -entry ). IF -entry CO ' .' OR -entry IS INITIAL OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. ENDIF. UNASSIGN . COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #7' sy-subrc. ENDIF. ENDLOOP. UNASSIGN . CLEAR lt_textpool[]. *--- screen short description CLEAR lt_screen[]. SELECT b~prog b~dynr b~lang b~dtxt INTO CORRESPONDING FIELDS OF TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d020t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ lv_progname AND subc EQ 'F' ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE dtxt CP 'SEL_SCREEN * INFO:*'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-object = 'FUGR'. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #8' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'D020T' -dynr INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #9' sy-subrc. ENDIF. ENDIF. *--- screen key word texts CLEAR: lt_screen[]. SELECT b~prog b~dynr b~lang b~fldn b~dtxt INTO TABLE lt_screen FROM trdir AS a LEFT OUTER JOIN d021t AS b ON b~prog EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ lv_progname AND subc EQ 'F' ) . IF sy-subrc NE 0. CLEAR lt_screen[]. ENDIF. DELETE lt_screen WHERE lang NE 'D' AND lang NE 'E'. * DELETE lt_screen WHERE dynr EQ '1000'. "generated screen 1000 DELETE lt_screen WHERE fldn CP '%_*_%_'. "generated screen/subscreen SORT lt_screen ASCENDING BY prog dynr fldn lang. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen ASSIGNING . ls_quantity_new-object = 'FUGR'. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #10' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -lang. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -lang. ls_quantity-stext_en = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'D021T' -dynr -fldn INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -lang. ls_quantity-stext_de = -dtxt. lv_length = strlen( -dtxt ). IF -dtxt CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #11' sy-subrc. ENDIF. ENDIF. *--- GUI Status - screen key word texts CLEAR: lt_screen_key[]. SELECT b~progname b~sprsl b~obj_type b~obj_code b~sub_code b~texttype b~text INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a LEFT OUTER JOIN rsmptexts AS b ON b~progname EQ a~name WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ lv_progname AND subc EQ 'F' ) . IF sy-subrc NE 0. CLEAR lt_screen_key[]. ENDIF. DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_screen_key ASSIGNING . ls_quantity_new-object = 'FUGR'. ls_quantity_new-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity_new-sub_name SEPARATED BY ' | '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #12' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN 'D'. ls_quantity-object = 'FUGR'. ls_quantity-obj_name = -obj_name. CONCATENATE 'RSMPTEXTS' -obj_type -obj_code -sub_code -texttype INTO ls_quantity-sub_name SEPARATED BY ' | '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -text. lv_length = strlen( -text ). IF -text CO ' .?' OR lv_length LT p_len. ls_quantity-err_ind = abap_true. ls_quantity-err_text = 'Description is missing or too short!'. ENDIF. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_screen_key[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #13' sy-subrc. ENDIF. ENDIF. ***--- GUI Title ==> already covered by D020T ** CLEAR: lt_screen_key[]. ** SELECT b~progname b~sprsl b~obj_code b~text ** INTO CORRESPONDING FIELDS OF TABLE lt_screen_key FROM trdir AS a ** LEFT OUTER JOIN d347t AS b ON b~progname EQ a~name ** WHERE a~name EQ ( SELECT name FROM trdir WHERE name EQ lv_progname ** AND subc EQ 'F' ) . ** IF sy-subrc NE 0. ** CLEAR lt_screen_key[]. ** ENDIF. ** DELETE lt_screen_key WHERE sprsl NE 'D' AND sprsl NE 'E'. ** SORT lt_screen_key ASCENDING BY progname obj_type obj_code sub_code texttype sprsl. ** CLEAR: ls_quantity, ls_quantity_new. ** LOOP AT lt_screen_key ASSIGNING . ** ls_quantity_new-object = 'FUGR'. ** ls_quantity_new-obj_name = -obj_name. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity_new-sub_name SEPARATED BY ' | '. ** IF ls_quantity-object NE ls_quantity_new-object ** OR ls_quantity-obj_name NE ls_quantity_new-obj_name ** OR ls_quantity-sub_name NE ls_quantity_new-sub_name. ** IF ls_quantity IS NOT INITIAL. ** COLLECT ls_quantity INTO lt_quantity. ** IF sy-subrc NE 0. ** MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #14' sy-subrc. ** ENDIF. ** ENDIF. ** CLEAR ls_quantity. ** ENDIF. ** CASE -sprsl. ** WHEN 'E'. ** ls_quantity-object = 'FUGR'. ** ls_quantity-obj_name = -obj_name. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ** ls_quantity-tfill = 1. ** ls_quantity-tabix = 1. ** ls_quantity-langu_en = -sprsl. ** ls_quantity-stext_en = -text. ** lv_length = strlen( -text ). ** IF -text CO ' .?' OR lv_length LT p_len. ** ls_quantity-err_ind = abap_true. ** ls_quantity-err_text = 'Description is missing or too short!'. ** ENDIF. ** WHEN 'D'. ** ls_quantity-object = 'FUGR'. ** ls_quantity-obj_name = -obj_name. ** CONCATENATE 'D347T' -obj_code INTO ls_quantity-sub_name SEPARATED BY ' | '. ** ls_quantity-tfill = 1. ** ls_quantity-tabix = 1. ** ls_quantity-langu_de = -sprsl. ** ls_quantity-stext_de = -text. ** lv_length = strlen( -text ). ** IF -text CO ' .?' OR lv_length LT p_len. ** ls_quantity-err_ind = abap_true. ** ls_quantity-err_text = 'Description is missing or too short!'. ** ENDIF. ** WHEN OTHERS. ** CONTINUE. ** ENDCASE. ** ENDLOOP. ** UNASSIGN . ** CLEAR lt_screen_key[]. ** IF ls_quantity IS NOT INITIAL. ** COLLECT ls_quantity INTO lt_quantity. ** IF sy-subrc NE 0. ** MESSAGE e252(s#) WITH 'Unexpected error:' 'FUGR - COLLECT' 'LT_QUANTITY #15' sy-subrc. ** ENDIF. ** ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_textpool[], lt_textpool_de[], lt_textpool_en[], lt_funct[], lt_screen[], lt_screen_key[], lt_funcname[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_FUGR *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_TRAN *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_tran USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF tstct WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'TRAN'. CLEAR: lt_table[], lt_quantity[]. SELECT b~sprsl a~tcode b~ttext INTO TABLE lt_table FROM tstc AS a LEFT OUTER JOIN tstct AS b ON b~tcode EQ a~tcode WHERE a~tcode EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE sprsl NE 'D' AND sprsl NE 'E'. SORT lt_table ASCENDING BY tcode sprsl. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . ls_quantity_new-obj_name = -tcode. IF ls_quantity-obj_name NE ls_quantity_new-obj_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TRAN - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -sprsl. WHEN 'E'. ls_quantity-object = 'TRAN'. ls_quantity-obj_name = -tcode. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -sprsl. ls_quantity-stext_en = -ttext. WHEN 'D'. ls_quantity-object = 'TRAN'. ls_quantity-obj_name = -tcode. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -sprsl. ls_quantity-stext_de = -ttext. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'TRAN - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_TRAN *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_SICF *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_sicf USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF icfdocu WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'SICF'. CLEAR: lt_table[], lt_quantity[]. SELECT a~icf_name b~icfparguid b~icf_langu b~icf_docu INTO TABLE lt_table FROM icfservice AS a LEFT OUTER JOIN icfdocu AS b ON b~icf_name EQ a~icf_name AND b~icfparguid EQ a~icfparguid WHERE a~icf_name EQ -obj_name+0(15) AND a~icfparguid EQ -obj_name+15(25). IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE icf_langu NE 'D' AND icf_langu NE 'E'. SORT lt_table ASCENDING BY icf_docu icf_langu. CLEAR ls_quantity. LOOP AT lt_table ASSIGNING . AT NEW icf_docu. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SICF - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -icf_langu. WHEN 'E'. ls_quantity-object = 'SICF'. ls_quantity-obj_name = -obj_name+0(15). ls_quantity-sub_name = -obj_name+15(25). ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -icf_langu. ls_quantity-stext_en = -icf_docu. WHEN 'D'. ls_quantity-object = 'SICF'. ls_quantity-obj_name = -obj_name+0(15). ls_quantity-sub_name = -obj_name+15(25). ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -icf_langu. ls_quantity-stext_de = -icf_docu. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SICF - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_SICF *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_SSFO *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_ssfo USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_ssfo_text TYPE STANDARD TABLE OF tline WITH DEFAULT KEY, lt_sourcetext TYPE STANDARD TABLE OF tline WITH DEFAULT KEY, lt_targettext TYPE STANDARD TABLE OF tline WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_tlwrkobj TYPE lwrkobj, lv_tabix_en TYPE sytabix, lv_tabix_de TYPE sytabix. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_ssfo_text, LIKE LINE OF lt_sourcetext, LIKE LINE OF lt_targettext. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: lt_quantity[], lt_sourcetext[], lt_targettext[], lt_quantity[]. LOOP AT it_objects ASSIGNING WHERE object EQ 'SSFO'. CLEAR: lt_sourcetext[], lt_targettext[], ls_tlwrkobj. *--- get texts of Smart Forms formular ls_tlwrkobj-targetlang = 'D'. ls_tlwrkobj-objtype = -object. ls_tlwrkobj-objname = -obj_name. CALL FUNCTION 'SSFTR_GET_TEXT' EXPORTING sourcelang = 'E' targetlang = 'D' * NOTEXT = ' ' TABLES sourcetext = lt_sourcetext[] targettext = lt_targettext[] CHANGING tlwrkobj = ls_tlwrkobj EXCEPTIONS object_not_found = 1 OTHERS = 2. IF sy-subrc NE 0. CONTINUE. ENDIF. LOOP AT lt_sourcetext ASSIGNING WHERE tdformat EQ '/E'. COLLECT INTO lt_ssfo_text. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SSFO - COLLECT' 'LT_SSFO_TEXT #1' sy-subrc. ENDIF. ENDLOOP. UNASSIGN . LOOP AT lt_targettext ASSIGNING WHERE tdformat EQ '/E'. COLLECT INTO lt_ssfo_text. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SSFO - COLLECT' 'LT_SSFO_TEXT #2' sy-subrc. ENDIF. ENDLOOP. UNASSIGN . *--- prepare quantity in language EN LOOP AT lt_ssfo_text ASSIGNING . CLEAR: ls_quantity, lv_tabix_en, lv_tabix_de. ls_quantity-object = 'SSFO'. ls_quantity-obj_name = -obj_name. ls_quantity-sub_name = -tdline. ls_quantity-tfill = 1. ls_quantity-tabix = 0. READ TABLE lt_sourcetext ASSIGNING WITH KEY tdformat = -tdformat tdline = -tdline. IF sy-subrc EQ 0. lv_tabix_en = sy-tabix. ENDIF. READ TABLE lt_targettext ASSIGNING WITH KEY tdformat = -tdformat tdline = -tdline. IF sy-subrc EQ 0. lv_tabix_de = sy-tabix. ENDIF. WHILE IS ASSIGNED OR IS ASSIGNED. IF IS ASSIGNED. ls_quantity-langu_en = 'E'. CONCATENATE -tdformat -tdline INTO ls_quantity-stext_en SEPARATED BY ' | '. ADD 1 TO lv_tabix_en. READ TABLE lt_sourcetext ASSIGNING INDEX lv_tabix_en. IF sy-subrc NE 0. lv_tabix_en = 0. UNASSIGN . ENDIF. IF IS ASSIGNED AND -tdformat EQ '/E'. lv_tabix_en = 0. UNASSIGN . ENDIF. ENDIF. IF IS ASSIGNED. ls_quantity-langu_de = 'D'. CONCATENATE -tdformat -tdline INTO ls_quantity-stext_de SEPARATED BY ' | '. ADD 1 TO lv_tabix_de. READ TABLE lt_targettext ASSIGNING INDEX lv_tabix_de. IF sy-subrc NE 0. lv_tabix_de = 0. UNASSIGN . ENDIF. IF IS ASSIGNED AND -tdformat EQ '/E'. lv_tabix_de = 0. UNASSIGN . ENDIF. ENDIF. ADD 1 TO ls_quantity-tabix. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SSFO - COLLECT' 'LT_SSFO_TEXT #1' sy-subrc. ENDIF. IF lv_tabix_en EQ 0. CLEAR: ls_quantity-langu_en, ls_quantity-stext_en. ENDIF. IF lv_tabix_de EQ 0. CLEAR: ls_quantity-langu_de, ls_quantity-stext_de. ENDIF. ENDWHILE. UNASSIGN: , . IF ls_quantity-tabix EQ 0. ls_quantity-tabix = 1. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SSFO - COLLECT' 'LT_SSFO_TEXT #1' sy-subrc. ENDIF. ENDIF. ENDLOOP. UNASSIGN . CLEAR: lt_ssfo_text[], lt_sourcetext[], lt_targettext[]. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_quantity[], lt_sourcetext[], lt_targettext[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_SSFO *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_WAPA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_wapa USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF o2applt WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF o2pagdirt WITH DEFAULT KEY, lt_table3 TYPE STANDARD TABLE OF o2pagpart WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF it_objects, LIKE LINE OF lt_table1, LIKE LINE OF lt_table2, LIKE LINE OF lt_table3. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LOOP AT it_objects ASSIGNING WHERE object EQ 'WAPA'. CLEAR: lt_table1[], lt_table2[], lt_table3[], lt_quantity[]. SELECT a~applname b~langu b~text INTO TABLE lt_table1 FROM o2appl AS a LEFT OUTER JOIN o2applt AS b ON b~applname EQ a~applname WHERE a~applname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table1 ASCENDING BY applname langu. CLEAR ls_quantity. LOOP AT lt_table1 ASSIGNING . AT NEW applname. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDAT. CASE -langu. WHEN 'E'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table1[], lt_table2[]. SELECT a~applname a~pagekey b~langu b~descript INTO TABLE lt_table2 FROM o2pagdir AS a LEFT OUTER JOIN o2pagdirt AS b ON b~applname EQ a~applname AND b~pagekey EQ a~pagekey WHERE a~applname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table2[]. ENDIF. DELETE lt_table2 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table2 ASCENDING BY applname pagekey langu. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -applname. ls_quantity_new-sub_name = -pagekey. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -langu. WHEN 'E'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-sub_name = -pagekey. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -descript. WHEN 'D'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-sub_name = -pagekey. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -descript. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. CLEAR: lt_table2[], lt_table3[]. SELECT a~applname a~pagekey b~langu a~compname b~descript INTO TABLE lt_table3 FROM o2pagpar AS a LEFT OUTER JOIN o2pagpart AS b ON b~applname EQ a~applname AND b~pagekey EQ a~pagekey AND b~compname EQ a~compname WHERE a~applname EQ -obj_name. IF sy-subrc NE 0. CLEAR lt_table3[]. ENDIF. DELETE lt_table3 WHERE langu NE 'D' AND langu NE 'E'. SORT lt_table3 ASCENDING BY applname pagekey compname langu. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table3 ASSIGNING WHERE descript NE ''. ls_quantity_new-obj_name = -applname. ls_quantity_new-sub_name = -pagekey. ls_quantity_new-su2_name = -compname. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -langu. WHEN 'E'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-sub_name = -pagekey. ls_quantity-su2_name = -compname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -descript. WHEN 'D'. ls_quantity-object = 'WAPA'. ls_quantity-obj_name = -applname. ls_quantity-sub_name = -pagekey. ls_quantity-su2_name = -compname. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -descript. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'WAPA - COLLECT' 'LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. ENDLOOP. UNASSIGN . FREE: lt_table1[], lt_table2[], lt_table3[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_WAPA *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_DOKS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_doks USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF dokhl WITH DEFAULT KEY, lt_tline_en TYPE STANDARD TABLE OF tline WITH DEFAULT KEY, lt_tline_de TYPE STANDARD TABLE OF tline WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity, ls_table2 TYPE dokil, lv_tabix_en TYPE i, lv_tabix_de TYPE i. FIELD-SYMBOLS: LIKE LINE OF lt_table1, LIKE LINE OF lt_tline_en, LIKE LINE OF lt_tline_de. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: lt_table1[], lt_quantity[], ls_table2, ls_quantity, ls_quantity_new. SELECT * INTO TABLE lt_table1 FROM dokhl WHERE object IN s_devcl AND langu IN ('D','E') AND dokstate EQ 'A'. IF sy-subrc NE 0. *--- this error will handled later on CLEAR lt_table1[]. ENDIF. *--- condense header to the most current version COMMIT WORK AND WAIT. SORT lt_table1 BY id ASCENDING object ASCENDING langu ASCENDING typ ASCENDING dokversion DESCENDING. DELETE ADJACENT DUPLICATES FROM lt_table1 COMPARING id object langu typ. IF lt_table1[] IS INITIAL. RETURN. ENDIF. *--- sort header SORT lt_table1 ASCENDING BY id object typ. DELETE ADJACENT DUPLICATES FROM lt_table1 COMPARING id object typ. COMMIT WORK AND WAIT. LOOP AT lt_table1 ASSIGNING . ls_quantity_new-object = 'DOK'. ls_quantity_new-obj_name = -id. ls_quantity_new-sub_name = -object. CONCATENATE -typ -dokversion -dokstate INTO ls_quantity_new-su2_name SEPARATED BY ' - '. IF ls_quantity-object NE ls_quantity_new-object OR ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-sub_name NE ls_quantity_new-sub_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOKS - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. ls_quantity-object = 'DOK'. ls_quantity-obj_name = -id. ls_quantity-sub_name = -object. CONCATENATE -typ -dokversion -dokstate INTO ls_quantity_new-su2_name SEPARATED BY ' - '. ls_quantity-tfill = 1. ls_quantity-tabix = 1. IF -dokstate NE 'A' AND -dokstate NE 'N'. ls_quantity-err_ind = abap_true. CONCATENATE 'Check document status:' -dokstate INTO ls_quantity-err_text SEPARATED BY space. ENDIF. SELECT SINGLE * INTO ls_table2 FROM dokil WHERE id EQ -id AND object EQ -object AND langu EQ 'E' AND typ EQ -typ. IF sy-subrc EQ 0. ls_quantity-langu_en = 'E'. CONCATENATE ls_table2-version ls_table2-masterlang ls_table2-txtlines ls_table2-dokstate ls_table2-selfdef INTO ls_quantity-stext_en SEPARATED BY ' - '. ENDIF. SELECT SINGLE * INTO ls_table2 FROM dokil WHERE id EQ -id AND object EQ -object AND langu EQ 'D' AND typ EQ -typ. IF sy-subrc EQ 0. ls_quantity-langu_de = 'D'. CONCATENATE ls_table2-version ls_table2-masterlang ls_table2-txtlines ls_table2-dokstate ls_table2-selfdef INTO ls_quantity-stext_de SEPARATED BY ' - '. ENDIF. *--- read document in requested languages CLEAR: lt_tline_en[], lt_tline_de[], lv_tabix_en, lv_tabix_de. IF ls_quantity-langu_en IS NOT INITIAL. CALL FUNCTION 'DOCU_READ' EXPORTING id = -id langu = 'E' object = -object typ = -typ version = -dokversion * SUPPRESS_TEMPLATE = ' ' * USE_NOTE_TEMPLATE = ' ' * IMPORTING * DOKTITLE = * HEAD = TABLES line = lt_tline_en[]. ENDIF. IF ls_quantity-langu_de IS NOT INITIAL. CALL FUNCTION 'DOCU_READ' EXPORTING id = -id langu = 'D' object = -object typ = -typ version = -dokversion * SUPPRESS_TEMPLATE = ' ' * USE_NOTE_TEMPLATE = ' ' * IMPORTING * DOKTITLE = * HEAD = TABLES line = lt_tline_de[]. ENDIF. READ TABLE lt_tline_en ASSIGNING INDEX 1. IF sy-subrc EQ 0. lv_tabix_en = sy-tabix. ENDIF. READ TABLE lt_tline_de ASSIGNING INDEX 1. IF sy-subrc EQ 0. lv_tabix_de = sy-tabix. ENDIF. WHILE IS ASSIGNED OR IS ASSIGNED. IF IS ASSIGNED. ls_quantity-langu_en = 'E'. CONCATENATE -tdformat -tdline INTO ls_quantity-stext_en SEPARATED BY ' | '. ADD 1 TO lv_tabix_en. READ TABLE lt_tline_en ASSIGNING INDEX lv_tabix_en. IF sy-subrc NE 0. lv_tabix_en = 0. UNASSIGN . ENDIF. ENDIF. IF IS ASSIGNED. ls_quantity-langu_de = 'D'. CONCATENATE -tdformat -tdline INTO ls_quantity-stext_de SEPARATED BY ' | '. ADD 1 TO lv_tabix_de. READ TABLE lt_tline_de ASSIGNING INDEX lv_tabix_de. IF sy-subrc NE 0. lv_tabix_de = 0. UNASSIGN . ENDIF. ENDIF. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SSFO - COLLECT' 'LT_SSFO_TEXT #1' sy-subrc. ENDIF. IF lv_tabix_en EQ 0. CLEAR: ls_quantity-langu_en, ls_quantity-stext_en. ENDIF. IF lv_tabix_de EQ 0. CLEAR: ls_quantity-langu_de, ls_quantity-stext_de. ENDIF. ADD 1 TO ls_quantity-tabix. ENDWHILE. IF ls_quantity-tabix GT 1 AND ls_quantity-langu_en IS INITIAL AND ls_quantity-langu_de IS INITIAL. CLEAR ls_quantity. ENDIF. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'DOKS - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. FREE: lt_table1[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_DOKS *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_SDAT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_sdat USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF balobjt WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF balsubt WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF lt_table1, LIKE LINE OF lt_table2. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: lt_table1[], lt_table2[], lt_quantity[]. SELECT b~spras a~object b~objtxt INTO TABLE lt_table1 FROM balobj AS a LEFT OUTER JOIN balobjt AS b ON b~object EQ a~object WHERE a~object IN s_devcl. IF sy-subrc NE 0. CLEAR lt_table1[]. ENDIF. DELETE lt_table1 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table1 ASCENDING BY object spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table1 ASSIGNING . ls_quantity_new-sub_name = -object. IF ls_quantity-sub_name NE ls_quantity_new-sub_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SDAT - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'SDAT'. ls_quantity-obj_name = 'APP_LOG'. ls_quantity-sub_name = -object. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -objtxt. WHEN 'D'. ls_quantity-object = 'SDAT'. ls_quantity-obj_name = 'APP_LOG'. ls_quantity-sub_name = -object. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -objtxt. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SDAT - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. DELETE ADJACENT DUPLICATES FROM lt_table1 COMPARING object. LOOP AT lt_table1 ASSIGNING . CLEAR lt_table2[]. SELECT b~spras a~object b~subobject b~subobjtxt INTO TABLE lt_table2 FROM balsub AS a LEFT OUTER JOIN balsubt AS b ON b~object EQ a~object AND b~subobject EQ a~subobject WHERE a~object EQ -object. IF sy-subrc NE 0. CONTINUE. ENDIF. DELETE lt_table2 WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table2 ASCENDING BY object subobject spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-sub_name = -object. ls_quantity_new-su2_name = -subobject. IF ls_quantity-sub_name NE ls_quantity_new-sub_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SDAT - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'SDAT'. ls_quantity-obj_name = 'APP_LOG'. ls_quantity-sub_name = -object. ls_quantity-su2_name = -subobject. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -subobjtxt. WHEN 'D'. ls_quantity-object = 'SDAT'. ls_quantity-obj_name = 'APP_LOG'. ls_quantity-sub_name = -object. ls_quantity-su2_name = -subobject. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -subobjtxt. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'SDAT - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. ENDLOOP. UNASSIGN . CLEAR: lt_table1[], lt_table2[]. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. FREE: lt_table1[], lt_table2[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_SDAT *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_AGRP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_agrp USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table TYPE STANDARD TABLE OF tbrgt WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF lt_table. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: lt_table[], lt_quantity[]. SELECT b~spras a~brobj a~brgru b~bezei INTO CORRESPONDING FIELDS OF TABLE lt_table FROM tbrg AS a LEFT OUTER JOIN tbrgt AS b ON b~brobj EQ a~brobj AND b~brgru EQ a~brgru WHERE a~brobj IN s_brobj "like S_TABU_DIS AND a~brgru IN s_brgru. "like /VFE IF sy-subrc NE 0. CLEAR lt_table[]. ENDIF. DELETE lt_table WHERE spras NE 'D' AND spras NE 'E'. SORT lt_table ASCENDING BY brobj brgru spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table ASSIGNING . ls_quantity_new-sub_name = -brobj. ls_quantity_new-su2_name = -brgru. IF ls_quantity-sub_name NE ls_quantity_new-sub_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VDAT - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'VDAT'. ls_quantity-obj_name = 'TBRGT'. ls_quantity-sub_name = -brobj. ls_quantity-su2_name = -brgru. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -bezei. WHEN 'D'. ls_quantity-object = 'VDAT'. ls_quantity-obj_name = 'TBRGT'. ls_quantity-sub_name = -brobj. ls_quantity-su2_name = -brgru. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -bezei. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'VDAT - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. FREE: lt_table[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_AGRP *&---------------------------------------------------------------------* *& Form CHECK_TEXTS_ACGR *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->IT_OBJECTS[] text * <--CT_QUANTITY[] text * <--CT_OUTPUT[] text *----------------------------------------------------------------------* FORM check_texts_acgr USING it_objects TYPE tt_objects CHANGING ct_quantity TYPE tt_quantity ct_output TYPE tt_output. DATA: lt_table1 TYPE STANDARD TABLE OF agr_texts WITH DEFAULT KEY, lt_table2 TYPE STANDARD TABLE OF agr_hiert WITH DEFAULT KEY, lt_table3 TYPE STANDARD TABLE OF agr_minit WITH DEFAULT KEY, lt_table4 TYPE STANDARD TABLE OF agr_tcdtxt WITH DEFAULT KEY, lt_quantity TYPE tt_quantity, ls_quantity LIKE LINE OF ct_quantity, ls_quantity_new LIKE LINE OF ct_quantity. FIELD-SYMBOLS: LIKE LINE OF lt_table1, LIKE LINE OF lt_table2, LIKE LINE OF lt_table3, LIKE LINE OF lt_table4. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CLEAR: lt_table1[], lt_table2[], lt_table3[], lt_table4[], lt_quantity[]. IF p_tctx EQ abap_true. SELECT a~agr_name b~spras b~line b~text INTO CORRESPONDING FIELDS OF TABLE lt_table1 FROM agr_define AS a INNER JOIN agr_lsd AS l ON l~agr_name EQ a~agr_name LEFT OUTER JOIN agr_texts AS b ON b~agr_name EQ a~agr_name WHERE a~agr_name IN s_devcl OR l~devclass IN s_devcl. IF sy-subrc EQ 0. SORT lt_table1 ASCENDING BY agr_name spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table1 ASSIGNING . ls_quantity_new-obj_name = -agr_name. ls_quantity_new-su2_name = -line. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #1' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_TEXTS'. ls_quantity-su2_name = -line. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_TEXTS'. ls_quantity-su2_name = -line. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table1[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #2' sy-subrc. ENDIF. ENDIF. ENDIF. ENDIF. SELECT a~agr_name b~spras a~object_id b~text b~description INTO CORRESPONDING FIELDS OF TABLE lt_table2 FROM agr_hier AS a INNER JOIN agr_lsd AS l ON l~agr_name EQ a~agr_name INNER JOIN agr_define AS t ON t~agr_name EQ a~agr_name LEFT OUTER JOIN agr_hiert AS b ON b~agr_name EQ a~agr_name AND b~object_id EQ a~object_id WHERE a~agr_name IN s_devcl OR l~devclass IN s_devcl. IF sy-subrc EQ 0. SORT lt_table2 ASCENDING BY agr_name object_id spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table2 ASSIGNING . ls_quantity_new-obj_name = -agr_name. ls_quantity_new-su2_name = -object_id. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #3' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_HIERT'. ls_quantity-su2_name = -object_id. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_HIERT'. ls_quantity-su2_name = -object_id. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table2[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #4' sy-subrc. ENDIF. ENDIF. ENDIF. SELECT a~agr_name b~spras b~sort_order b~text INTO CORRESPONDING FIELDS OF TABLE lt_table3 FROM agr_mini AS a INNER JOIN agr_lsd AS l ON l~agr_name EQ a~agr_name INNER JOIN agr_define AS t ON t~agr_name EQ a~agr_name LEFT OUTER JOIN agr_minit AS b ON b~agr_name EQ a~agr_name AND b~sort_order EQ a~sort_order WHERE a~agr_name IN s_devcl OR l~devclass IN s_devcl. IF sy-subrc EQ 0. SORT lt_table3 ASCENDING BY agr_name sort_order spras. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table3 ASSIGNING . ls_quantity_new-obj_name = -agr_name. ls_quantity_new-su2_name = -sort_order. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #5' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -spras. WHEN 'E'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_MINIT'. ls_quantity-su2_name = -sort_order. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -spras. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_MINIT'. ls_quantity-su2_name = -sort_order. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -spras. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table3[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #6' sy-subrc. ENDIF. ENDIF. ENDIF. SELECT a~agr_name c~langu a~type a~tcode c~text INTO CORRESPONDING FIELDS OF TABLE lt_table4 FROM agr_tcodes AS a INNER JOIN agr_lsd AS l ON l~agr_name EQ a~agr_name INNER JOIN agr_define AS t ON t~agr_name EQ a~agr_name LEFT OUTER JOIN agr_tcdtxt AS c ON c~agr_name EQ a~agr_name AND c~type EQ a~type AND c~tcode EQ a~tcode WHERE a~agr_name IN s_devcl OR l~devclass IN s_devcl. IF sy-subrc EQ 0. SORT lt_table4 ASCENDING BY agr_name type tcode langu. CLEAR: ls_quantity, ls_quantity_new. LOOP AT lt_table4 ASSIGNING . ls_quantity_new-obj_name = -agr_name. CONCATENATE 'TYPE =' -type '| TCODE =' -tcode INTO ls_quantity_new-su2_name SEPARATED BY space. IF ls_quantity-obj_name NE ls_quantity_new-obj_name OR ls_quantity-su2_name NE ls_quantity_new-su2_name. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #7' sy-subrc. ENDIF. ENDIF. CLEAR ls_quantity. ENDIF. CASE -langu. WHEN 'E'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_TCDTXT'. CONCATENATE 'TYPE =' -type '| TCODE =' -tcode INTO ls_quantity-su2_name SEPARATED BY space. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_en = -langu. ls_quantity-stext_en = -text. WHEN 'D'. ls_quantity-object = 'ACGR'. ls_quantity-obj_name = -agr_name. ls_quantity-sub_name = 'AGR_TCDTXT'. CONCATENATE 'TYPE =' -type '| TCODE =' -tcode INTO ls_quantity-su2_name SEPARATED BY space. ls_quantity-tfill = 1. ls_quantity-tabix = 1. ls_quantity-langu_de = -langu. ls_quantity-stext_de = -text. WHEN OTHERS. CONTINUE. ENDCASE. ENDLOOP. UNASSIGN . CLEAR lt_table4[]. IF ls_quantity IS NOT INITIAL. COLLECT ls_quantity INTO lt_quantity. IF sy-subrc NE 0. MESSAGE e252(s#) WITH 'Unexpected error:' 'ACGR - COLLECT' 'LT_QUANTITY #8' sy-subrc. ENDIF. ENDIF. ENDIF. IF lt_quantity[] IS NOT INITIAL. APPEND LINES OF lt_quantity TO ct_quantity. ENDIF. FREE: lt_table1[], lt_table2[], lt_table3[], lt_table4[], lt_quantity[]. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ENDFORM. " CHECK_TEXTS_ACGR *&---------------------------------------------------------------------* *& Form EVENT_ON_DOUBLE_CLICK *&---------------------------------------------------------------------* * Process event ON_DOUBLE_CLICK and display selected class. *----------------------------------------------------------------------* * -->IV_ROW selected row within ALV grid table * -->IV_FIELD selected column (field name) within ALV grid table *----------------------------------------------------------------------* FORM event_on_double_click USING VALUE(iv_row) TYPE i VALUE(iv_field) TYPE lvc_fname. DATA: lt_e071 TYPE STANDARD TABLE OF e071 WITH DEFAULT KEY, lt_rfc_spagpa TYPE STANDARD TABLE OF rfc_spagpa WITH DEFAULT KEY, ls_e071 LIKE LINE OF lt_e071, ls_rfc_spagpa LIKE LINE OF lt_rfc_spagpa, ls_agr_lsd TYPE agr_lsd, ls_tadir TYPE tadir, ls_quantity LIKE LINE OF gt_quantity, lv_s_lang TYPE lxeisolang, lv_t_lang TYPE lxeisolang, lv_docu_id TYPE dokhl-id, lv_docu_langu TYPE dokhl-langu, lv_docu_object TYPE dokhl-object, lv_agr_name TYPE agr_name. READ TABLE gt_quantity INTO ls_quantity INDEX iv_row. IF sy-subrc EQ 0. CASE iv_field. WHEN 'OBJECT'. CASE ls_quantity-object. WHEN 'ACGR'. lv_agr_name = ls_quantity-obj_name. CALL FUNCTION 'PRGN_SHOW_EDIT_AGR' EXPORTING agr_name = lv_agr_name mode = 'A' * SCREEN = '1' * SICHT = ' ' * START_POS = EXCEPTIONS agr_not_found = 1 OTHERS = 2. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Call of function module' 'VIEWCLUSTER_MAINTENANCE_CALL' 'returned with error code' sy-subrc. RETURN. ENDIF. ENDIF. WHEN 'DOK'. lv_docu_id = ls_quantity-obj_name. lv_docu_object = ls_quantity-sub_name. IF ls_quantity-langu_en IS NOT INITIAL. lv_docu_langu = ls_quantity-langu_en. ELSEIF ls_quantity-langu_de IS NOT INITIAL. lv_docu_langu = ls_quantity-langu_de. ELSE. lv_docu_langu = sy-langu. ENDIF. *--- call document editor in display mode CALL FUNCTION 'DOCU_CALL' EXPORTING displ = 'X' displ_mode = '1' id = lv_docu_id langu = lv_docu_langu object = lv_docu_object EXCEPTIONS wrong_name = 1 OTHERS = 2. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Document could not be displayed, try SE61:' ls_quantity-object ls_quantity-obj_name space. ENDIF. ENDIF. WHEN 'SDAT'. CALL FUNCTION 'ABAP4_CALL_TRANSACTION' EXPORTING tcode = 'SLG0' * SKIP_SCREEN = ' ' * MODE_VAL = 'A' * UPDATE_VAL = 'A' * IMPORTING * SUBRC = * TABLES * USING_TAB = * SPAGPA_TAB = * MESS_TAB = EXCEPTIONS call_transaction_denied = 1 tcode_invalid = 2 OTHERS = 3. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Try to execute transaction' 'SLG0' 'manually' space. ENDIF. ENDIF. WHEN 'SSFO'. CLEAR: lt_rfc_spagpa[], ls_rfc_spagpa. ls_rfc_spagpa-parid = 'SSFNAME'. ls_rfc_spagpa-parval = ls_quantity-obj_name. INSERT ls_rfc_spagpa INTO TABLE lt_rfc_spagpa. IF sy-subrc EQ 0. CALL FUNCTION 'ABAP4_CALL_TRANSACTION' EXPORTING tcode = 'SMARTFORMS' * SKIP_SCREEN = ' ' * MODE_VAL = 'A' * UPDATE_VAL = 'A' * IMPORTING * SUBRC = TABLES * USING_TAB = spagpa_tab = lt_rfc_spagpa[] * MESS_TAB = EXCEPTIONS call_transaction_denied = 1 tcode_invalid = 2 OTHERS = 3. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Try to execute transaction' 'SMARTFORMS' 'manually' space. ENDIF. ENDIF. ENDIF. WHEN 'VCLS'. CLEAR: lt_rfc_spagpa[], ls_rfc_spagpa. ls_rfc_spagpa-parid = 'DVI'. ls_rfc_spagpa-parval = ls_quantity-obj_name. INSERT ls_rfc_spagpa INTO TABLE lt_rfc_spagpa. IF sy-subrc EQ 0. CALL FUNCTION 'ABAP4_CALL_TRANSACTION' EXPORTING tcode = 'SE54' * SKIP_SCREEN = ' ' * MODE_VAL = 'A' * UPDATE_VAL = 'A' * IMPORTING * SUBRC = TABLES * USING_TAB = spagpa_tab = lt_rfc_spagpa[] * MESS_TAB = EXCEPTIONS call_transaction_denied = 1 tcode_invalid = 2 OTHERS = 3. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Call of function module' 'VIEWCLUSTER_MAINTENANCE_CALL' 'returned with error code' sy-subrc. RETURN. ENDIF. ENDIF. ENDIF. WHEN OTHERS. CALL FUNCTION 'RS_TOOL_ACCESS' EXPORTING operation = 'SHOW' object_name = ls_quantity-obj_name object_type = ls_quantity-object EXCEPTIONS not_executed = 1 invalid_object_type = 2 OTHERS = 3. IF sy-subrc NE 0. IF sy-msgty IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Not supported object type' ls_quantity-object 'object name' ls_quantity-obj_name. ENDIF. ENDIF. ENDCASE. WHEN OTHERS. IF ls_quantity-object EQ 'DOK'. IF ls_quantity-obj_name EQ 'RE'. *--- sonderlocke: report documentation ls_quantity-object = 'PROG'. ls_quantity-obj_name = ls_quantity-sub_name. ELSE. lv_docu_id = ls_quantity-obj_name. lv_docu_object = ls_quantity-sub_name. CALL FUNCTION 'DOCU_CALL_FOR_TRANSLATION' EXPORTING * DISPL = ' ' from_langu = 'E' id = lv_docu_id object = lv_docu_object to_langu = 'D' typ = 'E'. RETURN. ENDIF. ELSEIF ( ls_quantity-object EQ 'PROG' ) AND ( ls_quantity-obj_name CP 'SAPL*' OR ls_quantity-obj_name CP '/*/SAPL*' ). *--- sonderlocke: documentation funktionsgruppe ls_quantity-object = 'FUGR'. REPLACE FIRST OCCURRENCE OF 'SAPL' IN ls_quantity-obj_name WITH '' IN CHARACTER MODE. ENDIF. CLEAR: lt_e071[], ls_e071. ls_e071-trkorr = 'D60K900000'. ls_e071-as4pos = 1. ls_e071-pgmid = 'R3TR'. ls_e071-object = ls_quantity-object. ls_e071-obj_name = ls_quantity-obj_name. INSERT ls_e071 INTO TABLE lt_e071. CLEAR: lv_s_lang, lv_t_lang. *--- ensure you call SE63 with correct master language otherwise you risk loss of texts!!!! CASE ls_quantity-object. WHEN 'ACGR'. SELECT SINGLE * INTO ls_agr_lsd FROM agr_lsd WHERE agr_name EQ ls_quantity-obj_name. IF sy-subrc EQ 0. CASE ls_agr_lsd-langu. WHEN 'D'. lv_s_lang = 'deDE'. lv_t_lang = 'enUS'. WHEN 'E'. lv_s_lang = 'enUS'. lv_t_lang = 'deDE'. WHEN OTHERS. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Original language in repository objects' 'is not E(nglish) or D(eutsch) but' ls_tadir-masterlang space. RETURN. ENDCASE. ENDIF. WHEN OTHERS. SELECT SINGLE * INTO ls_tadir FROM tadir WHERE pgmid EQ 'R3TR' AND object EQ ls_quantity-object AND obj_name EQ ls_quantity-obj_name. IF sy-subrc EQ 0. CASE ls_tadir-masterlang. WHEN 'D'. lv_s_lang = 'deDE'. lv_t_lang = 'enUS'. WHEN 'E'. lv_s_lang = 'enUS'. lv_t_lang = 'deDE'. WHEN OTHERS. MESSAGE s252(s#) DISPLAY LIKE 'E' WITH 'Original language in repository objects' 'is not E(nglish) or D(eutsch) but' ls_tadir-masterlang space. RETURN. ENDCASE. ENDIF. ENDCASE. IF lv_s_lang IS NOT INITIAL AND lv_t_lang IS NOT INITIAL. *--- ensure you call SE63 with correct master language otherwise you risk loss of texts!!!! CALL FUNCTION 'LXE_OBJ_CALL_WL_WITH_TP_OBJ' EXPORTING s_lang = lv_s_lang t_lang = lv_t_lang * DO_EVAL = '' TABLES lt_e071 = lt_e071[]. * LT_E071K = ENDIF. ENDCASE. ENDIF. ENDFORM. " EVENT_ON_DOUBLE_CLICK *--- The End!