‎2009 Jan 19 4:56 AM
Hi,
I am displaying the header texts in PO Smartform. But the T166K table is not having complete data. Can any body tell me how this table T166K is populated?
‎2009 Jan 19 4:59 AM
You can use READ_TEXT function module to display
PO header texts.
‎2009 Jan 19 5:02 AM
Hi,
I think T166K is a customising table.
Please get in touch with your functional team to get more idea.
Regards
Shiva
‎2009 Jan 19 5:08 AM
Hi,
Thanks for ur quick replies. But READ_TEXT is to get a single text. Here i am using SELECT_TEXT to get all the related text objects and id's. For this i have to compare these with T166K table.
‎2009 Jan 19 5:31 AM
‎2009 Jan 19 5:46 AM
Hi,
I am using the following code. As the table T166K is not having the complete data, all the header texts are not being displayed.
data: ls_t166k type t166k.
data: lt_texts type table of ty_text.
data: ls_text type ty_text.
*BREAK-POINT.
ls_text-tdobject = 'EKKO'.
ls_text-tdspras = gv_language.
ls_text-tdname = is_ekko-ebeln.
clear gt_hd_texts.
call function 'SELECT_TEXT'
exporting
object = ls_text-tdobject
name = ls_text-tdname
id = '*'
language = ls_text-tdspras
tables
selections = lt_texts.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
sort lt_texts by tdid.
read IMG setting -- table T166K
append texts allowed to GT_HD_TEXTS
Head Text Part
clear ls_text.
loop at lt_texts into ls_text.
select single * from t166k into ls_t166k
where druvo = iv_druvo and
bstyp = is_ekko-bstyp and
bsart = is_ekko-bsart and
tdobject = ls_text-tdobject and
tdid = ls_text-tdid.
if sy-subrc = 0.
append ls_text to gt_hd_texts.
endif.
clear ls_text.
endloop.