Home > Ask the SAP Experts > SAPscript and Smart Forms Questions & Answers > Convert SAPscript into Smart Form
Ask The SAP Expert: Questions & Answers
EMAIL THIS

Convert SAPscript into Smart Form

Mark Smithson EXPERT RESPONSE FROM: Mark Smithson

Pose a Question
Other SAP Categories
Meet all SAP Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 29 January 2004
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.
INCLUDE ZMEDRUCK_TEXT OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&

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?

>
EXPERT RESPONSE

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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
SAPscript and Smart Forms
Avoid printing out blank address lines in SAP Smart Forms
Setting soft breakpoints in ABAP that reside in Smart Forms
Printing specifics on the last page of a Smart Form
Need more options in newer Smart Forms
What is SAPscript 'RV_CONNOTE_SUPPL'?
Problems with the output device 'LOCL'
How to print Smart Forms on Zebra printer with the landscape format
Half the page disappears after a wrong click in the SAPscript editor; how is this fixed?
New fonts added to SAP are replaced by old fonts in a print preview, why?
How to include T&Cs on the back of every printed page in a PO form

SAP Smart Forms and SAPscript
Easier maintenance of output types, procedures, conditions, etc.
Avoid printing out blank address lines in SAP Smart Forms
Setting soft breakpoints in ABAP that reside in Smart Forms
Printing specifics on the last page of a Smart Form
How to print Smart Forms on Zebra printer with the landscape format
Half the page disappears after a wrong click in the SAPscript editor; how is this fixed?
New fonts added to SAP are replaced by old fonts in a print preview, why?
How to include T&Cs on the back of every printed page in a PO form
Smart Forms vs. PDF-based print forms in SAP solutions -- pros and cons
Converting a PDF form to Word
SAP Smart Forms and SAPscript Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsBlogsTipsAsk the ExpertsWebcastsWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts