12-01-2008 9:17 AM
Hello Gurus,
I need Item Level Text ID and Description of Text Id and content of Text ID. I used READ_TEXT FM.
But, how can i print this id, How I will get the description of Text ID and content of the Text-ID.
I got Text ID, Description and content for Header Text. for header EKKO has relationship with STXH, STXL.
But I need for Item Level : Item Text ID, description and content.
for getting the EKPO item details there is no relation between EKPO ,STXH, STXL.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = SY-LANGU
NAME = STR
OBJECT = 'EKPO'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = ITEM_I_XTLINE
EXCEPTIONS
ID = 1
Thanks in advance.
appreciate for help.
Thanks
Kiran.
12-01-2008 9:32 AM
Hi,
For each line item text u will have the text id and description
in the internal table ITEM_I_XTLINE u will get the text's..
Regards,
Nagaraj
12-01-2008 9:37 AM
Hi,
You can concatenate the EBELN(Purchasing Document Number) and EBELP(Purchasing Document Item Number) and passed to NAME parameter of the READ_TEXT function module to get the item text. Rest of the parameteres seems to be correct.
12-01-2008 9:46 AM
Hi,
TLINE is a structure for that there is no data. It contains TDFORMAT and TDLINE field, but it is a structure,
data : item_i_xtline like tline occurs 0 with header line,
item_RLINE like tline.
i will send for header how i got the description and content. pls see.
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'F02'
LANGUAGE = SY-LANGU
NAME = XNAME
OBJECT = 'EKKO'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = i_XTLINE
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.
else.
clear temp.
Loop at i_xtline into rline.
if rline-tdline is not initial.
concatenate temp rline-tdline into temp separated by space.
endif.
endloop.
move temp to i_zzep_pohdr_s-hdr_lvl_txt_cont . "28 content
ENDIF.
select single * from t166k into i_t166k where bsart = i_ekko-bsart.
if sy-subrc = 0.
i_zzep_pohdr_s-hdr_lvl_txt_id = i_t166k-tdid. "26 ID
endif.
select single * from t166k into i_t166k where bsart = i_ekko-bsart.
if sy-subrc = 0.
select single * from TTXOT into i_TTXOT where tdobject = i_t166k-tdobject
and tdspras = I_ekko-spras.
if sy-subrc = 0.
i_zzep_pohdr_s-hdr_lvl_txt_desc_id = i_TTXOT-tdtext. " 27 Description
endif.
endif.
thanks.
12-01-2008 9:41 AM
Hi,,
CONCATENATE gwa_ekpo-ebeln gwa_ekpo-ebelp INTO gv_ebelnp.
gv_name = gv_ebelnp.
Regards,
Nagaraj
12-01-2008 9:49 AM
I have done all the above suggestions. But i need to put the ID text, Text Description, and content in the i_ekpo.
12-02-2008 2:23 AM
There is no relation between EKPO, STXH and STXL.
I used T166P for ID and TDTEXT.
And relation is there between EKPO and T166P.
Pls see the code below.
after FM READ_TEXT.
select * from t166P into TABLE i_t166P where bstyp = i_ekpo-bstyp
and pstyp = i_ekpo-pstyp.
if sy-subrc = 0.
lOOP AT I_T166P INTO WA_T166P.
if WA_t166p-tdid = 'F01'.
i_zzep_podet_s-ITM_lvl_txt_id = WA_T166p-tdid. "29
ENDIF.
ENDLOOP.
select single * from TTXOT into i_TTXOT where tdobject = 'EKPO'
and tdspras = sy-langu.
if sy-subrc = 0.
i_zzep_podet_s-itm_lvl_txt_desc_id = i_TTXOT-tdtext. " 27
endif.
endif.