cancel
Showing results for 
Search instead for 
Did you mean: 

scripts

Former Member
0 Kudos

Hi to all,

I have developped a script in 'en' language now i need the same form in 'de' as well as 'fr'.for this i used the if condition in the 'en' form.

i.e if sy-lang = 'en'

......

elseif sy-lang = 'de'

endif.

i wrote this in command editor of the form.but when iam testing it iam unable to see any text.but iam not able to see any text or values.(i applied this code for only one perticular window i.e subtotal window in my form).

please help me out.....urgent

thanks and regards,

lokanadhan.k

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi there,,

how are you maintaining forms in different languages,,

Do you have seperate form for each language...if so,, then you would be required to call the appropriate form from the driver program depending upon the logon language..

if you are using the same form with different languages and depending upon the logon language you want to call the appropriate text.

then following is the sample code

say you have an window called "Header"

there you want to display text called "Purchase Order"

/: CASE &SY-LANGU&

/: WHEN 'ES'

H1 ,,<B2>PEDIDO DE COMPRA</>

T1 ,,<B2>PEDIDO REF: </><B2>&EKKO-EBELN&</>

/: WHEN 'EN'

H1 ,,<B2>Purchase Order</>

T1 ,,<B2>Order Ref :</><B2>&EKKO-EBELN&</>

/: ENDCASE

where ES is the Spanish and EN is english..

H1 and T1 are the paragraph formats.

if found helpful, don't forget to reward points.

if you need further information,, please let me know how you are maintaining forms in different languages, did you translate them using tcode se63, se76.

Thanks-

Rahul

Former Member
0 Kudos

Hi,

I am doing this form in different languages with different languagiage log in se71.In my script i have 7 windows, did u mean to say that for each and every window i have to write a logic,to get trigger in different languges.please provide me the help..

Thanks and Regards,

Loki

Former Member
0 Kudos

Hi Loki,

You are not required to write the logic for each window in each language. Once you copy the form in another language, just make sure that while calling the form you use sy-langu so that correct form will get call. No need to handle anything else.

Regards,

Atish

rahulkavuri
Active Contributor
0 Kudos

hi

Do this independently of one another..

Open your script in say GERMAN Language and start editing the windows you want

Depending on the logon language the Script will automatically select the required form..

If you want to call the script in German even though your logon language is English then change the code like this...

CAPS for language or may be the sy-lang should have only single value 'E' or 'D'... ( its single character when it comes to the case of smartforms not so sure of scripts )

Try the below code..

i.e if sy-lang CS 'E'
......

elseif sy-lang CS 'D'

endif.