2008 Mar 20 8:44 AM
Hi Gurus.
I want to use BAPI_AGREEMENT_MAINTAIN for ME32L. Can anyone tell me how to use this.
Thanks.
2008 Mar 20 8:47 AM
here is the sample code ... hope it might help
data: IM_AGREEMENT_HEADER like BAPIOAHEAD occurs 0 with header line.
data: IM_AGREEMENT_HEADER_X like BAPIOAHEAX occurs 0 with header line.
data: IM_AGREEMENT_ITEMS like BAPIOAITEM occurs 0 with header line.
data: IM_AGREEMENT_ITEMS_X like BAPIOAITEX occurs 0 with header line.
IM_AGREEMENT_HEADER-AGMT_NO = '0085011092'.
Append IM_AGREEMENT_HEADER.
IM_AGREEMENT_HEADER_X-AGMT_NO = 'X'.
Append IM_AGREEMENT_HEADER_X.
IM_AGREEMENT_ITEMS-AGRMT_ITEM = '00001'.
IM_AGREEMENT_ITEMS-TRACKINGNO = 'test'.
Append IM_AGREEMENT_ITEMS.
IM_AGREEMENT_ITEMS_X-TRACKINGNO = 'X'.
Append IM_AGREEMENT_ITEMS_X.
CALL FUNCTION 'BAPI_AGREEMENT_MAINTAIN'
EXPORTING
IM_AGREEMENT_HEADER = IM_AGREEMENT_HEADER
TABLES
EXT_RETURN = RETURN
IMT_AGREEMENT_ITEMS = IM_AGREEMENT_ITEMS
IMT_AGREEMENT_ITEMS_X = IM_AGREEMENT_ITEMS_X.
commit work and wait.
LOOP AT RETURN.
WRITE: /0(10) RETURN-TYPE,
10(10) RETURN-ID,
20(10) RETURN-NUMBER,
30(40) RETURN-MESSAGE.
ENDLOOP.