Professional Documents
Culture Documents
com/2009/07/05/pritty-
report-vs-pritty-printer/
0
I was under the assumption that each time I use the following statement during the
runtime of an ABAP report, the text-symbols from the respective language would be
used from there on out (if they were translated accordingly):
Philip Allgaier
2,3071843
add a comment
2 Answers
active oldest votes
0
Probably, it worths to use CL_GUI_TIMER to refresh the screen after you switched
language. You can check it with SAP_TIMER_DEMO program.
share improve this answer |
Mike B.
5,055145888
I am failing to see how a timer is connected to my problem. Can you please elaborate. The timer does
not refresh the screen but simply executes logic after a given interval. – Philip Allgaier Jan 29 '15 at
10:15
I mean, to execute the report reloading when the event FINISHED will occur. Example of report auto-
refreshing: sapdev.co.uk/reporting/rep_autorefresh.htm – Mike B. Jan 29 '15 at 12:11
add a comment
0
I just found the solution: There is none, since there is none needed.
SAP is not caching the language-dependent text symbols. You can at any point in the
execution change the runtime language via:
HOME
PRIVACY POLICY
FOR DUMMIES
TUTORIALS
TIPS & TRICKS
SAMPLE CODES
SAP NEWS
Adding SE63 Translation To A Transport Request
(TR)
You are here:
1. Home
2. ABAP
March 24, 2014ABAP, TutorialsBy ABAPCOOKBOOK EDITOR
Former Member
March 1, 2006 14 minute read
This is about a simple ABAP Utility . It will post ABAP object’s documentation to Google, for the
purpose of displaying translated text in your logon language or in English.
You can also use this weblog for extending workbench functionality.
The Problem :
Not sure if you’ve faced this problem but I found that quite a few of the function modules are not
provided with English documentation – however documentation in German does exist for most of
these.
Actually I made the problem afterwards. Frankly speaking, I didn’t write this utility because I wanted
to solve any problem. It was just for the fun !!
[ Now where is the fun part? – keep on reading, it’s in The End 🙂 ]
Benefits :
1.
2.
When no documentation exist at all then you can be sure about that immediately.
Processing :
You can run the report program directly from SE38 as well . But it will be good if you can embed the
functionality in ABAP Workbench itself .
Implementation for BADI WB_PROCESS_FCODE -Method DISPATCH
method IF_EX_WB_PROCESS_FCODE~DISPATCH .
Data : lv_OBJECT type DOKHL-OBJECT.
Data : lv_obj_id type DOKHL-ID.
data : lv_langp type char5.
data : lv_typ type c.
data : lt_dokil type standard table of dokil.
data : wa_dokil type dokil.
*P_OK_CODE
Check P_OK_CODE eq ‘WB_DOCUMENTATION’.
break-point.
IF sy-tcode eq ‘SE37’.
get parameter id ‘LIB’ field lv_OBJECT.
lv_obj_id = ‘FU’.
lv_typ = ‘T’.
ELSEIF sy-tcode eq ‘SE38’.
get parameter id ‘RID’ field lv_OBJECT.
lv_obj_id = ‘RE’.
lv_typ = ‘E’.
ELSE.
ENDIF.
select *
into table lt_dokil
from DOKIL
where ID eq lv_obj_id
and OBJECT eq lv_OBJECT
and TYP eq lv_typ.
check sy-subrc eq 0.
check sy-subrc ne 0.
if sy-subrc eq 0 .
else.
Get German and translate to English.
lv_langp = ‘de|en’.
endif.
endmethod.
Program Z_RMTIWARI_ABAP_DOC_TRANSLATOR :
The program accepts inputs for the function module name & the language pair in. It simply gets the
available documentation of the object and then generates the HTML code for Google translation
FORM. The HTML Page gets downloaded to ‘C:\Temp’ folder on your PC and subsequently called by
the program in your default browser.
REPORT Z_RMTIWARI_ABAP_DOC_TRANSLATOR .
—-
—-
—-
—-
This utility will accept ABAP documentation objects and will submit
the text to google in order to translate it from one language to
other.
This utility is useful for translating the function module and other
ABAP Object’s documenations from German to English, in case it is
only available in German.
You can also translate the documentation from english to any other
(available) language,in case, for you, English is as good as German.
*—-
*—-
SELECTION SCREEN
*—-
Data declaration
—-
—-
lt_valuetab-P_LANGP = ‘de|en’.
lt_valuetab-DESC = ‘German to English’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘de|fr’.
lt_valuetab-DESC = ‘German to French’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|de’.
lt_valuetab-DESC = ‘English to German’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|es’.
lt_valuetab-DESC = ‘English to Spanish’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|fr’.
lt_valuetab-DESC = ‘English to French’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|it’.
lt_valuetab-DESC = ‘English to Italian’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|pt’.
lt_valuetab-DESC = ‘English to Portuguese’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|ja’.
lt_valuetab-DESC = ‘English to Japanese BETA’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|ko’.
lt_valuetab-DESC = ‘English to Korean BETA’.
APPEND lt_valuetab.
lt_valuetab-P_LANGP = ‘en|cn’.
lt_valuetab-DESC = ‘English to Chinese(Simplified) BETA’.
APPEND lt_valuetab.
…
ENDIF.
START-OF-SELECTION.
P_LANGU = P_LANGP(1).
EXTEND_EXCEPT =‘‘
ID = P_ID
LANGU = P_LANGU
OBJECT = P_OBJECT
TYP = ‘E’
VERSION =0
VERSION_ACTIVE_OR_LAST = ‘L’
PRINT_PARAM_GET = ‘X’
IMPORTING
DOKSTATE =
DOKTITLE =
HEAD =
DOKTYP =
TABLES
LINE = lt_doc_text
EXCEPTIONS
NO_DOCU_ON_SCREEN =1
NO_DOCU_SELF_DEF =2
NO_DOCU_TEMP =3
RET_CODE =4
OTHERS =5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
END-OF-SELECTION.
&—-
*& Form prepare_file_name
&—-
text
—-
–>x_directory text
–>x_program_name text
–>y_file_name text
—-
ENDFORM. ” prepare_file_name
&—-
text
—-
–> p1 text
<– p2 text
—-
IF sy-batch EQ ‘X’.
MESSAGE e001(AQ) WITH
‘This program cannot be executed in background’.
ELSE.
Status of download
CASE sy-subrc.
WHEN 0.
MESSAGE I002(AQ) WITH
‘HTML page downloaded as ‘ x_outfile.
WHEN OTHERS.
ENDFORM. ” download_html_file_on_pc
&—-
text
—-
–>P_GT_REP_TABLE text
–>P_GT_HTML text
—-
FORM convert_doc_to_html TABLES xt_REP_TABLE structure TLINE
yt_HTML.
DEFINE add_html.
yt_html = &1.
APPEND yt_html.
END-OF-DEFINITION.
add_html ‘‘
into lv_langp_html.
endif.
‘.
add_html ‘‘.
add_html ‘‘.
add_html ‘‘.
add_html ‘
‘.
add_html ‘</BODY>’.
add_html ‘</HTML>’.
ENDFORM. ” convert_code_to_html
&—-
*& Form show_html_file
&—-
text
—-
–>X_FILE_NAME text
—-
lv_url = x_file_name.
CALL FUNCTION ‘CALL_BROWSER’
EXPORTING
URL = lv_url.
ENDFORM. ” show_html_file
The Result:
For example : You can open a function module say ABAP_DOCU_SHOW using transaction SE37 .
Further click on Menu Function .
Since the BADI is implemented for function code ‘documentation’, the utility will be called and
Google translated text from German to English will be shown in your default browser.
Also there seems to be some problem with the google translation and it does not respect end-of-
sentence or line-breaks http://www.worldlingo.com/ could have done better . That makes the
translated text look like some kind of garbage. Also, there seems to be some encoding related issue.
But that should not be very difficult to resolve.
</P>
Alert Moderator
Assigned tags
Retagging required
rammanohar tiwari
Related Questions
We are sorry but we are currently unable to retrieve related content.
6 Comments
You must be Logged on to comment or reply to a post.
Eddy De Clercq
Hi,
I wondered why you don’t use simplier methods like the one described in
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/web
as/abap/just%20browsi
ng%20Around.article
I’m not saying that my code is better (in the contrary), but using the local machine as in
between stage could result in unwanted problems with the browser (see the multitude of
forum threads on the call_browser) or the file system (e.g. Tivoli managed PCs).
If the SAP server act as client you don’t need to worry about that anymore.
Eddy
o Like(0)
o
Former Member Post author
Hi Eddy,
But
1. cl_http_client is only available from 4.7 onwards at least I could not find it on the
4.6C version to which I’ve the access.
2. In order to make that work, we might well have to first configure the proxies or
firewalls, which does not actually belong to the expertise domain of ABAP
developers.
3. Ultimately, Google result has to be shown in a browser [ as whatever that was
called was not an API / web-service ]..unless you want to go for
pattern match and then get the text
Like(0)
Former Member
Ram,
I think it’s high time you download the NW04s preview edition which is here
on SDN and move on from your 610 you are missing out on
SOOOOOOOOOOOOOOOO much.
Besides configuring the proxy is nothing and most times it’s already done by
your Basis guys for many reasons.
Like(0)
Former Member
I hope you’re not serious about using such a translation service for other reasons then for
making yourself a joke about it.
It’s not only those technical problems of line breaking or UTF characters, it just makes
almost no sense with respect to the very content.
please don’t you ever trust in this. but I am sure you were just doing this for the fun of it :-))
regards,
anton
o Like(0)
Like(0)
Former Member
Wow – I was looking around for some post to consume a webservice from ABAP while
avoiding PI. AND WebAS AND Java. Plus I have no experience with this. PI Proxy bring it
on. That’s easy.
Anyway – I came across your post. I’m glad you got a record number of responses! I’m glad
they are pointing people like me in the right direction. I am disappointed you didn’t get any
positive comments.
So years later, and a dollar short. Thank you for the post! The responses and the blog have
helped me out. I’m glad you were exploring different parts of SAP, and figuring out how
they work.
I’m looking forward to reading your newer posts!
Introduction:
Translations into different languages for Transactions texts that are created through Tcode se93
Step 1:
Go to Transaction SE63.
Step 2:
Go to menu bar
Step 3:
Step 4:
Step 5:
Using Tcode SE93, created Transaction ZTEST_TRANS for a program as shown below
Step 6:
Enter the name of Transaction code and to which language that you want to translate.
Here I given the transaction code as “ZTEST_TRANS “and translation from English (EN) to German (DE).
Choose Edit button.
Step 7:
Step 8:
Give translation text in German for the Transaction text of English language.
And choose save button.
Home
All Posts
Tutorials
ABAP
Ariba
APIs in SAP
BI/BW
Code Snippets
Fiori
HANA
OOPs ABAP
Personas
S/4HANA
SAP Hybris
SAPUI5
CDS
UI5
Fiori
OData
HANA ABAP
S/4HANA
HANA Admin
Forums
YouTube Channel
Amazon
Discussion Forums
Privacy Policy
Extra
SAP Quiz
Books
Jobs
Find
Apply
V-Courses
Help Us
Sign in
your username
your password
Sign up
your email
your username
Password recovery
your email
Top of Form
Search
Bottom of Form
Sign in / Join
miniSAP
About Us
Authors
Contact Us
Star Contributors
EARN
Jobs
Forums
Discussion Forums
Privacy Policy
Amazon
FREE Trainings
Donate
SAP Access
Sign in
your username
your password
Create an account
Create an account
your email
your username
Password recovery
your email
Home
All Posts
Tutorials
ABAP
Ariba
APIs in SAP
BI/BW
Business Work Flow
Code Snippets
Fiori
HANA
OOPs ABAP
Personas
S/4HANA
SAP Hybris
SAPUI5
Vistex
CDS
UI5
Fiori
OData
HANA ABAP
S/4HANA
HANA Admin
Forums
YouTube Channel
Amazon
Discussion Forums
Privacy Policy
Extra
SAP Quiz
Books
Jobs
Find
Apply
V-Courses
Help Us
Top of Form
Search
Bottom of Form
Home ABAP 4 Smart Steps to Avoid Junk Characters using SAP Language Translation Approach
ABAP
Form
Tweaks
4 Smart Steps to Avoid Junk Characters using SAP Language Translation Approach
By
Sumit Naik
-
October 23, 2018
Share on Facebook
Tweet on Twitter
SAP Language Translation has been there since the birth of SAP. If you are in a project with Global
Roll Outs, you must have faced the issue of Language and Translation. In the mid 2000 era, I was
working for a USA client who were rolling out for South America and Asia. The USA release was
perfect but we had to put major effort for Language and Currency conversions for other
geographies.
Application developers (read ABAPer) often get junk character issue during Form Translations in roll
out engagements. Though Language Translation activity is one of the basic requirements in SAP
Forms (SmartScript, SmartForm or Adobe), at times if can consume high efforts to troubleshoot junk
character issues, and stress the developers and the team to great extend, if not approached
diligently.
Also Read : Free Video Tutorials on HANA, OData and ABAP 7.40
We have followed the simple below strategy for smooth Translation Activity for localize
requirement. You might use it as a guide for your project needs.
If you are in a team who are performing the language translation activity, do not neglect the below
two points:
For instance, we need to use JPMINCHO for language Japanese. Similarly for Chinese language, we
should use CNSONG or CNHEI.
Having said that, the million dollar question is, how do we really identify the correct font and device
type that should be used?
Do not worry. We are here to help you. Adopt the below simple procedures and you would never
see those unwanted characters in your output forms.
Hands on Exercise
For our understanding we would pick Chinese Language for Translation. We know that for Simplified
Chinese, ‘ZH’ is the SAP language code.
If you want to know the Language Keys or SAP Language Code, then go to table T002.
Coming back to the exercise, we would see how we can Translate a simple Purchase Order Texts
from English to Chinese.
Below steps would help us identify the correct Font and Device Type which in turn would help us
address the Language Translation requirement.
A language translation template should be prepared to collate the localize language (Chinese (ZH)
for our example) from the business/end/super users.
Identifying the correct font that should be used for the Purchase Order Form is our next step.
Go to t-code SE71, give the SAPScript name, for PO case it is MEDRUCK and Language as ‘ZH’. Select
the Paragraph Formats and hit display.
Click the Font to get the Chinese Font name. Check the font is CNHEI. We need to leverage the same
for our business case.
For some of us, it might look like below.
Now we need to analyse and figure out the correct device type which would support the Chinese
font CNHEI identified above.
The SAPscript Printer Fonts table TFO03 comes to our rescue. Provide the font identified (CNHEI) in
above step and get the correct Device Type. It has one to many relationship. Based on the fonts,
character per inch, bold, italics etc choose the most appropriate one for your landscape.
Step 4: Identify the correct Printer for the Device Type
The Spool Printer declaration table TSP03 has the information. Provide the device type CNHPLJ4 and
it would provide you the correct Printer.
That’s it. Follow the above 4 steps and have a smooth Translation and Printing activity. This is my
first article at SAPYard. Please do provide your genuine feedback. It would help me for my next
article.
Download Telegram App in your mobile and join the most active SAP Technical Discussion Group
where we have dedicated members (2580+) from 6 continents.
Log On
o Edit My Profile
o Account Settings
o Notifications
o Followed Activities
Logout
Home
Community
Archives
Discussions Archive
ABAP Development
Ask a Question
Write a Blog Post
Login / Sign-up
o Send a Message
o Manage My Blog Posts
o Quick Start Guide
Hi Gurus,
I have a table with entries. I want to translate the table entries into different language.
for that i entered as
SM30--> Goto --> Translation. But inthis position its Greyed out. Can anyone tell where can i
change translation for my description of entries.
Mohana
Tags:
abap
Former Member
November 11, 2008 at 09:32 AM
0 Likes
Correct Answer
hello Vijayan ,
All the above solutions are to translate the elements in table but not table entries ,
For this you have to create a Text table , like suppose you have a table ZTAB , Create another
table with the same fields and also one extra field language ( SPRAS ) .
if your table is already used in many places then better create a new text table for that , or else
modify the existing table by adding a field ( SPRAS ) .
for example consider TSTC - SAP Transaction Codes
TSTCT - Transaction Code Texts ( this is text table ).
To create text table , in change mode select a primary key and press foreign key button a new
pop screen appears in tht give the check table name (text table ) and select radio button 'key
fields of text table'.
hope it might be helpful,
Regards ,
Aby
1 Likes 1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question
8 replies
Hi,
You go to se11
Go To --> Transalation --> it will help you to write the language of transaction.
Thanks & Regards
0 likes
Former Member replied
November 11, 2008 at 08:06 AM
Hi,
u can do the translation from one language to another using SE11 ..
goto -> translation ........
Regards
Renu
0 likes
Hi
If i enters SE11--> Translation. It not for table entries na. It for table only. But i want translate my
table entries.
pls guide.
Mohana
0 likes
The translation option is disabled for a reason. Most likely because your table is not translatable,
i.e. it does not contain a key field of data type LANG (language).
You will have to include such a field in your table and re-generate the maintenance dialog, then
try again.
Thomas
0 likes
Hi Mohan,
Copy Code
Correct Answer
hello Vijayan ,
All the above solutions are to translate the elements in table but not table entries ,
For this you have to create a Text table , like suppose you have a table ZTAB , Create another
table with the same fields and also one extra field language ( SPRAS ) .
if your table is already used in many places then better create a new text table for that , or else
modify the existing table by adding a field ( SPRAS ) .
for example consider TSTC - SAP Transaction Codes
TSTCT - Transaction Code Texts ( this is text table ).
To create text table , in change mode select a primary key and press foreign key button a new
pop screen appears in tht give the check table name (text table ) and select radio button 'key
fields of text table'.
hope it might be helpful,
Regards ,
Aby
1
Summary:
This white paper gives you the step by step procedure to translate the Smart Form from one language to another
language (Language Translation) easily.
Author(s):
Company: Larsen and Toubro Infotech Ltd.
Created on: Date 9/15/2010
Author(s) Bio
SAP ABAP consultant with around 1 year of experience in Smart Forms, SAP scripts, Enhancements, Module Pool,
Reports.
1. Go to transaction 'SE63'.
3. Click on 'FS forms and Styles' and select 'SSF SAP Smart form'.
4. Then enter the smart form name in the object name text field.
5. Select the source language as English and the target language as the language u want to convert. (In our ex.
Portuguese)
6. Click edit.
Related Content:
SAP Smart form language translation ( Translate smart form from one language to another language).
smartforms
step-by-step-procedure
language-translation
2 Comments
1.
Former Member
good indications. But for my is little bit confusing when don't have the same number of text betwen original language
and destination language
o Jun 22, 2016
2.
Patrick Fichtner
Hi Jose Antonio,
that's why normally you first copy the whole source into the new language, and then start the translation. (via copy-icon
or edit→copy source text).
Un saludo
Patrick
o Feb 10, 2017
Log On
o Edit My Profile
o Account Settings
o Notifications
o Followed Activities
Logout
Home
Community
Blogs
Ask a Question
Write a Blog Post
Login / Sign-up
o Send a Message
o Manage My Blog Posts
o Quick Start Guide
Gaurang Gujar
January 25, 20133 minute read
Applies to:
SAP NetWeaver 2004s, mySAP ERP 2005
Created on:
22-01-2013
Author:
Summary:
Many of the MNC’s require SAP implementation all over the globe involving a lot of custom objects and
custom text. It is a tedious task to translate this text manually where lot of hours are burnt for the same
and moreover the translation may still have some human related translation typo errors, which will
require more efforts to be put in to correct it .
Purpose:
The tool developed increases the efficiency of language translation objects as it helps in avoiding human
errors. This tool also does the translation for Reports, Function groups, Includes in seconds. This tool not
only saves time for translation but also helps in reviewing the translation done with an additional Excel
tool.
Traditional method of LT
In most of the cases the Language translation for various Custom Texts is made available in Excel
worksheet.
Find the Text in source language and enter the corresponding translation from Excel Worksheet in as
shown below.
LT by using this tool
The tool is made considering the most common input and output medium used for translation to be Excel
worksheet. The Text Types and Translation are Read from Excel using an ABAP Program and Insert this
translation into the Text Pool of the Program Specified in the Selection Screen of the Tool. This tool can be
used for Uploading and Reviewing the Translation.
Section 1
Section 2
This code will export the current language translation in Excel file mentioned in the above selection
screen.
The 2 Excel file (Source and Review) can be compared using another Excel based tool
Excel based Form Is to be provided with both(Source and review) Excel file details:
2) Sheet Name
Future Scope
This methodology is currently capable of doing automatic language translation for Reports, Includes,
Programs and Function Groups. This Tool with additional changes can be used for language translation
of almost all SAP objects like Smart forms , Adobe Forms, Workflow etc
Related content
http://help.sap.com/saphelp_nw04/helpdata/en/77/5719d2492011d1894a0000e829fbbd/frameset.ht
m