Purchase order reject function

Hi all,
I need to reject a PO with abap code.
Since i didn't found any function module for that, i tried to create a BDC with ME29N but it doesn't seem to work.
Any other ideas?
Thanks,
Luis Cruz

After some debugs on ME29N, i manage to reject PO documents, here's the code, if anyone needs it:
*  prepare creation of PO instance
  ls_document-doc_type    = 'F'.
  ls_document-process     = mmpur_po_process.
  ls_document-trtyp       = 'V'.
  ls_document-doc_key(10) = lv_ponumber.
  ls_document-initiator-initiator = mmpur_initiator_rel.
*  object creation and initialization
  lv_ponumber = im_ebeln.
  lv_ebeln = lv_ponumber.
  create object lc_po.
  lc_po->for_bapi = mmpur_yes.
  call method lc_po->po_initialize( im_document = ls_document ).
  call method lc_po->set_po_number( im_po_number = lv_ebeln ).
  call method lc_po->set_state( cl_po_header_handle_mm=>c_available ).
*  read purchase order from database
  call method lc_po->po_read
    exporting
      im_tcode     = lv_tcode
      im_trtyp     = ls_document-trtyp
      im_aktyp     = ls_document-trtyp
      im_po_number = lv_ebeln
      im_document  = ls_document.
  if lc_po->if_releasable_mm~is_rejection_allowed( ) = 'X'.
    call method lc_po->if_releasable_mm~reject
      exporting
        im_reset = space
      exceptions
        failed   = 1
        others   = 2.
  endif.
  call method lc_po->po_post
    exceptions
      failure = 1
      others  = 2.

Similar Messages

  • Purchase Order - Rejected Status

    Hi All,
    Is there any Bapi or function module for Purchase Order Rejection. I have created a custom WF template for Purchase Order release. Once the approver cilcks the reject button, then the Purchase Order Status should be changed into Rejected status ( i.e Ekko-Procstat = Rejected ).
    Regards,
    Sankar

    Hi Sankar,
    use FM BAPI_PO_RESET_RELEASE.
    if you want to update a particular value you can take a copy of this FM and can customize it as per your requirement. Debug this BAPI. I hope this should solve your problem
    Regards,
    Raj

  • Workflow for purchase order rejection and esclation.

    Hi,
    Can any body tell us the what is the standard workflow for purchase order rejection and esclation.
    if no standard WF is there then how can create the workflow for ecslation and rejection.
    Thanks & Regards,
    Priti shrivastava

    Please check here.
    http://help.sap.com/saphelp_srm30/helpdata/en/5a/c5173f5ff48443e10000000a114084/content.htm

  • Purchase order rejection via BAPI

    Hi,
    i need to use BAPIs for purchase order release because it is interfaced with Notes.
    I'm looking for a BAPI or Function module in order to reject PO as it is possible in ME29N transaction in ECC 6.0 . I found BAPI_PO_RELEASE (to release) and BAPI_PO_RESET_RELEASE (to cancel release) but not BAPI for rejection.
    Is there anybody experiencing such a problem ?
    Pierre-Edouard Hamon

    No, thanks for your answer, but this BAPI only allows cancellation of a release code that has already been posted but doesn't allow rejection of a release code that has not yet been managed. (in ME29N, push button Refuse in PO header tab)
    PE Hamon

  • Purchase order rejection - status update

    Hi Experts,
    For PO and PR release ,I am developing the custom workflow .In that workflow user decision step to approving or rejecting for PO release/reject .In approve step I am able to release the po in background using  standard method in BUS2012 but in reject step I need to reject the po I am not able to get any std method or BAPI to reject the PO/PR.
    The above same problem I am facing in purchase order requisition.
    In invoice parking workflow I am facing same kind of problem , in this I need method to post the invoice.
    Need inputs on this to close the issues soon.
    I had checked forum ,but I didnu2019t get the hopeful answer.
    Regards,
    Ram.

    Hi Experts,
    Thanks for your reply .i had checked the BAPI : BAPI_PO_RESET_RELEASE but it not solving my problem. This bapi is use to cancel the po and change the status to in process,but in my case i need to reject the PO and status should be rejected.
    The same issue is coming for PR.
    Give some idea to post the parked invoice ,in background .Help to close this issue soon.
    Thanks in advance.
    Regards,
    Ram.

  • Purchase Order Rejection

    Dear all,
    When a purchase order is rejected (ME29N), the on-order stock is not updated automatically - until the purchase order item positions are deleted in this purchase order.
    So a plant controller who rejects a PO (and would not be authorized to update the positions of this PO), would need to send an email to their purchasing departement asking for them to delete the positions everytime in the PO to update the on-order stock?
    This process does not seem right as they would have to send an email (manually). How it works in other companies when the PO is rejected?
    Thanks,
    Annabelle R.

    communication !!!
    automated with a workflow.
    or by phone and email. To be honest, I have never seen that a controller rejected a PO without having spoken to the person who has created it.
    Why should he reject an order? only if he feels that there is someting wrong e.g. with the price, or he saw the the item was Ferrari instead of the usual items that are bought in your company. But this has to be communicated, otherwise the buyer or planner will not know what he has to do after an rejection.
    Just think about the overall process. MRP creates a requisition, buyer creates a PO, controller rejects. buyer flags PO for deletion - MRP creates next requistions ............. buyer creates a PO, controller rejects. buyer flags PO for deletion - MRP creates next requistions  ..... buyer creates a PO, controller rejects. buyer flags PO for deletion - MRP creates next requistions
    Funny process.
    There must be more than just setting a deletion flag.

  • SUS -  Purchase Order  - Rejection

    Hi,
      I would like to reject a PO that came in through SRM -> R3->XI-> SUS.. When logged in as SUS user, I see PO in Purchase Orders --> New section . I have only 'Set Confirmed' button visible and active.. How do I reject a Purchase Order. When I go to Purhcase Order --> Rejected , I am not able see the PO there..
    Also SUS user is not able to edit the Purchase Order I received from R3..
    Is there anything missing..
    Thanks,
    Ganni

    Hi naga
    DEFINE EVENT SCHEMA
      ->BUS2206
    AND GO TO transaction type of BUS2209
      supply event schema in transaction type.
    i think you have standard events are there  like
    APPROVAL_NOT_PROCESSED ..
    /people/ramakrishna.rallapalli/blog/2008/07/20/bidder-alert-notifications
    please check and you might get an idea how you can work on this. but it is possible.
    regards
    muthu

  • Purchase Order Partner Functions

    Hi all,
    I am adopting PO from another purchase order. The vendors are diifferent in my old PO and new PO. When I create the new PO, the partner functions of old PO are adopted. Even after i enter the new vendor, it doesnot update to new partner functions.
    Can you please suggest the solution for this? Is there any standard setting?
    Regards
    Kapil

    Hi,
    1st check new partner function which you are entering in PO or to adopt, that should be assigned to vendor account group in following path:
    SPRO->MM->Purchasing->Partner Determination-> partner roles->Permissible partner roles per account group
    Also check the presence of new partner function in partner schema and assigned to partner schema with others partner functions in following path:
    SPRO->MM->Purchasing->Partner Determination->Partner setting in Vendor master record-> Define partner Schema
    And check assignment of partner schema to your vendor account group in following path:
    SPRO->MM->Purchasing->Partner Determination->Partner setting in Vendor master record-> Assign partner schema to account Group
    Finally check partner schema assigned in PO document type in following path:
    SPRO->MM->Purchasing->Partner Determination->Partner Settings in Purchasing Documents-> Assign Partner Schemas to Document Types
    Regards,
    Biju K

  • Need BAPI for Purchasing Order Reject through Workflow

    Hi All.
    I need a bapi to reject Purchase Order(PO) through Workflow. i've found some to release but not to reject, ('08' status Code). Can anybody hlp me please.
    Thanks & Regards,
    Mani.

    You can check standard Wflow Template WS65400030
    I think you can use Method ResetRelease of businress Object BUS2012

  • Conifugarate item in purchase order by Function or BAPi

    Hello experts!,
    I have the following problem: I need to configurate de characterstics of a material at purchase order item level. But I can´t find any BAPI neither Function Module to perform this action.
    Has anyone done this before?
    Thank you for your help in advance
    Nice regards
    Ibai

    There is no function/BAPI to configure a Purchase order item.
    Your best bet would be to do a recording of ME22 (and not ME22N).

  • How to do form personalization on purchase order cancell functionality

    Hi,
    how to make form personalization on purchase order form so that user should not cancell the PO.
    Please suggest.
    Thanks

    This is already available in the additional line information..though..
    If you still want that at line level to be displayed..maybe you need to customize the form...not sure how u can handle that logic
    Mahendra

  • Sub-contracting Purchase order not functioning properly

    Hi
        We are having issues with a PO 45007xxxxx. This PO is set-up as a subcontracting PO. In the component section I have a material 1232  that it is supposed to consume material 1232 when material 97 is received against this order. At the end of March 2015, the 1232 consumption stopped. When we receive material 97, there is no longer a line for the 1232 consumption that automatically populates and occurs simultaneously with saving the GR. If I look at the GRs against this PO prior to 27.03.2015,  I can see the accurate 1232 consumption.  what ever I did GR after 27.03..2015,there is  no longer aline for the sonsumption material when I save my GR.
    Can some body guide me,please for this issue?

    Hi Hussain,
            As you told one Po entered item category L and another PO not entered " L".  If not entered means its normal PO and will not get BoM components in MIGO.
    And also what Patra told is correct. If you are not selected in MIGO for components then it will be post the line which is ever checked..
    For these you have reverse and do again transacation...

  • Materials Management - Purchase Order. FUNCTION 'BAPI_PO_CHANGE'

    Hello!
    How to use FUNCTION 'BAPI_PO_CHANGE'?
    Required paramiter only PO number?
    I need to change POITEM.
    Somebody hav example / description?

    Hi,
    refer to the link below for sample code :
    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    Regards,
    Surinder

  • Problem in Rejecting the purchase order release workflow

    Hai Friends ,
                  I did the purchase order workflow. it will working fine. when a approver refused the release, the intimation need to send to the previous approvers as well as po creator.  but there is no method available in the bus2012 for purchase order rejected. what i want to do  ? 
                     i did the purchase requisition workflow also. In that workflow there is a method in the name of " InfoReleaseRejected".   i used this method in my task it will working fine. but there is no method available for Purchase Order.
    Regads,
    R. Sathis Kumar

    Hai suthakar,
               I created the customized workflow. this workflow working well when the approvers approved. but it is not do anything when approver reject the release.
    Regards,
    Sathis Kumar R

  • Need to add two activities in Purchase order workflow template

    Hello,
    I got a requirement for purchase order at workflow template level need to add two activities like below
    a) p.o changed
    b) p.o cancelled.
    once p.o changed based on agent determination agent will receive the mail in his inbox same functionality for p.o cancelled. 
    also at work item level need to add attributes .
    but currently standard workflow for PO release it WS200000075  have only release activity   .
    how to add activity types to be available workflow template also please let me how to do binding for above activities once created?

    Hi vinoth,
    yes this p.o workflow based on release strategy. i was copied the standard workflow template added activities
    one is for changed and another is rejection.
    once functional guy rejected the purchase order rejection  activity  not working properly
    also same problem faced for changed step also while change the p.o value at item level.
    i am using business object BUS2012 adding attributes for work item.
    please guide me how to achieve above functionality also how to do binding for changing and rejection activities?

Maybe you are looking for

  • How do I approve an 'ask to buy' on a family share

    How do I find my 'notifications' to approve an 'Ask to buy' from my daughter's profile?

  • Final Rebate Settlement Issue

    Hi All, When i am trying to make final settlment of rebate system is giving me error "The sales volume for this agreement is not current'. I am unable to process final settlement and even sales volume in rebate agreement is showing 0. Please give me

  • How to watch FiOS TV on a computer?

    I will be getting FiOS Internet and TV installed next week.  I would like to watch TV on the computer.  I have an old analog TV tuner card in the PC.  Do I have to get a set-top box for the computer, or is there a way to access FiOS TV over the Inter

  • Accessing 10.3.9 disks from Leopard

    Hello everyone I'm just about to purchase a new Mac mini, and move all my data across from my current G4 10.3.9 by taking the hard disk out and mouting it in a USB / Firewire drive enclosure, and hooking this up to the mini. Before you ask, I can't b

  • Computer just turned off and now won't turn back on!!

    I have an IQ770 Touchsmart and while I was out of the room, it turned itself off.  Now it won't even turn back on!!!  I've unplugged and replugged and it won't do anything.  What could have caused it?  There was no power interruption, it's plugged in