<?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: Sysntax error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985349#M1161433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this situation where there are some blank values in T001-PERIV, which are not present in T009-PERIV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jan 2009 09:53:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-13T09:53:24Z</dc:date>
    <item>
      <title>Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985332#M1161416</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;This code is giving error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into corresponding fields of table it_t001.&lt;/P&gt;&lt;P&gt;Select * from T009 into corresponding fields of table it_t009.&lt;/P&gt;&lt;P&gt;Loop at it_t001 into it_t001_line.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move-corresponding it_t001-periv to it_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table "IT_T009" has no header line - explicit specification of an output area with "INTO wa" or "ASSIGNING &amp;lt;fs&amp;gt;" is required."&lt;/P&gt;&lt;P&gt;"IT_T001" is a table without a header line and therefore has no component called "PERIV".		&lt;/P&gt;&lt;P&gt;The internal table "IT_T001_INCONSISTENT" has no header line - instead of "APPEND IT_T001_INCONSISTENT", only "APPEND wa TO IT_T001_INCONSISTENT" is possible"		&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;P&gt;How do i correct this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:34:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985332#M1161416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985333#M1161417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read table .... INTO workarea. No header line defined, so use the workarea for reading data from itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:37:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985333#M1161417</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2009-01-13T07:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985334#M1161418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check ur Internal tables declaration. Declare the internal tables as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_t001 type standard table of x_t001 with header line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:39:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985334#M1161418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985335#M1161419</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 Read statement and replace it with below and declare it_t009_line .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_t009 into it_t009_line with key periv = it_t001-periv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985335#M1161419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985336#M1161420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;you are doing this ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into corresponding fields of table it_t001.&lt;/P&gt;&lt;P&gt;Select * from T009 into corresponding fields of table it_t009.&lt;/P&gt;&lt;P&gt;Loop at it_t001 into it_t001_line.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move-corresponding it_t001-periv to it_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&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;try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into corresponding fields of table it_t001.&lt;/P&gt;&lt;P&gt;Select * from T009 into corresponding fields of table it_t009.&lt;/P&gt;&lt;P&gt;Loop at it_t001 .&lt;/P&gt;&lt;P&gt;read table it_t009 into it_t001_line with key periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move-corresponding it_t001-periv to it_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&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;hope this help you&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;Ritesh J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:41:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985336#M1161420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985337#M1161421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;here is d correct code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_t001 TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;        wa_t001 TYPE t001,&lt;/P&gt;&lt;P&gt;        it_t001_inconsistent TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;        wa_t001_inconsistent TYPE t001,&lt;/P&gt;&lt;P&gt;        it_t009 TYPE STANDARD TABLE OF t009,&lt;/P&gt;&lt;P&gt;        wa_t009 TYPE t009,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into table it_t001.&lt;/P&gt;&lt;P&gt;IF it_t001[] is not initial.&lt;/P&gt;&lt;P&gt;Select * from T009 &lt;/P&gt;&lt;P&gt;             into table it_t009&lt;/P&gt;&lt;P&gt;             for all entries in it_t001&lt;/P&gt;&lt;P&gt;             where periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_t001 into wa_t001.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = it_t001-periv transporting no fileds.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move wa_t001-periv to wa_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append wa_t001_inconsistent  TO it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:44:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985337#M1161421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985338#M1161422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Define a work are of type T009&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data gwa_t009 like t009.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then change this line&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table it_t009 with key periv = it_t001-periv.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table it_t009 into gwa_t009 with key periv = it_t001_line-periv.
" When comparing the periv field of the t001 table, you have to compare it 
"with the contents of the field periv in the work area it_t001_line.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also change the lines of code where you are moving the data.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
move-corresponding it_t001-periv to it_t001_inconsistent_wa-periv. " Define the work area as well
append it_t001_inconsistent_wa to it_t001_inconsistent.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively you can declare all the tables with the addition with header line, but that is not recommended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Advait Gode on Jan 13, 2009 8:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985338#M1161422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985339#M1161423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select * from t001 into corresponding fields of table it_t001.
Select * from T009 into corresponding fields of table it_t009.

Loop at it_t001." into it_t001_line.

read table it_t009 with key periv = it_t001-periv.

If sy-subrc ne 0.

move-corresponding it_t001-periv to wa_t001_inconsistent-periv. "if you want to move only content of periv

" or else for entire record use 

move-corresponding it_t001 to wa_t001_inconsistent.
  
append wa_t001_inconsistent to it_t001_inconsistent. " using a explicit work area
endif.
endloop.&lt;/CODE&gt;&lt;/PRE&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;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 07:53:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985339#M1161423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T07:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985340#M1161424</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;Please use the following statement to define you Internal table or work area &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: it_t001 LIKE STANDARD TABLE OF t001 WITH HEADER LINE,
      wa_it_t001 LIKE t001,
      it_t009 LIKE STANDARD TABLE OF t009 WITH HEADER LINE,
      wa_it_t009 LIKE t009.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 08:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985340#M1161424</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-01-13T08:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985341#M1161425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) First   declare a work area for it_tT009 internal tables.&lt;/P&gt;&lt;P&gt;    data : wa_t009 like line of it_tT009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Then write the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into corresponding fields of table it_t001.&lt;/P&gt;&lt;P&gt;Select * from T009 into corresponding fields of table it_t009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear it_t001_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_t001 into it_t001_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear wa_t009.&lt;/P&gt;&lt;P&gt;read table it_t009 into wa_t009  with key periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move-corresponding it_t001-periv to it_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;clear it_t001_line.&lt;/P&gt;&lt;P&gt;endif.&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, 13 Jan 2009 08:20:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985341#M1161425</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T08:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985342#M1161426</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;One of you has given me this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_t001 TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;wa_t001 TYPE t001,&lt;/P&gt;&lt;P&gt;it_t001_inconsistent TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;wa_t001_inconsistent TYPE t001,&lt;/P&gt;&lt;P&gt;it_t009 TYPE STANDARD TABLE OF t009,&lt;/P&gt;&lt;P&gt;wa_t009 TYPE t009,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into table it_t001.&lt;/P&gt;&lt;P&gt;IF it_t001[] is not initial.&lt;/P&gt;&lt;P&gt;Select * from T009 &lt;/P&gt;&lt;P&gt;into table it_t009&lt;/P&gt;&lt;P&gt;for all entries in it_t001&lt;/P&gt;&lt;P&gt;where periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_t001 into wa_t001.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = it_t001-periv transporting no fileds.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move wa_t001-periv to wa_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append wa_t001_inconsistent TO it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&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;Its giving a syntax error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table "IT_T009" has no header line - explicit specification of an output area with "INTO wa" or "ASSIGNING &amp;lt;fs&amp;gt;" is required.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me out with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 08:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985342#M1161426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T08:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985343#M1161427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah...there was small type errors...here it is...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_t001 TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;wa_t001 TYPE t001,&lt;/P&gt;&lt;P&gt;it_t001_inconsistent TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;wa_t001_inconsistent TYPE t001,&lt;/P&gt;&lt;P&gt;it_t009 TYPE STANDARD TABLE OF t009,&lt;/P&gt;&lt;P&gt;wa_t009 TYPE t009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into table it_t001.&lt;/P&gt;&lt;P&gt;IF it_t001[] is not initial.&lt;/P&gt;&lt;P&gt;Select * from T009 &lt;/P&gt;&lt;P&gt;into table it_t009&lt;/P&gt;&lt;P&gt;for all entries in it_t001&lt;/P&gt;&lt;P&gt;where periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_t001 into wa_t001.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = wa_t001-periv transporting no fields.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move wa_t001-periv to wa_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append wa_t001_inconsistent TO it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 08:57:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985343#M1161427</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T08:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985344#M1161428</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;Use workarea for ur internal tables or use with headerline statement in ur internal table declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985344#M1161428</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985345#M1161429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to use explicit work area for all the tables than do it this way: Modify the code given above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Select * from t001 into table it_t001.

IF it_t001 is not initial.

Select * from T009 
into table it_t009
for all entries in it_t001
where periv = it_t001-periv.

Loop at it_t001 into wa_t001.
read table it_t009 into wa_t009 with key periv = wa_t001-periv.
If sy-subrc ne 0.
move wa_t001-periv to wa_t001_inconsistent-periv.
append wa_t001_inconsistent TO it_t001_inconsistent.
endif.
endloop.
endif.&lt;/CODE&gt;&lt;/PRE&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;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985345#M1161429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985346#M1161430</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 am using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:it_t001 like STANDARD TABLE OF t001 with header line,&lt;/P&gt;&lt;P&gt;wa_t001 TYPE t001,&lt;/P&gt;&lt;P&gt;it_t001_inconsistent TYPE STANDARD TABLE OF t001,&lt;/P&gt;&lt;P&gt;wa_t001_inconsistent TYPE t001,&lt;/P&gt;&lt;P&gt;it_t009 like STANDARD TABLE OF t009 with header line,&lt;/P&gt;&lt;P&gt;wa_t009 TYPE t009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from t001 into table it_t001.&lt;/P&gt;&lt;P&gt;IF it_t001[] is not initial.&lt;/P&gt;&lt;P&gt;Select * from T009&lt;/P&gt;&lt;P&gt;into table it_t009&lt;/P&gt;&lt;P&gt;for all entries in it_t001&lt;/P&gt;&lt;P&gt;where periv = it_t001-periv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_t001 into wa_t001.&lt;/P&gt;&lt;P&gt;read table it_t009 with key periv = it_t001-periv." TRANSPORTING NO FIELDS.&lt;/P&gt;&lt;P&gt;If sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move wa_t001-periv to wa_t001_inconsistent-periv.&lt;/P&gt;&lt;P&gt;append wa_t001_inconsistent TO it_t001_inconsistent.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the internal table it_t001_inconsistent gets all the entries which are there in it_t001... i.e. the basic logic of the program is failing, which is that only those entries should come in it_t001_inconsistent that are there is T001-PERIV but not in T009-PERIV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me out with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985346#M1161430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985347#M1161431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You wrote:&lt;/P&gt;&lt;P&gt;" .... those entries should come in it_t001_inconsistent that are there is T001-PERIV but not in T009-PERIV."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to let you know this is NEVER possible because against T001-PERIV you have T009 maintained as check table. This situation will never happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Select * from t001 into table it_t001.
IF it_t001[] is not initial.
Select * from T009
into table it_t009
for all entries in it_t001
where periv = it_t001-periv.

Loop at it_t001 into wa_t001.
read table it_t009 with key periv = it_t001-periv." TRANSPORTING NO FIELDS.
If sy-subrc ne 0.
move wa_t001-periv to wa_t001_inconsistent-periv.
append wa_t001_inconsistent TO it_t001_inconsistent.
endif.
endloop.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the stmt:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; read table it_t009 with key periv = it_t001-periv." TRANSPORTING NO FIELDS. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;read table it_t009 with key periv = wa_t001-periv. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find it_t001_inconsistent will have no values !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i am clear on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 13, 2009 10:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985347#M1161431</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-13T09:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985348#M1161432</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;You are reading the data in a work area wa_t001, but while comparing the key preiv, you are using the itab. this is wrong.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at it_t001 into wa_t001.
read table it_t009 with key periv = it_t001-periv." TRANSPORTING NO FIELDS.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at it_t001 into wa_t001.
read table it_t009 with key periv = wa_t001-periv.  "use the work are here
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&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;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:52:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985348#M1161432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985349#M1161433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this situation where there are some blank values in T001-PERIV, which are not present in T009-PERIV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985349#M1161433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985350#M1161434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blank values in T001-PERIV means that Fiscal Year Variant is not maintained for that Company Code. What i meant is that you cannot give wrong / incorrect values to this field. You can always leave it as blank &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your code will work, with the modifications mentioned in my post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 13, 2009 10:57 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:57:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985350#M1161434</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-13T09:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sysntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985351#M1161435</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;Thanks to you all. Now I am able to get entries in the table it_t001_inconsistent. Now how do I print the result of this table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2009 09:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sysntax-error/m-p/4985351#M1161435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-13T09:59:10Z</dc:date>
    </item>
  </channel>
</rss>

