ABAP 小店http://ymhtea.taobao.com
分类:
2014-03-29 11:36:46
原文地址:BAPI_PR_CHANGE 修改项目长文本 作者:qdbarry
网友: 城市火柴 | 时间:2009-07-24 09:41:32 | |||
|
我做了一个测试,这样写似乎并无不妥:
REPORT z_barry_bapi_pr_change.
DATA: itemtext TYPE bapimereqitemtext OCCURS 0 WITH HEADER LINE,
i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE .
PARAMETERS p_banfn LIKE eban-banfn .
START-OF-SELECTION.
itemtext-preq_no = p_banfn.
itemtext-preq_item = '00010'.
itemtext-text_id = 'B01'.
itemtext-text_form = '*'.
itemtext-text_line = 'aaaa'.
APPEND itemtext.
itemtext-text_form = '/'.
itemtext-text_line = 'bbbb'.
APPEND itemtext.
itemtext-preq_item = '00020'.
itemtext-text_form = '*'.
itemtext-text_line = 'cccc'.
APPEND itemtext.
itemtext-text_form = '*'.
itemtext-text_line = 'dddd'.
APPEND itemtext.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = p_banfn
TABLES
return = i_return[]
pritemtext = itemtext[].
COMMIT WORK AND WAIT .
LOOP AT i_return.
WRITE / i_return-message .
ENDLOOP.