Dynamic STANDARD TEXT in scripts

Hi friends,
         I have to include standard text in the script corresponding to the company code. For example if company code = 6100, I have to include standard text SD_6100, or else if 2000 I have to include SD_2000. Here I can use IF statement. But If company codes are 20 or 30 then it is difficult to write that many IF statements. And in future if they increased the company codes then we should write one more if statement.So is there any method to include the STANDARD TEXT dynamically.
Sathish Reddy.

Hi satish ,
create the standard text in tcode SO10 .
now u can create this with respect to company code
/:  case & - bukrs&
/:    when '20'
    text
/:   when '30'
    text for 30
/:   endcase.
so by doing this u ll trigger the corresponding text for company code .
now  to include the std text in your form
just call the standard text IN THAT WINDOW AS ...
/: INCLUDE Z_XXXXX OBJECT TEXT ID ST LANGUAGE EN
remarks,
Dynamically if u want to trigger the standard text u can go for IF end if logic as u stated or a case endcase..
there is no alternate .
regards,
VIjay
Message was edited by:
        Vijay k

Similar Messages

  • Using Standard text in scripts

    Hi all,
    I had a problem while printing standard texts in scripts.
    I Know how to print standard text if we have to print it from the begining of window using
    INCLUDE &T024E-TXADR& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS& PAR
    But my problem id i have print it after a hard coded text like
    Delivery schedule: 'here i have to print the standard text'.
    can any one please help me out how to solve the problem
    Thanks & regards
    sreehari p

    Hi,
    Here's one my brother taught me - you can actually trick the system to accommodate this requirement.
    Ensure that you use 2 different paragraph formats in your INCLUDE statement, using the PARAGRAPH and NEW_PARAGRAPH clauses, ie.
    INCLUDE &T024E-TXADR& OBJECT TEXT ID ADRS LANGUAGE &EKKO-SPRAS& PARAGRAPH P1 NEW-PARAGRAPH P2
    Paragraph P2 (which will be used as the first line) should be created as having a Line Spacing value of 1 TW (1 twip) which is less than 1/1000th of an inch.  Also, set the Left Margin value to an offset which brings the text to the right of the Delivery schedule literal.
    Paragraph P1 (which will be used for all subsequent lines) should be set up as normal - ie. use the same paragraph format as that for displaying your "Delivery schedule:" literal.  If you need the text to be indented in line with the first line, then copy your existing paragraph to a new paragraph but set the Left Margin value to the same as that in P2.
    What this does is to output the first line of text indented by the margin after skipping 1 twip, giving the illusion that it's actually on the same line.  Since subsequent lines are output with a normal (or normal/indented) paragraph, that just follows with normal spacing on subsequent lines.
    Hope this makes sense.
    Regards,  Andy

  • Location of standard text in scripts

    hi,
            where will be the standard text in script?
    regards,
    bbr.

    SO10 is the T-code.
    You can call the FM Read_text.
    you should pass the below values to FM
        id                            =
        language                      =
        name                          =
        object                        =
      tables
        lines                         =.
    Regards,
    Rajasekhar Reddy.

  • Dynamic Standard text - Appending text with variable

    Dear All,
    We have a dynamic standard text. The text is being created based on sales order (I don't know how this has been created). Now I want to add text inside the standard text. That text will also contain variable.
    Example: "This is a valid sales order 100010000". This is a standard text where the sales order value is fed dynamically, I don't know how?
    Now the objective is to add another field "abcd" in the standard text with some other fixed texts. Eg. "I want to add my name sy-uname". So the entire text should be as:-
    "This is a valid sales order 100010000. I want to add my name sy-uname."
    1.  I am not sure how to identify the original standard text. I would like to add second line there.
    2.  I would like to pass variable value dynamically in the standard text.
    Please can you help me out in solving the issues.
    Best wishes,
    Atanu

    Hi
    Could you please be clear with your question so that some one can provide you with best solution quickly.
    I am assuming that when your sales order is being created at the same time ,your dynamic standard text is generated .So now you want to amend this standard text just after the sales order is saved.If so then
    Just go to the sales order text tab in change mode and click on the text eidtor window ,it will take to you sapscript editor ,Then from menu Goto-Header .From here you get the details of
    Text Name      
    Language       
    Text ID        
    Text Object  
    Now Find the userexit after save and their use a read_text function module and read the standard text which is alreday created and take down in it_lines table and modify the text by appending your sy-uname line as second line or you can concetante on the same line. Now then use the save_text function module and save the standard text.
    You can use the exit MV45AFZZ In that routine FORM userexit_save_document..
    Hope this help you to resolve the issue.
    Cheers
    Joginder

  • Dynamic Standard text in SmartForms

    Hi,
    I have requirwemnt where I need to retrive the data from the Standard text to display.
    But it variews based on SalesOrge and Comany Code u2018Zxxxx_SALES_yyyyu2019 here XXXX is SalesOrge and YYYY Company code.
    How to call the standard text Dynamically in Samrtform?
    Regards
    Irfan

    Hi,
    For displaying standard text dynamically, just follow the following steps:
    1. Create a text element and in general attributes give type as Include Text.
    2. Instead of providing any static Standard text in Text Name field, you need to click on the arrow button pointing right, which is for Dynamic Field Value. There you can provide your variable as &VARIABLE&, which contains the standard text name based on the conditions.
    3. Pass value statically like Text Object-TEXT,  Text ID - ST , Language - EN or else you can passs them dynamically as per your requirement.
    As you will be passing variables in order to print dynamic standard texts, it is better to check the option "No error if no text exists".
    Karthik
    Edited by: Karthik S on Sep 2, 2010 2:40 PM

  • Calling standard text to script

    Hi,
    I created standard text using so10. How can I call this text to my script program??
    Is there any other way to acheive this??
    Thanks,
    Ravindra

    Hi Ravindra,
    By using INCLUDE command you can insert the standard text in script editor.
    please go throught the help command for include command and it will explain you in detail.
    One more thing regarding that,when you have to transport your request to QA system,  you have to include the standard text in your request otherwise your standard text will not be visible in the QA.
    To include your standard text to your request in DEU, run  program RSTXTRAN.
    Regards,
    Tarun

  • Difference jb/w text symblosin script and standard text in scripts

    hi to all
    can u pols explain about the
    difference b/w text symblos in script and standard text in scripts

    hi
    Default paragraph Paragraph set to * in <b>standard text</b> maintenance
    If no form has been assigned to a text, the system automatically assigns the form SYSTEM, which contains minimal definitions for text formatting. There are two ways of formatting texts using forms: • Use the <b>standard text</b> maintenance to enter and print the text.
    Any kind of text can be included in a form. If no object is specified, then TEXT will be used (<b>standard texts</b>).
    <b>
    Text Symbols</b>
    Text symbols acquire their values as a result of explicit assignment. To interactively assign text symbols, in the text editor choose Include &#61614; Symbols &#61614; Text. This method is available for all text symbols belonging to a text module as well as those of the associated form. Values defined in this way are lost when the transaction is left. If you want to print the text module again, then you must enter the symbol values again. The purpose of the DEFINE command is to provide a means of making this value assignment a permanent part of the text, so that the values are available again when the text module is called again. This command can also be used to re-assign a new value to a text symbol half-way through the text. Syntax: /: DEFINE &symbol_name& = 'value'
    /: DEFINE &subject& = 'Your letter of 7/3/95' The value assigned can have a maximal length of 60 characters. It may itself contain other symbols. A symbol contained within the value assigned to another symbol is not replaced with its own value at the point at which the DEFINE command is executed. Rather, this replacement is made when the symbol defined in the DEFINE command is called in the text.
    /: DEFINE &symbol1& = 'mail' /: DEFINE &symbol2& = 'SAP&symbol1&' /: DEFINE &symbol1& = 'script' &symbol2& -> SAPscript If, however, the DEFINE command is written using the ':=' character rather than the '=' character, then any symbol contained within the value being assigned is replaced immediately with its current value. The assignment to the target symbol is made only after all symbols in the value string are replaced with their values. The total length of the value string may not exceed 80 characters. The target symbol must be a text symbol, as before.
    /: DEFINE &symbol1& = 'mail' /: DEFINE &symbol2& := 'SAP&symbol1&' /: DEFINE &symbol1& = 'script' &symbol2& -> SAPmail
    Inserting <b>Text Symbols</b>
    Procedure
    Inserting a Text Symbol
    1. Choose Insert &#8594; Symbols &#8594; Text.
    2. Place the cursor on the desired text symbol.
    3. Choose Choose.
    4. The system inserts the text symbol.
    Editing the Value of a Text Symbol
    1. Choose Insert &#8594; Symbols &#8594; Text.
    2. Choose Edit value bearbeiten. The dialog window Value definition for symbol <text symbol> appears.
    3. Enter the appropriate value definition.
    4. Choose Continue. In the dialog window Text symbols the specified value appears after the name of the text symbol.
    5. Choose Continue.
    Deleting all Text Symbol Values
    1. Choose Insert &#8594; Symbols &#8594; Text.
    2. Choose Delete all values. The system deletes all defined values.
    3. Choose Continue.
    Using Formatting Options for Text Symbols
    1. Choose Insert &#8594; Symbols &#8594; Text.
    2. Choose Options. The dialog window Formatting options for <text symbol> appears.
    3. Fill in the fields.
    4. Choose Continue.
    5. Choose Continue. The system executes the selected formatting option.
    regards
    ravish
    <b>plz reward points if helpful</b>

  • Standard text in scripts

    Once we create standard text using SO10 transaction, how to use it in the script, I mean, where should we write??

    Hi,
    You will have to use a INCLUDE statement for the same.
    /: INCLUDE 'Z..' OBJECT TEXT PARAMETER...
    Take a look at this thread ...
    Re: Query Regarding INCLUDE statement in SAP Script
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Dynamic Standard text in SAPscript

    Hi,
    Can we use dynamica standard text in SAP script?
    The standard text name is supplied by a external field. The standard text contains a address.
    I want to change address based on text name.
    Thanks.
    Shreyas
    Help will be awarded.

    Hi
    In the SAPSCRIPT the std text is called by this statament:
    /: INCLUDE &V_TEXT_NAME& OBJECT TEXT ID ST LANGUAGE &LAN&
    The V_TEXT_NAME is the variable where the name of the std text is stored and it's filled at runtime.
    Now while printing a document you shouldn't (can't) change the std text, so you should have many std text as the addresses you need to print.
    So you can decide which text (address) to be printed inserting the name of the text in the variable V_TEXT_NAME.
    Max

  • To transport STANDARD TEXT for  script

    Hello Experts,
          Can any one give clarification
    'Hou to transport STANDARD TEXT for a script'.
    Regards,
    Kumar

    Hi,
    Use RSTXTRAN Standard Program..
    Do Like this..
    Goto se38 and enter program name as RSTXTRAN
    and press F8..
    and give Text-key Name as Standard Text Name
    then Press F8..
    And select Select check box.. and enter
    and press on trsfr to corr button..
    it asks transfee textxs to a correction..
    press on yes button..
    it will show request  number or create your own request...
    and after goto SE10 tcode and Transport it...
    Message was edited by:
            Vishnu Reddy

  • Standard text in script

    how to change standard text in script

    Hi
    Check the following links too,
    http://help.sap.com/saphelp_nw04s/helpdata/en/f4/b49ea6453611d189710000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3f/bd1edf1b9a421da8b84be03c86b301/content.htm
    http://www.sappoint.com/abap/sscript.pdf#search=%22changing%20standard%20text%20(sapscript)%22
    Please reward for the same.

  • Regarding printing of standard text in scripts

    Hi every one,
       I am  Dinakar. I had a situation where i am printing the standard text for
       Terms & Conditions.
       my page is able to print only 15 terms pr page.
       but my problem is that few line from the last (15th) terms & condition r missing
       in the first page. from 16th terms & conditions r printing properly.but again from third page remaining terms and conditions r completely missing.
    please help to complete this situation.
    Thanks & Regards
    Dinakar.

    Hi Dinakar,
    Try to keep the statments you want to display in a single page use <i>PROTECT</i> and <i>ENDPROTECT</i>.
    /:  PROTECT
    p1 standard text1
    p2  standard text2
    p13: standard text15
    /: ENDPROTECT
    Thanks,
    Sreekanth
    <i>*-- do not forget to reward if it helps you ;)</i>

  • Requirment Urgent: How to format standard text in Script like two columns.

    Hi,
    I want to format the text in two columns like this.
    1. This is the note. 5. This is the note.
    2. This is the note. 6. This is the note.
    3. This is the note. 7. This is the note.
    4. This is the note. 8. This is the note.
    I have to include a standard text and format like this.
    Thanks in advance.

    Hi,
    You have to create a paragraph format and create two tabs according to your column positions.
    and write.
    ,,&column1& ,,&column2&
    Regards,
    Wasim Ahmed

  • Problem in using standard text in SAP Script

    Hi All,
    I have to replace English text hardcoded in a script with standard texts (SO10) in Spanish. When I am including the standard text in script, it is displayed in different font and bigger size. I want to reduce the size and change the font of standard text. Is there any way to do that?
    Thanks in advance
    Radhika
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 4, 2010 2:37 PM

    Please check the links below , which might hel you..
    Re: Setting font to standard text in sap script
    How to change stranded text font in script
    Regards
    Satish Boguda

  • How to convert a Word Document to SAP SCript standard text.

    Hi team,
    Does any one know how to convert a word document or text in Word format to standard text.
    So that we can use that standard text in Script output.
    This might be very useful if we need to convert a lot of text into standard text.

    Hi,
    Create the name of the standard text you want in SO10.
    When the editor is called up, select Text -> Upload and then browse for your file(s). Must be saved in RTF format in Word remember.
    Cheers
    Colin.

Maybe you are looking for

  • Crash salvaschermo

    crash salvaschermo: chi può aiutarmi ?

  • Third party steps in SD?

    Third party steps in SD?

  • Delete Text and images in a pdf.

    I want to search and then delete all occurances of some text and specific images in a pdf

  • KDE4 randr + Samsung TV HDMI [SOLVED]

    Hello, I have following HW config: HP laptop with  Radeon HD 6370 with HDMI output Samsung LED TV UE46c6500, native resolution 1920x1080 Laptop display resolution is 1600x900 When I connect laptop with  TV using HDMI cable and message saying "new mon

  • How to Determine the Actual Bandwidth Utilization

    Router A (Serial Port) in location A is connected to Router B (Serial Port) in location B through an IP VPN connection. How will I be able to determine the actual bandwidth utilization of the link between Router A and Router B? Thanks