Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sapscript -how to use multiple language ?

Former Member
0 Likes
2,264

hi all,

can we use multiple languages in a script. i mean thet can we print a data from a particular text element

in different languages.

is it possible ?

and also how to handle differnt currencies in sapscript?

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
1,082

Hi,

when you use the syntax INCLUDE in sapscript, you could set the language with the command LANG. Have a look to the SapScript documentation.

Example from the help.sap.com :

/: INCLUDE MYTEXT

The text MYTEXT is included in the language of the calling text.

/: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'

The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call. 

For the currency what is the problem ?

the decimals positions could be manage with the WRITE ... CURRENCY.

the conversion must be made by SAP itsel, but you could use the function CONVERT_TO_LOCAL_CURRENCY.

Rgd

Frédéric

Message was edited by: Frédéric Girod

5 REPLIES 5
Read only

FredericGirod
Active Contributor
0 Likes
1,083

Hi,

when you use the syntax INCLUDE in sapscript, you could set the language with the command LANG. Have a look to the SapScript documentation.

Example from the help.sap.com :

/: INCLUDE MYTEXT

The text MYTEXT is included in the language of the calling text.

/: INCLUDE MYTEXT LANGUAGE 'E' PARAGRAPH 'A1'

The text with the name MYTEXT and the language E is included, regardless of the language of the calling text. The paragraph format A1 will be used as the standard paragraph type for this call. 

For the currency what is the problem ?

the decimals positions could be manage with the WRITE ... CURRENCY.

the conversion must be made by SAP itsel, but you could use the function CONVERT_TO_LOCAL_CURRENCY.

Rgd

Frédéric

Message was edited by: Frédéric Girod

Read only

Former Member
0 Likes
1,082

Hi Vinoth,

You can use multiple languages in a Script,

but while entering description of any particular language you have to log on in the same language .

To print currencies you can move the currency value to a variable.using WRITE <var> to <var1> CURRENCY (USD)or (any other value) and later use this var1 in your sap script.

Regards,

Raghavendra

Read only

Former Member
0 Likes
1,082

Hi,

You can translate your SAPScript to the languages you reuire in :

Adminstrative DATA-Language Attributes-

Translate - To Languages..

Choose yourlang. and translate your script...

Then you can translate text elements in SE63.

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,082

hi

USE <b>SE63 or SE71</b> to create Form in diffent lang.

OR u can use <b>SO10(i.e. standard TExt)</b> . That Standard

Text u have to maitain in diff. lang.

It should be used in SAP script.

U can use currency different country for that purpose u

have to <b>SET Country</b> command.

U can use <b>OY01</b> Tcode.

Regards

vinod

Read only

Former Member
0 Likes
1,082

Hi,

You can use a variable to store the language. If you are using your own print program you can define this variable in it. If the print program is a SAP standard program, you may define this variable in the SAPscript form (SE71).

e.g. define a variable VARLANG like sy-langu.

Assign to this variable the language you want to print to:

VARLANG = NAST-SPRAS.

when calling the include text use:

INCLUDE ZINCLUDE OBJECT TEXT ID ST LANGUAGE &VARLANG& PARAGRAPH PF

If your SAPscript uses a large number of include texts (created from SO10), this is the recommended approach. But if your SAPscript form has texts directly hard-coded (i.e. without use of include texts), I suggest that you should use the SAP translation utility (SE63) to translate your form.

I hope this solves your problem.

Riyaz