<?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: Query Billing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018191#M1608440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm agree with you, but my problem is reffered to the intercompany flow. The sales invoice is generated by purchase order. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want join the number of PO (VBRP-AUBEL) with the EKPO-EBELN (OK) and the related position number (VBRP-AUPOS)  with EKPO-EBELP (not permitted). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is the length of the field, but I do not know how I can make them equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Antonio Bruno on Aug 4, 2011 11:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Aug 2011 09:08:15 GMT</pubDate>
    <dc:creator>antonio_bruno</dc:creator>
    <dc:date>2011-08-04T09:08:15Z</dc:date>
    <item>
      <title>Query Billing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018189#M1608438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i've created a SAP Query, but i've a problem to join vbrp-aupos with ekpo-ebelp. How can i join the two fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 07:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018189#M1608438</guid>
      <dc:creator>antonio_bruno</dc:creator>
      <dc:date>2011-08-04T07:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query Billing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018190#M1608439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as they have absoluteley NOTHING to do witheach others, you will NEVER be able to join them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBRP-AUPOS holds the SALES ORDER itemnumber, while EKPO.EBELP holds the PURCHASE ORDER tiemnumber.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 08:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018190#M1608439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-04T08:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Query Billing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018191#M1608440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm agree with you, but my problem is reffered to the intercompany flow. The sales invoice is generated by purchase order. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want join the number of PO (VBRP-AUBEL) with the EKPO-EBELN (OK) and the related position number (VBRP-AUPOS)  with EKPO-EBELP (not permitted). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is the length of the field, but I do not know how I can make them equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Antonio Bruno on Aug 4, 2011 11:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 09:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018191#M1608440</guid>
      <dc:creator>antonio_bruno</dc:creator>
      <dc:date>2011-08-04T09:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query Billing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018192#M1608441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, stating it a bit more detailed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VBRP-AUBEL  = Number of according related sales order.&lt;/P&gt;&lt;P&gt;VBRP-AUPOS = Number of according related sales order item .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table EKPO holds Purchase order items. Even if there wouldnt be a problem in field length (SO items have char6 while PO items have char5), this join can never work from the logical view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you got a sales order number and an item number it makes no sense to search in table EKPO for them, since the according records are stored in table VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need the PO for your invoice i´d go via table VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_vbelv     type vbeln,
         lv_posnv    type pstvy.

select single vbelv posnv
from   vbfa
into    (lv_vbelv, lv_posnv)
where vbeln = vbrp-aubel
and    vbeln = vbrp-aupos
and    vbtyp_n = 'V'.

now you got the EBELN and EBELP in variables LV_VBELV and LV_POSNV.
with these you can goto table ekpo.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 09:28:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018192#M1608441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-04T09:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Query Billing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018193#M1608442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iu2019ve checked in the VBFA, but there isnu2019t these datas because the flow is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PO --&amp;gt; Delivery intercompany &amp;amp; Goods issue --&amp;gt; Intercompany Billing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I thought to join directly the data that Iu2019ve in the vbrp with ekpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you now how I can add the abap code to the SQ01?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 09:56:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-billing/m-p/8018193#M1608442</guid>
      <dc:creator>antonio_bruno</dc:creator>
      <dc:date>2011-08-04T09:56:48Z</dc:date>
    </item>
  </channel>
</rss>

