Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

printing long text in smartforms

Former Member
0 Kudos

Hi experts,

my requirement is to print long text in smartform

the description given in funtional spec is as follows

<b>manufacture adress MARA basic text of materialmaster lines 7-12 TBD by technical team</b>

I am using READ_TEXT functional module to get the text

so can u plz give me the parameters that should b passed in the Functional module . and the code which i have to write for getting the text.

points sure

regards

Venkat

11 REPLIES 11

Former Member
0 Kudos

You create a TEXT object and change the TYPE to INCLUDE TEXT. Once that is done all you have to do specify the parameters of your long text - TEXT ID, TEXT OBJECT and TEXT NAME. These are the same parameters that you use for READ_TEXT funciton. You don't have to fetch the text manually, it happens automatically.

Make sure this is a part of the main window as this might run into multiple pages.

0 Kudos

Hi Kishan thank u

based on the above functional description i gave can u plz say what should b passed for TEXT_ID, text object, text name.

and how to change the created text to INCLUDE TEXT type

plz explain coz its very urgent issue

regards

Venkat

Former Member
0 Kudos

Hi,

Check the following code... You can use it to get the basic idea of what paramteters you have to pass...

W_TDSPRAS = 'EN'.

w_tdid = 'F05'.

W_TDOBJECT = 'EKKO'.

W_TDNAME = IS_EKKO-EBELN

w_tdname type TDOBNAME ( po number if it is *header texts... concatenation of po number and line *item number if it is item texts.)

w_tdobject type TDOBJECT( table

w_tdspras type SPRAS

changing p_w_flag_text type c

w_it_text type TY_TEXTOBJECT .

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = w_tdid

language = w_TDSPRAS

name = w_TDNAME

object = w_TDOBJECT

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = w_IT_TExt

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

.

Thanks and Regards,

Bharat Kumar Reddy.V

0 Kudos

you can find them in table STXH and STXL.

or for ex---

To include a standard text in a form, use the INCLUDE command:

/: INCLUDE Z_BC460_EX4_HF OBJECT TEXT ID SDVD

0 Kudos

Hi Barath thank u

actually my table is MARA

can u explain what is TDID and what i should i pass here as u have given in ur reply TDID= 'f05'

can u plz explain

regards

Venkat

0 Kudos

Hi Kishan

this is not actually a standard text

then how to use include text command.

regards

venkat.

0 Kudos

Hi Barath

what is TDNAME here

actually basic text is given is given as 7-12 lines so which field i should use

and what tdid i should pass

0 Kudos

just check...

OBJECT MATERIAL

TDNAME Material(18)

TDID BEST, GRUN, or IVER

TDSPRAS sy-langu

OBJECT MDTXT

TDNAME Material(18)+PLANT

TDID LTXT

TDSPRAS sy-langu

MAterial Sales Text

OBJECT MVKE

TDNAME Material(18)Sales ORgDist Channel

TDID 0001

TDSPRAS sy-langu

0 Kudos

Hi Venkat,

TDNAME is the material number(MATNR),

TDID is GRUN,

TDOBJECT IS "MATERIAL",

The text contains several lines. These are returned in the internal table. You pic the lines 7-12 and concatenate them into a variable and print the same.

DATA: W_TEXT TYPE STRING.

LOOP AT IT_TEXT INTO WA_TEXT WHERE SY-TABIX = 7 OR

SY-TABIX = 8 OR

SY-TABIX = 9 OR

SY-TABIX = 10 OR

SY-TABIX = 11 OR

SY-TABIX = 12 .

CONCATENATE WA_TEXT-TDLINE W_TEXT INTO W_TEXT.

ENDLOOP.

Now print W_TEXT.

Thanks and Regards,

Bharat Kumar Reddy.V

0 Kudos

thank u

0 Kudos

thank u