‎2007 Dec 15 5:10 AM
hi,
Longtext gets stored in which table??How to access those text without read_text FM??
Thanks,
Gaurav
‎2007 Dec 15 5:12 AM
‎2007 Dec 15 5:15 AM
‎2007 Dec 15 5:19 AM
structure TLINE.
Check this link.
http://help.sap.com/saphelp_nw04/helpdata/en/fb/787036172511d2b428006094b944c8/frameset.htm
‎2007 Dec 15 5:20 AM
TLINE-TDLINE..
using the FM is the best way to do... create few tables and pull with the FM and play with it.
‎2007 Dec 15 5:14 AM
STXH is the text "header" table
check this for sample code.
http://fuller.mit.edu/SAPDocs/sap_long_text.html
Regards,
Maha
‎2007 Dec 15 5:14 AM
Hi,
No possible without using fm READ_TEXT.
The data in table STXL in LRAW format. you need to use fm read_texr
a®s
Message was edited by:
a®
‎2007 Dec 15 5:55 AM
Hi
You can use the Strutcure <b>TLINE</b>
Check the below sample
*&---------------------------------------------------------------------*
*& Report ZREADTEXTTEST *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT ZMATERAILDESCRIPTION .
tables: ekpo,MAKT.
TYPE-POOLS: slis.
DATA: thread LIKE thead.
DATA: l_index LIKE sy-tabix.
DATA: BEGIN OF INT_OUT OCCURS 0,
MATNR LIKE EKPO-MATNR,
MAKTX LIKE MAKT-MAKTX,
TDLINE LIKE TLINE-TDLINE,
WERKS LIKE EKPO-WERKS,
END OF INT_OUT.
DATA: BEGIN OF INT_OUT_new OCCURS 0,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
TDLINE LIKE TLINE-TDLINE,
tline like tline occurs 0,
WERKS LIKE EKPO-WERKS,
END OF INT_OUT_new.
DATA: it_tlines LIKE tline OCCURS 10 WITH HEADER LINE.
**************************
****ALV list definintion
*************************
DATA: ws_cat TYPE slis_fieldcat_alv ,
int_cat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
g_custom_container TYPE REF TO cl_gui_custom_container.
*****************
*selection-screen
*****************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 25(20) text-001.
**PARAMETERS: S_MATNR LIKE MAKT-MATNR obligatory.
*
SELECT-OPTIONS: S_MATNR FOR MAKT-MATNR .
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 25(20) text-002.
**PARAMETERS:p_ebeln LIKE ekko-ebeln obligatory.
*SELECT-OPTIONS: S_WERKS FOR EKPO-WERKS OBLIGATORY.
*SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_data.
* PERFORM field_catalog.
* PERFORM display_data.
END-OF-SELECTION.
*FORM GET_DATA.
form get_data.
DATA: l_index LIKE sy-tabix.
*SELECT
* a~matnr
* a~werks
* b~maktx FROM ekpo AS a
* INNER JOIN makt AS b
* ON b~matnr = a~matnr
* INTO CORRESPONDING FIELDS OF TABLE int_out
* WHERE
** a~matnr = s_matnr and
* a~werks IN s_werks.
*To Fetch Data From Makt.
SELECT MATNR MAKTX FROM MAKT INTO CORRESPONDING FIELDS OF TABLE
int_out WHERE MAKT~MATNR IN S_MATNR.
LOOP AT int_out.
l_index = sy-tabix.
* read table int_out_new with key matnr = int_out-matnr.
int_out_new-matnr = int_out-matnr.
int_out_new-maktx = int_out-maktx.
*
thread-tdname = int_out-matnr.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'BEST'
language = sy-langu
name = thread-tdname
object = 'MATERIAL'
TABLES
lines = it_tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
*Loop on it_tlines where long text is coming .
loop at it_tlines.
IF sy-subrc = 0.
int_out_new-tdline = it_tlines-tdline.
append int_out_new.
clear int_out_new.
clear int_out_new-tdline.
ENDIF.
endloop.
delete adjacent duplicates from INT_OUT .
append int_out_new.
ENDLOOP.
* Field Catalog
***MATERIAL NO no
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'MATNR'.
int_cat-reptext_ddic = 'MATERIAL NO'.
APPEND int_cat .
*material Short Description
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'MAKTX'.
int_cat-reptext_ddic = 'MATERIAL SHORT DESCRIPTION'.
int_cat-datatype = 'CHAR'.
int_cat-outputlen = '45'.
APPEND int_cat .
** Material Long Description
int_cat-tabname = 'INT_OUT_NEW'.
int_cat-fieldname = 'TDLINE'.
int_cat-reptext_ddic = 'MATERIAL LONG DESCRIPTION'.
int_cat-datatype = 'CHAR'.
int_cat-outputlen = '200'.
APPEND int_cat .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = int_cat[]
TABLES
t_outtab = int_out_NEW
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "display_dataRegards
Pavan
‎2007 Dec 15 7:09 AM