<?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: BAPI for creating sales invoice in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267506#M149491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that will generate the Spool, if that is the case you can read the spool table TSP01 with the Username,date. in your program have a code like this...&lt;/P&gt;&lt;P&gt;before generating the spool(i mean calling the FM) take the latest spool  with the help of username,date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then call your FM, then later again select the Spool using user,date. compare both the spool numbers , if they are not same, then consider the second one as the spool number generated . if they are same then no spool generated.&lt;/P&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Apr 2006 11:43:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-28T11:43:58Z</dc:date>
    <item>
      <title>BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267499#M149484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use BAPI_SALESORDER_CREATEFROMDAT2 to create salesorder. Is there another BAPI or function to convert this salesorder to invoice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 06:55:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267499#M149484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T06:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267500#M149485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the FM &amp;lt;b&amp;gt;GN_INVOICE_CREATE&amp;lt;/b&amp;gt;, it will create the Invoice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 07:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267500#M149485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T07:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267501#M149486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I tell to BAPI_BILLINGDOC_CREATEMULTIPLE (or GN_INVOICE_CREATE) that it should create invoice from existing sales order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 09:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267501#M149486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T09:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267502#M149487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass the sales order number and its item to field DOC_NUMBER and ITM_NUMBER of structure BILLINGDATAIN.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 09:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267502#M149487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T09:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267503#M149488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to fill the communication structures KOMFK,KOMFKGN,KOMFKKO,KOMFKTX etc..and pass it to FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'GN_INVOICE_CREATE'
      EXPORTING
        DELIVERY_DATE   = DELIVERY_DATE
        INVOICE_DATE    = INVOICE_DATE
        INVOICE_TYPE    = 'ZFX'
        PRICING_DATE    = PRICING_DATE
        VBSK_I          = X_VBSK
        WITH_POSTING    = 'D'
        ID_NO_ENQUEUE   = 'X'        
      TABLES
        XKOMFK          = IT_KOMFK
        XKOMFKGN        = IT_KOMFKGN
        XKOMFKKO        = IT_KOMFKKO
        XKOMFKTX        = IT_KOMFKTX
        XKOMV           = IT_KOMV
        XTHEAD          = IT_HEAD
        XVBFS           = IT_VBFS
        XVBPA           = IT_VBPA
        XVBRK           = IT_VBRK
        XVBRP           = IT_VBRP
        XVBSS           = IT_VBSS
        SUCCESS_DOC_OUT = IT_SUCCESS.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 09:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267503#M149488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T09:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267504#M149489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does not work, it requires also other fields and then creates invoice based on that data not on sales order data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an easier way to reference only sales order number to create matching invoice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 10:08:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267504#M149489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T10:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267505#M149490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I debugged vf01 and found that it uses RV_INVOICE_CREATE. It only needs xkomfk-vbeln field as order number and creates invoice correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My invoices are automatically printed to spool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to get the OTF spool, convert it to PDF and stream it to PHP web application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;PDF part works OK, only missing link is how to get spool number after rv_invoice_create?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;br,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;erki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 11:20:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267505#M149490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-28T11:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267506#M149491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erki,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that will generate the Spool, if that is the case you can read the spool table TSP01 with the Username,date. in your program have a code like this...&lt;/P&gt;&lt;P&gt;before generating the spool(i mean calling the FM) take the latest spool  with the help of username,date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then call your FM, then later again select the Spool using user,date. compare both the spool numbers , if they are not same, then consider the second one as the spool number generated . if they are same then no spool generated.&lt;/P&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 11:43:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267506#M149491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-28T11:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267507#M149492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as I just found out, you have to call the fm RV_INVOICE_DOCUMENT_ADD, too. My coding (working) looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_komfk-vbeln = '0000000111'.&lt;/P&gt;&lt;P&gt;it_komfk-vbtyp = 'J'.&lt;/P&gt;&lt;P&gt;append it_komfk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RV_INVOICE_CREATE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    vbsk_i                    = wa_VBSK&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   VBSK_E                    = wa_vbsk_e&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    xkomfk                    = it_KOMFK&lt;/P&gt;&lt;P&gt;    xkomv                     = it_KOMV&lt;/P&gt;&lt;P&gt;    xthead                    = it_THEADVB&lt;/P&gt;&lt;P&gt;    xvbfs                     = it_VBFS&lt;/P&gt;&lt;P&gt;    xvbpa                     = it_VBPAVB&lt;/P&gt;&lt;P&gt;    xvbrk                     = it_VBRKVB&lt;/P&gt;&lt;P&gt;    xvbrp                     = it_VBRPVB&lt;/P&gt;&lt;P&gt;    xvbss                     = it_VBSS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RV_INVOICE_DOCUMENT_ADD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    vbsk_i                 = wa_vbsk_e&lt;/P&gt;&lt;P&gt;   WITH_POSTING           = 'A'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    xkomfk                    = it_KOMFK&lt;/P&gt;&lt;P&gt;    xkomv                     = it_KOMV&lt;/P&gt;&lt;P&gt;    xthead                    = it_THEADVB&lt;/P&gt;&lt;P&gt;    xvbfs                     = it_VBFS&lt;/P&gt;&lt;P&gt;    xvbpa                     = it_VBPAVB&lt;/P&gt;&lt;P&gt;    xvbrk                     = it_VBRKVB&lt;/P&gt;&lt;P&gt;    xvbrp                     = it_VBRPVB&lt;/P&gt;&lt;P&gt;    xvbss                     = it_VBSS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Johannes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:29:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267507#M149492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI for creating sales invoice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267508#M149493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..  rv_invoice_create is returning values but when the same structures are passed to &lt;/P&gt;&lt;P&gt;rv_invoice_document_add it is not returning anything...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2009 13:40:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-for-creating-sales-invoice/m-p/1267508#M149493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-25T13:40:14Z</dc:date>
    </item>
  </channel>
</rss>

