DATA: gt_hunumbers TYPE STANDARD TABLE OF bapihunumber,
gt_huitem TYPE STANDARD TABLE OF bapihuitem
DATA: gt_huobject TYPE STANDARD TABLE OF bapihuobject.
DATA:lt_huobject TYPE STANDARD TABLE OF bapihuobject.
DATA:ls_huobject TYPE bapihuobject.
FORM gethulist CHANGING pt_hunumbers LIKE gt_hunumbers
pt_huitem LIKE gt_huitem.
DATA: "lt_hunumbers TYPE STANDARD TABLE OF bapihunumber,
lt_huheader TYPE STANDARD TABLE OF bapihuheader,
"lt_huitem TYPE STANDARD TABLE OF bapihuitem,
lt_huhistory TYPE STANDARD TABLE OF bapihuhistory,
lt_return TYPE STANDARD TABLE OF bapiret2.
"DATA: ls_hunumbers TYPE bapihunumber.
"ls_hunumbers-hu_exid = '1000000016'.
"APPEND ls_hunumbers TO lt_hunumbers.
"CLEAR ls_hunumbers.
CALL FUNCTION 'BAPI_HU_GETLIST'
EXPORTING
* NOTEXT = ' '
onlykeys = ' '
TABLES
hunumbers = pt_hunumbers
* HUOBJECTS =
* HUKEY =
huheader = lt_huheader
huitem = pt_huitem
huhistory = lt_huhistory
* NOTFOUNDHUS =
* HIGHESTLEVEL =
return = lt_return.
LOOP AT lt_return TRANSPORTING NO FIELDS WHERE type CA 'EAX'.
* 处理错误信息
ENDLOOP.
ENDFORM.