Open sales orders using SD_SELECT_SALES_DOCUMENTS - no POSNR

Hi all,
I'm trying to use SD_SELECT_SALES_DOCUMENTS to select open sales documents but have noticed that it does not seem to contain line item details, seems like it only shows open sales orders at header level. I was wondering if there was something similar for line item details?
Regards,
Mark.

Marcin, thanks for the suggestion - unfortunately in import parameters didn't give me the function I needed.
Instead i've found BAPI_SALESORDER_GETSTATUS  to be quite suitable.
Regards,
Mark

Similar Messages

  • Change of open sales order : using BAPI

    Hi
       this  is ravi
                      can any one help me on this  topic
            1)change of open sales order  using BAPI .With appropriate reason( like header level reason)
                       thanks & regards

    hI,
        chk this FM BAPI_SALESORDER_PROXY_UPLOAD how the FM BAPI_SALESORDER_CHANGE was used
    Check this code,
    REPORT Z_SALES_ORDER_CHANGE
    NO STANDARD PAGE HEADING
    LINE-SIZE 132
    LINE-COUNT 65(0)
    MESSAGE-ID ZZ.
    TABLES: VBAP.
    DATA:
    V_FILEIN(90) TYPE C,
    V_RECIN TYPE I,
    V_RECVBAP TYPE I,
    V_RECORDER TYPE I,
    V_VBELN LIKE VBAP-VBELN,
    ORDERHEADERINX LIKE BAPISDH1X.
    DATA: BEGIN OF I_ORDERS OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    BRGEW(18) TYPE C,
    VOLUM(18) TYPE C,
    END OF I_ORDERS.
    DATA: BEGIN OF I_OUTPUT OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    GEWEI LIKE VBAP-GEWEI,
    BRGEW LIKE VBAP-BRGEW,
    VOLUM LIKE VBAP-VOLUM,
    CKWGT TYPE C,
    CKVOL TYPE C,
    END OF I_OUTPUT.
    DATA: BEGIN OF ORDERITEMIN OCCURS 0.
    INCLUDE STRUCTURE BAPISDITM.
    DATA: END OF ORDERITEMIN.
    DATA: BEGIN OF ORDERITEMINX OCCURS 0.
    INCLUDE STRUCTURE BAPISDITMX.
    DATA: END OF ORDERITEMINX.
    DATA: BEGIN OF RETURN OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA: END OF RETURN.
    DATA: BEGIN OF BAPIRETURN OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA: END OF BAPIRETURN.
    PARAMETERS:
    P_PATH(45) TYPE C DEFAULT '/usr/users/ftpsapom/' LOWER CASE,
    P_FNAME(32) TYPE C DEFAULT '/sweetjo.txt' LOWER CASE.
    START-OF-SELECTION.
    CONCATENATE PATH AND FILE NAME INTO ONE VARIABLE
    CONCATENATE P_PATH P_FNAME INTO V_FILEIN.
    OPEN DATASET
    IF V_FILEIN IS INITIAL.
    MESSAGE E002 WITH 'FILE' V_FILEIN 'DOES NOT CONTAIN ANY DATA!'.
    ELSE.
    OPEN DATASET V_FILEIN
    FOR INPUT
    IN TEXT MODE.
    IF SY-SUBRC = 0.
    READ DATASET
    DO.
    READ DATASET V_FILEIN INTO I_ORDERS.
    IF SY-SUBRC = 0.
    APPEND I_ORDERS.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    CLOSE DATASET
    CLOSE DATASET V_FILEIN.
    IF SY-SUBRC <> 0.
    MESSAGE E002 WITH 'ERROR - CLOSING' V_FILEIN.
    ENDIF.
    ELSE.
    MESSAGE E002 WITH 'ERROR - COULD NOT OPEN' V_FILEIN.
    ENDIF.
    ENDIF.
    SORT AND REMOVE DUPLICATES FROM I_ORDERS
    SORT I_ORDERS BY VBELN POSNR.
    DELETE ADJACENT DUPLICATES FROM I_ORDERS.
    POPULATE I_OUTPUT
    LOOP AT I_ORDERS.
    SHIFT I_ORDERS-POSNR LEFT DELETING LEADING SPACE.
    CONCATENATE '0' I_ORDERS-POSNR INTO I_ORDERS-POSNR.
    SELECT SINGLE BRGEW VOLUM
    FROM VBAP
    INTO (VBAP-BRGEW, VBAP-VOLUM)
    WHERE VBELN = I_ORDERS-VBELN
    AND POSNR = I_ORDERS-POSNR.
    IF SY-SUBRC = 0.
    IF VBAP-BRGEW = 0.
    I_OUTPUT-CKWGT = 'X'.
    ENDIF.
    IF VBAP-VOLUM = 0.
    I_OUTPUT-CKVOL = 'X'.
    ENDIF.
    I_OUTPUT-VBELN = I_ORDERS-VBELN.
    I_OUTPUT-POSNR = I_ORDERS-POSNR.
    I_OUTPUT-GEWEI = 'ST'.
    I_OUTPUT-BRGEW = I_ORDERS-BRGEW.
    I_OUTPUT-VOLUM = I_ORDERS-VOLUM.
    APPEND I_OUTPUT.
    CLEAR: I_OUTPUT.
    ENDIF.
    V_RECIN = V_RECIN + 1.
    ENDLOOP.
    POPULATE BAPI DATA AND RUN BAPI
    CLEAR: ORDERHEADERINX, ORDERITEMIN, ORDERITEMINX,
    RETURN, BAPIRETURN.
    REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
    ORDERHEADERINX-UPDATEFLAG = 'U'.
    LOOP AT I_OUTPUT WHERE CKWGT = 'X' OR CKVOL = 'X'.
    V_RECVBAP = V_RECVBAP + 1.
    IF I_OUTPUT-VBELN <> V_VBELN AND SY-TABIX <> 1.
    V_RECORDER = V_RECORDER + 1.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = V_VBELN
    ORDER_HEADER_INX = ORDERHEADERINX
    TABLES
    RETURN = RETURN
    ORDER_ITEM_IN = ORDERITEMIN
    ORDER_ITEM_INX = ORDERITEMINX.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'
    IMPORTING
    RETURN = BAPIRETURN.
    WRITE OUT RETURN
    LOOP AT RETURN.
    WRITE: / RETURN.
    ENDLOOP.
    WRITE: / BAPIRETURN.
    SKIP.
    CLEAR: ORDERITEMIN, ORDERITEMINX,
    RETURN, BAPIRETURN.
    REFRESH: ORDERITEMIN, ORDERITEMINX, RETURN, BAPIRETURN.
    ENDIF.
    ORDERITEMIN-ITM_NUMBER = I_OUTPUT-POSNR.
    ORDERITEMIN-UNTOF_WGHT = I_OUTPUT-GEWEI.
    IF NOT I_OUTPUT-CKWGT IS INITIAL.
    ORDERITEMIN-GROSS_WGHT = I_OUTPUT-BRGEW.
    ORDERITEMINX-GROSS_WGHT = 'X'.
    ENDIF.
    IF NOT I_OUTPUT-CKVOL IS INITIAL.
    ORDERITEMIN-VOLUME = I_OUTPUT-VOLUM.
    ORDERITEMINX-VOLUME = 'X'.
    ENDIF.
    APPEND ORDERITEMIN.
    ORDERITEMINX-ITM_NUMBER = I_OUTPUT-POSNR.
    ORDERITEMINX-UNTOF_WGHT = 'X'.
    ORDERITEMINX-UPDATEFLAG = 'U'.
    APPEND ORDERITEMINX.
    V_VBELN = I_OUTPUT-VBELN.
    ENDLOOP.
    RUN BAPI ON LAST ORDER
    IF NOT ORDERITEMIN IS INITIAL.
    V_RECORDER = V_RECORDER + 1.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    SALESDOCUMENT = V_VBELN
    ORDER_HEADER_INX = ORDERHEADERINX
    TABLES
    RETURN = RETURN
    ORDER_ITEM_IN = ORDERITEMIN
    ORDER_ITEM_INX = ORDERITEMINX.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'
    IMPORTING
    RETURN = BAPIRETURN.
    WRITE OUT RETURN
    LOOP AT RETURN.
    WRITE: / RETURN.
    ENDLOOP.
    WRITE: / BAPIRETURN.
    SKIP.
    ENDIF.
    WRITE OUT RECORD COUNT FROM FILE
    WRITE: / 'RECORD COUNT FROM FILE ', V_RECIN.
    SKIP.
    WRITE OUT RECORD COUNT FROM FILE
    WRITE: / 'RECORD COUNT OF LINES TO CHANGE ', V_RECVBAP.
    SKIP.
    WRITE OUT RECORD COUNT FROM FILE
    WRITE: / 'RECORD COUNT OF ORDERS TO CHANGE ', V_RECORDER.
    SKIP.
    TOP OF PAGE
    TOP-OF-PAGE.
    WRITE:/1(5) TEXT-H01, 6(8) SY-DATUM MM/DD/YY,
    100(8) TEXT-H02, 126(8) SY-PAGNO.
    WRITE:/1(5) TEXT-H03, 6(8) SY-UZEIT USING EDIT MASK '__:__:__',
    20(77) TEXT-H04,
    100(8) TEXT-H05, 108(25) SY-REPID.
    WRITE:/1(6) TEXT-H06, 8(12) SY-UNAME,
    20(4) TEXT-H07, 25(32) SY-HOST,
    100(13) TEXT-H08, 121(8) SY-SYSID,
    129 '/', 130(3) SY-MANDT.
    ULINE.
    SKIP
    <b>Reward points</b>
    Regards

  • How to create open sales order using BAPI....?

    Hi Guru's,
    please help me how to create open sales order and which BAPI i have to use for open sales order.
    please provide any program logic related to this or step by step process.....
    that would be helpful to me.
    thanks in advance...
    Srinivas....

    Hi sreenu,
    Open PO or Open sales order means that the complete cycle is not complete. That means the Sales order is not completely delievered or is not billed or is not paid for. Only once the cycle is completed the order status shows as complete untill then its Open.
    You can use VA05 to find open sales orders.
    Similarlry open PO's are those PO's whos inbound delivery is not complete or whos goods receipt is not complete and whos payment is not done to the vendor
    U cannot directly find the open PO and open SO from any table.
    That u have to calculate from the status of the PO and SO and then check wheteher that is complete or not.
    U have table VBUP for SO status.Check out the fields in that table
    pls see the below link.
    http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
    http://msdn.microsoft.com/en-us/library/cc185190.aspx
    thjanks
    karthik

  • How to check open deliveries and open sales order using means of transport

    Hi,
    I want to check open sales order and open delivries which is having "ABXP" means of transport type .Can anybody suggest me to check in which table or any transa

    means of transport type
    Please reconfirm whether the above statement is correct.  Moreover, you yourself can check at your end by opening any sale order, go to that field, press F1 and press the "Technical Information" icon so that you can see the corresponding table name and field name over there.
    G. Lakshmipathi

  • Migrate all Open Sales Orders From Legacy System (SAP) To SAP System using

    Hi Experts,
                 I've to Migrate all Open Sales Orders From Legacy System (SAP) To SAP System using Business Objects with a new SALES ORDER DOCUMENT NUMBER referencing the older one.
               I'll get all the required data with field in an excel file.
                 Does any standard transaction exist for it ? Or how to go ahead with it ?
    Thanks and regards,
    Jyoti Shankar

    Hi
    If you are checking for CREATE option then Sales Doc Type
    For more Info goto SWO1 transaction -> BUS2032 --> DIsplay --> Execute --> There SELECT the method which you want to perform... There you can fine the MANDATORY parameters also....
    Or in DISPLAY mode PLACE Cursor on the Required Method and CLick the PARAMETERS button on toolbar...
    That will show the MANDATORY parameters...
    Reward if helpful....
    Message was edited by:
            Enter the Dragon

  • SQL Open Sales Orders Value using today's currency rates

    Hi experts,
    I am creating a report for displaying the open sales order values (and other fields) using current currency rate (where applicable). I developed the below query. The only problem with this query is that it ignores the order rows in which the currency field is blank (Don't understand why this happens in SAP). Do you have other ideas?
    Thanks & Regards,
    IC
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name",  T1.ItemCode, 
    T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM',  T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)", T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod, ORTT T4 WHERE T0.DocCur <> 'GBP' AND T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T1.OpenQty > 0
    UNION ALL
    SELECT
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date", T0.CardCode as "Cust Code", T0.CardName as "Customer Name", T1.ItemCode, T1.Dscription, T3.ItmsGrpNam, T1.U_SU, T1.U_SULEN, T1.U_SUQTY, T2.InvntryUom as 'Stock UOM', T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered", T1.OpenQty as 'Bal Qty', T1.LineTotal AS "Ord Value (GBP)", T1.LineTotal/T1.Quantity*T1.OpenQty AS "Open Qty Val (GBP)", T1.LineTotal/T1.Quantity AS "Price (GBP)", T1.Price*T1.OpenQty as "Ord Value (BP Currency)",T1.Price as 'Price (BP Curr)', T1.Currency as 'Cur Ind', T1.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date", T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod WHERE T0.DocCur = 'GBP'  AND T1.OpenQty > 0 ORDER BY 2,1

    Hi,
    Try:
    SELECT 
    T0.DocNum as 'Sales Ord No', T0.DocDate as "Ord Date",  T0.CardCode as "Cust Code",  T0.CardName as "Customer Name", 
    T1.ItemCode,  T1.Dscription,  T3.ItmsGrpNam,  T1.U_SU,  T1.U_SULEN,  T1.U_SUQTY,  T2.InvntryUom as 'Stock UOM', 
    T1.Quantity as 'Ord Qty', T1.Quantity*T2.U_ITWTSTU as 'Weight (KG)', T1.Quantity-T1.OpenQty as "Qty Delivered",
    T1.OpenQty as 'Bal Qty', T1.Price*T1.Quantity/T4.Rate AS "Ord Value (GBP)",
    T1.Price*T1.OpenQty/T4.Rate  AS "Open Qty Val (GBP)", T1.Price/T4.Rate  AS "Price (GBP)",
    T1.Price*T1.OpenQty as "Ord Value (BP Currency)", T1.Price as 'Price (BP Curr)',
    T1.Currency as 'Cur Ind', T4.[Rate] AS 'Curr Rate', T0.DocDueDate as "Due Date",  T1.WhsCode as 'Del WHG'
    FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry
    INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    LEFT JOIN ORTT T4 ON T1.Currency=T4.Currency AND T4.[RateDate] = [%0] AND T4.Rate != 0
    WHERE T0.DocCur != 'GBP' AND AND T1.OpenQty > 0
    Thanks,
    Gordon

  • Open sales order migration using lsmw

    Hello guys iam migrating open sales order and iam having header  fields
    AUART
    VKORG
    VTWEG
    SPART
    KUNNR
    KUNNR
    BSTKD
    BSTDK
    VBEGDAT
    VENDDAT
    item fields  are
    MATNR
    ZMENG
    SPART
    ISMACTIVATION
    what is the standard object available for this migration in lsmw.?i thought of using
    0090 salesdocument standrd object using direct input method but field ismactivation is not available in that object.
    if i go for bapi method salesorder_createfromdat2 i couldnt find the above fields for mapping in that object.but some of the guys in this forum used this bapi method  for this type of migration i dnt how they did it can u please suggest solution for this .
    Regards
    Janapathi

    Hi!
    In the given BAPI, the field names are different. You have to match them using their description or data type.
    If you check this BAPI in transaction SE37, on hte Import tab, click on the BAPISDHD1ref type.
    Here you can find the field DOC_TYPE (type AUART). With this way, you can find the matching fields.
    Regards
    Tamá

  • List of Open Sales Orders

    Hi All,
            I  am in need of a report to display  list of open Sales orders, Requirement Date or Requested Delivery Date and Requirement Qty for given Materials (Multiple Input) and Plant.
    Please guide me, Is there any Standard Report Available to display the above information except VA05.
                                                            Or else
    Please guide me, the list of tables to fetch those information.

    Did you try in VA05N ?
    How ever , you will not get the requirement date oir requested delivery date here .You can get only Document date or creation date .
    I suggest you to try to build a report with the below SAP field and data element  :
           VBELN       VBAK-VBELN,     "SALES  ORDER
           POSNR       VBAP-POSNR,     "ITEM
           MATKL       VBAP-MATKL,     "Material Group
           AUART       VBAK-AUART,     "ORDER TYPE
           AUDAT       VBAK-AUDAT,     "ORDER DATE
           BSTNK       VBAK-BSTNK,     "CUSTOMER PO NO.
           BSTDK       VBAK-BSTDK,     "CUSTOMER PO DATE
           WAERK       VBAK-WAERK,     "Currency
           PSTYV       VBAP-PSTYV,     "Sales document item category
           ZMENG       VBAP-ZMENG,     "TARGET QTY.
           KWMENG      VBAP-KWMENG,    "SO QTY
           OPENQTY     VBAP-KWMENG,    "OPEN QTY
           LFIMG       LIPS-LFIMG,     "DELIVERY QTY
           LFIMG1      LIPS-LFIMG,
           SHKZG       VBRP-SHKZG,
           NETPR       VBAP-NETPR,     "UNIT PRICE
           NETWR       VBAP-NETWR,     "NET VALUE
           BALWR       VBAP-NETWR,     "NET VALUE FOR BALANCE QTY.
           BALLOC      VBAP-NETWR,     "BALANCE VALUE IN LOCAL CURRENCY
           KURSK       VBKD-KURSK,     "EXCHANGE RATE
           FPLNR       VBKD-FPLNR,     "BILLING PLAN NO.
           FKSAF       FPLT-FKSAF,     "BILLING STATUS
           LOCVAL      VBAP-NETWR,     "AMT. IN LOCAL CURRENCY
           KUNNR       VBAK-KUNNR,     "CUSTOMER
           VKORG       VBAK-VKORG,     "SALES ORG.
           VKBUR       VBAK-VKBUR,     "SALES OFF.
           VDATU       VBAK-VDATU,     "Req.Del.Date  
           MATNR       MARA-MATNR,     "MATERIAL NO
           ARKTX       VBAP-ARKTX,     "MATERIAL DESC
           WERKS       VBAP-WERKS,     "PLANT
           LFSTA       VBUP-LFSTA,     "Item Delivery Status
           FKARA       TVAK-FKARA,
           GBSTA       VBUP-GBSTA,     "Overall Status
           FKSAA       VBUP-FKSAA,     "Item billing statuS
           NAME1       KNA1-NAME1,     "CUSTOMER NAME
           VBTYP       VBAK-VBTYP,     "Doc. Category
           LFARV       TVAK-LFARV,     "Delivery type
           LIFNR       LFA1-LIFNR,     "Vendor Number
           SPSTG       VBUK-SPSTG,     "Overall blkd status
           COST        KONV-KWERT,     "COST
           DISC        KONV-KBETR,     "DISCOUNT
           SPRICE      VBAP-NETWR,     "SELLING PRICE
    The above field are similiar kind of report .But I feel you have to keep two opetion one will be Open Sales Order and other All the sales order .Discuss with your abaper in this regard in line with VA05N and VA05
    Hope this will be useful
    Regards
    JH
    Edited by: Jiaul Haque on Jun 20, 2010 9:07 AM

  • Reg Open sales order item and the quantity

    Hi experts:
    I am getting open sales order item based on inner join of tables(vbak, vbap, vbep). Not using vbbe table in inner join as it doesnt carry all pending open records.
    can any one say how open sales order items  and their quantity can be retrieved?
    I searched forum and saw usage of vbuk and vbup tables, but it does not accomplish our scenario.
    Thanks in advance,
    Sashti.

    Hi,
    1) fetch the header information from VBAK table.
    2) Based on VBAK table fetch all the line items from VBAP table.
    3) Now fetch from VBFA table.
    *-Fetch from VBFA to get the delivered qty
      SELECT vbelv               " Preceding sales and distribution document
             posnv               " Preceding item of an SD document
             rfmng               " Referenced quantity in base UOM
        FROM vbfa
        INTO TABLE lt_vbfa
         WHERE vbelv   = gv_vbeln
           and vbtyp_n = 'J'.
    4) By comparing VBFA-POSNR just filter the records from the VBAP internal table. Remained lines are open lines of the sales order.
    Regards,
    ~Satya

  • How can i get the open sale orders for given material no and plant

    Hi,
    I have to retrieve the open sale orders depending on the material number and plant.
    For only open sale orders at header level and item level.
    I want to use VBUK-GBSTK to find open sale order at header level and
                          VBUP-GBSTA at item level.
    Can any one suggest me the best logic as performance is concerned?           
    Thanks,
    Kumar.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • BAPI or FM to get open sales orders to material like TC VA05N

    Hi,
    i'm searching for a bapi or fm to get a list with all open sales orders to a material like the tc va05n this do. Maybe some of you know such a bapi or fm.
    I tried the fm SD_SELECT_SALES_DOCUMENTS but i don't get the result i hoped.
    Would be happy if someone could help me.

    Hello Alexander,
    To get Open Sales order has VA05N use the Function Module
    RV_SALES_DOCUMENT_VIEW_3
    We need to pass value to the Importing parameters VBCOM
    To get the open sales order
    VBCOM-VKORG = sales organisation
    VBCOM-ZUART  = 'A'
    VBCOM-TRVOG = '0'
    VBCOM-STAT_DAZU = 'X'
    VBCOM-NAME_DAZU = 'X'
    VBCOM-KOPF_DAZU = 'X'
    VBCOM-VBOFF = 'X'
    VBCOM-AUDAT = Begin Date
    VBCOM-AUDAT_BIS = end date
    By passing this variable you will get the all open sales for given sales organisation and given date.

  • Logic for Open Sales order qty

    What should be the logic given to determine "open sales order qty" during designing a report.
    Note the criterias are as under:
    1) Open sales order qty is the confirmed qty less the delivery qty.
    2) The delivery qty should be delivery order qty (The delivery should not necessarily be pick, packed & PGI)

    sorry it doesn't work for services, since they do not create requirements.
    in this case you can use VBFA table, subracting all the delivered quantities VBFA-RFMNG with VBFA-VBTYP_N = J and VBFA-VBELV/VBFA-POSNV = to your order/item from the ordered quantities
    hope  this help you.
    Roberto

  • Report for open sales order

    Dear all,
    I need to create a open sales order report. Could you please tell me from which table i can get open sales order. Its standard report is VA05 and also I checked in table VBBE. but all record which i get from VA05 are not visible in VBBE table. It means VBBE doesnt carry all pending open records.
    Please guide me from which table i can get it or what is the sriteria to get it?
    Thankyou very much in advance
    Punnet Sharma

    hi,
    my logic goes like this:
    Note: Open cursor is used since we are dealing with huge amnt of data:
    * Select orders based on their Delivery status
      SELECT  vbeln
      FROM vbuk INTO TABLE git_vbuk
          WHERE lfstk = 'A' OR lfstk = 'B' .
    * Filter selected orders
    * Selection using open cursor
      DATA: lwa_op_sal_ord1 TYPE gt_comtab.
      IF sy-subrc = 0.
        OPEN CURSOR c1 FOR
          SELECT vbap~matnr
          FROM vbap INNER JOIN vbak
          ON vbap~vbeln EQ vbak~vbeln
          FOR ALL entries IN git_vbuk
          WHERE vbap~vbeln = git_vbuk-vbeln AND
                vbak~vbtyp = 'C'.
        DO.
          CLEAR lwa_op_sal_ord1.
          FETCH NEXT CURSOR c1 INTO CORRESPONDING FIELDS OF lwa_op_sal_ord1.
          IF sy-subrc = 0.
            APPEND lwa_op_sal_ord1 TO li_op_sal_ord1.
          ELSE.
            CLOSE CURSOR c1.
            EXIT.
          ENDIF.
        ENDDO.
      ENDIF.
    here filter orders based on 'A' and 'B' from VBUK...
    then frm header table VBAK get order for vbtyp ='C'.
    now li_op_sal_ord1 will have open sales orders..
    Moreover as per ur query y do u need the item data frm VBAP as u are only concerned abt VBELN.
    If u need item u hv 2 run another select.
    regards,
    ags

  • Reg : open sale order

    hai to all
    i my senario i should download the open sale order existing in the present production server into a flat fle
    can anyone tell me where this ship- to party is getting stored while creating the sale order. please let me know the table name.
    regards
    vijay

    Hi Vijay,
    To find out Open Sales Order. You shoud get them from VBUK-GBSTK <> 'C'. Store them in internal table.
    To get Ship-to-party, you can get it from VBPA (partner table).
    VBPA-VBELN = sales order number
    VBPA-POSNR = '000000'
    VBPA-PARVW = 'WE' or 'SH'
    You will get details for Ship to Party.
    regards,
    ram

  • Open sales orders

    Hi All,
    I need to sum up the open sales order quantities to obtain past due and future open orders.can any one help how to get it.
    -Ram

    Good
    try with VA05. more over Use VBAP VBAK tables with using status field.
    [Thank you so much for understanding us|Re: Help]
    Edited by: Amit Gujargoud on Aug 29, 2008 12:39 PM

Maybe you are looking for

  • Phone app in iOS 8 does not appear in full display.

    Just got brand new iPhone 6, 64 GB. Sometimes when I open my phone app, it appear that the full display of the app has shifted down by quarter of an inch, with the bottom quarter inch "cut off" and the top quarter inch empty black. See the 2 screen s

  • Puzzling panther behavior -- aps launch only when others are open

    Hello Appleheads ~ I complained a while back about a software update from apple which blocked itunes and Final Cut Pro from launching in 10.3.9. No solution was found. Now I have found that when I launch Protools 6.4.1 first, I am able to launch and

  • Constant drops and hangs

    Hi I bought my Airport Extreme base station before Christmas and have sufferer very frequent dropouts and reboots and/or complete hangs. Just now, I dropped connectivity and the logs show for the immidiate time period and my minute long wireless down

  • I'm new and confused

    I don't want to annoy anyone but if someone could help me I would appreciate it greatly. What I'm trying to do is bring up a window that is used to get the player names for a game and when they click the button that window goes away and another game

  • I can't get my wireless to turn back on PLEASE HELP!!

     I thought I was computer savvy and told a friend at work that has an issue with her internet that I could fix it. I am having more trouble than I thought. She told me it was a Windows 7 and it is a Dell Windows XP Professional service pack 3. I am n