在 SAP 中提取采购订单文本 [英] Extracting Purchase Order texts in SAP

查看:49
本文介绍了在 SAP 中提取采购订单文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以报表或表格的形式查看采购订单 ME23N 中的项目文本选项卡中的详细信息?我试图在很多地方搜索,但我找不到表.表 EKKO/EKPO 在这方面似乎没有帮助.

Is there any way to view the details in Item Text tab in Purchase Order ME23N in a report form or table form? I have tried to search in many places but I couldn't find the table. Table EKKO/EKPO doesn't seem to help in this.

推荐答案

有表STXH(用于标题)和STXL(用于行)但它们不可读开箱即用.
通常阅读文本是由READ_TEXT FM:

There are tables STXH (for header) and STXL (for lines) but they are not readable out-of-the-box.
Usually reading texts is made by READ_TEXT FM:

CALL FUNCTION 'READ_TEXT'
 EXPORTING
  client = sy-mandt
  id = 'F01'
  language = 'E'
  name = %PO_number% + %PO_pos%
  object = 'EKPO'

要找出必要文本的 ID/名称,应进入编辑模式并按 Goto >> Header 此处应检查对应字段

To find out ID/name of necessary text one should enter edit mode and press Goto >> Header where one should check correspondent fields

UPDATE:基于上例的文本批量提取

UPDATE: mass extraction of texts based on the above example

TYPES: BEGIN OF ty_stxl_raw,
        clustr TYPE stxl-clustr,
        clustd TYPE stxl-clustd,
       END OF ty_stxl_raw,
       BEGIN OF ty_stxl,
        tdname TYPE stxl-tdname,
        clustr TYPE stxl-clustr,
        clustd TYPE stxl-clustd,
       END OF ty_stxl.
DATA:  t_stxl_raw TYPE STANDARD TABLE OF ty_stxl_raw,
       t_stxl     TYPE TABLE OF ty_stxl,
       w_stxl_raw TYPE ty_stxl_raw.

DATA:  t_tline TYPE STANDARD TABLE OF tline.
FIELD-SYMBOLS: <tline> TYPE tline,
               <stxl> LIKE LINE OF t_stxl.

SELECT l~tdname l~clustr l~clustd
 INTO CORRESPONDING FIELDS OF TABLE t_stxl
 FROM stxl AS l
 JOIN stxh AS h
  ON h~tdobject = l~tdobject
   AND h~tdname   = l~tdname
   AND h~tdid     = l~tdid
 WHERE l~relid    = 'TX'          "standard text
   AND h~tdobject = 'EKPO'
   AND h~tdname   = '450001216400010'
   AND h~tdid     = 'F01'
   AND l~tdspras  = sy-langu.

LOOP AT t_stxl ASSIGNING <stxl>.
CLEAR: t_stxl_raw[], t_tline[].
APPEND VALUE ty_stxl_raw( clustr = <stxl>-clustr clustd = <stxl>-clustd ) TO t_stxl_raw.
IMPORT tline = t_tline FROM INTERNAL TABLE t_stxl_raw.

LOOP AT t_tline ASSIGNING <tline>.
 "do anything
ENDLOOP.

ENDLOOP.

这篇关于在 SAP 中提取采购订单文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆