<?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: Line item display problem from table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219813#M1207156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for your case i think you should use 'OR' instead of 'AND'.&lt;/P&gt;&lt;P&gt;hkont = '000500100' OR koart = 'D'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2009 08:16:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-27T08:16:18Z</dc:date>
    <item>
      <title>Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219812#M1207155</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 strucked up in my report  with a problem , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;document no.(BELNR)  for corresponding bkpf has four line item  in BSEG table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BUZEI                      GJAHR  BUZEI   KOART  DMBTR           HKONT&lt;/STRONG&gt;                                             &lt;/P&gt;&lt;P&gt;9000000078	2006	1	S    200,600.00        0000500100	&lt;/P&gt;&lt;P&gt;9000000078	2006	2	S    24,072.00          0000301500	&lt;/P&gt;&lt;P&gt;9000000078	2006	3	S    481.00               0000300450	&lt;/P&gt;&lt;P&gt;9000000078	2006	4	D    225,153.00        0000209800	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requiremet is that&lt;/P&gt;&lt;P&gt;========================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when it goes inside the loop &lt;/P&gt;&lt;P&gt;i want to display the belnr where Hkont  = '000500100' &lt;/P&gt;&lt;P&gt;and koart = 'D', that will be 001 line item (buzei) and  0004 Buzei in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie my output should be like&lt;/P&gt;&lt;P&gt;============================ &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GROSS        NET&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;200,600.00  225,153.00&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i specify  and hkont = '000500100'and koart = 'D'. its not getting inside the select itself&lt;/P&gt;&lt;P&gt;if i select without the where condition and hkont = '000500100'and koart = 'D' its going inside...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me out....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My codings&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elect bukrs belnr  gjahr xref1 xref2  kunnr  buzei dmbtr hkont koart from bseg into corresponding fields of table it_bseg &lt;/P&gt;&lt;P&gt;                                          for all entries in it_bkpf&lt;/P&gt;&lt;P&gt;                                           where  bukrs = it_bkpf-bukrs&lt;/P&gt;&lt;P&gt;                                                  and belnr = it_bkpf-belnr&lt;/P&gt;&lt;P&gt;                                                  and gjahr = it_bkpf-gjahr&lt;/P&gt;&lt;P&gt;                                                  and hkont = '000500100'&lt;/P&gt;&lt;P&gt;                                                  and koart = 'D'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_bseg into wa_bseg . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   wa_final-kunnr = wa_bseg-kunnr.&lt;/P&gt;&lt;P&gt;   wa_final-xref1 = wa_bseg-xref1.&lt;/P&gt;&lt;P&gt;   wa_final-xref2 = wa_bseg-xref2.&lt;/P&gt;&lt;P&gt;    wa_final-DMbtr = wa_bseg-dmbtr.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 08:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219812#M1207155</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T08:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219813#M1207156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for your case i think you should use 'OR' instead of 'AND'.&lt;/P&gt;&lt;P&gt;hkont = '000500100' OR koart = 'D'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 08:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219813#M1207156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T08:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219814#M1207157</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 this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or instead of AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i specify and hkont = '000500100' &lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;OR&lt;/SPAN&gt; koart = 'D'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 08:22:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219814#M1207157</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T08:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219815#M1207158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs belnr  gjahr xref1 xref2  kunnr  buzei dmbtr hkont koart from bseg into corresponding fields of table it_bseg&lt;/P&gt;&lt;P&gt;                                          for all entries in it_bkpf&lt;/P&gt;&lt;P&gt;                                           where  bukrs = it_bkpf-bukrs&lt;/P&gt;&lt;P&gt;                                                  and belnr = it_bkpf-belnr&lt;/P&gt;&lt;P&gt;                                                  and gjahr = it_bkpf-gjahr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                                 and ( hkont = '000500100' or koart = 'D').&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried giving this way too ...but its not fetching the value....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and one more problem is the my NETPAY AND GROSS AMT inthe table is stored in same &lt;/P&gt;&lt;P&gt;field name as DMBTR , how can make it to display in net and gross&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 09:09:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219815#M1207158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219816#M1207159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again check this query should be work. Otherwise you have one more option, select all the data and use the delete statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete fomr it_bseg where hkont ne 'your value'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second if you have two fields with same name then declare in the internal table as folows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;dmbtr  like tab1-dmbtr, &lt;/P&gt;&lt;P&gt;gross_pay like tab2-dmbtr,&lt;/P&gt;&lt;P&gt;end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select dmbter from tab1 into corresponding fields of table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select dmbtr from tab2 into itab-gross_pay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modify itab transporting gross_pay.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 09:25:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219816#M1207159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T09:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Line item display problem from table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219817#M1207160</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;thanx a lot fo your reply,....&lt;/P&gt;&lt;P&gt;thats wat i thought and was trying to do so.....&lt;/P&gt;&lt;P&gt;and modified...can you please look in to the code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;but wa_final-gross = wa_amount-dmbtr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;     &lt;STRONG&gt;wa_final-net = wa_amount-dmbtr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;value is not getting populated ....i dont know the reason&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_bseg[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select  bukrs belnr gjahr dmbtr from bseg into corresponding fields of table it_amount&lt;/P&gt;&lt;P&gt;                                for all entries in it_bseg&lt;/P&gt;&lt;P&gt;                                 where bukrs = it_bseg-bukrs&lt;/P&gt;&lt;P&gt;                                 and belnr = it_bseg-belnr.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it_amount[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select  kunnr  name1 LOCCO from kna1 into corresponding fields of table it_kna1&lt;/P&gt;&lt;P&gt;                                      for all entries in it_bseg&lt;/P&gt;&lt;P&gt;                                        where  kunnr = it_bseg-kunnr and&lt;/P&gt;&lt;P&gt;                                               locco = pr_locco.&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;;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_bseg by belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_bseg into wa_bseg .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   wa_final-kunnr = wa_bseg-kunnr.&lt;/P&gt;&lt;P&gt;   wa_final-xref1 = wa_bseg-xref1.&lt;/P&gt;&lt;P&gt;   wa_final-xref2 = wa_bseg-xref2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_amount into wa_amount  with key belnr = bseg-belnr.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if wa_bseg-hkont = '000500100'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;wa_final-gross = wa_amount-dmbtr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;if wa_bseg-koart = 'D'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;wa_final-net = wa_amount-dmbtr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;Endif.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;at end of belnr.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Endat.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 10:23:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/line-item-display-problem-from-table/m-p/5219817#M1207160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T10:23:09Z</dc:date>
    </item>
  </channel>
</rss>

