<?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: empty ls_ in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754244#M326933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think there is another problem like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = &amp;lt;b&amp;gt;bkpf-belnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and gjahr = &amp;lt;b&amp;gt;bkpf-gjahr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change it to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = &amp;lt;b&amp;gt;ls_bkpf-belnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and gjahr = &amp;lt;b&amp;gt;ls_bkpf-gjahr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You loop over lt_bkpf into ls_bkpf&lt;/P&gt;&lt;P&gt;therefore you have to  use ls_bkpf-belnr and ls_bkpf-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jan 2007 13:24:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-02T13:24:17Z</dc:date>
    <item>
      <title>empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754238#M326927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, my report dont have output...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZNALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: bseg, bsid,bkpf.&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;data: datum type sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    data: bschl type bseg-bschl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gjahr(4),&lt;/P&gt;&lt;P&gt;      budat type bkpf-budat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lt_bkpf type table of bkpf,&lt;/P&gt;&lt;P&gt;      lt_bseg type table of bseg,&lt;/P&gt;&lt;P&gt;      ls_bkpf type bkpf,&lt;/P&gt;&lt;P&gt;      ls_bseg type bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of ls_nalog,&lt;/P&gt;&lt;P&gt;      POZ   type BUZEI,    &lt;/P&gt;&lt;P&gt;      KUNNR type KUNNR,    &lt;/P&gt;&lt;P&gt;      BELNR type BELNR_D,  &lt;/P&gt;&lt;P&gt;      BLDAT type BLDAT,   &lt;/P&gt;&lt;P&gt;      DUG type ZDUG,       &lt;/P&gt;&lt;P&gt;      POT type ZPOT,       &lt;/P&gt;&lt;P&gt;      SAL type ZSAL,       &lt;/P&gt;&lt;P&gt;      VAL type WAERS,      &lt;/P&gt;&lt;P&gt;      AUGBL type AUGBL,    &lt;/P&gt;&lt;P&gt;      BROJ type SAKNR,     &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;             &lt;/P&gt;&lt;P&gt;      end of ls_nalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lt_nalog like ls_nalog occurs 0,&lt;/P&gt;&lt;P&gt;      lt_bsid type table of bsid,&lt;/P&gt;&lt;P&gt;      lv_sumpot like BSID-DMBTR,&lt;/P&gt;&lt;P&gt;      lv_sumdug like BSID-DMBTR,&lt;/P&gt;&lt;P&gt;      lv_pot like BSID-DMBTR,&lt;/P&gt;&lt;P&gt;      lv_dug like BSID-DMBTR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      hilisx(2) type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: BEGIN OF BLOCK EKR1 WITH FRAME.&lt;/P&gt;&lt;P&gt;parameters: p_bukrs type knb1-bukrs DEFAULT 'ZS01'.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF BLOCK EKR1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: s_blart for bkpf-blart no-display.&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;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move: 'I' to s_blart-sign, 'EQ' to s_blart-option.&lt;/P&gt;&lt;P&gt;move 'KR' to s_blart-low.&lt;/P&gt;&lt;P&gt;append s_blart.&lt;/P&gt;&lt;P&gt;move 'RE' to s_blart-low.&lt;/P&gt;&lt;P&gt;append s_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move sy-datum to gjahr.&lt;/P&gt;&lt;P&gt;budat = sy-datum - 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bkpf into table lt_bkpf&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;  and gjahr = gjahr&lt;/P&gt;&lt;P&gt;  and budat = budat&lt;/P&gt;&lt;P&gt;  and blart in s_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = bkpf-belnr&lt;/P&gt;&lt;P&gt;  and gjahr = bkpf-gjahr.&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 bschl = '31'.&lt;/P&gt;&lt;P&gt;move ls_bseg-dmbtr to ls_nalog-pot.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move ls_bseg-dmbtr to ls_nalog-dug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;move ls_bseg-buzei to ls_nalog-poz.&lt;/P&gt;&lt;P&gt;move ls_bseg-lifnr to ls_nalog-dug.&lt;/P&gt;&lt;P&gt;move ls_bkpf-bldat to ls_nalog-bldat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND Ls_nalog to lt_nalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*break-point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  WRITE: /  'Pozition ',&lt;/P&gt;&lt;P&gt;       17  'KONTO',&lt;/P&gt;&lt;P&gt;       32  'wndor. ',&lt;/P&gt;&lt;P&gt;       43  'descript',&lt;/P&gt;&lt;P&gt;       58  'Datum dok.',&lt;/P&gt;&lt;P&gt;       69  'number',&lt;/P&gt;&lt;P&gt;       75  'Valuta',&lt;/P&gt;&lt;P&gt;       88  'no.dok',&lt;/P&gt;&lt;P&gt;       95  'credit',&lt;/P&gt;&lt;P&gt;       105  'debit',&lt;/P&gt;&lt;P&gt;       125  'sum'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at lt_nalog into ls_nalog.  " output screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WRITE: / ls_nalog-poz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      17   ls_bkpf-belnr,&lt;/P&gt;&lt;P&gt;      32  ls_nalog-BROJ,&lt;/P&gt;&lt;P&gt;      22  ls_nalog-BELNR,&lt;/P&gt;&lt;P&gt;      58  ls_nalog-BLDAT,&lt;/P&gt;&lt;P&gt;      95  ls_nalog-DUG,&lt;/P&gt;&lt;P&gt;     105  ls_nalog-POT,&lt;/P&gt;&lt;P&gt;      122  ls_nalog-SAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 11:54:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754238#M326927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T11:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754239#M326928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the below selection , whats the variables &amp;lt;b&amp;gt;gjahr&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;budat&amp;lt;/b&amp;gt; contains?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope these two fields are initial. So the selection is not picking any infromation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bkpf into table lt_bkpf&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and gjahr = gjahr&lt;/P&gt;&lt;P&gt;and budat = budat&lt;/P&gt;&lt;P&gt;and blart in s_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sunil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754239#M326928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754240#M326929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;put a break point at statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bkpf into table lt_bkpf&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and gjahr = gjahr&lt;/P&gt;&lt;P&gt;and budat = budat&lt;/P&gt;&lt;P&gt;and blart in s_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check out if it gives any selection and if the Internal table It_bkpf updated by any value or not .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754240#M326929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754241#M326930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;if i understand your code, i think you will all entries in BSEG&lt;/P&gt;&lt;P&gt;which have the BUDAT from yesterday. Think about, that&lt;/P&gt;&lt;P&gt;yesterday is the 1.1. (Newyear). Do you have look&lt;/P&gt;&lt;P&gt;in the BSEG (BKPF) via SE16 (SE16N) if there is any entry for&lt;/P&gt;&lt;P&gt;your condition?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754241#M326930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754242#M326931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You debugg the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = bkpf-belnr&lt;/P&gt;&lt;P&gt;and gjahr = bkpf-gjahr.&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 bschl = '31'.&lt;/P&gt;&lt;P&gt;move ls_bseg-dmbtr to ls_nalog-pot.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;move ls_bseg-dmbtr to ls_nalog-dug.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;move ls_bseg-buzei to ls_nalog-poz.&lt;/P&gt;&lt;P&gt;move ls_bseg-lifnr to ls_nalog-dug.&lt;/P&gt;&lt;P&gt;move ls_bkpf-bldat to ls_nalog-bldat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND Ls_nalog to lt_nalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think data is not coming here.&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;Kannaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:07:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754242#M326931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754243#M326932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nick ,just change ur select condition as follows  and then see if u have any data,if yes yes then u can recheck ur conditions (in where clause) ..also u can go to se11 and cross check the tables BKPF and BSEG and give the same condition there in the selection screen and see if data exists for them or not..it seems there something wrong with conditions..&lt;/P&gt;&lt;P&gt;reward if helpfull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bkpf into table lt_bkpf&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;*and gjahr = gjahr        "commented&lt;/P&gt;&lt;P&gt;*and budat = budat&lt;/P&gt;&lt;P&gt;*and blart in s_blart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = bkpf-belnr.&lt;/P&gt;&lt;P&gt;*and gjahr = bkpf-gjahr.  "commented&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 12:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754243#M326932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T12:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: empty ls_</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754244#M326933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think there is another problem like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = &amp;lt;b&amp;gt;bkpf-belnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and gjahr = &amp;lt;b&amp;gt;bkpf-gjahr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change it to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at lt_bkpf into ls_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from bseg into table lt_bseg&lt;/P&gt;&lt;P&gt;where belnr = &amp;lt;b&amp;gt;ls_bkpf-belnr&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and gjahr = &amp;lt;b&amp;gt;ls_bkpf-gjahr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You loop over lt_bkpf into ls_bkpf&lt;/P&gt;&lt;P&gt;therefore you have to  use ls_bkpf-belnr and ls_bkpf-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Dieter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jan 2007 13:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/empty-ls/m-p/1754244#M326933</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-02T13:24:17Z</dc:date>
    </item>
  </channel>
</rss>

