<?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: Do I need to declare parameters before using them? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455832#M215491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;good &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT THINK YOU HAVE TO DECLARE THE SEPARATE INTERALABLE FOR THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jul 2006 14:01:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-07T14:01:19Z</dc:date>
    <item>
      <title>Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455825#M215484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Say I have a piece of code like below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM UPLOAD_PC_FILE USING P_PATH
                           P_INTERNAL_TABLE.
   P_PCPATH_TOSTRING = P_PATH.
   CALL FUNCTION 'GUI_UPLOAD'
     EXPORTING
       FILENAME                      = P_PCPATH_TOSTRING
*   FILETYPE                      = 'ASC'
*   HAS_FIELD_SEPARATOR           = ' '
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
*   VIRUS_SCAN_PROFILE            =
*   NO_AUTH_CHECK                 = ' '
 IMPORTING
*   FILELENGTH                    =
  HEADER                        =  WA_INBOUND
     TABLES
       DATA_TAB                      = P_INTERNAL_TABLE
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
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to declare the P_INTERNAL_TABLE as an internal table or ABAP will automatically know that this is an internal table (I will always pass in internal tables when I call this form in the main program)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anyi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:31:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455825#M215484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455826#M215485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must declare it before you use it.  In this case, you are declaring it in the signature of the FORM.  So here it is declared.  But when calling the form you must pass a valid internal table name  that has been declared before hand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zrich_0001.

data: &amp;lt;b&amp;gt;itab&amp;lt;/b&amp;gt; type table of string.



perform upload tables &amp;lt;b&amp;gt;itab&amp;lt;/b&amp;gt;.


*---------------------------------------------------------------------*
*       FORM upload                                                   *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  --&amp;gt;  L_ITAB                                                        *
*---------------------------------------------------------------------*
form upload tables &amp;lt;b&amp;gt;l_itab&amp;lt;/b&amp;gt;.


  call function 'GUI_UPLOAD'
       exporting
            filename = 'C:test.txt'
       tables
            data_tab = &amp;lt;b&amp;gt;l_itab&amp;lt;/b&amp;gt;.


endform.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455826#M215485</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-07T13:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455827#M215486</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;Data_itab --&amp;gt; takes any internal table which u pass.&lt;/P&gt;&lt;P&gt;since Data_itab is not a type specific&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u declare P_INTERNAL_TABLE as internal table of any type; as per ur requirement it will except.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;exam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :P_INTERNAL_TABLE type table of z_struc&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;data :P_INTERNAL_TABLE type table of standard_structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will except any table; but u have to declare internal table of particular type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manoj Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:33:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455827#M215486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455828#M215487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course yes.&lt;/P&gt;&lt;P&gt;They must be declared as the same type as in the function module.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:34:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455828#M215487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:34:59Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455829#M215488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you need to declare the p_path as the type of the variable that you are passing in the Perform of the FORM UPLOAD_PC&lt;/P&gt;&lt;P&gt;Similarily you also need to define the p_internal_table as the type of table that you are passing to the Perform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:36:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455829#M215488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455830#M215489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data: path type string.
data itab like mara occurs 0 with header line.
perform upload_pc_file using path tables itab.

FORM upload_pc_file  USING    P_PATH type string
                     TABLES   P_ITAB STRUCTURE ITAB .
"now use gui_upload here...                                
ENDFORM.                    " upload_pc_file&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:43:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455830#M215489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455831#M215490</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;U jus have to declare it once before u pass them in ur perform...&lt;/P&gt;&lt;P&gt;The formal parameters need not to be declared again and it can have any name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u.&lt;/P&gt;&lt;P&gt;Seema.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 13:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455831#M215490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T13:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455832#M215491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;good &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT THINK YOU HAVE TO DECLARE THE SEPARATE INTERALABLE FOR THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 14:01:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455832#M215491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T14:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Do I need to declare parameters before using them?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455833#M215492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;good &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DONT THINK YOU HAVE TO DECLARE THE SEPARATE INTERALABLE FOR THIS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS&lt;/P&gt;&lt;P&gt;MRUTYUN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jul 2006 14:01:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/do-i-need-to-declare-parameters-before-using-them/m-p/1455833#M215492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-07T14:01:56Z</dc:date>
    </item>
  </channel>
</rss>

