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

Similar Messages

  • Reg:open sales orders

    Can any body give me the logic to list the oper sales orders.
    Thanks,
    srik

    Hi,
    *& Report  ZOPEN_SALESORDER
    report zopen_salesorder message-id arc no standard page heading.
    tables :kna1,vbak.
    select-options : so_vkorg for vbak-vkorg ,
    so_vtweg for vbak-vtweg ,
    so_spart for vbak-spart,
    so_kunnr for kna1-kunnr.
    data : keybalance like bapi3007_3 occurs 0 with header line.
    data : begin of sales_open occurs 0 ,
    vbeln like vbak-vbeln,
    auart like vbak-auart,
    kunnr like kna1-kunnr,
    bstnk like vbak-bstnk,
    lfstk like vbuk-lfstk,
    fkstk like vbuk-fkstk,
    gbstk like vbuk-gbstk,
    end of sales_open.
    data : begin of itm_sales occurs 0,
    vbeln like vbap-vbeln,
    posnr like vbap-posnr,
    matnr like vbap-matnr,
    lfsta like vbup-lfsta,
    lfgsa like vbup-lfgsa,
    fksta like vbup-fksta,
    fksaa like vbup-fksaa,
    gbsta like vbup-gbsta,
    end of itm_sales.
    data : l_kunnr like kna1-kunnr,
    l_vkorg like vbak-vkorg,
    l_vtweg like vbak-vtweg,
    l_spart like vbak-spart.
    data: v_statusl(20) type c,
    v_statusb(20) type c,
    v_statusf(20) type c,
    v_statusg(20) type c,
    v_status(20) type c,
    v_field(1) type c.
    **Selection Screen Validations.
    at selection-screen.
    perform validations.
    *& Form Validations
    text
    --> p1 text
    <-- p2 text
    form validations.
    **Customer
    if not so_kunnr[] is initial.
    select single kunnr into l_kunnr
    from kna1
    where kunnr in so_kunnr.
    if sy-subrc ne 0.
    message e002 with text-005.
    endif.
    endif.
    **Sales Organization
    if not so_vkorg[] is initial.
    select single vkorg into l_vkorg
    from tvko
    where vkorg in so_vkorg.
    if sy-subrc ne 0.
    message e003 with text-006.
    endif.
    endif.
    **Distribution Channel
    if not so_vtweg[] is initial.
    select single vtweg into l_vtweg
    from tvkov
    where vkorg in so_vkorg
    and vtweg in so_vtweg.
    if sy-subrc ne 0.
    message e004 with text-007.
    endif.
    endif.
    **Division
    if not so_spart[] is initial.
    select single spart into l_spart
    from tvta
    where vkorg in so_vkorg
    and vtweg in so_vtweg
    and spart in so_spart.
    if sy-subrc ne 0.
    message e005 with text-008.
    endif.
    endif.
    endform. " Validations
    top-of-page.
    perform sales_top_of_page.
    start-of-selection.
    perform sales_sel.
    *& Form sales_sel
    text
    --> p1 text
    <-- p2 text
    form sales_sel.
    data: date type sy-datum.
    date = sy-datum - 3000.
    select vbeln auart kunnr bstnk
    lfstk fkstk gbstk
    into table sales_open
    from vbakuk
    where vkorg in so_vkorg
    and vtweg in so_vtweg
    and spart in so_spart
    and kunnr in so_kunnr
    "and gbstk ne 'C'.
      and gbstk in ('A','B')
      and erdat >= date.
    loop at sales_open.
    call function 'BAPI_AR_ACC_GETKEYDATEBALANCE'
          exporting
            companycode = '1919'
            customer    = sales_open-kunnr
            keydate     = sy-datum
          tables
            keybalance  = keybalance.
        read table keybalance index sy-tabix.
    write:/4 sy-vline,
    5 sales_open-vbeln  color 2 intensified on,
    16 sy-vline,
    17 sales_open-auart color 2 intensified on,
    27 sy-vline,
    28 sales_open-kunnr color 2 intensified on,
    40 sy-vline,
    41 sales_open-bstnk color 2 intensified on,
    55 sy-vline,
    56 sales_open-lfstk,
    76 sy-vline,
    77 sales_open-fkstk,
    96 sy-vline,
    97 sales_open-gbstk ,
    117 sy-vline,
    118 keybalance-lc_bal,
    142 sy-vline.
    "hide sales_open-vbeln .
    endloop.
    write :/4 sy-uline(160).
    endform. " sales_sel
    *& Form sales_top_of_page
    text
    --> p1 text
    <-- p2 text
    form sales_top_of_page.
    write:/4 sy-uline(160),
    50 'OPEN SALES ORDERS' color 7 intensified on .
    write: /4 sy-vline,
    5 'SalesOrder' color 1 ,
    16 sy-vline,
    17 'OrderType' color 1,
    27 sy-vline,
    28 'Customer' color 1,
    40 sy-vline,
    41 'PoNumber' color 1,
    55 sy-vline,
    56 'Delivery Status' color 1,
    76 sy-vline,
    77 'Billing Status' color 1,
    96 sy-vline,
    97 'Processing Status' color 1,
    117 sy-vline,
    130 'Balance' color 1,
    142 sy-vline.
    write:/4 sy-uline(160).
    endform. " sales_top_of_page
    "at line-selection.
    "select a~vbeln
    "a~posnr
    "a~matnr
    "* a~kwmeng
    "b~lfsta
    "b~lfgsa
    "b~fksta
    "b~fksaa
    "b~gbsta
    "into table itm_sales
    "from vbap as a join vbup as b
    "on avbeln eq bvbeln
    "and aposnr eq bposnr
    "and b~gbsta ne 'C'
    "where a~vbeln eq sales_open-vbeln.
    "if not sales_open is initial.
    "loop at itm_sales.
    "write:/5 itm_sales-vbeln,
    "itm_sales-posnr,
    "itm_sales-matnr,
    "itm_sales-lfsta,
    "itm_sales-lfgsa,
    "itm_sales-fksta,
    "itm_sales-fksaa,
    "itm_sales-gbsta.
    "endloop.
    "endif.
    thanks
    Ravi

  • 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

  • Reg...Open sales order

    Hi Experts
    can u let me know the standard Transaction/ Program for Open Sales Orders.
    Regards,
    kumar

    Hi,
    Please check transaction VA05.
    Regards,
    Ferry Lianto

  • Open Sales Orders Backlog Report

    Hi All: I have been asked to create Backlog reports for Open Sales Orders and the revenue amounts for the next 15days, one month, 2 months, 3 months 6 months etc etc. Does anyone know of a standard report that covers that and the business content and cues that go with it?
    Thanks in advance
    Bobby

    I haven't seen any standard content for it, with my client, we actually developed the open order report from Item extractor and status extractor. And compare the created on date to the system data to see how long it has been opened for and put it in different buckets.
    Hopes that help.
    thanks.
    Wond.

  • 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

  • Close Open sale order items

    Hi,
    We have a business scenario of one sales order --> one delivery document. Any items which have not been confirmed for delivery need to be closed out so that they do not show up as open requirements.
    One way is to reject the open line items. However, rejection reduces the original customer sales order value.
    Is there any other way that the open sales order line items can be changed in status so that the pricing is intact, but the item is closed out ?
    Would appreciate inputs from the forum
    Thanks

    Hi
    In standard itself this can be achieved
    In t code OVAG itself for your reason of rejection if you maintain BLANK in the statistical column
    Then those rejected values will not be reflected in sales order
    Suppose  a sales order contains three materials say
    Material A  qty 3 units
    Material B  qty 3 units
    Material C  qty 2 units
    Each and everything is priced as 10 US dollars
    then the nett value of this order will be 80 US dollars
    Suppose if you reject Material C  qty 2 units with a reason of rejection by maintaining the settings that i mentioned above the sales order value still Will  be  80 US dollars and will not become  60 US dollars
    This is what you are looking for (i hope so)
    Please try this
    Regards
    Raja

  • Open sale order quantity in VA05

    hi all,
    can anyone please tell me the function module or bapi or Table to find out open sales order quantity coming in VA05.
    regards.

    First of all define what is open , is it created but notdelivered , or delivered but not invoiced.
    The table VBUP has flags for statuses eg
    A     Not yet processed
    B     Partially processed
    C     Completely processed
    A for open , B for partial C for complete , so by checking this table you will find which are actually delivered or invoiced completely.
    Tcode V.02 gives u this option.

  • Open Sale Order Value (FD33) not getting diminished even after closing SO?

    Hi,
    Upon Executing FD33 and clicking the status view for a Customer say XYZ , and then choosing EXTRAS-Open Sale Order . Say the value of open sale orders being shown is 75000. Even after closing the open sale orders (By Selecting VA05 and Putting reason for Rejection), and then also the Open Sales Order value is not getting diminished.
    What could be the reason ?
    Pls help.
    Regrds,
    Binayak

    Hi Binayak,
    As mentioned by you, running of Credit re-org program 'RVKRED77' is the only solution for this problem and it is known problem in SAP.
    Some precautions
    1. Always run the program in background by scheduling a job.
    2. The idle time is around midnight when no user is working on SAP.
    3. Some time the job fails as some other program may be updating same tables as this program. In such cases re-schedule the job at different time.
    4. You may run the program 'RVKRED88' which will simulate without actual updation of credit values.
    Hope this clarifies..
    Regards,
    Madhu.

  • Open sale order

    In a report i am in need of obtaining open sale order for a material. open sale order means sale orders for which the PGI is not yet done.
    can anybody tell me how to achieve this..

    Dear,
    Go to VA05 and enter the date range/material or customer code as required.
    Check the option "open sales order"
    Enter the sales organisation and hit enter.
    Now system will display the open SO's.
    Regards,
    Joseph Charles Vaikathussery

  • Open Sales Order Deposits Report

    Experts,
    Is there a way to report on all deposits taken for open sales orders?
    So for every open sales order, I want a total of the payments taken on those orders.
    thank you,
    Bob

    Gordon,
    That did it. I just added one more WHERE criteria to only select orders that have deposits.
    Thank you!
    Bob
    SELECT Distinct t0.Cardcode as "Customer#", t0.Cardname as "Customer Name",  t0.Docnum as "SO #", t0.DocDate, t0.DocDueDate, t0.DocTotal as 'Sales Order Total', t3.DocTotal as 'Deposit Total'
    FROM dbo.ORDR t0
    inner join dbo.rdr1 t1 on t1.docentry = t0.docentry left join dbo.dpi1 t2 on t2.BaseEntry = t1.DocEntry and t2.BaseType = 17 left join dbo.odpi t3 on t3.DocEntry = t2.DocEntry WHERE  t0.DocStatus = 'O' and t3.docentry is not null
    Order by t0.Cardcode
    Edited by: Robert Welch on Mar 9, 2010 9:49 PM
    Edited by: Robert Welch on Mar 9, 2010 9:49 PM
    Edited by: Robert Welch on Mar 9, 2010 10:02 PM

  • 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

  • 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

  • Open Sales orders through IDOC

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

    Hi
    We are trying to send the list of open sales orders of a customer in an IDOC to the customer. For example, if the customer has got 15 sales order to be delivered to him , he needs the details of all these 15 orders in an single IDOC
    Is there any IDOC message type available for this in SAP R/3 4.7 version  or is there a standard solution of sending these details through IDOC
    Regards
    Anandh

Maybe you are looking for

  • Unable to open Hyperion WebAnalysis studio: java.lang.NullPointerException

    I am unable to open Hyperion web analysis studio. Probably there is some issue with Java. I've tried re-installed, updated with java but issue still persists. Following is appearing in java console: Java Plug-in 1.6.0_24 Using JRE version 1.6.0_24-b0

  • Download install files for use on two computers

    I want to install Creative Cloud on both my iMac and Macbook (as per the Licensing Agreement).  As I have a slow internat connection, can I downlaod the files, copy to the second computer and install on that one?  If so, where do the files reside?

  • Can i work in Aperture 3 with photos on external disk?

    I have a small disk (300GB). I have about of 60000 photos on my 1TB external disk. Can i work in Aperture, with my photos on my external disk, or first i need to import all my photos into my Mac Pro? If the Tutorial of Aperture 3 tell me, when i work

  • OSA : Approve button disabled.

    Hi, We have implented OSA model for Appraisals.Using the BSP Applcation <b>HAP_DOCUMENT</b>.If an employee(further participant) logs in,the Approve/Reject button is disabled in the page 'documents_where_participated.htm'. For the same user,it's works

  • Adding streaming video to flash 8

    I have two videos, one is a Windows Media Video and the other is a QuickTime video. They are both hosted on a streaming video server. I am trying to stream them through Flash. I do not want to create a FLV. I created a button to the two links but tha