Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table T166K

Former Member
0 Likes
1,174

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?

5 REPLIES 5
Read only

GauthamV
Active Contributor
0 Likes
879

You can use READ_TEXT function module to display

PO header texts.

Read only

Former Member
0 Likes
879

Hi,

I think T166K is a customising table.

Please get in touch with your functional team to get more idea.

Regards

Shiva

Read only

Former Member
0 Likes
879

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.

Read only

0 Likes
879

Hello

STXH, STXL

Read only

Former Member
0 Likes
879

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.