Reject requisition/order in background
Florin Wach
florin.wach at gmx.net
Thu Oct 29 05:26:09 EDT 2009
Hi folk,
I'm looking for an ABAP snippet to reject a purchase requisition and purchase order in background.
I have found BAPI's to perform a single release, but none for a rejection. (It's enjoy-Transaktion, so a Batch-Input will not work).
I have tried to use the ABAP OO interfaces for the requisition part, but without effect. When the document is saved/posted, just nothing happends, although no error messages are set:
* Get requisition factory reference:
CALL FUNCTION 'MEREQ_GET_FACTORY'
IMPORTING
ex_factory = lv_factory.
CALL METHOD lv_factory->create_header
EXPORTING
im_tcode = 'ME54N'
im_document = ls_document
im_protect = 'X'
IMPORTING
ex_instance = lo_req.
CALL METHOD lo_req->IF_RELEASABLE_MM~REJECT( im_reset = space ).
... and then perform some steps to post the changes:
CALL METHOD lo_req->check
CALL METHOD lo_req->post
I have left out some details.
I'm under ECC 6.00.
DOES ANYONE HAVE ANY SUGGESTIONS / EXPERIENCES?
Thank you in advance,
Florin
More information about the SAP-WUG
mailing list