<?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 Problem with Select Statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212711#M474170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm giving input through Flat file using WS_UPLOAD.storing it_txt_upload.(which contains all the personal numbers came from Flat file)&lt;/P&gt;&lt;P&gt;and trying to read the data from table PA0006 into it_p0006&lt;/P&gt;&lt;P&gt;using for all entries.&lt;/P&gt;&lt;P&gt;it is not taking some of the personal numbers.&lt;/P&gt;&lt;P&gt;i have checked in Debug mode it is storing to it_txt_upload(53 personal numbers)&lt;/P&gt;&lt;P&gt;after select query it needs to take the entries for all the 53 personal numbers.&lt;/P&gt;&lt;P&gt;but it not taking all.&lt;/P&gt;&lt;P&gt;for all the personal numbers records are there in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm providing the code what i have written. please check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;uploading the data from excel to internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            filename                = 'H:\EMP_NO.TXT'  " Input file&lt;/P&gt;&lt;P&gt;            filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            data_tab                = t_txt_upload    "internal table&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            conversion_error        = 1&lt;/P&gt;&lt;P&gt;            file_open_error         = 2&lt;/P&gt;&lt;P&gt;            file_read_error         = 3&lt;/P&gt;&lt;P&gt;            invalid_type            = 4&lt;/P&gt;&lt;P&gt;            no_batch                = 5&lt;/P&gt;&lt;P&gt;            unknown_error           = 6&lt;/P&gt;&lt;P&gt;            invalid_table_width     = 7&lt;/P&gt;&lt;P&gt;            gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;            customer_error          = 9&lt;/P&gt;&lt;P&gt;            others                  = 10.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;   message e030.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not t_txt_upload[] is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the data from table PA0006.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   select  pernr&lt;/P&gt;&lt;P&gt;        begda&lt;/P&gt;&lt;P&gt;        endda&lt;/P&gt;&lt;P&gt;        anssa&lt;/P&gt;&lt;P&gt;        stras&lt;/P&gt;&lt;P&gt;        locat&lt;/P&gt;&lt;P&gt;        ort01&lt;/P&gt;&lt;P&gt;        ort02&lt;/P&gt;&lt;P&gt;        pstlz&lt;/P&gt;&lt;P&gt;        land1&lt;/P&gt;&lt;P&gt;        telnr&lt;/P&gt;&lt;P&gt;        com01&lt;/P&gt;&lt;P&gt;        num01&lt;/P&gt;&lt;P&gt;        com02&lt;/P&gt;&lt;P&gt;        num02&lt;/P&gt;&lt;P&gt;              from pa0006&lt;/P&gt;&lt;P&gt;        into table it_p0006&lt;/P&gt;&lt;P&gt;     for all entries in t_txt_upload&lt;/P&gt;&lt;P&gt;       where pernr eq t_txt_upload-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    message I030.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   sort it_p0006 by pernr.&lt;/P&gt;&lt;P&gt;   delete adjacent duplicates from it_p0006.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2007 06:43:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-03T06:43:34Z</dc:date>
    <item>
      <title>Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212711#M474170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm giving input through Flat file using WS_UPLOAD.storing it_txt_upload.(which contains all the personal numbers came from Flat file)&lt;/P&gt;&lt;P&gt;and trying to read the data from table PA0006 into it_p0006&lt;/P&gt;&lt;P&gt;using for all entries.&lt;/P&gt;&lt;P&gt;it is not taking some of the personal numbers.&lt;/P&gt;&lt;P&gt;i have checked in Debug mode it is storing to it_txt_upload(53 personal numbers)&lt;/P&gt;&lt;P&gt;after select query it needs to take the entries for all the 53 personal numbers.&lt;/P&gt;&lt;P&gt;but it not taking all.&lt;/P&gt;&lt;P&gt;for all the personal numbers records are there in database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm providing the code what i have written. please check it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;uploading the data from excel to internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'WS_UPLOAD'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            filename                = 'H:\EMP_NO.TXT'  " Input file&lt;/P&gt;&lt;P&gt;            filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            data_tab                = t_txt_upload    "internal table&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            conversion_error        = 1&lt;/P&gt;&lt;P&gt;            file_open_error         = 2&lt;/P&gt;&lt;P&gt;            file_read_error         = 3&lt;/P&gt;&lt;P&gt;            invalid_type            = 4&lt;/P&gt;&lt;P&gt;            no_batch                = 5&lt;/P&gt;&lt;P&gt;            unknown_error           = 6&lt;/P&gt;&lt;P&gt;            invalid_table_width     = 7&lt;/P&gt;&lt;P&gt;            gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;            customer_error          = 9&lt;/P&gt;&lt;P&gt;            others                  = 10.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;   message e030.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not t_txt_upload[] is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the data from table PA0006.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   select  pernr&lt;/P&gt;&lt;P&gt;        begda&lt;/P&gt;&lt;P&gt;        endda&lt;/P&gt;&lt;P&gt;        anssa&lt;/P&gt;&lt;P&gt;        stras&lt;/P&gt;&lt;P&gt;        locat&lt;/P&gt;&lt;P&gt;        ort01&lt;/P&gt;&lt;P&gt;        ort02&lt;/P&gt;&lt;P&gt;        pstlz&lt;/P&gt;&lt;P&gt;        land1&lt;/P&gt;&lt;P&gt;        telnr&lt;/P&gt;&lt;P&gt;        com01&lt;/P&gt;&lt;P&gt;        num01&lt;/P&gt;&lt;P&gt;        com02&lt;/P&gt;&lt;P&gt;        num02&lt;/P&gt;&lt;P&gt;              from pa0006&lt;/P&gt;&lt;P&gt;        into table it_p0006&lt;/P&gt;&lt;P&gt;     for all entries in t_txt_upload&lt;/P&gt;&lt;P&gt;       where pernr eq t_txt_upload-pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;    message I030.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   sort it_p0006 by pernr.&lt;/P&gt;&lt;P&gt;   delete adjacent duplicates from it_p0006.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 06:43:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212711#M474170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T06:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212712#M474171</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 think those pernrs are missing in  PA0006 that's why its not retrieving data belongs to that pernrs.&lt;/P&gt;&lt;P&gt;goto se11 and check the pernrs in  PA0006  comparing  it_txt_upload-pernr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 06:50:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212712#M474171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T06:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212713#M474172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check that the data that you are picking from the presentation server has the same length as that of that in the SAP system... also some of the personal number's should match in your case.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What all problem can be there in you case...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- length of the data (may be key field) would be diff in both db table and the flat file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- there would be no primary key's matching from db table with the key you have taken in your internnal table from flat file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayant &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please award if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 06:50:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212713#M474172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T06:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212714#M474173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI vamsi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is pernrr a primary key in the table pa0006?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If pernr the only primary key then all data will be fetched..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If pernr has some other fields ( i mean pernr + some other field as primary key) then it will not fetch the redundant pernr values from the database..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;nazeer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        nazeer shaik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 06:52:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212714#M474173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T06:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212715#M474174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamsi &lt;/P&gt;&lt;P&gt;Check that it_p0006 structure,whether you declared it has internal table or work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try looping it_txt_upload and &lt;/P&gt;&lt;P&gt;select &lt;/P&gt;&lt;P&gt;endloop.&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, 03 May 2007 06:54:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212715#M474174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T06:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212716#M474175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first suggestion for you....do not use ws_upload as it is obsolete now. Use gui_upload method of the cl_gui_frontend_services class. or alternatively gui_upload function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check if the employee number is being populated in the correct field of your t_txt_upload from the file. it should come in the pernr field. i hope the field length in the internal table is long enough to hold the employee numbers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your select query is correct. no problems there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are sorting the table by pernr then add the comparing addition in the delete adjacent duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_p0006 by pernr. &lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_p0006 comparing pernr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Priyank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 07:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212716#M474175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-03T07:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Select Statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212717#M474176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the data loaded in debug mode (to bypass cnversion) are the Personnel number right justified, padded with zeroes, if its not the case, maybe you have to LOOP at your internal table to correct this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT t_txt_upload.
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      input         = t_txt_upload-pernr
    IMPORTING
      OUTPUT        = t_txt_upload-pernr.
  MODIFY t_txt_upload.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2007 07:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-statement/m-p/2212717#M474176</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2007-05-03T07:07:29Z</dc:date>
    </item>
  </channel>
</rss>

