2006 Jul 05 8:34 AM
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
2006 Jul 05 8:37 AM
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.
2006 Jul 05 8:41 AM
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
2006 Jul 05 8:43 AM
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
2006 Jul 05 8:45 AM
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
2006 Jul 05 8:47 AM
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
2006 Jul 05 8:51 AM
Hi Kishan
this is not actually a standard text
then how to use include text command.
regards
venkat.
2006 Jul 05 9:04 AM
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
2006 Jul 05 9:08 AM
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
2006 Jul 05 9:23 AM
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
2006 Jul 05 12:16 PM
2006 Jul 05 12:16 PM