<?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: syntax error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089515#M977862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The reaason for this may the actual and formal parameters are matching. Define the Variable FILE in PERFORM statement to be of same type as that defined in FORM statement.&lt;/P&gt;&lt;P&gt;I mean to say in your program declare like following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FILE  TYPE RLGRAP-FILENAME.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2008 09:14:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-09T09:14:13Z</dc:date>
    <item>
      <title>syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089510#M977857</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 got syntax error in following routine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PERFORM LOAD_EXCEL_FILE  TABLES RECORD
                          USING  FILE
                            CHANGING GV_TEXT.

************************************************************************
*       Form  LOAD_EXCEL_FILE
************************************************************************
FORM LOAD_EXCEL_FILE TABLES   P_UPLOAD
                     USING    P_FILENAME  LIKE RLGRAP-FILENAME
                     CHANGING GV_TEXT TYPE NATXT.

  DATA : IF_INTERN TYPE  KCDE_CELLS OCCURS 0 WITH HEADER LINE.
  DATA : VF_INDEX TYPE I.
  DATA : VF_START_COL TYPE I VALUE '1',
         VF_START_ROW TYPE I VALUE '1',
         VF_END_COL   TYPE I VALUE '256',
         VF_END_ROW   TYPE I VALUE '65536'.

  FIELD-SYMBOLS : &amp;lt;FS&amp;gt;.
  CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
    EXPORTING
      FILENAME                = P_FILENAME
      I_BEGIN_COL             = VF_START_COL
      I_BEGIN_ROW             = VF_START_ROW
      I_END_COL               = VF_END_COL
      I_END_ROW               = VF_END_ROW
    TABLES
      INTERN                  = IF_INTERN
    EXCEPTIONS
      INCONSISTENT_PARAMETERS = 1
      UPLOAD_OLE              = 2
      OTHERS                  = 3.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    GV_TEXT = 'Excel file upload error.'.
    EXIT.
  ENDIF.

  IF IF_INTERN[] IS INITIAL.
    GV_TEXT = 'No Data Uploaded'.
  ELSE.
    SORT IF_INTERN BY ROW COL.
    LOOP AT IF_INTERN.
      IF SY-TABIX &amp;gt;= 0.          "Starts AT ROW 0, COL 0.
        MOVE : IF_INTERN-COL TO VF_INDEX.
        ASSIGN COMPONENT VF_INDEX OF STRUCTURE P_UPLOAD TO &amp;lt;FS&amp;gt;.
        MOVE : IF_INTERN-VALUE TO &amp;lt;FS&amp;gt;.
        AT END OF ROW.
          APPEND P_UPLOAD.
          CLEAR P_UPLOAD.
        ENDAT.
      ENDIF.
    ENDLOOP.
  ENDIF.

ENDFORM.                    " LOAD_EXCEL_FILE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax errorr is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;In PERFORM or CALL FUNCTION "LOAD_EXCEL_FILE", the actual parameter "FILE" is incompatible with the formal parameter "P_FILENAME"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:09:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089510#M977857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089511#M977858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check how FILE is declared ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:11:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089511#M977858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089512#M977859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check datatype of File.&lt;/P&gt;&lt;P&gt;it should be same in both form and perform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:11:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089512#M977859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089513#M977860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple: check how you've defined your parameter FILE. It should be defined as TYPE RLGRAP-FILENAME...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:11:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089513#M977860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089514#M977861</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;Do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data file type RLGRAP-FILENAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM LOAD_EXCEL_FILE  TABLES RECORD&lt;/P&gt;&lt;P&gt;                          USING  FILE&lt;/P&gt;&lt;P&gt;                            CHANGING GV_TEXT.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Form  LOAD_EXCEL_FILE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;FORM LOAD_EXCEL_FILE TABLES   P_UPLOAD&lt;/P&gt;&lt;P&gt;                     USING    P_FILENAME &lt;STRONG&gt;TYPE&lt;/STRONG&gt; RLGRAP-FILENAME&lt;/P&gt;&lt;P&gt;                     CHANGING GV_TEXT TYPE NATXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089514#M977861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089515#M977862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The reaason for this may the actual and formal parameters are matching. Define the Variable FILE in PERFORM statement to be of same type as that defined in FORM statement.&lt;/P&gt;&lt;P&gt;I mean to say in your program declare like following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: FILE  TYPE RLGRAP-FILENAME.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089515#M977862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089516#M977863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i declared like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: file(30) TYPE c
                      DEFAULT '/export/remote/data.txt'
                      LOWER CASE
                      OBLIGATORY,&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:14:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089516#M977863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089517#M977864</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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'C:\export\remote\data.txt'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089517#M977864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: syntax error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089518#M977865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;PARAMETERS: file(30) TYPE c&lt;/P&gt;&lt;P&gt;                      DEFAULT '/export/remote/data.txt'&lt;/P&gt;&lt;P&gt;                      LOWER CASE&lt;/P&gt;&lt;P&gt;                      OBLIGATORY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filename which you have given in the above statement is not having the correct path. Give the correct path in the above statement. There is no directory of it. &lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;' D:\sapdb\data\wrk\ID1\dbahist'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error/m-p/4089518#M977865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:21:06Z</dc:date>
    </item>
  </channel>
</rss>

