<?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 Syntatical error in ABAP program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131489#M987922</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 a table called ZEX1_DEPT. Now I am trying to design a screen and written the follwoing program to insert data in the table ZEX1_DEPT. The structure of the table ZEX1_DEPT is DEPTNO NUMC, DEPTNAME CHAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Y_INSERT_INTO_DEPT_TABLE.&lt;/P&gt;&lt;P&gt;TABLES  ZEX1_DEPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok LIKE ok_code,&lt;/P&gt;&lt;P&gt;      v_dept_no TYPE n,&lt;/P&gt;&lt;P&gt;      v_dept_name TYPE c,&lt;/P&gt;&lt;P&gt;      v_dept TYPE ZEX1_DEPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE init_screen_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  CLEAR v_dept_no.&lt;/P&gt;&lt;P&gt;  CLEAR v_dept_name.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'BUTTON_EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN 'BUTTON_INSERT'.&lt;/P&gt;&lt;P&gt;      v_dept.deptno = v_dept_no.&lt;/P&gt;&lt;P&gt;      v_dept.deptname = v_dept_name.&lt;/P&gt;&lt;P&gt;      INSERT INTO ZEX1_DEPT VALUES v_dept.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am getting the following error during chek syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program Y_INSERT_INTO_DEPT_TABLE	33	@0A\QError@&lt;/P&gt;&lt;P&gt;Statement "V_DEPT" is not defined. Check your spelling. spelling.		&lt;/P&gt;&lt;P&gt;spelling. spelling.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me why I am getting the error and how can I get rid of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Koushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jun 2008 06:48:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-30T06:48:03Z</dc:date>
    <item>
      <title>Syntatical error in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131489#M987922</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 a table called ZEX1_DEPT. Now I am trying to design a screen and written the follwoing program to insert data in the table ZEX1_DEPT. The structure of the table ZEX1_DEPT is DEPTNO NUMC, DEPTNAME CHAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Y_INSERT_INTO_DEPT_TABLE.&lt;/P&gt;&lt;P&gt;TABLES  ZEX1_DEPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: ok_code TYPE sy-ucomm,&lt;/P&gt;&lt;P&gt;      save_ok LIKE ok_code,&lt;/P&gt;&lt;P&gt;      v_dept_no TYPE n,&lt;/P&gt;&lt;P&gt;      v_dept_name TYPE c,&lt;/P&gt;&lt;P&gt;      v_dept TYPE ZEX1_DEPT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE init_screen_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  CLEAR v_dept_no.&lt;/P&gt;&lt;P&gt;  CLEAR v_dept_name.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;  save_ok = ok_code.&lt;/P&gt;&lt;P&gt;  CLEAR ok_code.&lt;/P&gt;&lt;P&gt;  CASE save_ok.&lt;/P&gt;&lt;P&gt;    WHEN 'BUTTON_EXIT'.&lt;/P&gt;&lt;P&gt;      LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;    WHEN 'BUTTON_INSERT'.&lt;/P&gt;&lt;P&gt;      v_dept.deptno = v_dept_no.&lt;/P&gt;&lt;P&gt;      v_dept.deptname = v_dept_name.&lt;/P&gt;&lt;P&gt;      INSERT INTO ZEX1_DEPT VALUES v_dept.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I am getting the following error during chek syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program Y_INSERT_INTO_DEPT_TABLE	33	@0A\QError@&lt;/P&gt;&lt;P&gt;Statement "V_DEPT" is not defined. Check your spelling. spelling.		&lt;/P&gt;&lt;P&gt;spelling. spelling.		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me why I am getting the error and how can I get rid of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Koushik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131489#M987922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Syntatical error in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131490#M987923</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;is V_dept a strtucture then&lt;/P&gt;&lt;P&gt;mention in the tables statemnt tables : V_DEPT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insted of&lt;/P&gt;&lt;P&gt;            v_dept.deptno = v_dept_no.&lt;/P&gt;&lt;P&gt;            v_dept.deptname = v_dept_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do the following &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_dept-deptno = v_dept_no. &lt;/P&gt;&lt;P&gt;      v_dept-deptname = v_dept_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:56:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131490#M987923</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-06-30T06:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Syntatical error in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131491#M987924</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;you can take a structure same as to your database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move these two values to this internal table.&lt;/P&gt;&lt;P&gt;and use statement insert ztable from table internla table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or in your case you hav to take a work area and move thses to value to work area..then use the statement you have used...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this may help u..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 06:56:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131491#M987924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T06:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Syntatical error in ABAP program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131492#M987925</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;Try like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;save_ok = ok_code.&lt;/P&gt;&lt;P&gt;CLEAR ok_code.&lt;/P&gt;&lt;P&gt;CASE save_ok.&lt;/P&gt;&lt;P&gt;WHEN 'BUTTON_EXIT'.&lt;/P&gt;&lt;P&gt;LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;WHEN 'BUTTON_INSERT'.&lt;/P&gt;&lt;P&gt;v_dept-deptno = v_dept_no.&lt;/P&gt;&lt;P&gt;v_dept-deptname = v_dept_name.&lt;/P&gt;&lt;P&gt;INSERT INTO ZEX1_DEPT VALUES v_dept.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instaed of (v_dept.deptno) write (v_dept-deptno)&lt;/P&gt;&lt;P&gt;In all case when you are assigning values to structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2008 07:00:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntatical-error-in-abap-program/m-p/4131492#M987925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-30T07:00:22Z</dc:date>
    </item>
  </channel>
</rss>

