Problem solve Get help with specific problems with your technologies, process and projects.

Convert SAPscript into Smart Form

I'm trying to convert a SAPscript into a Smart Form. The problem I'm having relates to the multiple-language capability of the SAPscript.

I'm trying to convert a SAPscript into a Smart Form. The problem I'm having relates to the multiple-language capability...

of the SAPscript. It starts with an INCLUDE of a standard text containing DEFINE statements. e.g.


I have standard texts defined in all the languages I need. (advantage was that only 1 layout needed to be maintained)
DEFINE &ST_TO_BE_PRICED& = 'To be priced' in English 

DEFINE &ST_TO_BE_PRICED& = 'A pr?rquer' in French

Is there a way I can reuse this standard text by for example having a piece of code that would load the correct language and then populate the global variables?

You have come up with an elegant approach for dynamic handling of language-specific output in SAPscript. Unfortunately, as you probably have found already, this particular approach does not work in Smart Forms.

Within a Smart Form, you can set up an 'Include text' node to access standard texts as used in SAPscript. In addition, you can specify dynamically the language to retrieve (via a variable in the language parameter). However, any commands within these standard texts -- such as DEFINE -- are ignored.

Thus, I would recommend simplifying your approach. Based on your example above, since you can no longer assign the words 'To be priced' and 'A prÉmarquer' to variables within standard texts, why not put the words directly into these standard texts (or into text modules) instead and invoke them solely when you wish to produce output? As an alternative -- if you need tighter control over how these words appear or wish to minimize external text retrieval -- insert a language-dependent CASE statement assigning the words to variables within the Smart Form itself (in the Initialization section or a Program node).

Either approach will allow you to rely upon a single Smart Form for your multi-language output. If there are many, many such texts you may wish to reevaluate whether the benefits outweigh the disadvantages of having a single form for multi-language output.

This was last published in January 2004

Dig Deeper on SAPscript and Smart Forms

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.