BAPI to Block/Cancel Purchase order

hello everybody,
can any one tell me if there is a BAPI to block Purchase order at item level. or if there is a BAPI to cancel a Purchase order.
Tx .
Regards
Swanand

Hello Swanand,
You might want to have a look at BAPI_PO_RESET_RELEASE. This BAPI is documented well enough for you to decide whether this is suitable for your case.
If this helps, please reward points and mark the topic as answered.
Regards,
Anand Mandalika.

Similar Messages

  • Bapi : Is there any BAPI to CANCEL / BLOCK a Purchase Order

    hello everybody,
    can anyone tell me if there is any BAPI to cancel or block a Purchase order.
    Note : blocking of purchase order is done on item level of the PO.
    Regards
    Swanand

    Hello,
    in BAPI_PO_CHANGE:
    Field DELETE_IND in structures POITEM and POITEMX.
    It's reference is to data-element ELOEK: Documentation to this:
    <i>Text
    Deletion indicator in purchasing document
    Definition
    Determines whether the item in the purchasing document is deleted or blocked.
    Use
    You can set the deletion indicator by choosing Edit -> Delete if:
    You want to cancel an item
    An item is closed and can be archived
    You can set the blocking indicator by selecting the item and then choosing Edit -> Block if you do not want to allow subsequent functions for the item. Note that you must manually remove the indicator as soon as subsequent functions are allowed again.
    Examples
    You have entered a purchase order item by mistake. You cancel it by setting the deletion indicator.
    A purchase order item has been delivered, invoiced, and paid for, and can now be archived. You can set the deletion indicator.</i>
    Regards Wolfgang

  • How to determine canceled purchase orders

    Hi all,
    I have to block purchase requisition if purchase order is created.
    if PO is deleted (canceled) PR can be modified again.
    So i want to khow how can i see if PO is canceled???
    Thank you

    Thank you Navneeth 
    I have a PO with only one line that i have deleted.
    In EKPO-LOEKZ the value is 'L'
    in EKKO-LOEKZ there is no value?!!!
    Q1 : have i deleted the PO correctly
    Q2 : If yes, is there an other way to determine canceled purchase orders??
    Thanks

  • Need a Bapi to Create a purchase order

    Hi experts,
    Is there a Bapi, to create a 'Purchase Order' from an existing Purchasing document no. marked for deletion.
    Thanks in advance ,
    Hrashit Rungta

    Hi Experts,
    I have used BAPI_PO_CREATE1 to create a purchase order .
    I have successfully created a purchase order when i use this BAPI directly through SE37 ,
    supplying the required inputs.
    But now i am calling  this BAPI inside a program,
    Supplying the same inputs as earlier.
    Buit i am not able to generate a PO.
    I am getting the messages in the Return Table as :|Please enter items first
                                                                                    No instance of object type PurchaseOrder has been created. External referen
                                                                                    Document contains no items
    Can someone suggest What input am i missing ?
    Thanks in advance,
    Harshit Rungta

  • Cancel Purchase Order

    Dear Expert,
    Can you give me the steps as to how to cancel purchase order, thanks.

    Go to Purchase Order and in Purchase Order Item details Tab Select Delivery Tab and Clcik on Delivery Completed Indicator and Save.
    Repeat the Same Steps for all Items in Purchase Order and save.
    IF you want to Delete the Line Items Then Select the line ITems in ITem Overview tab and Click on Delete Button and save.
    http://www.sap-img.com/materials/steps-to-take-in-order-to-force-close-po.htm
    http://www.sap-img.com/materials/how-can-we-delete-purchase-requisition.htm
    Regards,
    Ashok

  • Cancelled Purchase Order

    Dear Sir /Madam,
    What is the procedure for cancel Purchase Order?How to Intimate Vendor to cancellation of Po? How to find a List of Canceled Purchase Order in system? requesting you to pl.explain with T-Code.
    With Kind regards,
    Nitin

    >
    Jeyakanthan A wrote:
    > Define resaons for cancellation in SPRO settings.
    >
    > When you cancel order,mentione order reason code in p.o.
    >
    > It will list canceled p.o's in ME2N,From dynamci selection select Reason for cancel. from document header,enter reason code.
    Check this detail of this img activity:
    Define Reasons for Cancellation
    In this step, you can specify the circumstances under which a purchase order with a validity period (i.e., in the standard system, a PO of the document type 'FO') is terminated prematurely.
    Activities
    Define a key and enter a description of the relevant reasons for cancellation.
    *Meaning this setting can only be done for document type FO = framework order.*
    unless i am missing some other setting.
    This can be found under spro>mm>PO>Define reasons for cancellation
    Edited by: Afshad Irani on Aug 27, 2010 12:32 PM

  • To block the Purchase orders with the help of Quality info record.

    Dear All,
    I have one requirement and it is as follows.
    In Quality Info Record we have a tab called Release in that there are two sections one is Release quantity and the other is Block.
    Now my client requirement here is : consider an example suppose he enters 100 in the quantity field,upto 100 the system must allow him to do Purchase Order after the 100 system must show an error that quantity is blocked and Purchase order cannot be created.
    The purchase order should only create when he changes the quantity from 100 to the higher quantity.
    Is this possible?
    if so kindly tell me what are the  normal settings and configuration settings to be done.
    as the client doesnot want to change it manually.
    Kindly guide me in this regard.
    Regards,
    santosh.

    Dear Santosh,
    E.g. lets say Release Qty. = 100.
    now, if the material received from vendor is OK, you want to continue with that vendor, and if material is rejected,no further material will be rceived.
    as, your client do not wants to do it manually,
    in q-info record, above "release qty" there is "Release qty. active"tick. so, create Z function module which will only reset the "QINF FREI_MGKZ" field, and assign it into Follow-up action for Usage decision for acceptance. it will be better to create new UD code.
    at the end, if Material is Ok, after UD, it will remove "Release qty. active" tick and you can continue with that vendor.  and if UD is rejected, system is not going to allow for PO, as release qty was 100.
    regards,
    Amol

  • HOW TO BLOCK THE PURCHASE ORDER AND MARK FOR DELETION ?

    Hi ,
                        During the Creation of the Purchase order in the SAP System... After creation of the Purchase order should be blocked and a work item is created for the approver. If the Approver approves the Order then the Order is Unblocked and a mail send to the initiators inbox and the Order is Released. Similarly if the Approver Rejects the Purchase Order then its set for Mark for Deletion.
    I did Po creation and release part. But i am facing problem during the Blocking & Unblocking the Purchase order. If he rejects i need to set for "Mark For Deletion". plz help me to solve this...

    Hi,
    You can use bapi 'BAPI_PO_CHANGE' to change the status of PO and for release use bapi BAPI_PO_RELEASE.
    Hope this will help you.
    Smit

  • Canceling Purchase Order

    Hello Gurus,
    I got error <b>The Valuation Category cannot be changed bcos Purchase oders already exits</b>,there is po exists for 10 pieces
    i got this error while selecting <b>Valuation Category</b> in material master,
    when doing Split valuation we've to post out all stocks,
    so my question i want to Cancel this purchase order,
    i tried with blocking PO by selecting LOCK in PO item
    im still getting the error..........how can i avoid this error
    pls help me............

    Hi,
    U need to put deletion indicator at the line item from tcode me22 and going to edit and putting deletion indiactor.
    Moreover you need to put the delivery completed indicator in the item details.
    Hope this helps u
    reward if useful
    Rohit

  • How to view cancelled Purchase Orders.

    Hello Everybody,
    I was wondering if there is a way to see canceled or blocked Purchase Orders. Any help would be highly appreciated.
    Thank You.

    Hi,
    Select report ME2N (Purchasing Documents per Document Number). Select oprtion 'Dynamic Selection'. Here, at 'Purchasing Document Item' level, select field 'Deletion Indicator'. Mark this foeld as 'X'. Select your other parameters such as vendor, date range, plant & execute. The system will show the report of P.O.s with deletion indicator at item level & with other paramters you have selected.
    Hope this will help.
    Regards,
    Prashant Kolhatkar

  • Goods-Receipt Block for Purchase Order depending on Goods-Receipt Date

    Hi,
    I want to set up the system so it can block the Goods-Receipt for Purchase Order respectively Scheduling Agreement if the Goods Receipt is about to take place 30 days or more before the Desired Delivery Date.
    For Example: If I have a Purchase Order with the desired delivery date 30.09.2008. I want to set up the system so, that it bans (forbids) the Goods Receipt before the 01.09.2008.
    If possible I would want to do that without additional programming. Is it possible to set up the system using only customising settings?
    Thanks for your help
    Bogdan

    Hello Marius-Bodgan,
    as this question is marked answered I assume you have received an solution for your requirement. Could you please share the solution with me by posting it here? I have the same requirement and did not find any possibility to do this in customizing.
    Thanks in advance,
    Emanuel
    Found the solution in thread Re: Goods Receipt
    Edited by: Emanuel Penalver on Jul 15, 2008 11:48 AM

  • Reg bapi for creation of purchase order

    hai to all,
    i have to upload purchase orders from  legacy file to R/3 system
    certain order having more than 50 line items
    so please any one send me <b>stardard bapi program or bdc program for me21n</b> transaction which will suitable for my senario.
    please send asap
    regards
    vijay

    hai
    i am trying to create po using bapi
    the following code explains
    constants : c_x value 'X'.
      data: del_date type sy-datum.
      data: pohead  type bapimepoheader.
      data: poheadx type bapimepoheaderx.
      data: exp_head type bapimepoheader.
      data: t_return_out  type table of bapiret2 with header line,
            wa_return_out  TYPE bapiret2.
      data: poitem  type table of bapimepoitem with header line.
      data: poitemx type table of bapimepoitemx with header line.
      data: posched  type table of bapimeposchedule with header line.
      data: poschedx type table of bapimeposchedulx with header line.
      data: ex_po_number type bapimepoheader-po_number.
    Header Level Data
      pohead-comp_code = '1011'.
      pohead-doc_type   = 'NB'     .
      pohead-creat_date = sy-datum   .
      pohead-vendor = 'A1138'.
      pohead-purch_org = 'DOMS'.
      pohead-pur_group = 'MFR'.
      pohead-langu      = sy-langu   .
      pohead-doc_date   = sy-datum.
      poheadx-comp_code  = c_x.
      poheadx-doc_type   = c_x.
      poheadx-creat_date = c_x.
      poheadx-vendor     = c_x.
      poheadx-langu      = c_x.
      poheadx-purch_org  = c_x.
      poheadx-pur_group  = c_x.
      poheadx-doc_date   = c_x.
    Item Level Data
      poitem-po_item  = 1.
      poitem-material = '000000000100001079'.
      poitem-plant    = 'HO01'.
    poitem-stge_loc = ''.
      poitem-quantity = 1.
      append poitem.
      poitemx-po_item    = 1.
      poitemx-po_itemx   = c_x.
      poitemx-material   = c_x.
      poitemx-plant      = c_x .
      poitemx-stge_loc   = c_x .
      poitemx-quantity   = c_x .
      poitemx-tax_code   = c_x .
      poitemx-item_cat   = c_x .
      poitemx-acctasscat = c_x .
      append poitemx.
    Schedule Line Level Data
    posched-po_item        = 1.
    posched-sched_line     = 1.
    posched-del_datcat_ext = 'D'.
    del_date = sy-datum + 1.
    write del_date to posched-delivery_date.
    posched-deliv_time     = '000001'.
    posched-quantity       = 1.
    append posched.
    poschedx-po_item        = 1.
    poschedx-sched_line     = 1.
    poschedx-po_itemx       = c_x.
    poschedx-sched_linex    = c_x.
    poschedx-del_datcat_ext = c_x.
    poschedx-delivery_date  = c_x.
    poschedx-quantity       = c_x.
    append poschedx.
      call function 'BAPI_PO_CREATE1'
           EXPORTING
                poheader         = pohead
                poheaderx        = poheadx
                testrun          = ' '
           IMPORTING
                exppurchaseorder = ex_po_number
                expheader        = exp_head
           TABLES
                return           = t_return_out
                poitem           = poitem
                poitemx          = poitemx.
               poschedule       = posched
               poschedulex      = poschedx.
    call function 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
               wait = 'X'.
    if not ex_po_number is initial.
       call function 'DEQUEUE_ALL'.
    else.
       call function 'DEQUEUE_ALL'.
       message i036.
    endif.
    **endform. " create_po
    IF ex_po_number IS NOT INITIAL.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
          PERFORM show_result.
    ELSE.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          PERFORM show_result.
        ENDIF.
    *&      Form  show_result
          text
    -->  p1        text
    <--  p2        text
    FORM show_result .
      LOOP AT t_return_out INTO wa_return_out.
        write : ex_po_number.
        WRITE : / wa_return_out-type,
                / wa_return_out-id,
                / wa_return_out-number,
                / wa_return_out-message,
                / wa_return_out-log_no,
                / wa_return_out-log_msg_no,
                / wa_return_out-message_v1,
                / wa_return_out-message_v2,
                / wa_return_out-message_v3,
                / wa_return_out-message_v4,
                / wa_return_out-parameter,
                / wa_return_out-row,
                / wa_return_out-field,
                / wa_return_out-system.
      ENDLOOP.
    <b>iam geting the error such that</b>
    E                                                                            
    BAPI                                                                         
    001                                                                          
    No instance of object type PurchaseOrder has been created. External reference:
    000000                                                                       
    PurchaseOrder                                                                
    POHEADER                                                                     
            1                                                                 
    E                                                                         
    ME                                                                        
    062                                                                       
    Account assignment mandatory for material 100001079 (enter acc. ***. cat.)
    000000                                                                    
    100001079                                                                 
    POITEM                                                                    
    <b>how to correct this error</b>
    regards
    vijay

  • Customer cancels purchase order

    Hi alltogether,
    I have to give a recommendation for the following case:
    - user created a customer order with one item and item cat. TAB!
    - user created a po with ME57/ME21N and ordered the parts
    - user received the parts (with or w/o MIGO, doesn't matter)
    Now the customer rings and does not want the parts anymore.
    User wants to keep the po with the specific number 45xxxxxxxx, because he will receive a supplier invoice with relation to that po number.
    He also wants to keep the ordered parts in his own stock, means he doesn't want to return to supplier.
    How can we reject the customer order and change the po so that we can post the stock to unrestricted use?
    (It doesn't allow to reject the customer order items (subsequent documents message) as long as I do not delete the purch. order item.
    Error-Message: "Delete purchase order 45xxx and item 000010 first" )
    There is one workaround I found:
    1.) delete po item (garbage icon)
    2.) reject customer order item
    3.) change account assignment category in po item to BLANK (was set to M, because of the TAB item in cust. order)
    4.) clear Purch.req and req. item reference in po item line
    5.) save po
    6.) undo deletion of po item (unlock icon)
    Too complicate, isn't it?
    Any good ideas from the pros outside?
    Thx a lot
    Wolfi.

    Hi Wolfi,
    It seems the experts here are missed the mark and seem not to grasp the main point of your question. I think you should try to get proper answer on the sales general forum.
    In my opinion you have already drawn up the steps of the exact solution how to handle this issue and no one has been able to give a solution of such qualty till know.
    You have to delete PO, PR, SO as well, so maybe you have to work with it a lot but if you want an exact solution you may have to pay the price.
    Other side of the coin that your customer shouldn't cancel an already issued order of which procurement is in progress. Of course it is your internal issue how to handle.
    In my opinion maybe you can simply delete the PO item and create a new one that is not in connection with the SO itself - I don't know it is possible but maybe it is.
    BR
    Csaba

  • BAPI  for Creating Service Purchase Order

    Hi All,
      I am not able to create service po using bapi, after passing the parameters
      ls_polimits-LIMIT     = '30'.
      ls_polimits-EXP_VALUE = '20'.
      APPEND : ls_polimits TO gt_polimits.
        ls_poserv-quantity = '10'.
        ls_poserv-base_uom = 'AU'.
        ls_poserv-short_text = 'AAAAAAAA'..
        ls_poserv-price_unit = '1'.
        ls_poserv-GR_PRICE = '25'.
        ls_poserv-TAX_CODE = 'V0'.
        ls_poserv-MATL_GROUP = '6AD'.
        APPEND : ls_poserv TO gt_poserv,
               ls_poservx TO gt_poservtxt.
    message getting is
    500000280 00010 Purchase order still contains faulty items
    500000280 00010 No instance of object type PurchaseOrder has been created. External reference:
    500000280 00010 Please maintain services or limits
    please help me
    Appropriate points will be rewarded.
    Arun

    Dear Seshu,
    This is not the problem with data, coz, i am able to create the PO (Service) Manually.
    please let me know what all tabeles, i need to pass for this BAPI_PO_CREATE1
    presently I am passing
    CALL FUNCTION 'BAPI_PO_CREATE1'
           EXPORTING
                poheader          = g_pohdr
                poheaderx         = g_pohdrx
               testrun           = 'X'
           IMPORTING
                exppurchaseorder  = l_ponum
           TABLES
                return            = lt_return
                poitem            = gt_poitem
                poitemx           = gt_poitemx
                poaccount         = gt_poacct
                poaccountx        = gt_poacctx
                POSERVICES        = gt_poserv
                POSRVACCESSVALUES = gt_poservacc
    Regards
    Arun

  • BAPI to get the Purchase Order Details

    Hi Folks,
    Which BAPI is used for retriving the details of a particulare Purchase Order? Please also mention how the same is used? Sample code will be helpful.
    Thanks
    Siddarth

    Hi Sid,
    Try this out...
    Report ZBapi .
    data: po_items type table of bapiekpo with header line.
    parameters: p_ebeln type ekko-ebeln.
    call function 'BAPI_PO_GETDETAIL'
      exporting
        purchaseorder                    = p_ebeln
      ITEMS                            = 'X'
      ACCOUNT_ASSIGNMENT               = ' '
      SCHEDULES                        = ' '
      HISTORY                          = ' '
      ITEM_TEXTS                       = ' '
      HEADER_TEXTS                     = ' '
      SERVICES                         = ' '
      CONFIRMATIONS                    = ' '
      SERVICE_TEXTS                    = ' '
      EXTENSIONS                       = ' '
    IMPORTING
      PO_HEADER                        =
      PO_ADDRESS                       =
    tables
      PO_HEADER_TEXTS                  =
       po_items                         = po_items
      PO_ITEM_ACCOUNT_ASSIGNMENT       =
      PO_ITEM_SCHEDULES                =
      PO_ITEM_CONFIRMATIONS            =
      PO_ITEM_TEXTS                    =
      PO_ITEM_HISTORY                  =
      PO_ITEM_HISTORY_TOTALS           =
      PO_ITEM_LIMITS                   =
      PO_ITEM_CONTRACT_LIMITS          =
      PO_ITEM_SERVICES                 =
      PO_ITEM_SRV_ACCASS_VALUES        =
      RETURN                           =
      PO_SERVICES_TEXTS                =
      EXTENSIONOUT                     =
    check sy-subrc  = 0.
    loop at po_items.
      write:/ po_items.
    endloop.
    <b>Reward Points if Useful</b>
    Regards
    Gokul

Maybe you are looking for

  • Website not loading properly out of nowhere

    Out of no where my website in Muse is not loading properly on the web. The homepage is loading weird and then if I click on the navigation it is fine. Does anyone know what might be happening?  The web address is www.dianearthistory.com

  • Screen not displayed correctly using InteractiveViewer

    I have created a report that prompts the User for Start and End dates.  When the Prompt dialogue box is displayed using interactiveViewer the images are not displayed correctly. Does anybody have a fix for this problem ?? Example attached. Ron Smith

  • How to create aliases in terminal

    I just installed mysql on my imac and in the documentation it suggests that I create an alias for the mysql server path so I don't have to keep typing out the long path. it suggests to create an alias called 'mysql' for the path '/usr/local/mysql/bin

  • Error when deploying to server. Offline deployment @currentUser

    So finally I am ready to deploy an LS HTML application to a webserver. I had to download and install the prereq offline, and think I got it right. However when I try to import the .zip file in IIS, I get the following error(the db gets created) An er

  • HT204187 outgoing mail rejects password on one computer but not the other

    The mail program says the outgoing mail password is incorrect on wife's desktop computer, but mail works from her iPad.