11-18-2008 6:43 AM
Hello Friends,
I working on sapscript of quality of certificate in that printout is displaying short text for material inspection characteristics but i want to display long text for material inspection characteristics.
pls guide me in which structure long text is stored for material inspection characteristics.
or i have to write my own fucntion module for the same.??
Regards,
S
11-18-2008 6:58 AM
Hi,
Long text are stored in tablex STXH or STXL, if you are entering long text in header the STXH, else STXL.
if you are using SAPscript then :
&TTXIT-TDTEXT&
INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE 'EN'.
value of T166K-TXNAM, T166K-TDOBJECT & T166K-TDID will be given by ur functional guy.
if you wnat in report then :
you can use the funcution module Read_text.
for example :
data: ebeln1 like ekko-ebeln,
ebelp1 like ekpo-ebelp.
*data: tline like tline occurs 0 with header line.
data: itab_stxl like stxl occurs 0 with header line.
ebeln1 = i_item-ebeln.
ebelp1 = i_item-ebelp.
concatenate ebeln1 ebelp1 into taxt.
move i_item-matnr to taxt.
select * from stxl into table itab_stxl where tdname eq taxt
and tdobject eq 'MATERIAL'
and tdid eq 'GRUN'
and tdspras eq 'EN'.
if sy-subrc eq 0.
call function 'READ_TEXT'
exporting
client = sy-mandt
id = 'GRUN'
language = 'E'
name = taxt
object = 'MATERIAL'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = tline
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.
else.
refresh tline.
endif.
loop at tline.
replace all occurrences of '<(>' in tline-tdline with space.
condense tline-tdline.
replace all occurrences of '<)>' in tline-tdline with space.
condense tline-tdline.
modify tline transporting tdline.
endloop.
Hope this will fullfill your requirement
Thanks & regards
Edited by: Naseeruddin on Nov 18, 2008 8:09 AM
12-13-2008 9:05 AM