2013 Jun 19 12:45 PM
TEXT NOT DISPLAY in smartforms .......when I debug I shaw the text but after f5 it is gone .
I declare lv_line type c in global data.where is the problem
my code is
dATA: lt_line TYPE TABLE OF tline,
ls_line TYPE tline.
data: NAME type THEAD-TDname,
TDOBJECT type THEAD-TDOBJECT value 'VBBK' .
name = p_vbeln.
BREAK-POINT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = TDOBJECT
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
TABLES
LINES = LT_LINE
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.
* Implement suitable error handling here
ENDIF.
BREAK-POINT.
*CLEAR LS_LINE.
READ TABLE LT_LINE INTO LS_LINE INDEX 1.
LS_LINE-TDLINE = LV_LINE.
.
TEXT NOT DISPLAY in smartforms .......when I debug I shaw the text but after f5 it is gone .
I declare lv_line type c in global data.where is the problem
my code is
dATA: lt_line TYPE TABLE OF tline,
ls_line TYPE tline.
data: NAME type THEAD-TDname,
TDOBJECT type THEAD-TDOBJECT value 'VBBK' .
name = p_vbeln.
BREAK-POINT.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = sy-langu
NAME = NAME
OBJECT = TDOBJECT
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
* OLD_LINE_COUNTER =
TABLES
LINES = LT_LINE
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.
* Implement suitable error handling here
ENDIF.
BREAK-POINT.
*CLEAR LS_LINE.
READ TABLE LT_LINE INTO LS_LINE INDEX 1.
LS_LINE-TDLINE = LV_LINE.
.
2013 Jun 19 12:59 PM
Hi
Your statement should be like this..
LV_LINE = LS_LINE-TDLINE.
Not... LS_LINE-TDLINE = LV_LINE.
Also check the length of your variable lv_line... ( lv_line type char132 )
Regards,
Venkat
2013 Jun 19 1:25 PM
Yes go with Venkateswaran K as suggested
Statement should be LV_LINE = LS_LINE-TDLINE.
Regards,
Bastin.G
2013 Jun 19 1:30 PM
2013 Jun 20 5:46 AM
Hi,
my function person told me to use read_text in smartforms. and I use dis form for tcode vf02 all the program lines and data are in smartforms so I called READ_TEXT here.
sharmi
2013 Jun 20 7:14 AM
Hope you aware of include text in smartforms
If it is smartform or script you can include the text object directly with out using READ_TEXT FM
Page->Window->Text and select text type as Include text .
then pass the object Id, text id and text object for that text.
Including Text Modules (SAP Library - Smart Forms)
Regards,
Bastin.G
2013 Jun 19 1:38 PM
Hi Sharmistha,
try use the following code.
*-Types for text
TYPES:BEGIN OF ty_lines,
line(72) TYPE c,
END OF ty_lines.
data:wa_lines TYPE ty_lines
LOOP AT LT_LINE INTO LS_LINE.
wa_lines-line = wa_text-tdline.
*-- pass this value to your end structure.
ENDLOOP.
Hope may solve your problem.
Regards,
Gurunath
2013 Jun 19 1:41 PM
2013 Jun 19 1:50 PM
Hi Sharm,
While transfer the data form one variable to another vaiable you should follow below coding,
*CLEAR LS_LINE.
READ TABLE LT_LINE INTO LS_LINE INDEX 1.
LS_LINE-TDLINE = LV_LINE.
*CLEAR LS_LINE.
READ TABLE LT_LINE INTO LS_LINE INDEX 1.
if sy-subrc = 0.
LV_LINE = LS_LINE-TDLINE .
endif.
After read statement check the subrc whether your internal table have that data or not.
Warm Regards,
John.
2013 Jun 20 5:51 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |