ABAP顾问
分类:
2009-07-25 14:34:16
网友: 城市火柴 | 时间: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.
城市火柴 2009-08-04 13:26:06
Summary Symptom You create purchase orders using BAPI_PR_CREATE or you change existing purchase orders using BAPI_PR_CHANGE. If you transfer long texts, long text lines may not be transferred in the specified sequence and the text may be mixed up. Other terms Long text, sort, stable, purchase requisition Reason and Prerequisites This problem is caused by a program error. Solution See the advance corrections.