‎2008 Feb 06 9:11 AM
Hi gurus,
In vf02 they are giving some text . that text is going and saving in STXL table. I want to include this text in smart form.
After choosing include text in General attributes. I am giving
text object is vbbk
Text id is time
language en
but i don't know what i want to give in text name.
so plz help me.
S.Murali Naidu
Edited by: Murali Sreerama on Feb 6, 2008 10:12 AM
‎2008 Feb 06 9:16 AM
Hi,
Use FM "read_text".
Here's a sample piece of code.
DATA: I_F02LINES LIKE STANDARD TABLE OF TLINE WITH HEADER LINE.
data :Lv_name type THEAD-TDNAME.
Lv_name = W_EKKO-EBELN.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F02'
LANGUAGE = 'E'
NAME = Lv_name
OBJECT = 'EKKO'
TABLES
LINES = I_F02LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
READ TABLE I_F02LINES INDEX 1.
regards,
kavitha
‎2008 Feb 06 9:17 AM
Hi
This long text
we have to pass
TDID
TDOBJECT
TDNAME
TDSPRAS
to the FM READ_TEXT, then only we will get its content
Award if useful
Narendra
‎2008 Feb 06 9:19 AM
‎2008 Feb 06 9:21 AM
Hi,
Hope this may be helping you,please refer this:
You need to create a text element for this. In the text element type, you have a drop-down where you select include text.
There are corresponding boxes for OBJECT & ID where you type in TEXT & ADRS respectively.
You gotto define 2 global variables: V_TXKOP & V_SPRAS which you have to populate from T024E & EKKO respectively.
Also:
create an include text in the header window
and specify
Text Name - &T024E-TXKOP&
Text Object - TEXT
Text ID - ADRS
Language - &EKKO-SPRAS&
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
‎2008 Feb 06 9:22 AM
Hi,
Please use this code:: (reward pts)
DATA gt_text LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: gt_lines.
REFRESH gt_text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id = 'your text id'
language = sy-langu
name = your billing doc no
object = 'your obj id'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines = gt_text
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR: gt_line7,
gt_lines.
then to display that
LOOP AT gt_text.
IF NOT gt_text-tdline IS INITIAL.
CONCATENATE gt_line gt_text-tdline INTO gt_line SEPARATED BY space.
ENDIF.
ENDLOOP.
Edited by: rohitaash sharma on Feb 6, 2008 10:22 AM