Closing POs

Hi ppl,
          I am working on closing all the open POs(ekpo-delivery complete indicator is blank) along with some more validations from other db tables using for all entries(select query). finally i have the open POs in an internal table.
within a loop i have passed this table-po_number to bapi_po_change along with DCI field marked as 'X' at last i am displaying the return struct of the bapi but all are 'E' no PO z closed or changed.
DATA: li_item   TYPE bapimepoitem OCCURS 0 WITH HEADER LINE,
        li_header TYPE bapimepoheader OCCURS 0 WITH HEADER LINE,
        li_return_values TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
        lw_purchase_item LIKE LINE OF gi_purchase_item,
  li_itemx TYPE bapimepoitemx OCCURS 0 WITH HEADER LINE.
  li_item-no_more_gr = 'X'.
  LOOP AT gi_purchase_item.
    li_item-po_item     = li_itemx-po_item  = gi_purchase_item-ebelp.
    li_item-material    = gi_purchase_item-matnr.
    li_item-plant       = gi_purchase_item-werks.
    li_header-po_number = gi_purchase_item-ebeln.
    APPEND li_item.
    APPEND li_itemx.
    APPEND li_header.
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder                = li_header-po_number
TABLES
       return                       = li_return_values
       poitem                       = li_item
       poitemx                      = li_itemx
ENDLOOP.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*    EXPORTING
*      WAIT          =
*    IMPORTING
*      RETURN        =
  LOOP AT li_return_values.
    WRITE : / li_return_values-type,
            / li_return_values-message.
ENDLOOP.
Now what my specification is there are so many items for a single PO number i need to close even tat..... How can i pass many item numbers(EBELP) for a single po_number(EBELN)????
can anyone suggest something on this at the earliest........

pass the items in an internal table and passit to the function module.
reward this with points.

Similar Messages

  • Return to Vendor Process on Closed POs

    Hi,
    A quick check.
    We have a scenario in which we are returning goods to vendor for closed POs which are not available in the SAP system. These closed POs are available in BW system for reference.
    How do we resolve this problem?
    Please share your thoughts on this.
    Appreciate your responses.
    Kind Regards,
    Tanuja

    Dear btanuji
    Actually in your case all data is stored in BW (it means Archiving - temparerly stored data) you can take help your BW consultant, then restore in SAP R3. (they will restore that data in relevant fields)
    Hope you understand
    Regards
    shankar

  • Extracting closed POs in ME2N report

    Hi guys,
    How do i extract all closed POs during certain period using ME2N report.also how do i display some more detail from other fields in the report.( adding custom scope ).Is there any parameter which can filter POs by  closing date
    looking forward for your suggestions.
    Thanks
    Chris T

    Hello Chris,
    If you have custom fields then you can do it using Query or developing a report with the help of technical experts.
    For query: Refer to the first thread of this forum.
    For developing report : Consult with your technical expert, explain him your requirement, give the fields you want as input and as output. he will develop a report based on your requirement.
    Hope this helps.
    Regards
    Arif Mansuri

  • Report to show closed POs

    Hi Experts,
    Is there report in purchasing which allow us to extract a list of Closed PO ?
    ( PO for which goods receipt & invoicing is done)
    Can any one guide me thru, Many thanks.
    Regards,
    Simha

    Hi All,
    Many thanks for your inputs.
    In ME2N, Can you pls guide me what inputs i need to consider in 'dynamic selections' for POs where Goods receipt is done and Invoicing is done?
    Is it that
    Purchasing Document Item ->
                                               Delivery Completed = 'X'
                                               Invoice receipt        = 'X'
    With this input will i be able to retrieve POs for which Goods receipt and Invoicing is done?
    Regards,
    Simha

  • Purchased order table for closed POs

    Hi All,
    My client wants to build a query to show the open quantity and value for all GR and IR based POs. They do not want to use the standard report ME2L, ME2N, ME2M etc..Pls let me know if anyone has built the similar query. I have joint EKPO, EKET which gives me the scheduled and recvd qty and its value. To show the difference of these two quantities as open qty, I have added an additional column and put a formula to calculate the difference (i.e EKET-MENGE - EKET-WEMNG). This is working fine for GR based PO. But the problem im facing with is IR based PO. Since the query pulls the qty from EKET and EKET will have 0 qty for IR based PO, in this case the query is showing all schedu;ed qty as open qty which is wrong.
    I would really appreciate if someone can advise me the best way to work on this issue. Also pls let me know if there is any table that shows PO status whether its open/closed so i can join that table as well.
    Thanks,
    Maya

    Thank you Pankaj for quick response.
    I believe delivery completion indicator would work only for GR based PO.
    I used EKBE as well. But it does not seem to work fine. When I use EKBE, it brings both GR and IR qty for each line item. And also if there are multiple GR and IR, the formula calculates the difference for all lines which is not showing the correct open qty.
    Any other thoughts ?
    Thank you,
    Maya

  • Project commitment from closed POs with unreceived lines

    Hello.
    Does the PO commitment on a Project remain active if the PO is closed, but this PO has unreceived lines (money left on the PO).
    If not, obviously, the proper way to close this PO si to reduce the lines, right?
    m

    Hi
    You might need to Permanently Close the PO. I guess that will remove the commitment.
    Dina

  • Forced closing open Approved POs with data related issues

    Hello All,
    I have a requirement to force "Final Close" all the old Pos (2 - 3 year old) as part of data clean up. Most of the POs can't be closed through froms as they are all 3-way match POs and their recieved/delivered qty <> invoice qty.
    I 'm wondering does Oracle provide any data clean up scripts for the forced closed POs ? If not if we update the back end tables (oracle does not advise) are there any implications for the new transactions ?
    Thanks for your help & feedback
    Ravi

    I'm having this exact same problem, except I don't use GMail Notifier. The being unable to log out, shut down, or restart issue I've had intermittently in the past; the broken screensaver is new.

  • Closing Open Purchase order

    Hi All
    I want to Close all the open PO's
    For this i m using Mass maintenance
    I have seleted the Object as purchase order  --Line item details
    Well i have selected few POs for testing and marked all of them as delivery completed
    But the Problem is that since the version management is active I am not able to close all POs
    Also i am not able to select the version management field because it is not available in Object of Purchase order
    What can be the possible solution
    Has anybody Mass closed POs
    REPY to the answer will be awarded duly
    Regds
    Shailesh

    Hey Shailesh,
    Your idea is correct develop a BDC (tcode SHDB) and by using it you can make indicator delivery completed set in PO.
    Also consult with ABAP fellow.
    Regs
    Appie

  • PO Closed Indicator table

    Hi,
    I have the table for EKBE  in front to individual item in field ELIKZ,,  X is there if the delevery is complteed for that item,   i want to know the table name and the field name to see teh PO which is complety closed at PO Level.
       regards,
        zafar

    Hi
    If you want to manually close the PO then activate the Delivery completed indicator and Final invoice indoicator.
    If you want to extract the closed POs then you can use the report ME2L, ME2N etc with proper selection parameters and Dynamic selections.
    If you want to extract the closed PO trhu table & field then Use EKPO-ELIKZ ( Del comp) & EKPO-EREKZ - Final Invoice
    Hope it helps
    Thanks/Karthik

  • Closing a PO

    Hi
    Can anyone explain me what are the different ways in which we can close a PO?.
    If the POs is closed, how to know that this PO is closed?. Is there any report to see the closed POs and Open POs seperately?
    Thanks in advance

    Apart from other replies,
    1.Short close purchase order by making goods receipt qty = ordered qty on doing this delivery completed indicator will be ticked automatically,po is close.
    2. If purchase order is wrongly created or pending for long time,then u can delete line items in purchase order.
    Tcode : MB5S is useful tcode to find open goods receipt / open invoices value wise / if u want to know delivery is completed,
    add delivery completion indicator field from layout if it is marked as 'X'.
    Other tcodes like ME2N,ME2M,ME2L,ME2K,ME2S,ME2C,ME2W will appropriate selection parameters will give u different views
    of purchase order by document number,material,vendor,account assignement,service purchase order,material group,stock transfer p.o,from reports u can easily find status of purchase orders.
    Hope it will clarify ur question.

  • Closing Purchase Orders

    We currently have over a thousand open POs that need to be closed. Some of the POs date back to 2004. Some have never had any activity posted against them. The remaining have not had any activity in 6 months or more. We are currently closing POs via the PO Recon Workbench. However, this is a timely process. Is there a process that we can run to close POs that are no longer needed.

    Hello Folks,
    There is PeopleSoft Delivered process for PO Close ,
    Close Purchase Orders ~ PO_PORECON
    This is an application engine.
    PIA Navigation : Purchasing > Purchase Orders > Reconcile POs > Close Purchase Orders >Close PO.
    This will gradually set the status of all the effected PO tables, with PO status as COMPLETE.
    if you need more detailed information.Please let me know.
    Regards,
    SM Sachdeva.

  • Closed PO Report with Reason

    Hi,
    Is there a report i could use to identify closed POs and their respective reasons for closing.
    Thanks

    There is no standard report to meet your requirement, you have to develop your own custom report.
    thanks

  • Closed PO without Action History(APP-PO-14288)

    Hi All,
    There are Some of closed POs without Action History.
    No record in PO_ACTION_HISTORY for these POs.
    When I view Action History , I will receive an error -- APP-PO-14288.
    Any advice is appreciated.
    Thank you.
    Best Regards
    Edited by: user631092 on Nov 24, 2008 4:20 PM

    Hi Srini,
    Thanks for your help.
    I found this note too. After running Workflow Background Process, I still can't view action history.
    I checked the result of wfdirchk.sql too, but I don't know how to analyze it.
    The end of the result as below:
    -- WF_USER_ROLES: Missing user role
    -- Every User must Participate in their own role
    ERROR :
    NAME
    R01156
    -- WF_USER_ROLES - Duplicate Rows
    no rows selected
    no rows selected
    --Number of roles that qualify for purging (Make sure you run purge
    --regularly!
    COUNT(*)
    705
    --Number of userroles that qualify for purging (Make sure you run purge
    --regularly!
    COUNT(*)
    1145

  • Purchase order report -help needed.

    Hi guys,
    Can anyone help me create a report for the purchase orders (similar to ME2N) ,my company needs all the info related to a PO like payment history.we need to pull all <b>closed POs</b> during a certain time period.Is ther a way todo this .
    I'd appreciate your help.'
    Thanks
    Cheris T

    Hello,
    You will need to run both ME80N and FBL1N. ME80FN can display PO history and from FBL1N you can get payment history.
    Hope this helps !
    Cheers !

  • Vendor Payment Analysis - How much is paid/ how much to pay ?

    Hello Experts,
                            I am trying to work on Vendor payment analysis where i have to identify how much amount has been paid to a perticular vendor and how much is to be paid analyzing the PO information. I also know that for a perticular vendor the PO created will either hit a cost centre (hardware vendor) or a wbs ( service provider or consulting vendor) .
          If  someone has worked on it and give me some suggestion it will be great help.
       I have identified that i can use 2LIS_02_ACC-Purchasing data account level for getting PO header and item detail but here how will i identify Open and closed POs.Is there a flag field please let me know
    Similarly can i use New gl ledger 0FI_GL_14 to identify which are open PO and which are closed. I would also like to know if these 2 datasoruces be able to fulfill my needs.
    regards,
    Aero

    Thanks Satya/Durgesh
                                         For the valuable information.One last question related to the scenario is about reporting based on Cost centre and WBS element for a vendor. A PO  for a perticular vendor will either hit a cost centre(hardware vendor) or a wbs (consultants for a project)  element based on product/ or services offered by the vendor.
    I was thinking of using below mentioned extractors :
    Cost Centre : 0CO_OM_CCA_9 ( Actual Costs Using Delta Extraction)
    WBS element : 0CO_OM_WBS_6( Actual Costs Using Delta Extraction)
    WBS Elements:0CO_OM_WBS_7( Commitment Line Items)
    WBS Elements: 0CO_OM_WBS_8(Budget Line Items)
    BUT Problem with these extractor is it has vendor information but no PO related to those vendors. How should i solve this issue ?

Maybe you are looking for

  • Coloured text cycle

    Hi there, Need some help in creating text (individual letters) cycling through different colours. For example each letter cycling through say 6 colours, each letter a different colour to the next. Trying to create a behavior to do this but without mu

  • How to get rid of historical data in MRP

    Hi, We have recently done Re Go-Live for a client. It involved changing the existing company code and re-assignment of new company code to existing plants. While doing so, transactional data that was created before Re Go-live still shows in the syste

  • JPanel Positiong with Gridbag Layout Problem

    Hi, I'm desingning an UI in which I made a JFrame and set it Layout as gridBag layout. Now I have added Three JPanel in this JFrame. The problem is that All the three JPanels are shown in center While I want to palce them in top left corner. I have d

  • Convert table definition to DTD

    does anybody know an easy way to create a DTD of an existing ORACLE database? Can I use "transx"? Thanks, Luis

  • Trying to update my iPad to ios6.  Unsuccessfully.

    Trying to update my iPad to ios6.  I have the latest version of iTunes.  I plug in my iPad and look at summary and shows I need to update.  I click update.  Message pops up saying I haven't backed up some items off my iPad. Click continue or cancel.