<?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: validating of flat file before uploading in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957714#M394033</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;normally as BDC is processed through screens, the screen validations are already done for the same. in case any error occurs in the processing, it is validated on the screen can be observed in session (in case of session method) or BDCMSGCOLL (in case of calltransaction method).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you dont want to validate in run time, and want to do all the validations before processing, you can read each record of the uploaded internal table using LOOP statement, and do the necessary validations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2007 10:46:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-15T10:46:17Z</dc:date>
    <item>
      <title>validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957712#M394031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;is there any method to validate a flat file before uploading the records to the database for uploading we may use session or call transaction method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:15:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957712#M394031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T10:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957713#M394032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Populate the data into one internal table using (GUI_UPLOAD function module)-&amp;gt; Loop the internal table-&amp;gt; Do the validation for each field of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a way to validate the data before passing it to a BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhavana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957713#M394032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T10:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957714#M394033</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;normally as BDC is processed through screens, the screen validations are already done for the same. in case any error occurs in the processing, it is validated on the screen can be observed in session (in case of session method) or BDCMSGCOLL (in case of calltransaction method).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you dont want to validate in run time, and want to do all the validations before processing, you can read each record of the uploaded internal table using LOOP statement, and do the necessary validations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:46:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957714#M394033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T10:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957715#M394034</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;Populate the data into one internal table using (GUI_UPLOAD function module)-&amp;gt; Loop the internal table-&amp;gt; Do the validation for each field of the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a way to validate the data before passing it to a BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Validation in the sense generally we will check and split the line items while handling with BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957715#M394034</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-02-15T10:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957716#M394035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you provide sample code for that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 12:46:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957716#M394035</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T12:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: validating of flat file before uploading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957717#M394036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Checking the file Format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;file_exist&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      file                 = w_l_file&lt;/P&gt;&lt;P&gt;    RECEIVING&lt;/P&gt;&lt;P&gt;      result               = w_file_fg&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      cntl_error           = 1&lt;/P&gt;&lt;P&gt;      error_no_gui         = 2&lt;/P&gt;&lt;P&gt;      wrong_parameter      = 3&lt;/P&gt;&lt;P&gt;      not_supported_by_gui = 4&lt;/P&gt;&lt;P&gt;      OTHERS               = 5.&lt;/P&gt;&lt;P&gt;and then for data up load in to internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = p_file&lt;/P&gt;&lt;P&gt;      i_begin_col             = 1&lt;/P&gt;&lt;P&gt;      i_begin_row             = 2&lt;/P&gt;&lt;P&gt;      i_end_col               = 9&lt;/P&gt;&lt;P&gt;      i_end_row               = 5000&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      intern                  = it_excel&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inconsistent_parameters = 1&lt;/P&gt;&lt;P&gt;      upload_ole              = 2&lt;/P&gt;&lt;P&gt;      OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the data ino our required format of internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_excel INTO is_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CASE is_excel-col.&lt;/P&gt;&lt;P&gt;      WHEN c_col_0001.&lt;/P&gt;&lt;P&gt;        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            date_external = is_excel-value&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;P&gt;            date_internal = w_date.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          MESSAGE i000(ymmm) WITH 'Enter valid Date in Excel'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;        is_data-cdate   = w_date.             "OB Delivery Creation date&lt;/P&gt;&lt;P&gt;        CLEAR:w_date.&lt;/P&gt;&lt;P&gt;      WHEN c_col_0002.&lt;/P&gt;&lt;P&gt;        is_data-stsan   = is_excel-value.      "STSA Number&lt;/P&gt;&lt;P&gt;      WHEN c_col_0003.&lt;/P&gt;&lt;P&gt;        is_data-matnr   = is_excel-value.      "Material Number&lt;/P&gt;&lt;P&gt;      WHEN c_col_0004.&lt;/P&gt;&lt;P&gt;        TRANSLATE is_excel-value TO UPPER CASE.&lt;/P&gt;&lt;P&gt;        is_data-lgort   = is_excel-value.      "Storage Location.&lt;/P&gt;&lt;P&gt;      WHEN c_col_0005.&lt;/P&gt;&lt;P&gt;        is_data-charg   = is_excel-value.      "Batch Number&lt;/P&gt;&lt;P&gt;      WHEN c_col_0006.&lt;/P&gt;&lt;P&gt;        is_data-menge   = is_excel-value.      "Quantity in KG&lt;/P&gt;&lt;P&gt;      WHEN c_col_0007.&lt;/P&gt;&lt;P&gt;        is_data-chnum   = is_excel-value.      "Delivery Challan Number&lt;/P&gt;&lt;P&gt;      WHEN c_col_0008.&lt;/P&gt;&lt;P&gt;        is_data-fagnt   = is_excel-value.      "Forwarding Agent &amp;#150; 1&lt;/P&gt;&lt;P&gt;      WHEN c_col_0009.&lt;/P&gt;&lt;P&gt;        is_data-vnumb   = is_excel-value.      "Vehicle License Plate Number&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    AT END OF row.&lt;/P&gt;&lt;P&gt;      APPEND is_data TO it_data.&lt;/P&gt;&lt;P&gt;      CLEAR: is_data,is_excel.&lt;/P&gt;&lt;P&gt;    ENDAT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_data BY cdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then do the validation.&lt;/P&gt;&lt;P&gt;I worked on this.&lt;/P&gt;&lt;P&gt;IF it is use full Give some points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2007 11:00:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validating-of-flat-file-before-uploading/m-p/1957717#M394036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-17T11:00:00Z</dc:date>
    </item>
  </channel>
</rss>

