Change TCode Language Without
Logout
*&---------------------------------------------------------------------* *& Report ZCHANGE_LANGUAGE *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zcall_language. *>>> Deklaration DATA: gt_instlang TYPE TABLE OF t002t. FIELD-SYMBOLS: <gs_instlang> TYPE t002t. *>>> Selektionscreen PARAMETERS: p_spras LIKE tcp0c-langu DEFAULT 'EN', p_tcode TYPE tcode OBLIGATORY. *********************************************************************** START-OF-SELECTION. *********************************************************************** * Lesen der installierten Sprachen CALL FUNCTION 'PROFILE_LANGUAGE_GET_INFO' TABLES instlang = gt_instlang EXCEPTIONS instlang_entries_not_found = 1 syslang_entry_not_found = 2 OTHERS = 3. IF sy-subrc <> 0. MESSAGE i372(pu). "Fehler beim Ermitteln der installierten Sprachen EXIT. ENDIF. READ TABLE gt_instlang ASSIGNING <gs_instlang> WITH KEY sprsl = p_spras. IF sy-subrc <> 0. MESSAGE i091(pf) WITH p_spras. "Language & is not installed EXIT. ENDIF. SET LOCALE LANGUAGE p_spras. CALL FUNCTION 'ABAP4_CALL_TRANSACTION' DESTINATION 'NONE' EXPORTING tcode = p_tcode EXCEPTIONS call_transaction_denied = 1 tcode_invalid = 2 OTHERS = 3. IF sy-subrc <> 0. CASE sy-subrc. WHEN '1'. MESSAGE i077(s#) WITH p_tcode. "You are not authorized to use transaction & WHEN '2'. MESSAGE i343(s#) WITH p_tcode. "Transaction & does not exist WHEN '3'. MESSAGE i127(00). "This function is not possible ENDCASE. ENDIF.Get help for your ABAP problems Do you have a ABAP Question? ABAP Books
More ABAP Tips
SAP Basis, ABAP Programming and Other IMG Stuff http://www.erpgreat.com All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|