How to check Sales Order complete or incomplete in program?

Hi, Gurus:
In the program, how to check Sales Order complete or incomplete based on Order Number vbeln?
Thanks,

You can check the status table VBUK for this.
VBUK has all the status related fields in it.
Search for the field which suits to your specific requirment.
Regards,
Naimesh Patel

Similar Messages

  • How do know sales order  completed  or not

    Hi Gurus,
    I have created  Sales order with  materials and quantity,and ,
    could u tel Any Field for   sales order complete or incomplete status and Table
    Thanks in Advance.
    Sivakumar

    Check the Table VBUP whether the Delivery Status(LFSTA for sales order/RFSTA for inquiry) is 'A' (A - NOT YET PROCESSED , B-PARTIALLY PROCESSED, C-COMPLETELY PROCESSED)
    SELECT SINGLE VBELN        
                     POSNR        
      FROM  VBUP
      INTO   (LW_VBELN,
              LW_POSNR)
      WHERE VBELN  = I_VBELN
      AND    POSNR  = I_POSNR
      AND    LFSTA   =  'A'.
    IF SY-SUBRC = 0 MEANS SALES ORDER NOT YET PROCESSED.
    IF YOU WANT TO FIND THE SUBSEQUENT DOCUMENT FOR THE SO ,YOU CAN FIND IN THE TABLE VBFA.
    REGARDS,
    R

  • How to check sale order stock

    Hi,
    Which T-code used for view the  sales order stock
    thanks.

    Hi Balaji,
    You can View Sales Order Stock using MB52 with Special stock Indicator E and with MMBE and also try in CO09.
    Reg,
    Ashok
    Please close issue, if answered.

  • Insert code in prgram to check sales order exits in your own program

    Hi Experts
    I want to insert a coding in IDOC , can anyone write in abap coding and show .....The program is to check if sales order for category PSTYV ( CATEGORY ) for items ...
    if found set flag true else set flag false...
    Eg
    clear flag
    insert code
    to check s/o for ZTAC item found
    if found
    set flag = true
    else
    set flag = false
    So how can I write a a code in ABAP
    Thanks in advanced
    Piroz

    Hi Fracis
    Thanks for your advice I did in this way ,  Is there any correction required
    form look_sap_saleord  using    p_in_string
                                    p_material_in          " Material No exits
                                    p_site_in              " plant
                           changing p_out_saleord_e        " sales order
                                    p_out_material_e       " Mat No
                                    p_out_order_e          " Prod Order
                                    p_out_wemng_e          " QTY goods received for order item
                                    p_out_psmng_e.         " Ordered Qty Item
      data: lva_prodord like afpo-aufnr,   " Production Order
            lva_prodmat like afpo-matnr,   " Material Number
            lva_saleord like vbkd-vbeln,   " Sales Order
            lva_pstyv   like vbap-pstyv,   " Category
            lva_wemng   like afpo-wemng,   " Quantity of goods received for the order item
            lva_psmng   like afpo-psmng,   " Ordered Qty Item
            lva_count   type i.            " counter validation
    CHECK FOR SALES ORDER IN VBAP IF EXITS
    GO TO DELIVERES
    ELSE CHECK REQUIRED PRODUCTION ORDER
           ihrez_e Ship to party
    check single if the sales order exits
      select vbeln from vbkd into vbkd-vbeln
        where ihrez_e eq p_in_string.
      Is the sales order exits for ZTAN Category ?
        select vbeln from vbap into vbap-vbeln
          where vbeln eq vbkd-vbeln and
                werks eq p_site_in and
                matnr eq p_material_in and
                pstyv = 'ZTAN'.
        The sales order is for the specified plant.
          lva_saleord = vbap-vbeln.
          lva_prodmat = vbap-matnr.
          exit.
        endselect.
      when an order for this plant has been found.
        if not lva_saleord is initial.
        exit.
        endif.
      endselect.
      check not lva_saleord is initial.
      select count(*) into lva_count from vbap
        where vbeln = lva_saleord.
      if lva_count eq 1.
        select vbeln matnr aufnr pstyv
        into (lva_saleord, lva_prodmat, lva_prodord, lva_pstyv) from vbap
          where vbeln = lva_saleord and
                matnr = p_material_in and
                pstyv = 'ZTAN'.
          exit.
        endselect.
      else.
        select vbeln matnr aufnr pstyv
        into (lva_saleord, lva_prodmat, lva_prodord, lva_pstyv) from vbap
          where vbeln = lva_saleord
          and matnr   = p_material_in.
          exit.
        endselect.
      endif.
       move: lva_saleord to p_out_saleord_e,           " sales order
             lva_prodord to p_out_order_e,             " production order
             lva_prodmat to p_out_material_e,          " material no
             lva_psmng   to p_out_psmng_e,             " QTY Ordered
             lva_wemng   to p_out_wemng_e.             " Qty Received goods
            lva_wemng   to p_out_wemng_e.             " Quantity of goods received for the order item
    endform.                    " look_sap_sales ord
    Regards

  • How to make the status of a sales order complete of which PART DELIVERY

    How to make the status of a sales order complete of which PARTIAL DELIVERY has already done. <b>(Assigning rejection status not accepted)</b>

    Hi Gyana
    There is no document with me. But I can confidently say that because I am using this functionality.
    In my case I have created a Order Reason as "Short Closed". once you short close this order only the balance quantity gets rejected (provided you have already made previous delivery and PGI).
    Try it in one of your test clients if you have. Once it is short Closed it wont also show in the orders due for processing in Production.
    Also you can generate reports based on this if your customer wants to know how many order he has short closed, qty of item short closed etc.
    Try it.
    Rgds
    Sunil

  • How to compare sale order bom and production order bom.

    i would like to provide report with respect to comparation of sale order bom and production order bom, but i am not familiar with SD and PP, can anyone give me some clue? i only know sale order bom is created via 'CS61', afterwards run mrp to get production order, the process appears complicated, i needn't know the process detail, just want to know how to get sale order bom and relative production order bom. please guide me.

    Hi,
    Check Tcode:CS14 to SD/PP BOM's
    Chidambaram

  • How to create sales order Automatically with reference to contract?

    how to create sales order automatically through batch or online? can anyone please suggest what needs to be change in SAPMV45A program?

    Hi,
    Wt am able to understand from the above question is, you want to create automatic sales order against contract on a day to day basis by doing batch program, hope am wright.
    See you can do it in two ways.
    1. By using BDC, in SHDB T code record how exactly you will do transaction and then give it to your abaper rest he will do. he will write a program and he will schedule that program every day night.
    2. By using BAPI. Just check in there are many threads are there which gives sales order bapi. Tell your abaper to map that bapi and tell them to schedule back ground job.
    Hope this will help out in solving your problem.
    Regards,
    Nagesh

  • How to list Sales Order with credit block

    Hi, Gurus,
    I really don't know how to list sales orders with credit block?
    Is there any way for end user to do it?
    If so, is it possible to list SO with credit block for certain period of time such as one month?
    Any help would be appreciated.

    HI
    Check T-Code VKM2 (Released documents)
    You need to check VKM1 (Blocked Documents)
    Sorry before i gave wrong information , myself i corrected VKM2 for released not for blocked list (Due to non Availability of SAP access )
    Regards,
    Prasanna
    Edited by: prasanna_sap on Feb 7, 2012 7:12 AM

  • How to find sales order no., purchase order no. using sales order ID,PO ID

    hi,
    how to find sales order no., purchase order no. using sales order ID,PO ID
    Thank you,
    hari om

    Dear Hari Om,
    Could you please tell me, to what are you referring Sales Order ID and P.O. ID?
    meanwhile check with:
    T. Code: SE16
    Table: VBKD
    Execute (F8) the Report.
    On to next Screen, Go to Menu-bar
    Settings --> Format_Lists --> Choose Fields
    Field: VBELN - Sales Order
    Field: BSTKD - Purchase Order No.
    Best Regards,
    Amit

  • How to find sales order using material???

    hi guyz,
    i have a mateial and i want to check the sales order created with this material, I am using VBAP table in SE16,could you plz advice how can i check sales order for this material using table.appreciate immediate reply.
    Thanks.
    Md

    Hi Md,
    If you want to find the sales orders with the material number then go to SE16 and go to VBAP table.In the VBAP table selection screen give the material number which you want then press F8 you will get the all sales orders with your material number.
    Thanks,
    shyla

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • Check sales order exits for category ZTAC

    Hi Experts
    I have a requirement to modify the iDOC interfaced program,
    In the routien which checks for the existence of a production order, I have to modify the following
    1.  Inspect each item on the sales order
    2. If (and only if) there is atleast one item with a category of "ZTAC" then check for a production order otherwise processing the order in the usual manner.
    Could anyone tell me how to check (Is there a sales order) if no then display error message if yes then is there a production order if no display error message if yes Create confirmation .......................
    I want to know how to write a coding to check sales order exits from table VBAP,VBAK Etc., .
    Thanks in Advanced
    Regards
    Piroz

    Hi Prabhu
    Thanks for your email and response but I need to check this in program for IDOC ....Modification
    Insert code in this way
    check sales order for category = 'ZTAN' inspect for each item on sales order
    and if you found item with cateogry ZTAN then check for production order otherwise go asual manner
    I WANT TO WRITE A CODING HERE **********************
      if production order required then check
                    for each item on sales order item list
                          with item category = 'ZTAC' then
                                     return true
                                next
                                  end function
      VBAP TABLE field VBELN and PSTYV (ZTAC,ZTAN Etc)
    Eg of coding
    if lva_saleord is initial
            select single * from vbap into l_saleord
              where vbelv = lva_saleord
              and   vbeln = lva_vbeln and
              exit.
            endselect.
          endif.
    I want to write a small program in between to check the sales order exits if it is then I have to go to deliveries ...................
    Regards
    Eslam

  • SALE ORDER COMPLETION DATE

    Hi all,
               We are create one sale order in va01N after completion of all process we make a delivery entry in VL01N.We are creat morethan five deliveries.
          Any standard report to see the sale orders completed date
    ie order closed date wise report.
    Regards,
    T.Murugu

    Hi
    You can use Acceptance field at Sales Order item to enter date on which final delivery is made.
    Based on that field, we can create a Z report lisitng Customer, Order Number, and Delivery Date (Maybe more fields based on the business scenario)
    Hope you find it useful.
    Reward points if you do.
    Regards
    Ravi

  • WMS :  How to Process Sales Order Released before Turning on WMS

    Hello Gurus,
    How to process sales orders released before WMS enable flag is turned on in the  new WMS enviournment in Oracle 11.5.10 ?

    Helios,
    Thanks for the document.
    I m looking for how to perform Pick confirm transactions for already printed Pick slips before WMS enabled flag is turn on for the org.
    One option is to close all the deliveries  but if there is no on hand at that point the they will remain option.
    Other option is to Back order those deliveries and re release them post wms enable flag is turned on... The only issue i see here is that if there are more new orders for one of the items  and the orders are released then which orders will get allocated/reserved if there is limited on hand quantity to statisfy the SO need.
    Let me know if you can think off some alternative solution.
    Apprecite help !!
    Thanks,
    Sam

  • How to print sales order acknowledgement while printing purchase order

    how to print sales order acknowledgement while printing corresponding purchase order
    in me22n

    in print program of Purchase order.. try to trigger output for Order Ack. as well...
    Order acknowledgement

Maybe you are looking for