<?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 on INCLUDE STRUCTURE. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982783#M951392</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;LOOP AT tvbdpa INTO wa_tvbdpa.&lt;/P&gt;&lt;P&gt;        READ TABLE itab_lips  INTO wa_lips.&lt;/P&gt;&lt;P&gt;          WITH TABLE KEY posnr = wa_tvndpa-posnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        wa_tvbdpa-kdmat = wa_lips-kdmat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        MODIFY TABLE tvbdpa FROM wa_tvbdpa&lt;/P&gt;&lt;P&gt;               TRANSPORTING kdmat.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&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;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Jun 2008 08:02:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-21T08:02:27Z</dc:date>
    <item>
      <title>Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982782#M951391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is abit hard to explain what I need here.&lt;/P&gt;&lt;P&gt;But I try to explain as much as I can.&lt;/P&gt;&lt;P&gt;I am writing this code in order to update the customer material numbers into internal table tvbdpa. As you can see in my code, getting the customer material numbers require mapping the position number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck at the LOOP below with ***.&lt;/P&gt;&lt;P&gt;Also getting the syntax error &lt;/P&gt;&lt;P&gt;_The declaration for the key field "KDMAT" is imcomplete.&lt;/P&gt;&lt;P&gt;However "KDMAT" is is contained in the key of table "TVBDPA" and must be filled._&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: vbco3.
DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF tvbdpa OCCURS 0,        "Internal table for items
        kdmat LIKE LIPS-KDMAT.
        INCLUDE STRUCTURE vbdpa.
DATA: END OF tvbdpa.

DATA: itab_vbak TYPE SORTED TABLE OF vbak
         WITH UNIQUE KEY vbeln,
      wa_vbak  LIKE LINE OF itab_vbak,
      itab_lips TYPE SORTED TABLE OF lips
         WITH UNIQUE KEY vbeln,
      wa_lips   LIKE LINE OF itab_lips,
      wa_tvbdpa LIKE LINE OF tvbdpa,
      lv_zuonr  TYPE vbak-zuonr.

  vbco3-mandt = sy-mandt.
  vbco3-spras = nast-spras.
  vbco3-vbeln = nast-objky.
  vbco3-kunde = nast-parnr.
  vbco3-parvw = nast-parvw.

CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
  EXPORTING
    comwa                       = vbco3
  IMPORTING
    kopf                        = vbdka
  TABLES
    pos                         = tvbdpa
    mess                        = da_mess
  EXCEPTIONS
    fehler_bei_datenbeschaffung = 1.

IF NOT tvbdpa[] IS INITIAL.
  SELECT SINGLE zuonr FROM vbak
    INTO lv_zuonr
    WHERE vbeln = vbdka-vbeln.

    IF sy-subrc = 0 AND lv_zuonr &amp;lt;&amp;gt; ''.
      SELECT vbeln posnr kdmat FROM lips
        INTO CORRESPONDING FIELDS OF TABLE itab_lips
        WHERE vbeln = lv_zuonr.

***I am stuck at here.
      LOOP AT itab_lips INTO wa_lips.
        READ TABLE tvbdpa INTO wa_tvbdpa
          WITH TABLE KEY posnr = wa_lips-posnr.

        wa_tvbdpa-kdmat = wa_lips-kdmat.
 
        MODIFY TABLE tvbdpa FROM wa_tvbdpa
               TRANSPORTING kdmat.
      ENDLOOP.
***end I am stuck at here.
    ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All advise are welcome and greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 07:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982782#M951391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T07:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982783#M951392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;LOOP AT tvbdpa INTO wa_tvbdpa.&lt;/P&gt;&lt;P&gt;        READ TABLE itab_lips  INTO wa_lips.&lt;/P&gt;&lt;P&gt;          WITH TABLE KEY posnr = wa_tvndpa-posnr.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        wa_tvbdpa-kdmat = wa_lips-kdmat.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;        MODIFY TABLE tvbdpa FROM wa_tvbdpa&lt;/P&gt;&lt;P&gt;               TRANSPORTING kdmat.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&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;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 08:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982783#M951392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T08:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982784#M951393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;make the change as follows:

DATA: BEGIN OF tvbdpa OCCURS 0,        "Internal table for items
        kdmat LIKE LIPS-KDMAT,                 "IT should be a Comma
        INCLUDE STRUCTURE vbdpa.
DATA: END OF tvbdpa.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 08:03:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982784#M951393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T08:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982785#M951394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Subramanian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this more make sense for you?&lt;/P&gt;&lt;P&gt;Can I read the table like :- &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        READ TABLE itab_lips INTO wa_lips
          WITH TABLE KEY VBELN = wa_tvbdpa-matnr." AND POSNR = wa_tvbdpa-posnr.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: vbco3.

DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF tvbdpa OCCURS 0,        "Internal table for items
        kdmat LIKE LIPS-KDMAT.
        INCLUDE STRUCTURE vbdpa.
DATA: END OF tvbdpa.

DATA: itab_vbak TYPE SORTED TABLE OF vbak
         WITH UNIQUE KEY vbeln,
      wa_vbak  LIKE LINE OF itab_vbak,
      itab_lips TYPE SORTED TABLE OF lips
         WITH UNIQUE KEY vbeln,
      wa_lips   LIKE LINE OF itab_lips,
      wa_tvbdpa LIKE LINE OF tvbdpa,
      lv_zuonr  TYPE vbak-zuonr.

  vbco3-mandt = sy-mandt.
  vbco3-spras = nast-spras.
  vbco3-vbeln = nast-objky.
  vbco3-kunde = nast-parnr.
  vbco3-parvw = nast-parvw.

CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
  EXPORTING
    comwa                       = vbco3
  IMPORTING
    kopf                        = vbdka
  TABLES
    pos                         = tvbdpa
    mess                        = da_mess
  EXCEPTIONS
    fehler_bei_datenbeschaffung = 1.

IF NOT tvbdpa[] IS INITIAL.
  SELECT SINGLE zuonr FROM vbak
    INTO lv_zuonr
    WHERE vbeln = vbdka-vbeln.

    IF sy-subrc = 0 AND lv_zuonr &amp;lt;&amp;gt; ''.
      SELECT vbeln posnr kdmat FROM lips
        INTO CORRESPONDING FIELDS OF TABLE itab_lips
        WHERE vbeln = lv_zuonr.
    
      LOOP AT tvbdpa INTO wa_tvbdpa.
        READ TABLE itab_lips INTO wa_lips
          WITH TABLE KEY VBELN = wa_tvbdpa-matnr." AND POSNR = wa_tvbdpa-posnr.
    
        wa_tvbdpa-kdmat = wa_lips-kdmat.
    
        MODIFY TABLE tvbdpa FROM wa_tvbdpa
               TRANSPORTING kdmat.
      ENDLOOP.
    ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 08:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982785#M951394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T08:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982786#M951395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this..&lt;/P&gt;&lt;P&gt;replace this with  this...delete the table command here..it will work..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; READ TABLE tvbdpa INTO wa_tvbdpa&lt;/P&gt;&lt;P&gt;          WITH  KEY posnr = wa_lips-posnr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 08:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982786#M951395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T08:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error on INCLUDE STRUCTURE.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982787#M951396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&lt;/P&gt;&lt;P&gt;This should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SUbramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 08:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/syntax-error-on-include-structure/m-p/3982787#M951396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T08:39:05Z</dc:date>
    </item>
  </channel>
</rss>

