DATA: gt_texttable TYPE TABLE OF textline,
gW_texttable LIKE LINE OF gt_texttable.
DATA:lv_name TYPE tdobname.
DATA:lt_text LIKE TABLE OF tline.
DATA:lv_tdid TYPE thead-tdid,
lv_tdobject TYPE thead-tdobject.
REFRESH gt_texttable.
CLEAR:lt_text,lv_name.
IF pw_out-zlx = 'S'.
lv_name = sy-mandt && pw_out-rsnum && pw_out-rspos.
lv_tdid = 'MATK'.
lv_tdobject = 'AUFK'.
ELSEIF gs_out-zlx = 'J'.
lv_name = sy-mandt && 'M' && pw_out-stlnr && pw_out-stlkn && pw_out-stpoz.
lv_tdid = 'MPO'.
lv_tdobject = 'BOM'.
ELSEIF gs_out-zlx = 'W'.
lv_name = sy-mandt && 'M' && pw_out-stlnr && pw_out-stlkn && pw_out-stpoz.
lv_tdid = 'MPO'.
lv_tdobject = 'BOM'.
ENDIF.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = lv_tdid
language = sy-langu
name = lv_name
object = lv_tdobject
TABLES
lines = lt_text[]
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT lt_text INTO DATA(lw_text).
gw_texttable = lw_text-tdline.
APPEND gw_texttable TO gt_texttable.
ENDLOOP.
CALL FUNCTION 'ADA_POPUP_WITH_TABLE'
EXPORTING
startpos_col = 1
startpos_row = 1
titletext = '文本行'
* WORDWRAP_POSITION =
TABLES
valuetab = gt_texttable.
ALV 双击显示行文本
最新推荐文章于 2024-11-07 10:15:41 发布