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 manage a second language

former_member1161170
Participant
0 Likes
3,025

Hi all.

 

I must get a second kind of “Z*” invoices with German language by Sapscript, but i wish to keep the same message/sapscript.

 

If I modify the same Sapscript in another language, in German, I suppose it can be executed logging in with language DE: is it correct? But If I logged in by Italian language, can I get somehow the German version too? And, least but not last, can i change the logo too?

 

Otherwise, changing method, can I test the WERKS field to output the right logo in the program or in the Sapscript? I know how to test in a normal window ( /:  IF &vbdkl-werks& EQ '....'), but I don't know how to do the same thing in a Graphic.

Thank you for the answers.

Hi all.

 

I must get a second kind of “Z*” invoices with German language by Sapscript, but i wish to keep the same message/sapscript.

 

If I modify the same Sapscript in another language, in German, I suppose it can be executed logging in with language DE: is it correct? But If I logged in by Italian language, can I get somehow the German version too? And, least but not last, can i change the logo too?

 

Otherwise, changing method, can I test the WERKS field to output the right logo in the program or in the Sapscript? I know how to test in a normal window ( /:  IF &vbdkl-werks& EQ '....'), but I don't know how to do the same thing in a Graphic.

Thank you for the answers.

12 REPLIES 12
Read only

Former Member
0 Likes
2,028

Hello Massimiliano,

You just need to translate Sapscript and modify script program (Z program that fills invoice data) to act according to log-on language. SE63 can be used for translation.

Best regards,

Kerim

Read only

0 Likes
2,028

No, I don't want to act according to log-on language. I want to choose the language by werks or by bukrs.

Looking for, I found the parameter language in function module OPEN_FORM.

So, ok: I can manage the language.

But how can I manage the logo?

It's a graphic, a bitmap. It must be changed by the language.

Read only

bernat_loscos
Explorer
0 Likes
2,028

Hi massimiliano,

Developing SAPScript in different languages


You can goto transaction SE63 and translate the scripts into different languages.

In SE63, click Translation -> Long Texts -> Sapscripts -> Forms

Those language you can convert to have already been pre-installed in the system.

SE63 is the best way to translate since it offers check options.

Regards.

Read only

0 Likes
2,028

SE63 doesn't let me change the logo, the graph.

I need to change this one changing language.

Read only

Former Member
0 Likes
2,028

This message was moderated.

Read only

0 Likes
2,028

I read the page.

It would be useful:

> Command in your Sapscript

> /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E

But I'm in 4.6x:

>In 4.6x :-

> 1.  Goto SE71 Change the mode to GRAPHICAL

> 2.  Choose the Graph Tabstrips

> 3.  Now type in some name for the LOGO WINDOW

> 4.  Press the IMPORT BUTTON and then IMPORT the BMP file from your DESKTOP

> 5.  The code will be written automatically. You just need to drag and drop wherever you want

>      the graphics to be.

> Please note that in 4.6c onwards, you can also used Windows Bitmap file ( .BMP).

So, I presume, I need to get a new sapscript/message ...

Read only

enrico_andreoli
Participant
0 Likes
2,028

Ciao Massimiliano,

come hai risolto con la lingua? Sei riuscito a gestirla in base a divisione/società?

Read only

0 Likes
2,028

Yes I do it passing through a "normal" window, not a graphic one.

For example:

/:   IF &WA_ZCMR-BUKRS& = 'TIMBRO1'

/:   BITMAP 'TIMBRO1' OBJECT GRAPHICS ID BMAP TYPE BMON DPI 200

/:   ELSE

/:   BITMAP 'TIMBRO2' OBJECT GRAPHICS ID BMAP TYPE BMON DPI 200

/:   ENDIF

Read only

Former Member
0 Likes
2,028

Hi,

if you designed your script well, the language is held dynamically. Depending on the business-case some forms uses the login language, others uses the language of businesspartner.

so check the language is dynamically read from the right place and every SO10-Text call has no hard Coded EN or DE in it. so for example if you reading the logo dynamically in the driver programm or in the sap-script-formular you should be fine. otherwise you have to change this logics.

the formular itself can be copied to another language.

regards

Stefan Seeburger

Read only

0 Likes
2,028

In our reality, in our context, some employees log in in Italian, others log in in German. But who logs in in Italian works both: with italian invoices and german ones.

The people must not log off and login to change language: I must decide the logo from "werks" or "vkorg".
So I solved with an "if" in sapscript logic passing through a "normal" window, not a graphic one.

Read only

0 Likes
2,028

Hi,

logo is not my problem, that's pretty easy and already managed with an IF clause like yours.

I've explained my problem here in a discussion:

I've translated a SAP SCRIPT (production order - CO02/CO03) from Italian to Serbian using SE76.

I need to print in IT (italian) or in SH (serbian) depending on the WERKS of the production order (1100 -> IT, 2000 -> SH). I can't use system language 'cause users may log on in IT, SH or EN depending on what they prefers.

I read in other discussions about the FM OPEN_FORM; at the moment i have this setup:

call function 'OPEN_FORM'

     exporting

       device   = 'PRINTER'

       dialog   = space

       form     = print_co-forml

       language = print_co-spras

       options  = print_opts

     exceptions

       canceled = 01

       device   = 02

       form     = 03

       options  = 04

       unclosed = 05.

   call function 'START_FORM'

     exporting

       startpage = startpage.

Read only

Former Member
0 Likes
2,028

Hi,

I've seen a solution at some customers for multi-lingual sapScript Forms:

They defined all the texts in a SO10-Text. At start of the form they included the SO10-Text with the needed language.

The form has all text only with text-symbols, so one form can have many different languages.

Regards