<?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: Create Data, UPdate statement problems in 4.6 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116268#M984094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I beleive it is the .INCLUDE s and APPEND s which create the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;made these changes..and is working..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : t_dd03l like dd03l occurs 0 with header line.
data : GT_FIELDCAT type lvc_s_fcat.

select * from dd03l into corresponding fields of table t_dd03l
where tabname = p_table.
sort t_dd03l by position.
loop at t_dd03l where rollname ne space.
GT_FIELDCAT-FIELDNAME = t_dd03l-FIELDNAME.
GT_FIELDCAT-TABNAME   = p_table.
 APPEND GT_FIELDCAT to i_fcat.
endloop.

*  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
*       EXPORTING
*            i_structure_name = p_table  " Table Name
*       CHANGING
*            ct_fieldcat      = i_fcat
*       EXCEPTIONS
*            OTHERS           = 1.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Jul 2008 21:33:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-10T21:33:19Z</dc:date>
    <item>
      <title>Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116261#M984087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was having with the create data statement to create an internal table. However as suggested by many here I hav used methods and FM to do the same and my internal table is creted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the problem is the Internal table created does not have the same &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table &amp;lt;f_table_update&amp;gt; has been created with 804 bytes memory. However MARA has 806 bytes of memory.&lt;/P&gt;&lt;P&gt; hence a short Dump is observed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shore Dump message&lt;/P&gt;&lt;P&gt;In this particular case, the database table is 806 bytes wide, &lt;/P&gt;&lt;P&gt;but the internal table is only 804 bytes wide.                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data :       i_fcat         TYPE STANDARD TABLE OF lvc_s_fcat.
DATA: i_table_data1  TYPE REF TO data.
FIELD-SYMBOLS: &amp;lt;f_table_update&amp;gt;     TYPE STANDARD TABLE.

PARAMETERS: p_table TYPE tabname OBLIGATORY.

  CLEAR   i_fcat.
  REFRESH i_fcat.

  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
            i_structure_name = p_table  " Table Name
       CHANGING
            ct_fieldcat      = i_fcat
       EXCEPTIONS
            OTHERS           = 1.

  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
    EXPORTING
      it_fieldcatalog = i_fcat
    IMPORTING
      ep_table        = i_table_update.
  IF sy-subrc = 0.
    ASSIGN i_table_update-&amp;gt;* TO &amp;lt;f_table_update&amp;gt;.
  ELSE.
    WRITE: 'Error creating internal table'.
  ENDIF.

    IF NOT &amp;lt;f_table_update&amp;gt; IS INITIAL.    
      UPDATE (p_table) FROM TABLE &amp;lt;f_table_update&amp;gt;. "Program dumps here
endif.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 19:12:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116261#M984087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T19:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116262#M984088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In debug, check the i_fcat returned by 'LVC_FIELDCATALOG_MERGE'.&lt;/P&gt;&lt;P&gt;Compare the structure it has returned with the MARA 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;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 19:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116262#M984088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T19:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116263#M984089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did that it has the same fields as what MARA has.&lt;/P&gt;&lt;P&gt;Excatly the same&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 19:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116263#M984089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T19:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116264#M984090</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;After getting the field catalog from FM LVC_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;try to increase the length (internal length and output length) of the last field in it by 2 character (in 4.6 c 1 char = 1 byte). Then try to update the table and check the result.&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;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 20:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116264#M984090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T20:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116265#M984091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use fm DB_UPDATE_TABLE  for updating and check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 20:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116265#M984091</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-10T20:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116266#M984092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try but again this wont serve my problem. I might also Insert some records inot the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the replys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 20:40:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116266#M984092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T20:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116267#M984093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have used the FM as suggested by you but am unable to as it says wrong Param. Sy-subrc = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any more suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 20:47:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116267#M984093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T20:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create Data, UPdate statement problems in 4.6</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116268#M984094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I beleive it is the .INCLUDE s and APPEND s which create the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;made these changes..and is working..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : t_dd03l like dd03l occurs 0 with header line.
data : GT_FIELDCAT type lvc_s_fcat.

select * from dd03l into corresponding fields of table t_dd03l
where tabname = p_table.
sort t_dd03l by position.
loop at t_dd03l where rollname ne space.
GT_FIELDCAT-FIELDNAME = t_dd03l-FIELDNAME.
GT_FIELDCAT-TABNAME   = p_table.
 APPEND GT_FIELDCAT to i_fcat.
endloop.

*  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
*       EXPORTING
*            i_structure_name = p_table  " Table Name
*       CHANGING
*            ct_fieldcat      = i_fcat
*       EXCEPTIONS
*            OTHERS           = 1.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2008 21:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-data-update-statement-problems-in-4-6/m-p/4116268#M984094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-10T21:33:19Z</dc:date>
    </item>
  </channel>
</rss>

