<?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: Table VBKD update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862518#M1321783</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;The record with item 0 means header data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data stored in VBKD are valid for all items of sales document, so the system inserts one record only with the item equal to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only if the user changes some data of VBKD for a certain item, the system'll insert a new record for VBKD with item equal to the item where the modification was done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you need to extract data from VBKD u should run the select twice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: POSNR TYPE VBAP-POSNR.
DATA: VBKD_H TYPE VBKD.
DATA: VBKD_P TYPE VBKD.

SELECT * FROM VBAP WHERE VBELN = .......
   IF VBKD_H IS INITIAL.
      SELECT SINGLE * FROM VBKD INTO VBKD_H
            WHERE VBELN = VBAP-VBELN
                 AND POSNR = '000000'.
   ENDIF.
   SELECT SINGLE * FROM VBKD INTO VBKD_P
         WHERE VBELN = VBAP-VBELN
              AND POSNR = VBAP-POSNR.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    VBKD_P = VBKD_H.
  ENDIF. 
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway just as I said, the Sales Document: Business Data are generally the same for all items, so I think it''s rare u can find another record there except the header one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2009 09:47:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-20T09:47:45Z</dc:date>
    <item>
      <title>Table VBKD update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862515#M1321780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am useing VBKD-INCO1 - Incoterms (part 1)&lt;/P&gt;&lt;P&gt;                   VBKD-INCO2 - Incoterms (part 2)&lt;/P&gt;&lt;P&gt;                    VBKD-ZTERM - Terms of payment key&lt;/P&gt;&lt;P&gt; for some of my report.In VBAP there are suppose 4 line item but in VBKD there is only one entry with line item no 000000 .&lt;/P&gt;&lt;P&gt;so I am not able to utilize this above mentioned fields.&lt;/P&gt;&lt;P&gt;can anyone guid me why there is no entry in VBKD and is there any other table from where I can take this above metioned field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Sanujeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862515#M1321780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Table VBKD update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862516#M1321781</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;Try to table VBUP with VBKD.&lt;/P&gt;&lt;P&gt;VBUP is check table for posnr.&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>Mon, 20 Jul 2009 09:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862516#M1321781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Table VBKD update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862517#M1321782</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;Can u explane more about it.How there is only one  entry with item 000000 in VBKD when there is 4 line item in VBAP table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanujeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862517#M1321782</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Table VBKD update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862518#M1321783</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;The record with item 0 means header data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data stored in VBKD are valid for all items of sales document, so the system inserts one record only with the item equal to 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only if the user changes some data of VBKD for a certain item, the system'll insert a new record for VBKD with item equal to the item where the modification was done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you need to extract data from VBKD u should run the select twice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: POSNR TYPE VBAP-POSNR.
DATA: VBKD_H TYPE VBKD.
DATA: VBKD_P TYPE VBKD.

SELECT * FROM VBAP WHERE VBELN = .......
   IF VBKD_H IS INITIAL.
      SELECT SINGLE * FROM VBKD INTO VBKD_H
            WHERE VBELN = VBAP-VBELN
                 AND POSNR = '000000'.
   ENDIF.
   SELECT SINGLE * FROM VBKD INTO VBKD_P
         WHERE VBELN = VBAP-VBELN
              AND POSNR = VBAP-POSNR.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    VBKD_P = VBKD_H.
  ENDIF. 
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway just as I said, the Sales Document: Business Data are generally the same for all items, so I think it''s rare u can find another record there except the header one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2009 09:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862518#M1321783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Table VBKD update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862519#M1321784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sanujeet again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select records from vbap table  with your selection condition and then user inner join for table vbkd and vbup and use for all entries for this inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbap into I_vbap where vbeln in s_vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_vbap[] is initial.&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;vbeln a&lt;/SUB&gt;posnr &lt;/P&gt;&lt;P&gt;          into table itab &lt;/P&gt;&lt;P&gt;         from vbkd as a inner join vbup as b &lt;/P&gt;&lt;P&gt;        on a&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln and a&lt;SUB&gt;posnr = b&lt;/SUB&gt;posnr&lt;/P&gt;&lt;P&gt;         for all entries in i_vbap&lt;/P&gt;&lt;P&gt;        where vbeln = i_vbap-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&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>Mon, 20 Jul 2009 09:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-vbkd-update/m-p/5862519#M1321784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-20T09:54:47Z</dc:date>
    </item>
  </channel>
</rss>

