<?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: Error when using the method cl_gui_frontend_services=&amp;gt;file_open_dialog in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045500#M421148</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 try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...

parameters: p_input type localfile.
  
at selection-screen on value-request for p_input.

  data: path_str type string.
 
  call method cl_gui_frontend_services=&amp;gt;directory_browse
      exporting
         window_title    = 'Select Directory'
      changing
         selected_folder = path_str
      exceptions
         cntl_error = 1.
 
  call method cl_gui_cfw=&amp;gt;flush
       exceptions
          cntl_system_error = 1
          cntl_error        = 2.
 
  p_input =  path_str.

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Mar 2007 15:45:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-10T15:45:38Z</dc:date>
    <item>
      <title>Error when using the method cl_gui_frontend_services=&gt;file_open_dialog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045499#M421147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently practicing BDC and I think the first step is to locate where my text file is. Now based on my code below, after selecting my text file nothing happens. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what will be my next after getting the file from a specific location? Thanks guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_aris_practice_bdc_0&lt;/P&gt;&lt;P&gt;        NO STANDARD PAGE HEADING&lt;/P&gt;&lt;P&gt;        LINE-SIZE 255&lt;/P&gt;&lt;P&gt;        LINE-COUNT 64&lt;/P&gt;&lt;P&gt;        MESSAGE-ID zz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*BDC Data&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF bdc_tab OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE bdcdata.&lt;/P&gt;&lt;P&gt;DATA: END OF bdc_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Table&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF it_input OCCURS 0,&lt;/P&gt;&lt;P&gt;         user     TYPE usr02-bname,&lt;/P&gt;&lt;P&gt;         title    TYPE sza5_d0700-title_medi,&lt;/P&gt;&lt;P&gt;         lname    TYPE addr3_data-name_last,&lt;/P&gt;&lt;P&gt;         fname    TYPE addr3_data-name_first,&lt;/P&gt;&lt;P&gt;         initials TYPE addr3_data-initials,&lt;/P&gt;&lt;P&gt;         nickname TYPE addr3_data-nickname,&lt;/P&gt;&lt;P&gt;         function TYPE addr3_data-function,&lt;/P&gt;&lt;P&gt;      END OF it_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: gt_lines TYPE sy-tabix,&lt;/P&gt;&lt;P&gt;      gt_file  TYPE filetable,&lt;/P&gt;&lt;P&gt;      wa_file  TYPE filetable,&lt;/P&gt;&lt;P&gt;      gt_subrc TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CONSTANTS&lt;/P&gt;&lt;P&gt;CONSTANTS: c_mask(60) TYPE c  VALUE ',&lt;STRONG&gt;.&lt;/STRONG&gt;.'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection Screen&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: p_input LIKE rlgrap-filename.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input.&lt;/P&gt;&lt;P&gt;  CALL METHOD cl_gui_frontend_services=&amp;gt;file_open_dialog&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WINDOW_TITLE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_EXTENSION       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   DEFAULT_FILENAME        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FILE_FILTER             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      initial_directory       = 'C:\Temp\'&lt;/P&gt;&lt;P&gt;      multiselection          = 'X'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      file_table              = gt_file[]&lt;/P&gt;&lt;P&gt;      rc                      = gt_subrc&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   USER_ACTION             =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_open_dialog_failed = 1&lt;/P&gt;&lt;P&gt;      cntl_error              = 2&lt;/P&gt;&lt;P&gt;      error_no_gui            = 3&lt;/P&gt;&lt;P&gt;      OTHERS                  = 4.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*START-OF-SELECTION&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;  PERFORM put_in_itab.&lt;/P&gt;&lt;P&gt;  PERFORM process_records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  get_files&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM put_in_itab.&lt;/P&gt;&lt;P&gt;  DATA: lv_file TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_file = p_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                      = lv_file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILETYPE                      = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     has_field_separator           = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER_LENGTH                 = 0&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    READ_BY_LINE                  = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DAT_MODE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CODEPAGE                      = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    IGNORE_CERR                   = ABAP_TRUE&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    REPLACEMENT                   = '#'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    CHECK_BOM                     = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    VIRUS_SCAN_PROFILE            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    NO_AUTH_CHECK                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    HEADER                        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                      = it_input&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     file_open_error               = 1&lt;/P&gt;&lt;P&gt;     file_read_error               = 2&lt;/P&gt;&lt;P&gt;     no_batch                      = 3&lt;/P&gt;&lt;P&gt;     gui_refuse_filetransfer       = 4&lt;/P&gt;&lt;P&gt;     invalid_type                  = 5&lt;/P&gt;&lt;P&gt;     no_authority                  = 6&lt;/P&gt;&lt;P&gt;     unknown_error                 = 7&lt;/P&gt;&lt;P&gt;     bad_data_format               = 8&lt;/P&gt;&lt;P&gt;     header_not_allowed            = 9&lt;/P&gt;&lt;P&gt;     separator_not_allowed         = 10&lt;/P&gt;&lt;P&gt;     header_too_long               = 11&lt;/P&gt;&lt;P&gt;     unknown_dp_error              = 12&lt;/P&gt;&lt;P&gt;     access_denied                 = 13&lt;/P&gt;&lt;P&gt;     dp_out_of_memory              = 14&lt;/P&gt;&lt;P&gt;     disk_full                     = 15&lt;/P&gt;&lt;P&gt;     dp_timeout                    = 16&lt;/P&gt;&lt;P&gt;     OTHERS                        = 17&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;  ELSE.&lt;/P&gt;&lt;P&gt;    DESCRIBE TABLE it_input LINES gt_lines.&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;ENDFORM.                    "get_files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  process_records&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM process_records.&lt;/P&gt;&lt;P&gt;  LOOP AT it_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                    "process_records&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2007 14:30:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045499#M421147</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2007-03-10T14:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the method cl_gui_frontend_services=&gt;file_open_dialog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045500#M421148</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 try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...

parameters: p_input type localfile.
  
at selection-screen on value-request for p_input.

  data: path_str type string.
 
  call method cl_gui_frontend_services=&amp;gt;directory_browse
      exporting
         window_title    = 'Select Directory'
      changing
         selected_folder = path_str
      exceptions
         cntl_error = 1.
 
  call method cl_gui_cfw=&amp;gt;flush
       exceptions
          cntl_system_error = 1
          cntl_error        = 2.
 
  p_input =  path_str.

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2007 15:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045500#M421148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-10T15:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using the method cl_gui_frontend_services=&gt;file_open_dialog</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045501#M421149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hii viraylab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go throgh this link..This sample code solves ur problem....&lt;/P&gt;&lt;P&gt;/people/milind.upasani/blog/2007/03/07/step-by-step-approach-to-ceate-simple-bdc-session-program-using-reusable-template&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    U are new to BDC it seems...&lt;/P&gt;&lt;P&gt;    first u read the sap help ... then u will come know what to do after wards....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fa/097720543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fa/097720543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Be familiar with the structure BDCDATA.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Data transfers&amp;lt;/b&amp;gt;  In this page..&lt;/P&gt;&lt;P&gt;Next u need to know about the &amp;lt;b&amp;gt;transaction RECORDER the tcode is SHDB.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing is difficult in this ..&lt;/P&gt;&lt;P&gt;For example When u r creating a data element in SE11 u go through some screens in a flow, by clicking some pushbuttons and by generating some function codes manually, and entering values manually...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But here u wont do it manually, these values will be populated from file into an internal table...&lt;/P&gt;&lt;P&gt;Before calling a transaction into which u r going to populate the data is to be filled into a table with structure &amp;lt;b&amp;gt;BDCDATA.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;U need to use CALL TRANSACTION 'SE11' using BDCDATA or&lt;/P&gt;&lt;P&gt; the session method..&amp;lt;/b&amp;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;Reward points for helpful answers...&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2007 17:08:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-when-using-the-method-cl-gui-frontend-services-gt-file-open-dialog/m-p/2045501#M421149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-10T17:08:43Z</dc:date>
    </item>
  </channel>
</rss>

