Reject requisition/order in background

Florin Wach florin.wach at gmx.net
Thu Oct 29 11:09:57 EDT 2009


Hello Shai,

thanks for your feedback.

As the approval workflow is already widely implemented, and we also rely on the processing status etc. I have chosen option 2, using function module    CALL FUNCTION 'ME_UPDATE_REQUISITION_RELEASE'

However, all the checks have to be done manually, including the workflow events etc. and lock object handling. However, it does what I wanted to achive despite the full-blown standard usage (user-exits etc.).
Under these restrictions, it works for me now.

Thanks again,
Florin

P.S.: If anyone else find a conventient standard way, please let me know



-------- Original-Nachricht --------
> Datum: Thu, 29 Oct 2009 06:01:46 -0700 (PDT)
> Von: Shai Eyal <shai.eyal at yahoo.com>
> An: sap-wug at mit.edu
> Betreff: Re: Reject requisition/order in background

> Florin,
> 
> I'm afraid I have bad news for you - THERE IS NOT SUCH BAPI, METHOD or
> standard way to perform it.
> FM BAPI_REQUISITION_RESET_REL_GEN suggested does not reject requisition -
> it simply cancels release of certain release code.
> 
> I previously fronted the issue and offered the customers the followings:
> 	1. Implement rejection by locking PR items. Such can be easily
> implemented. The major disadvantage is you will have to build the rejected PR
> workflow all over again.
> 	2. Write FM that updates EBAN - you need to update the processing state
> field.
> I strongly suggested on option 1. Since you carry that in background, it
> should not matter much. It also has the same affect - can't process
> requisition. 
> If you'll find standard way to reject it I'll be happy to know about. BTW,
> batch input will not work with "Enjoy" transactions.
>  
> Good luck,
> 
>  
> Regards,
> Shai Eyal
> SAP Logistics senior consultant
> SAP Workflow & BPM specialist
> http://www.linkedin.com/in/shaieyal
> Mobile: 972-52-5816633
> 
> 
> 
> 
> ________________________________
> From: "sap-wug-request at mit.edu" <sap-wug-request at mit.edu>
> To: sap-wug at mit.edu
> Sent: Thursday, October 29, 2009 14:23:07
> Subject: SAP-WUG Digest, Vol 59, Issue 66
> 
> Send SAP-WUG mailing list submissions to
>     sap-wug at mit.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>     http://mailman.mit.edu/mailman/listinfo/sap-wug
> or, via email, send a message with subject or body 'help' to
>     sap-wug-request at mit.edu
> 
> You can reach the person managing the list at
>     sap-wug-owner at mit.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of SAP-WUG digest..."
> 
> 
> Today's Topics:
> 
>   1. Reject requisition/order in background (Florin Wach)
>   2. RE: Reject requisition/order in background
>       (akshay.bhagwat at wipro.com)
>   3. Custom material workflow report  (Gayathri Shivakumar)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 29 Oct 2009 10:26:09 +0100
> From: "Florin Wach" <florin.wach at gmx.net>
> Subject: Reject requisition/order in background
> To: sap-wug at mit.edu
> Message-ID: <20091029092609.286950 at gmx.net>
> Content-Type: text/plain; charset="us-ascii"
> 
> 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
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 29 Oct 2009 15:49:00 +0530
> From: <akshay.bhagwat at wipro.com>
> Subject: RE: Reject requisition/order in background
> To: <sap-wug at mit.edu>
> Message-ID:
>     <925928EF61EB8142A25835422EC26A8105006CD2 at PNE-HJN-MBX01.wipro.com>
> Content-Type: text/plain;    charset="iso-8859-1"
> 
> 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
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Thu, 29 Oct 2009 08:22:39 -0400
> From: "Gayathri Shivakumar" <Gayathri.Shivakumar at us.yazaki.com>
> Subject: Custom material workflow report 
> To: <sap-wug at mit.edu>
> Message-ID:
>    
> <092B2D6C441ED54CAACDCE77A7F547F30358AE9F at CANT-VMSG-002.yazaki.local>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hi experts,
> 
> 
> 
> I have been tasked with giving information to the ABAP team to generate
> a report to track workflow for material. I have a custom workflow
> developed for material flow. The format for the report is :
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Material Planner Task 1
> 
> SAP Part Number
> 
> Plant Code
> 
> Plant Specific Material Status
> 
> Owners
> 
> Date/Time Task Received
> 
> Date/Time Task Completed
> 
> Elapsed Time
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> F0000000002
> 
> 1112
> 
> 40
> 
> xxxx
> xxxx
> xxxx
> 
> 1/1/2009, 2:00pm
> 
> 1/2/2009, 8:32am
> 
> 0 Days
> 18 hours
> 32 Minutes
> 
> F0000000001
> 
> 1234
> 
> 20
> 
> xxxx
> xxxx
> 
> 1/1/2009, 2:00pm
> 
> 1/2/2009, 9:32am
> 
> 0 Days
> 19 hours
> 32 Minutes
> 
> F0000000001
> 
> 4567
> 
> 30
> 
> xxxx
> 
> 1/1/2009, 2:00pm
> 
> 1/2/2009, 10:32am
> 
> 0 Days
> 20 hours
> 32 Minutes
> 
> F0000000001
> 
> 3456
> 
> 10
> 
> xxxx
> xxxx
> xxxx
> 
> 1/1/2009, 2:00pm
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Ave. Completion Time
> 
> 0 Days
> 19 hours
> 32 Minutes
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> We have looked at standard reports and they do not meet the requirements
> of the customer. We are trying to track only one particular task in the
> workflow. To get the required data we are looking at workflow tables
> SWW_WI2OBJ and function modules SWW_WI_FIND_DEPENDANT_WIS. Since each
> material is extended to several plants we are seeing several entries. I
> am particularly not able to find the starting workitem id to track down
> the rest. 
> 
> 
> 
> I would like to know if there are other specific tables that I need to
> look at. Where are the container variables of the workflow template
> stored ? 
> 
> 
> 
> Thanks and Regards.
> 
> 
> 
> Gayathri Shivakumar
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.mit.edu/pipermail/sap-wug/attachments/20091029/1863a97d/attachment.htm
> 
> ------------------------------
> 
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
> 
> 
> End of SAP-WUG Digest, Vol 59, Issue 66
> ***************************************
> 
> 
> 
>       New Email names for you! 
> Get the Email name you&#39;ve always wanted on the new @ymail and
> @rocketmail. 
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/



More information about the SAP-WUG mailing list