Purch Order header status....

Gurus.
Is there a easy way of getting the purchase order header status ?
....I have debugged the following code....without success:
PERFORM get_status_header IN PROGRAM saplmepo
                                          CHANGING status_header.

Hi,
Try using the ABAP class CL_PO_HEADER_HANDLE_MM to "load" global data of the SAPLMEPO program.
It will make it possible then to call the get_status_header form:
REPORT zggar_0006.
TYPE-POOLS: mmpur.
DATA: gr_po           TYPE REF TO cl_po_header_handle_mm,
      l_document      TYPE mepo_document,
      l_result        TYPE mmpur_bool.
DATA: l_mepo_status   TYPE mepo_status.  " to be filled with GET_STATUS_HEADER
START-OF-SELECTION.
  CREATE OBJECT gr_po.
  l_document-doc_type    = 'F'.
  l_document-process     = mmpur_po_process.
  l_document-trtyp       = 'A'.
  l_document-doc_key(10) = '4500000175'.
  CALL METHOD gr_po->po_initialize( im_document = l_document ).
*  CALL METHOD gr_po->set_po_number( im_po_number = l_document-doc_key(10) ).
** Read purchase order from database
  CALL METHOD gr_po->po_read
    EXPORTING
      im_tcode     = 'ME23N'
      im_trtyp     = l_document-trtyp
      im_aktyp     = l_document-trtyp
      im_po_number = l_document-doc_key(10)
      im_document  = l_document
    IMPORTING
      ex_result    = l_result.
  CHECK l_result = mmpur_yes.
  PERFORM get_status_header IN PROGRAM saplmepo
                            CHANGING l_mepo_status.
  WRITE : / l_mepo_status-value_ordered.
Hope this helps.
Best regards,
Guillaume

Similar Messages

  • Production Order Header Status

    Hi
    I am having a production order with 4 operations. when i am confirming the first operation as partial confirmation because i am just confirming only partial quantity, the whole production order status is set to PCNF. Even though i am finally confirming the same operation finally and confirming all the other operations also finally, the order status is not changing to CNF. it is still in the PCNF . how do i get it to CNF status? because the PCNF status for the order will create other problems.
    The operation statuses for the same order give correct statuses as PCNF or CNF or milestone. The problem is only with order header status.
    Can someone please solve this issue. Points assured
    Regards
    Chandra

    Hi,
    In tcode OPK4 - Define confirmation parameter select your plant & order type.
    In 2nd tab page, select Confirmation type - Automatic final confirmation.
    So when doing opn confirmation if the qty is equal or more than order qty, system automatically set to Final confirmation.
    If the confirmation qty is less than order qty, system automatically set to partial confirmation.
    Regards,
    Dharma

  • How the sales order header status update?

    Hello,
    In the sales order header "STATUS" tab is there, under this status tab we can find OBJECT status if we click that object status it shows the Object number,Object category,status profile and status with status no. on which bases this status will update in the sales order header?
    my case is Status "10-xxxx" set automatically for some orders.
    Could you plz let me know on which bases, the status will be updated in the sales order?
    Regards|KS

    Hi
    SAPu2019S GENERAL STATUS MANAGEMENT FUNCTIONALITY
    General Status Management replaced order status management functionality in recent SAP releases (4.6C).  This discussion will address general status management, as this is how SAP allows user statuses for controlling objects in this and future releases.
    General Status Management applies to internal orders, project definitions, WBS elements, production orders and many other objects in SAP.  For the purposes of this discussion we will concentrate on status management for internal orders and WBS elements.  A list of all objects relevant for status management will be made available upon request.
    A status is an indicator that fulfills two functions.  First, it informs you that a particular status has been reached.  For example, an internal order has been created and released; a settlement rule has been entered; a particular business transaction has been executed, etc.  Second, it influences the business transactions you can perform for a particular status.  A status can allow a business transaction; allow a business transaction but issue a warning message; or prohibit a business transaction altogether.  If a warning message is issued it is up to the user whether the business transaction is carried out or not.
    Statuses can be used to control and communicate.  Statuses can be used in reporting (show me a report of all internal orders with a status of TECO, or technically complete).  Statuses can be used as selection criteria (select all internal orders with a status of CLSD, or closed).  Statuses can communicate the state of an object (ready for archiving, not ready for settlement execution).
    There are SAP standard delivered statuses that apply to all object types.  These are known as SYSTEM STATUSES.  CRTD, REL, SETC, TECO are examples of SAP standard system statuses.  SAP standard system statuses cannot be removed from use.  You cannot override the SAP system status with a user status.  You cannot change the behavior of an SAP system status.
    User statuses (or user defined statuses) exist in addition to SAP standard statuses.  User statuses are intended to augment or refine SAP standard statuses, not replace them.  There is no limitation to the number of user statuses that can be created.  Both system and user statuses influence business transactions in the same way.
    An object can have multiple statuses active at the same time.  A plant maintenance order can have released, preliminarily costed, work order printed and confirmed statuses all at the same time.  For SAP display purposes only one status can be displayed on the status line in master data screens, but it is possible to see all active statuses for an object at one time by drilling down into the master data screens.
    A STATUS PROFILE, or user status profile, contains individual user statuses and the business transaction rules defined for those statuses.  There is no limit to the number of user status profiles that can be maintained in SAP.  A user status profile is assigned to an order type or a project profile in configuration.  This user status profile is then defaulted into all objects that reference that order type or project profile.  A users status profile can be overwritten (or deleted) in an individual object (via native master data screens), but only if a user status has yet to be activated for that particular object.  Once a user status has been activated for that object the user status profile cannot be changed.
    HOW STATUS MANAGEMENT WORKS
    When an object (internal order, WBS element, production order) is created SAP assigns the system status CRTD.  MIT automatically releases the order, so the system status REL is also activated.  If there is a user status profile defined in the order type (or project profile) this is carried over into the internal order (or WBS element).  If not, only the SAP system statuses will apply to this object.
    When a user executes a business transaction for this object, SAP checks the user status to see if that business transaction can be executed without any additional influence from a user status, can be executed but with a warning message being issued, or cannot be executed at all.  SAP also checks whether the business transaction sets or deletes any other user statuses within the user status profile.
    A user status may also be maintained directly in the object master data.  Accessing the master data screens allows a user to manually maintain user statuses.  If necessary, an authorization code can be assigned to a user status to ensure that no unauthorized persons can change the status of an object.  Once changed, the new user status is fully active and acts no differently than if a business transaction set the user status.
    Status management and business transaction control only work with standard SAP transactions.  Z transactions will not show up on the business transaction list for an object.  The business transaction table is configurable, but SAP strongly recommends not changing that table.  SAP directly updates that table via support packs and it is often impacted during upgrades.
    Authorization codes / keys are available in user statuses.  The authorization code is checked only when user statuses are being set manually, from within the objectu2019s master data screens.  This ensures the user has the proper authorization to set that status for that particular object.  However, it is important to understand that SAP sets a user status in reaction to a business transaction it does not perform an authorization check.

  • Sales order header status

    Dear Gm,
    I want see sales order header status for "n" number (Mass) of sales order,From the Sales order header status i want the details abt ("Incomplete header data"/Partially rejected),Please guide me how to get the same,
    now i am taking From VA03 ,But it consume more time
    Regards
    Arun kumar K

    incomplete doc - header data
    Use Table VBUV - Sales Document: Incompletion Log
    Where, Table-Field VBUV-TBNAM maintain Tables as VBAK
    Partially rejected
    Header level
    VBUK-ABSTK as B - Partially processed
    Item Level
    VBUP-ABSTA as B - Partially processed
    Regards
    JP

  • Function Module to update the sales order header status

    Hi,
      I am looking for a function module to update the Sales order header status.
      Pls. let me know if anybody has used any FM to update the SO status.
    Thanks,

    By mentioning status do you mean Object status or Document status??
    For Object status you may use FM: STATUS_MAINTAIN
    For document status it changes according to flow.
    Regards
    Eswar

  • Purchase Order Header Status tab

    Hello.
    I have a problem-question.
    In some POs in header status tab, the quantity is missing and only the amount is displayed.
    Why is that?
    thank you!

    compare the items of a purchase order showing the quantity with a PO that does not show the quantity.
    Maybe one is a service PO while the other is for material.

  • Unable to upload PM Work Order Header Status

    Hi,
    I have made LSMW for tcode: IW31. I have a requirement to upload legacy data to SAP with their existing header status.
    For instance:
    I have a work order which got a header status complete and I want to upload this work order with its status. So, how can I upload different work orders with their different header status.
    Do let me know as soon as possible.
    Thanks for the contribution.
    Regards,
    Yahya

    Yes, you are right. Originally it should be the way you answered but requirement is to upload data with respect to their order status from legacy.
    In addition, is there any possiblity that I can create one complete LSMW for transaction IW31 OR IW32?
    This is asked because I am unable to upload data in Operatoins Tab
    Thanks.
    Regards,
    Yahya

  • Purchase Order Header Status report

    Hi All,
    Just wondering in which table /report I could get the values of "STATUS" tab in PO header which has information about Ordered,Delivered,Still to deli.,Invoiced,Downpayments..
    Does anyone know from wher i can get this information for list of PO's?
    Inputs will be highly appreciated..
    Thanks & Regards
    Vikrant M Kelkar

    Hi Sri,
    Thanks for the reply, but change document table  CDHDR doesnot help us..
    Anyother table that you know...????
    Regards
    Vikrant M Kelkar

  • Quotation / Sales Order - Header - Status

    Hi
    How do I go about creating a new Status under Processing Status?
    I have searched for a solution but i am not 100% sure that the described solutions also apply to my issue (under SCM-PP I found how to create New Status like Production Order statuses).
    Ryan

    HI ,
    Try status profile under sales.Create  a new status proflle and assign the same to quotation or order.
    Thanks,
    Pramod

  • How to change header status of a sales order

    Hi people,
    can anybody suggest me a FM for changing sales order header status (say from partailly complete to completed).
    Regards,
    Sandy

    Use this FM SD_SALES_HEADER_MAINTAIN.
    <b><REMOVED BY MODERATOR></b>
    Regards.
    Message was edited by:
            Alvaro Tejada Galindo

  • How to change the status of clinical order header

    Hi all,
    I need to change the status (N1CORDER-WLSTA) of the clinical order header. I have found the way to change the status of the items and it works, but i dont know how to change the header status.
    Now, for the items i do:
    1- Create an object type cl_ishmed_prereg
    2- Load the item (n1vkg-vkgid)
    3- Use set_status method
    4- Save the object
    5- Commit work
    So, do you know how i can change the status of the header? Im looking for other methods but...
    Thanks,
    Manel

    In order to change the clinic order header status u have to:
    1- Obtain the instance from item instance:
        CALL METHOD lv_prereg->get_corder
          IMPORTING
            er_corder = lv_corder
            e_rc      = rc.
    2- Create a var type rn1_corder_x
    3- Modify:
    is_n1corder_x-wlsta = 'RE'. " new status
    is_n1corder_x-wlsta_x = 'X'.
    4- Use change mehod:
        CALL METHOD lv_corder->change
          EXPORTING
            is_corder_x     = is_n1corder_x
          IMPORTING
            e_rc            = rc
          CHANGING
            cr_errorhandler = cl_error.
    5- Save:
    CALL METHOD lv_corder->if_ish_objectbase~save
    6- Commit work
    Regards,
    Manel

  • Inconsistency of order header and operation status

    Hi guru.
    I did final confirmation of the production order.
    This production order has one operation.
    So..the operation status was changed to  'CNF MILE REL'.
    But Order header status was not changed to 'CNF DLV'.
    It's status was still  'REL MSPT PRC GMPS SETC'.
    I did final confrimation again with 0 qty.
    So it was changed to 'CNF DLV'.
    But i want to know why first 'final confirmation' could not change the order header status.
    Please help me.
    Thanks.

    Dear Jong,
    1) CNF and DLV are two different status
    2) If Auto GR is not maintained then you only get status CNF after doing final confirmation in CO11N or in CO15
    3) So in your case i guess after doing final confimation you checked the status and found CNF but not DLV
    4) after user doing GR in MB31 or in MIGO you might have got status DLV, and mean while again you might have
    done final confirmation with zero qty and seeing both status CNF and DLV
    Regards
    Madhu

  • Sales order Header Credit status showing as Approved

    Hi all,
    My User created a Sales order with 200 tones with around 5700 USD but while saving it did not block sales order for credit but the customer was over their credit limit.in FD32 it already exceed 152 % Further orders have blocked with other customer is was blocking
    i check in FD32 it showing Cred.limited used 152%
    and the sales order header status showing as - Approved
    when the sales order status shows as approved
    can any one guide me what could be problem
    Thanks
    Rajesh

    Hi
    CHeck with the order, see who has changed it
    salesorder- goto - environment- click changes and check it for that.
    Check on - how it is released
    who has changed
    take the log and time
    if all the congi
    config
    fine...then check the change log
    or go to table CDHDR
    Revert if you have further queries.

  • What is the best method to getting the Production Header Status?

    Hi All,
    To get the Production Order Header status I used the following function;
    ***Object to specify only the Prod.Ord header is needed
    v_ORDER_OBJECTS-HEADER = 'X'.
    Refresh IT_HEADER.
    CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
      EXPORTING
        NUMBER                 = wa_itab-AUFNR
        ORDER_OBJECTS          = v_ORDER_OBJECTS
      TABLES
        HEADER                 = IT_HEADER.
    Clear wa_HEADER.
    READ TABLE IT_HEADER WITH
       KEY ORDER_NUMBER = wa_itab-AUFNR INTO wa_HEADER.
    ***Finally got the Status
    wa_itab-STATUS = wa_HEADER-SYSTEM_STATUS.
    If I were to get the status for many Production Orders this would take a lot of time. So I decided to take another way that is;
    SELECT *
      INTO CORRESPONDING FIELDS OF TABLE ittab
    FROM jest
    WHERE objnr = caufv-OBJNR
    The problem in JEST table does not give the order in which each Status was Confirmed. It does not have a Date field to indicate the Date which the Status got confirmed. Because of this I am not in a position to put the Status in Order like it appears in the CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'.
    What I need, is there a table where the Header Status appears in order or a table that has the Date along with the Status?
    Thanks,
    Kishan

    Hi Sailatha Nagasamudram,
    The View VJAUFK points back to JEST table. Though the Date fields are included it does not help to get the Order in which Status were confirmed. The example I took in our system has the same date for all the Statuses. If you goto CO03 and see the Header Status they appear in Order which I am talking about.
    Thanks,
    Kishan

  • Header status is not changing in sales order

    Hi,
    I have done sales order, and released pick as well after that confirmed shipment also. And I have runned workflow background process for om:lines and om:headers also. But now the problem is after these steps the line level status is closed but the header level status is showing booked only. Please anyone help me to solve this issue.

    Hello,
    Header will close in last day of the month.
    Look also at Sales Order Header Does Not Close After ALL Lines Have Closed [ID 133837.1]
    Regards,
    Luko
    Edited by: Luko on 2011-10-27 08:47
    Edited by: Luko on 2011-10-27 08:47

Maybe you are looking for

  • Installation CRC exception

    I have the following error in installing the SunONE application server downloaded on my Win2K Professional OS SP3 patched. Any advice is appreciated. Thanks. -- error snippets |-1%java.util.zip.ZipException: invalid entry CRC (expected 0x263a0ea2 but

  • Append Text Header for Binary file

    Hello Experts I am using LabView 7.0 with PCI 6040 DAQ. I have created two separate files, one file is Binary that collects binary raw data from 16 channels of the DAQ. The second file contains variable length Header, i.e the information about all 16

  • Job Opportunities.

    Hello Everyone. I was just curious as to how does everyone get jobs for their businesses? I've worked with Html for about 4 years total. I've used Dreamweaver for about 2 of those years. I just find if rather difficult getting job opportunities. Do y

  • Xcode Crashing when creating or opening new projects

    Process:     Xcode [849] Path:        /Applications/Xcode.app/Contents/MacOS/Xcode Identifier:  com.apple.dt.Xcode Version:     5.0.2 (3335.32) Build Info:  IDEApplication-3335032000000000~4 App Item ID: 497799835 App External ID: 106632651 Code Type

  • Converting interactive DVD to IPad ?

    I have an interactive DVD which I would like to be able to play on my IPad (Gen 4). It is an educational DVD with lessons for each section. Can this be done and if so, how? Thank you for your help.