Reject requisition/order in background

akshay.bhagwat@wipro.com akshay.bhagwat at wipro.com
Thu Oct 29 06:19:00 EDT 2009


Hi Florin,

I hope you might have already looked at the same, but just wanted to check one point. 
Will reset release or cancel release is equivalent to Rejection?

In that case, you can have a look at : BAPI_REQUISITION_RESET_REL_GEN

Regards,

Akshay Bhagwat

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Florin Wach
Sent: Thursday, October 29, 2009 2:56 PM
To: sap-wug at mit.edu
Subject: Reject requisition/order in background

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
_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com




More information about the SAP-WUG mailing list