Code: Alles auswählen.
REPORT ztranslation_tool MESSAGE-ID ztranslation_tool.
"Written by Hovitaga ( https://sta-technologies.com/hovitaga/)
TYPE-POOLS: icon.
SELECTION-SCREEN FUNCTION KEY 1.
SELECTION-SCREEN BEGIN OF BLOCK lang WITH FRAME TITLE text-001. " Language options
PARAMETERS: p_slang TYPE lxeisolang DEFAULT 'enUS' MATCHCODE OBJECT ztranslation_tool_sh_lang,
p_tlang TYPE lxeisolang DEFAULT 'deDE' MATCHCODE OBJECT ztranslation_tool_sh_lang.
SELECTION-SCREEN END OF BLOCK lang.
TABLES: tadir, e071, sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK obj WITH FRAME TITLE text-002. " Object set
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_tadir TYPE flag RADIOBUTTON GROUP sel DEFAULT 'X' USER-COMMAND dummy.
SELECTION-SCREEN COMMENT 3(29) text-010 FOR FIELD p_tadir.
PARAMETERS: p_e071 TYPE flag RADIOBUTTON GROUP sel.
SELECTION-SCREEN COMMENT 40(50) text-011 FOR FIELD p_e071.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: so_pkg FOR tadir-devclass MODIF ID tad,
so_auth FOR tadir-author MODIF ID tad,
so_type FOR tadir-object MODIF ID bot,
so_name FOR tadir-obj_name MODIF ID bot,
so_tr FOR e071-trkorr MODIF ID e07.
SELECTION-SCREEN SKIP.
PARAMETERS: p_env TYPE i.
SELECTION-SCREEN END OF BLOCK obj.
DATA: gt_e071 TYPE TABLE OF e071,
gv_lines TYPE i,
gv_answer TYPE c,
go_docking TYPE REF TO cl_gui_docking_container,
go_image TYPE REF TO cl_gui_picture,
gt_envi_tab TYPE senvi_tab,
gt_envi_tab_sum TYPE senvi_tab,
gv_object_name TYPE tadir-obj_name,
gv_obj_type TYPE euobj-id,
gs_functxt TYPE smp_dyntxt,
gt_selection TYPE TABLE OF rsparams,
gs_selection LIKE LINE OF gt_selection.
FIELD-SYMBOLS: <gs_e071> LIKE LINE OF gt_e071,
<gt_envi> LIKE LINE OF gt_envi_tab.
INITIALIZATION.
gs_functxt-icon_id = icon_transport.
gs_functxt-quickinfo = text-009.
gs_functxt-icon_text = text-009.
sscrfields-functxt_01 = gs_functxt.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 EQ 'TAD' AND p_tadir IS INITIAL.
screen-input = 0. MODIFY SCREEN.
ELSEIF screen-group1 EQ 'E07' AND p_e071 IS INITIAL.
screen-input = 0. MODIFY SCREEN.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'FC01'.
CLEAR gt_selection.
gs_selection-selname = 'ST_USER'.
gs_selection-kind = 'S'.
gs_selection-sign = 'I'.
gs_selection-option = 'EQ'.
gs_selection-low = sy-uname.
APPEND gs_selection TO gt_selection.
gs_selection-selname = 'ST_DATE'.
gs_selection-kind = 'S'.
gs_selection-sign = 'I'.
gs_selection-option = 'EQ'.
gs_selection-low = sy-datum.
APPEND gs_selection TO gt_selection.
gs_selection-selname = 'LANG_ISO'.
gs_selection-kind = 'S'.
gs_selection-sign = 'I'.
gs_selection-option = 'EQ'.
gs_selection-low = p_tlang.
APPEND gs_selection TO gt_selection.
IF p_env IS INITIAL.
gs_selection-selname = 'ST_PACKG'.
gs_selection-kind = 'S'.
LOOP AT so_pkg.
gs_selection-sign = so_pkg-sign.
gs_selection-option = so_pkg-option.
gs_selection-low = so_pkg-low.
gs_selection-high = so_pkg-high.
APPEND gs_selection TO gt_selection.
ENDLOOP.
gs_selection-selname = 'ST_OBJCT'.
gs_selection-kind = 'S'.
LOOP AT so_type.
gs_selection-sign = so_type-sign.
gs_selection-option = so_type-option.
gs_selection-low = so_type-low.
gs_selection-high = so_type-high.
APPEND gs_selection TO gt_selection.
ENDLOOP.
ENDIF.
SUBMIT rs_lxe_record_torder VIA SELECTION-SCREEN
WITH SELECTION-TABLE gt_selection
AND RETURN.
ENDCASE.
START-OF-SELECTION.
CLEAR gv_answer.
IF p_e071 EQ 'X'.
SELECT e071~pgmid e071~object e071~obj_name
FROM e071 INNER JOIN e070 ON e070~trkorr EQ e071~trkorr
INTO CORRESPONDING FIELDS OF TABLE gt_e071
WHERE e071~obj_name IN so_name
AND e071~object IN so_type
AND ( e070~trkorr IN so_tr OR e070~strkorr IN so_tr ).
SORT gt_e071 BY pgmid object obj_name.
DELETE ADJACENT DUPLICATES FROM gt_e071 COMPARING pgmid object obj_name.
ELSEIF p_tadir EQ 'X'.
SELECT pgmid object obj_name
FROM tadir
INTO CORRESPONDING FIELDS OF TABLE gt_e071
WHERE obj_name IN so_name
AND object IN so_type
AND devclass IN so_pkg
AND author IN so_auth.
ENDIF.
IF p_env IS NOT INITIAL.
LOOP AT gt_e071 ASSIGNING <gs_e071>.
gv_obj_type = <gs_e071>-object.
gv_object_name = <gs_e071>-obj_name.
CLEAR gt_envi_tab.
CALL FUNCTION 'REPOSITORY_ENVIRONMENT_ALL'
EXPORTING
obj_type = gv_obj_type
* ENVIRONMENT_TYPES =
object_name = gv_object_name
* PARALLEL_TASK =
deep = p_env
* WITH_MEMORY = ' '
TABLES
environment_tab = gt_envi_tab
* SOURCE_OBJECTS =
.
DELETE gt_envi_tab WHERE object(1) CN 'YZ'. " NOT LIKE 'Z%' or object NOT LIKE 'Y%'.
APPEND LINES OF gt_envi_tab TO gt_envi_tab_sum.
ENDLOOP.
SORT gt_envi_tab_sum BY type object.
DELETE ADJACENT DUPLICATES FROM gt_envi_tab_sum COMPARING type object.
LOOP AT gt_envi_tab_sum ASSIGNING <gt_envi>.
APPEND INITIAL LINE TO gt_e071 ASSIGNING <gs_e071>.
<gs_e071>-pgmid = 'R3TR'.
<gs_e071>-object = <gt_envi>-type.
<gs_e071>-obj_name = <gt_envi>-object.
ENDLOOP.
ENDIF.
DESCRIBE TABLE gt_e071 LINES gv_lines.
IF gv_lines GT 1000.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
titlebar = text-003
text_question = text-004
text_button_1 = text-005
text_button_2 = text-006
default_button = '2'
display_cancel_button = space
IMPORTING
answer = gv_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSEIF gv_lines EQ 0.
MESSAGE s001 DISPLAY LIKE 'E'.
RETURN.
ENDIF.
IF gv_answer IS INITIAL OR gv_answer EQ '1'.
CALL FUNCTION 'LXE_OBJ_CALL_WL_WITH_TP_OBJ'
EXPORTING
s_lang = p_slang
t_lang = p_tlang
do_eval = 'X'
TABLES
lt_e071 = gt_e071.
ENDIF.
Code: Alles auswählen.
001 Language options 16 16
002 Object set 10 10
003 Confirm processing 18 18
004 More than 1000 objects found. Do you want to continue? 54 54
005 Yes 3 3
006 No 2 2
007 Confirm action 14 14
008 Do you want to transport the translations? 42 42
009 Create transport 16 16
010 Based on Repository (TADIR) 27 27
011 Based on Change and Transport System (E071) 43 43
Code: Alles auswählen.
P_E071 ?...
P_ENV Environment depth
P_SLANG Source language
P_TADIR ?...
P_TLANG Target language
SO_AUTH Person Responsible
SO_NAME Object Name
SO_PKG Package
SO_TR Request/Task
SO_TYPE Object Type
Code: Alles auswählen.
000
001 No objects found