Skip to Content
author's profile photo Former Member
Former Member

Including standard text in smartforms

Hi,

I have created a smartform which contains certain statict text in a text element.

In the middle of the static text, there is a telephone number which should be in standard text.

Can u please help me how to include a standard text in middle of a static text.

Example:

"Please contact 098 232 12312 for further communication"

The above is the line to be printed. Only the telephone number should be printed using standard text.

Please help me.

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 07:55 AM

    Hi Aneesha,

    Instead of using STANDARD TEXT use function module READ_TEXT to fetch the telephone number from SO10.

    create a Program Lines and call funtion READ_TEXT and fetch teleophone number passing the required values.

    *Internal table to store standard texts
    DATA: IT_TEXTS like T_LINE occurs o with header line.
    
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
    *         CLIENT                  = SY-MANDT
              id                      =       "Text ID
              language                =       "Laguage
              name                    =       "Text name
              object                  =       "text object
    *         ARCHIVE_HANDLE          = 0
    *    IMPORTING
    *         HEADER                  =
         tables
              lines                   = IT_TEXTS   "Internal table
    *    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.

    Then you can copy the telephone number into a variable and use in 2nd paragraph .

    BR

    Dep

    Edited by: DeepakNandikanti on Aug 22, 2011 9:56 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 06:11 AM

    Hi Aneesha,

    How do you get the standard text, Ii.e., telephone number from ?.

    If used under loop write like in program lines:

    CONCATENATE '"Please contact' wa_tel_no 'for further communication"' 
    INTO v_test SEPARATED BY space.

    Global declaration v_test TYPE string.

    BR

    Dep

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 06:23 AM

    Hi Deepak

    The telephone number is also a static text.

    The reason why it should be included as a standard text is, if the phone number is changed due to any reasons, they will change it there so that it doe'snt affect my smartform.

    But im unable to understand how to include it.

    Please help me

    Thanks a lot.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 06:30 AM

    Hi Deepak,

    in s010 -- I created a standard text and gave the telephone number. Thats it . As it is just a static text.

    If i do include text in smartform , it cant be printed at the particular position i wanted right?

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Aneesha,

      I hope I understood the requirement:

      First, you create a template with three columns .

      Next, create text in first column with content : '"Please contact'

      Next, create a include text( standard text ) for second column with contents from SO10 : telephone number.

      Next, create a text for third column with content : 'for further communication"'

      So this way you will get out in one line as :

      "Please contact 098 232 12312 for further communication"

      and when ever standard text is changed in SO10 it will reflect in smartform.

      Hope tis helps.

      BR

      Dep

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 07:13 AM

    Hi Deepak,

    Im sorry that i gave just an example.

    Here is the main one.

    Actually the letter contains an address on the top left corner.(dynamic)

    Sone static text in 1st paragraph

    2nd paragraph: Weu2019ve tried without success to contact you about this, so please can you call us as soon as possible on 0845 026 8818 so we can set up a new account. Weu2019re here to help you 8am to 5pm Monday to Friday.

    (the telephone number should be maintained through standard text (given as a business rule)).

    3rd paragraph : Some static text.

    Yours sincerely.

    name.

    I have maintained an address also in standard text.It was simple i created a window and in that i have selected include text and the things are done. but how could i include in the middle of the static text im not understanding.

    Thanks a lot for ur time and help.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2011 at 08:26 AM

    Hi Aneesha,

    Or you can try with

    Click on below link:

    [readtext]

    And try to use syntax in 2nd paragraph :

    /: INCLUDE &VBAK-VBELN(K)& OBJECT VBBK ID 0001

    First give a try with READ_TEXT funtion module or else use above option.

    BR

    Dep

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.