cancel
Showing results for 
Search instead for 
Did you mean: 

Including standard text in smartforms

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Aneesha,

Or you can try with

Click on below link:

[]

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

Former Member
0 Kudos

Thanks a lot Deepak.

im done with the program. I used READ_TEXT function module.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Aneesha,

I would like to know how you are storing the telephone numbers??.

BR

Dep

Former Member
0 Kudos

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