取销售订单行项目长文本
这里举例子 销售订单号:100000073 行项目:10
事务代码 VA05 输入凭证号进入 :
双击行项目进入:
双击长文本 进入后 点击菜单栏的转到 表头:
附上例子代码:
"取销售订单长文本数据
DATA: l_id TYPE thead-tdid,
l_language TYPE thead-tdspras,
l_name TYPE thead-tdname,
l_object TYPE thead-tdobject.
DATA:it_line TYPE STANDARD TABLE OF tline.
"第一个长文本
l_id = ‘Z001’.
- l_language = sy-spras. "‘E’ for English
CONCATENATE ‘0100000073’ ‘000010’ INTO l_name.
l_object = ‘VBBP’.
CALL FUNCTION ‘READ_TEXT’
EXPORTING
client = sy-mandt
id = l_id
language = sy-langu
name = l_name
object = l_object
TABLES
lines = it_line
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.
"将取出的多行长文本进行拼接
LOOP AT it_line INTO DATA(is_line).
CONCATENATE gs_itab1-zddbzxx is_line INTO gs_itab1-zddbzxx .
ENDLOOP.
CLEAR:l_id ,l_language ,l_name ,l_object ,is_line ,it_line.
ENDIF.
来源:CSDN
作者:ABAP-小帅
链接:https://blog.csdn.net/weixin_42808203/article/details/103906938