cancel
Showing results for 
Search instead for 
Did you mean: 

Printing script in different launguages based on the condition

Former Member
0 Kudos

Hi all,

Can any one provide me overview like how to proceed with printing the script in different languages based on some condition in the driver program.

Appreciate ur answers.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Every one.

Former Member
0 Kudos

Hi,

For printing the script in different languages, you need to have the script in generated i different languages and once you have the script in the languages you need then in Function Modules.

Import parameters you have sy-lang attribute to which we can pass the language we want the script to get open. and execute the text elements. of the FORM in the FM write_form.

For eg:

I have a script in both German and English languages then in the OPEN_FORM i need to pass the language i want the script to get opened.

Here we can pass the value through a variable according to the condition we want.

Regards

Sarves

Former Member
0 Kudos

Hi,

thanks for your answers.

I have a doubt like i need to develop a script in two launguages? even my requirement is similar like urs based on the entries in the driver program i need to either open a german or english one.

Can u please more precise with ur answers?

Thanks in advance

Joe

Former Member
0 Kudos

Hi

is it mandatory to create two scripts in english as well as german??

Thanks

Former Member
0 Kudos

Hi,

Yes it is mandatory to create 2 scripts in both English and German.

Note: If there are any standard texts in the script then even those you need to create in both the languages accordingly as there is no translator available in SAP. So if you are using any standard texts then you need to create them in SO10 in both the languages.

Regards

Sarves

Former Member
0 Kudos

Hi,

I have a serious doubt like instead of creating two scripts we can have the multiple if condition in side the script ie text editor when ever the laungauge plays a role ie header and footer and subheadings.

More to that if i create two scripts for the same output type will it b a problem in assigning it to the same out type..

I hope key conflict will arise.

Please correct me if i am wrong.

Thanks,

Joe

Former Member
0 Kudos

Hi,

As you are trying to assign it to an output type. You can do based on the conditions of the language, in the text editors maintain the if else conditions and according to the language you need, you can fetch the data from the standard texts and display it in the language you want.

or

if you are not using the standard texts maintain the headings in both the languages over there only in the text editor using the control command if else.

Regards

Sarves

Former Member
0 Kudos

Hi.

So finally i dont want to develop two scripts right?

I can go with the single one with the multiple if conitions .

Tnx,

Joe

Former Member
0 Kudos

Hi,

Yes you can go with if else conditions in the scripts text editor where ever you want to display the headings in that particular language

" Example
IF &language& = 'EN'    "Get the language from the driver program and display accordingly
Thankyou
ELSEIF &language& = 'DE'
Danke
ENDIF

Regards

Sarves