<?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: upload zprograms into sap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363583#M807082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is a single program , try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto SE38&lt;/P&gt;&lt;P&gt;create the program and go in change mode&lt;/P&gt;&lt;P&gt;in menu Utilities&lt;DEL&gt;-&amp;gt;more utilities&lt;/DEL&gt;&amp;gt;upload/download---&amp;gt;upload the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2008 18:57:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-04T18:57:35Z</dc:date>
    <item>
      <title>upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363581#M807080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to upload zprograms into sap?is there any program to upload zprograms into sap from a txt format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz send the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 18:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363581#M807080</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T18:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363582#M807081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pavan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes we can upload zprograms into sap from presentaion server, Go to--&lt;DEL&gt;-&amp;gt; Utilities&lt;/DEL&gt;&lt;DEL&gt;&amp;gt; More utilities&lt;/DEL&gt;---&amp;gt; upload.&lt;/P&gt;&lt;P&gt; There we can browse what ever file we need to upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want ??&lt;/P&gt;&lt;P&gt;Hope this will helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surender.B.V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 18:54:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363582#M807081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T18:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363583#M807082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is a single program , try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;goto SE38&lt;/P&gt;&lt;P&gt;create the program and go in change mode&lt;/P&gt;&lt;P&gt;in menu Utilities&lt;DEL&gt;-&amp;gt;more utilities&lt;/DEL&gt;&amp;gt;upload/download---&amp;gt;upload the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 18:57:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363583#M807082</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T18:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363584#M807083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is bunch of zprograms to upload into sap from presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any program to upload many zprograms into sap from  presentation server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 19:15:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363584#M807083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T19:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363585#M807084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what i mean is , i want to upload all files at a time in sap from  presentation server.&lt;/P&gt;&lt;P&gt;(whose name starts with zp*, like that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since i got hundreds of programs.  plz suggests me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 19:20:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363585#M807084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-04T19:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363586#M807085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; your req to upload into sap all at once is not possible... all you can do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the slection screen you can create few parameters.. which allow to browse for files on the presentation server..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the code.. you need to call gui_upload FM for all those files.. and get data into internal table.. and do you manupulations and update the tables in SAP you wanted..&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;Award points if helpful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Feb 2008 21:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363586#M807085</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-02-04T21:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363587#M807086</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;Try this program, it should work&lt;/P&gt;&lt;P&gt;however the programs created will not have any development package or description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZKRIS_UPLOADALL
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Author  : Kris Donald
*&amp;amp; Date    : 12-11-2007
*&amp;amp; Purpose : To read all text files in a directory and write it to pgms
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Date Changed by Tag Description
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zkris_uploadall.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE lv_b1ttl.
PARAMETERS: p_dir(512) DEFAULT 'C:'.
PARAMETERS: p_hide AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.

*----------------------------------------------------------------------*
* Initialization                                                       *
*----------------------------------------------------------------------*
INITIALIZATION.
* sets the value for the title of the parameters block
  lv_b1ttl = 'Parameters'.

*----------------------------------------------------------------------*
* at selection screen                                                  *
*----------------------------------------------------------------------*

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dir.

  DATA: initial_folder TYPE string.
  DATA: selected_folder TYPE string.
  initial_folder = p_dir.

  CALL METHOD cl_gui_frontend_services=&amp;gt;directory_browse
    EXPORTING
*    window_title         =
      initial_folder       = initial_folder
    CHANGING
      selected_folder      = selected_folder
    EXCEPTIONS
      cntl_error           = 1
      error_no_gui         = 2
      not_supported_by_gui = 3
      OTHERS               = 4
          .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    WRITE:/ 'Error number', sy-subrc.
    EXIT..
  ENDIF.

  p_dir = selected_folder.

*----------------------------------------------------------------------*
* start-of-selection                                                   *
*----------------------------------------------------------------------*

START-OF-SELECTION.

  DATA: it_file_table TYPE STANDARD TABLE OF file_info.
  DATA: wa_file_table LIKE LINE OF it_file_table.

  TYPES: BEGIN OF x_sourcecode_type,
    line(1023),
    END OF x_sourcecode_type.
  DATA: it_sourcecode TYPE x_sourcecode_type OCCURS 0 WITH HEADER LINE.

  DATA: lv_count TYPE i.
  DATA: lv_directory TYPE string.
  DATA: lv_file TYPE string.
  DATA: lv_progname LIKE trdir-name.
  DATA: lv_length TYPE i.

  lv_directory = p_dir.
  CALL METHOD cl_gui_frontend_services=&amp;gt;directory_list_files
    EXPORTING
      directory                   = lv_directory
      filter                      = '*.TXT'
      files_only                  = 'X'
*    directories_only            =
    CHANGING
      file_table                  = it_file_table
      count                       = lv_count
    EXCEPTIONS
      cntl_error                  = 1
      directory_list_files_failed = 2
      wrong_parameter             = 3
      error_no_gui                = 4
      not_supported_by_gui        = 5
      OTHERS                      = 6
          .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    WRITE:/ 'Error number', sy-subrc.
    EXIT.
  ENDIF.

  DELETE it_file_table WHERE filelength = 0.
*LOOP AT it_file_table INTO wa_file_table.
*  WRITE:/ wa_file_table-filename.
*ENDLOOP.

  LOOP AT it_file_table INTO wa_file_table.

    CONCATENATE p_dir '\' wa_file_table-filename INTO lv_file.

    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = lv_file
        filetype                      = 'ASC'
*   HAS_FIELD_SEPARATOR           = ' '
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
       dat_mode                      = 'X'
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
*   VIRUS_SCAN_PROFILE            =
*   NO_AUTH_CHECK                 = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
      TABLES
        data_tab                      = it_sourcecode
     EXCEPTIONS
       file_open_error               = 1
       file_read_error               = 2
       no_batch                      = 3
       gui_refuse_filetransfer       = 4
       invalid_type                  = 5
       no_authority                  = 6
       unknown_error                 = 7
       bad_data_format               = 8
       header_not_allowed            = 9
       separator_not_allowed         = 10
       header_too_long               = 11
       unknown_dp_error              = 12
       access_denied                 = 13
       dp_out_of_memory              = 14
       disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17
              .
    IF sy-subrc &amp;lt;&amp;gt; 0.
      WRITE:/'Please ensure that file', lv_file,
        'resides on your local PC'.
      EXIT.
    ENDIF.

*  loop at it_sourcecode.
*    write:/ it_sourcecode-line.
*  endloop.

    IF p_hide = 'X'.
      it_sourcecode-line = '*@#@@[SAP]'.
      INSERT it_sourcecode INDEX 1.
    ENDIF.

    lv_length = STRLEN( wa_file_table-filename ).
    lv_length = lv_length - 4.

    lv_progname = wa_file_table-filename(lv_length).

    INSERT REPORT lv_progname FROM it_sourcecode.
    IF sy-subrc = 0.
      WRITE:/ 'File', lv_progname, 'successfully written to program'.
    ELSE.
      WRITE:/ 'Error while writing to program', lv_progname.
      continue.
    ENDIF.

    REFRESH it_sourcecode.
    CLEAR it_sourcecode.

  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 06:09:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363587#M807086</guid>
      <dc:creator>former_member189059</dc:creator>
      <dc:date>2008-04-24T06:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: upload zprograms into sap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363588#M807087</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 prg to download all the Zprograms with package wise ...if can change it to upload that could fine..&lt;/P&gt;&lt;P&gt;let me know do U need it or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2008 09:05:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/upload-zprograms-into-sap/m-p/3363588#M807087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-24T09:05:29Z</dc:date>
    </item>
  </channel>
</rss>

