I must admit that my Japanese is not so good…..
Then it hits that me !! we do have in the dictionary some languages Japanese included .
Can we use the dictionary also in our print out ?
If we can transfer the Data element texts translation to the form we can.
To the code:
The input is based on tables scarr,spfli .
Class Y_R_EITAN_TEST_31_05_CL will hold the data types that will be transferred to the smartform.
Types tp_meta_x and tp_meta_1 are the carriers of the of the Data element translation .
TYPES: BEGIN OF tp_meta_x . TYPES: ddtext TYPE dd04t-ddtext , reptext TYPE dd04t-reptext , scrtext_s TYPE dd04t-scrtext_s , scrtext_m TYPE dd04t-scrtext_m , scrtext_l TYPE dd04t-scrtext_l . TYPES: END OF tp_meta_x . TYPES BEGIN OF tp_meta_1 . TYPES s_carr_id TYPE tp_meta_x . TYPES s_carrname TYPE tp_meta_x . TYPES s_currcode TYPE tp_meta_x . TYPES s_from_cit TYPE tp_meta_x . TYPES s_fromairp TYPE tp_meta_x . TYPES s_to_city TYPE tp_meta_x . TYPES s_toairp TYPE tp_meta_x . TYPES s_airpname TYPE tp_meta_x . TYPES s_dep_time TYPE tp_meta_x . TYPES s_arr_time TYPE tp_meta_x . TYPES s_distance TYPE tp_meta_x . TYPES s_distid TYPE tp_meta_x . TYPES END OF tp_meta_1 .
Program Y_R_EITAN_TEST_31_05 .
The thing to note in this program is FORM get_meta_1 here we populate st_meta_1 which is type y_r_eitan_test_31_05_cl=>tp_meta_1 .
For each entry we call function ‘DDIF_DTEL_GET’ and fill its tp_meta_x .
Here is what we have at the end of form get_meta_1:
SmartForm Y_R_EITAN_TEST_31_05 .
As expected we have st_meta_1 as import parameter.
The only thing that remain to do is to drag the fields as usual (better then typing ) .
This also apply to the headings of tables.
Exceptions: When we canot use the SAP standard translations the structure can be filled from different text repository (e.g. text symbol, ztables ).
Running the program
The output in different language:
This one is in right to left language (Hebrew) the SAP translation is not complete but we can see that RL applied .
That’s all folks and happy translations.