Use standard text (SO10) in report(SE38) to compose the body of email

hello experts,
here i wanna create the body of email with a format, hence i decide to use Standard Text. in this Standard Text, i also maintain some variable such &p_name&( i remember it works  in forms,such script and ssf), while i define p_name as 'demo' in the program and try to transfer p_name to standard text, it fails. while i check the output of standard text, it show &p_name& instead of demo.
could anyone tell me how to realize this function?
Thanks in advance.
Desmond

Hi,
try this,
data:w_field(10) type c VALUE '1234'.
DATA:wa_head TYPE THEAD.
data:it_final TYPE TABLE OF tline.
wa_head-tdname = 'Z_SAMPLE'.  u201CStandard text,refer screen shot
wa_head-tdid = 'ST'.
wa_head-tdobject = 'TEXT'.
wa_head-tdspras = 'EN'.
CALL FUNCTION 'READ_TEXT'
  EXPORTING
  CLIENT                        = SY-MANDT
    id                            = wa_head-tdid
    language                      = wa_head-tdspras
    name                          = wa_head-tdname
    object                        = wa_head-tdobject
  ARCHIVE_HANDLE                = 0
  LOCAL_CAT                     = ' '
IMPORTING
  HEADER                        = HEADER
  TABLES
    lines                         = it_final
EXCEPTIONS
  ID                            = 1
  LANGUAGE                      = 2
  NAME                          = 3
  NOT_FOUND                     = 4
  OBJECT                        = 5
  REFERENCE_CHECK               = 6
  WRONG_ACCESS_TO_ARCHIVE       = 7
  OTHERS                        = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REPLACE_TEXTSYMBOL'
  EXPORTING
    endline                = 10
  FORMATWIDTH            = 72
  LANGUAGE               = SY-LANGU
  LINEWIDTH              = 132
  OPTION_DIALOG          = ' '
  REPLACE_PROGRAM        = 'X'
  REPLACE_STANDARD       = 'X'
  REPLACE_SYSTEM         = 'X'
  REPLACE_TEXT           = 'X'
    startline              = 1
IMPORTING
  CHANGED                = CHANGED
  TABLES
    lines                  = it_final

Similar Messages

  • How to Maintain documentation (se38) using standard text (SO10)

    Hi,
    I have created standard text using SO10. Now I want to include the standard text in documentation (SE38) section of my ABAP program.
    I tried using /: INCLUDE 'YTEST' OBJECT TEXT ID ST LANGUAGE EN
    But the standard text is not showing up when I click the documentation icon in the selection screen.
    Can you please let me know how to maintain documentation for ABAP programs using Standard Texts.
    Thanks in advance.
    Sincerely,
    Vidya

    Hi Mahesh,
    In SO10, which format key has been used (AS, /*, /:, *.... to show up in documentation). when you used insert->text-> did you use 'expand immediately' check box. If expand immediately option is used, it won't serve our purpose.
    =
      (space)
    Example
    SO10 Yeurope_terms
    Inside Yeurope_terms
    Terms: For Europe
    /*           No Tax for Italy
    Waiting for your reply.
    Sincerely,
    Vidya

  • How to use standard text  so10

    Hello sir
    Here the problem is i want get three company adress in the script..
    Here i  used the satandard text  (so10)  and created three adress  and i went to address window  type
    There
    i written if exgrp =52
    <b> include zadress 1 text id  language E.
    else exgrp=53
    <b> include zadress 2 text id langugage e.
    this one i did in developement client and  i tested and  imported threw scc1 its not reflecting while exectuing.
    so please tell me how to print the 3 comapny address .. and step by step procedure .
    Thankyou
    Regars
    REDDY

    HELLO sir ,
    I done wt  u said but unable to get that address in script .......
    Please check  the flow once which done by me ......
    firsr created 3 texts and went to  the adress window there i used insert option gave standard text ...
    in the address window i gave
    If P_EXGrp -52( &j_1iexchdr-exgrp&)
    include text 1
    elseif P_exgrp=53
    include text 2
    else if P_exgrp=54
    endif .     this the  way i used if condition i ..........  if i changed the  second statement to Only  to "else" its printing the only else part exectuting  in script .
    and by using  RSTXTRAN progarm transported my request .  and by scc1 imported  but iunable to get Please tell me i didnt change the driver progarm .. selection scrrren &J_1iexchdr-exgrp& is one fileld based on this company code should come .. 
    Please let me know how to get ....wt changes i should make Please
    Thankyou,
    Regards

  • Using standard texts in reports output

    Hi,
    Would you please let me know the process of using standard texts created in So10 transaction in reports development. READ_TEXT function module made me to code a lot as per my requirement.
    Thanks,
    Kumar.

    Hi ,
    if you want to use READ_TEXT then you have to take help of you functional consultant.Ask him to provide the TEXT ID ,NAME, OBJECT and with the help of these things you can proceed furthur,
    If you still need any help.let me know.
    Thanks and regards,
    Rajeshwar

  • Reg : usage of standard Texts(SO10)

    Hi all of u,
      I want to use standard texts ,which were created under Tcode SO10, alone to display output without using them in any of the script or smartforms.Also i want to nw that , is it possible to use Variables inside standard text,which r really exist in report,report is through which i want to make use of ths Texts .The variable are / shuld be  local to this program...
    Kindly guide me ....
    This will simplifies my work ...
    Thanks in advance,
    Regards,
    Chandra.V

    Hi Chandra Shekar,
    standard text with variable
    SO10 doubt : standard Text
    Regards,
    Sravanthi

  • Standard text (SO10) - To print the text in same line

    In Standard text (SO10) I would like to have my text in a single line. For that I have used the extended line (=) tag. But It is not working.
    Can anyone help me how can I achieve this.
    Actually how many characters I can put in a single line. I think it is 72. But my text is less than 72 characters.
    Can anyone Please help me.
    Regards
    Meshack Appikatla.

    A Text Symbol in Script or Smartform can take lenght of Maximum 80 characters. Any thing more than that will be truncated even if the window is long enoguh to hold more than 80 characters. Si your character formated need to be have the PROTECTED option checked.
    At Topic:
    Try increasing the window size in lenght or width, If that is not possible pratically, you can try by decreasing the font size.

  • How to use standard texts in smartforms

    Hi Friends,
          How to use standard texts in smartforms, ie in scripts we are using standard texts using tr so10.
    thanks in advance,
    regards,
    sharma.

    For long text
    method1
    Create TEXT node- general attributes change text type to include text
    then you can input text name/text object/text id/language
    method2
    create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
    then use LOOP or TABLE node to display it
    For TEXT module(For foreign language)
    Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
    then enter smartform Create TEXT node- general attributes change text type to text module
    input the text module name which created by above
    btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10

  • How to declare variables in standard text  - so10 t.code

    Hello Friends,
             How to declare variables in standard text  - so10 t.code? Your response will be appreciated much.
    Thanks
    Sri

    For Script & Smartform  Text - &VAR&

  • How to use Standard Text Key in maintenance order header long text?

    Dear All,
    I have created a standard text key using transaction CA10 and I want to use this in maintenance order header long text. Is there any way to select any standard text key in maintenance order header long text?
    Regards & Thanks,
    Saif

    Hi
    To use standard texts, perform the following six steps:
    Select the maintenance order and access the operation overview screen using Goto -->Operation overview.
    You can enter standard text keys in this screen or in a detail screen for the relevant operation.
    Enter a standard text key in the appropriate field and press ENTER .
    If the text is longer that the short text line available, the field Text is selected for that operation.
    Check the long text and edit it if necessary. To do this, select the operation and choose Operation--> Long text.
    The system branches to the text editor screen. If you also entered a short text for the operation and specified that this should not be overwritten by the standard text, you will see the short text displayed in the first line of the editor. The following lines contain the standard text.
    Check the standard text and change it if necessary.
    Save the final version of the text and return to the previous screen with Goto--> Back.
    Save the maintenance order.
    Standard texts are created for your system by your system administrator using the Customizing function.
    Regards
    Makarand Gurjar

  • 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 use Standard Text in ALV

    How to use Standard Text in ALV header part? Can you please help me by giving the answer?

    Hi ,
           You can read the Standard text using read_text function module and then print in LV header part.

  • Need to use standard text in smartforms

    Hi,
        My requirement is like to use standard text for the address like ...
    Company Name
    Street, State, PIN
    Phone: 111-111-1111
    All the above lines should be aligned in the middle and 'Company Name' should be displayed in the bold.
    1) I have created the standard text, and included statement in text window as 'INCLUDE XXXX OBJECT TEXT ID ST LANGUAGE EN' but unfortunately it was not displaying anything in the output.
    2) I have tried the another method like using the 'Include Text' as a text type in the text window. It was coming but BOLD and center alignment was not coming.
    Here my question is why it was not coming in 1) case and if i use READ_TEXT function module will it solve the problem ? in case 2) how can i get all the 3 lines gets center aligned and first line should be bold.
    Thanks in advance for your help.

    Hi Jaya ,
    if u wnt ur Addr  first line should come in bold letter than for that
    u first *** to "sap smart forms : initial screen" there is option  'STYLE' click on that radiobutton and creat ur own STYLE (Zxxx) on there u vl find al ur answer...
    hope this vl  help u ,
    plz reward paint.
    regards
    wasim
    Edited by: mdwasim akram on Jun 11, 2008 1:09 PM

  • Standard text (SO10) - 'Where used list'

    Dear all,
    I would know if SAP provide a standard tool that consents to display a 'where used' list for the standard texts.
    I mean, this report has to show where the standard text defined via SO10 are used (SAPScripts, Smartforms...).
    Thanks and best regards
    Davide

    I doubt if there is such report.
    Enjoy SAP.
    Pankaj Singh.

  • How to use stylescreated in se 72 in STANDARD TEXT SO10

    Hi all,
    I have created a style in se72.
    Now can i use the style while creating a stAndard text in SO10 and in script.
    If yes can anyone let me know how to do that
    Thanks

    In SO10 go into change/ create mode and from the menu select FORMAT and in this select CHANGE STYLE. A popup with the styles comes up and just slect which ever you want.

  • Assign standard text (SO10) in transport request

    Hi Experts,
    How can i assign the standard text i've created in SO10 to a transport request. Thanks!
    Best Regards,
    Kurtt

    Hi,
    Refer note 3355 in OSS for a complete explanation. The SAPscript objects that should be transported must be written in a transport request.
    The entries are as follows:
    R3TR FORM NAME (NAME = Name of the layout set)
    R3TR STYL NAME (NAME = Name of the style)
    R3TR TEXT OBJECT,NAME,ID,L
    (OBJECT = Text object, NAME = Text name, ID = Text ID, L = Text language)
    If you want to transport a number of texts, you can use report RSTXTRAN to insert the individual text keys into a correction. The transport request must be entered and released via the transport system.
    Regards
    Sudheer

Maybe you are looking for

  • ITunes launch time on Windows 7 PC

    I'm just curious how long it should take for iTunes to launch. I just installed it on an HP Pavilion with Windows 7. I have about 8 gigs of music files, if that makes any difference. It takes about 1 minute to launch. Is that normal or do I have a pr

  • Pricing Error - Billing doc. not generated

    Hi All, As there was a pricing error in Scheduling agreement the billing document could not be generated. Current Status :- SA(Scheduling agreement) Created. DO(Delivery ) Created PGI done.             Stock removed from the system     "Shipment Star

  • Why can't I test the form?

    I just made a form in FormsCentral and now I want to test it. When I go to Testing and then click on "look how users see the form", nothing happens. What is going wrong?

  • Standard (VL) versus Home & Business (OEM)

    Let's say, I don't care about Publisher. Are there reasons to prefer the Standard edition, other than the introduced activation issues in Home & Business? After all, the price for one Standard license is twice as high than for one Home & Business lic

  • Step Type : Condition

    Hi, I use SAP_WAPI_WRITE_CONTAINER to write data into container variable "ApprovalStatus". It is of type MARC-KZKRI. It can accept 'X' or Space for that variable. I pass the value for container variable ApprovalStatus. To complete the step i use SAP_