<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Open Orders in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641108#M285506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Please consider table VBUK, VBUP as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Nov 2006 07:10:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-13T07:10:09Z</dc:date>
    <item>
      <title>Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641107#M285505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geeks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's the best or better easiest way to get all open orders (meaning not invoiced orders) from a certain customer. The problem I see, is the status of the document. Whether an order was invoiced or not (orders with goods movements are invoiced delivery related) you can not see in the status of the order. Only if the related delivery was invoiced, the delivery get's the invoiced indicator. That's why I think, we have to check through the document flow (VBFA) to check for all orders of the respective customers, what is the linked delivery. Then we can check the status of that delivery and we can find out, what deliveries (and by this what orders) have not been invoiced yet.&lt;/P&gt;&lt;P&gt;But in addition there can also be orders without delivery created, so we also have to check for orders without predecesing document. But they are only relevant, if the items in the order are not completly rejected.&lt;/P&gt;&lt;P&gt;To limit the list of orders (as the VBAK will get huge in time) I was thinking of checking only orders from VBAK which are created within the last 4 weeks.&lt;/P&gt;&lt;P&gt;But that still seems to be a lot of documents to be checked.&lt;/P&gt;&lt;P&gt;Do you have an idea of how we could easily get the information on orders, which are not invoiced yet (or more clear, where the follow up document is not invoiced yet)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! Waiting for replies...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nosaj-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:02:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641107#M285505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641108#M285506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Please consider table VBUK, VBUP as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:10:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641108#M285506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641109#M285507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the field LFSTK, LFGSK from VBUK are the indicators for delivery related data of a SO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similary field FKSTK should be able to tell you the Invoice status.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641109#M285507</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641110#M285508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason ,, &lt;/P&gt;&lt;P&gt;do this ..&lt;/P&gt;&lt;P&gt;since u want the open invoice orders ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try to write a porgram for the logic ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**selection-screen.
SELECT-OPTIONS : so_vkorg FOR  vbak-vkorg OBLIGATORY,
                               so_vtweg FOR  vbak-vtweg OBLIGATORY,
                               so_spart FOR  vbak-spart,
                               so_kunnr FOR  kna1-kunnr.


1.create twi internal tables ..

DATA : BEGIN OF it_billing_h OCCURS 0,
       vbeln LIKE vbrk-vbeln,
       fkart LIKE vbrk-fkart,
       kunag LIKE vbrk-kunag,
       gbstk LIKE vbuk-gbstk,
       END OF it_billing_h.

DATA : BEGIN OF it_billing_i OCCURS 0,
       vbeln LIKE vbrp-vbeln,
       posnr LIKE vbrp-posnr,
       matnr LIKE vbrp-matnr,
       fkimg LIKE vbrp-fkimg,
       fksta LIKE vbup-fksta,
       fksaa LIKE vbup-fksaa,
       uvfak LIKE vbup-uvfak,
       fkivp LIKE vbup-fkivp,
       fssta LIKE vbup-fssta,
       gbsta LIKE vbup-gbsta,
       END OF it_billing_i.

*2. now see the logic 


    SELECT vbeln
         fkart
         kunag
         gbstk
         INTO TABLE it_billing_h
         FROM vbrkuk
         WHERE vkorg IN so_vkorg
         AND vtweg IN so_vtweg
         AND spart IN so_spart
         AND kunag IN so_kunnr
         AND gbstk NE 'C'.

    IF NOT it_billing_h[] IS INITIAL.
      SELECT c~vbeln
             c~posnr
             c~matnr
             c~fkimg
             d~fksta
             d~fksaa
             d~uvfak
             d~fkivp
             d~fssta
             d~gbsta
             INTO TABLE it_billing_i
             FROM vbrp AS c JOIN vbup AS d
             ON d~vbeln EQ c~vbeln
             AND d~posnr EQ c~posnr
             FOR ALL ENTRIES IN it_billing_h
             WHERE d~vbeln EQ it_billing_h-vbeln
             AND d~gbsta NE 'C'.
Endif.

loop at it_billingh.

endloop.         " ----&amp;gt;basic list of all open invoice orders..

at line selection.
loop at  it_billing_i.
endloop.          " ----&amp;gt;secondary list of all open item for the invoice ,,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;VIjay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vijay Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:28:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641110#M285508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641111#M285509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried the transaction VA05?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 10:27:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641111#M285509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T10:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641112#M285510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the answers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 06:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641112#M285510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T06:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Open Orders</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641113#M285511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 06:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-orders/m-p/1641113#M285511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T06:55:13Z</dc:date>
    </item>
  </channel>
</rss>

