<?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: Query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590131#M265666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Vikram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Sep 2006 04:15:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-19T04:15:50Z</dc:date>
    <item>
      <title>Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590121#M265656</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 have to upload an excel sheet from the desktop to the internal table &amp;amp; I am using the FM - TEXT_CONVERT_XLS_TO_SAP ... all is going well but the enduser wants that I should check for the situation where a wrong excel file is selected for the upload, then I need to throw an error that "wrong file selected".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any reponses on how to handle it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;SB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590121#M265656</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590122#M265657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you could use a file path parameter to request user to input the file path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then u need to define what is defined as error/wrong.&lt;/P&gt;&lt;P&gt;There after just a pop up window to say 'wrong file selected'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all is fine then u proceed to upload. ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590122#M265657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590123#M265658</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; How do u want to validate that? Do you want to validate based on the file name? or File extension? Or incorrrect data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If you want to validate the file name or file extension then you need to write ur own code.&lt;/P&gt;&lt;P&gt; If you want to validate based on the contents then you have to first upload and then loop through the data and validate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:33:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590123#M265658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590124#M265659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I need to validate based on the filename... &amp;amp; I hope that since this is a regular monthly upload ... the excel sheet will be saved with date ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590124#M265659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590125#M265660</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 the FM "SO_SPLIT_FILE_AND_PATH" and split the filename and validate as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:48:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590125#M265660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590126#M265661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay ... but this may restrict the user to enter the filename always the same ... instead of that if the first line/column of the excel sheet will always be = "Rate Type"... then they will have the flexibility to use any name with an .xls extention ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; With the FM that I am using TEXT_CONVERT_XLS_TO_SAP ... can I select the header's 1st column = 'Rate Type' &amp;amp; if sy-subrc &amp;lt;&amp;gt; 0. then throw an error...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 01:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590126#M265661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T01:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590127#M265662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any reponses for this query ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 02:27:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590127#M265662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T02:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590128#M265663</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;did u try using FM GUI_UPLOAD??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 02:46:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590128#M265663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T02:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590129#M265664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes ... I did .. but in that the excel file values were shown as ## while debugging the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 03:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590129#M265664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T03:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590130#M265665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SB,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can select first row from the itab populated from excel and validate if the value = Rate Type as per you requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zupload_excel_to_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS: truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE  rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF t_datatab,&lt;/P&gt;&lt;P&gt;      col1(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      col2(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      col3(30)    TYPE c,&lt;/P&gt;&lt;P&gt;      END OF t_datatab.&lt;/P&gt;&lt;P&gt;DATA: it_datatab type standard table of t_datatab,&lt;/P&gt;&lt;P&gt;      wa_datatab type t_datatab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_raw TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;CONSTANTS: c_filename(20) type c value 'Rate Pattern'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;At selection screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      field_name = 'P_FILE'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      file_name  = p_file.&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;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    I_FIELD_SEPERATOR        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      i_line_header            =  'X'&lt;/P&gt;&lt;P&gt;      i_tab_raw_data           =  it_raw       " WORK TABLE&lt;/P&gt;&lt;P&gt;      i_filename               =  p_file&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_converted_data     = it_datatab[]    "ACTUAL DATA&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;      conversion_failed        = 1&lt;/P&gt;&lt;P&gt;      OTHERS                   = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_datatab index 0.&lt;/P&gt;&lt;P&gt;if it_datatab-col1 &amp;lt;&amp;gt; c_filename.&lt;/P&gt;&lt;P&gt;message e001 with 'Incorrect File'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would give you some idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vikram&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls reward for helpful replies!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 03:27:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590130#M265665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T03:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590131#M265666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Vikram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2006 04:15:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query/m-p/1590131#M265666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-19T04:15:50Z</dc:date>
    </item>
  </channel>
</rss>

