<?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: Updateing Table Records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663691#M1446680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Mar 2010 08:05:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-22T08:05:12Z</dc:date>
    <item>
      <title>Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663683#M1446672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to update the table records which i'll get from a unix directory, i need to update in batch session everyday. So other than BDC or LSMW is there anyother way to update only table.  Last point to add is i'll be having 2 tables Header and Item table which i need to update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;VEnk@&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 04:55:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663683#M1446672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T04:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663684#M1446673</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;Yes options are available. There may be a BAPI  is available to update the header and item records in SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 04:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663684#M1446673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T04:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663685#M1446674</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;Is your tables standard or Z??? If standard, definitely there will be T-code/BAPI for that. In case of Z, you have to BDC or direct table update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 05:02:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663685#M1446674</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-11T05:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663686#M1446675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its Z header and item table and how to do direct table update ??&lt;/P&gt;&lt;P&gt;Any Inputs????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards&lt;/P&gt;&lt;P&gt;VEnk@&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Venkat Reddy on Mar 11, 2010 10:54 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 05:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663686#M1446675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T05:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663687#M1446676</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;If it is Z, where are u using this table. I hope there must be some Z-tcode exist for updating this table. You can check where used list of these tables. If any Z-tcode available then You can do BDC for that T-code. If not direct table update is the only option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct table update can be done by INSER/MODIFY/UPDATE statements. Check F1 help on these for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 05:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663687#M1446676</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-11T05:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663688#M1446677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
            report zmjud001 no standard page heading.
            tables: z_mver.
            parameters: test(60) lower case default '/dir/judit.txt'.
            data: begin of unix_intab occurs 100,
            field(53),

      end of unix_intab.
      data: msg(60).
      ***open the unix file
      open dataset test for input in text mode message msg.
      if sy-subrc &amp;lt;&amp;gt; 0.
      write: / msg.
      exit.

endif.
***load the unix file into an internal table
do.
read dataset test into unix_intab.
if sy-subrc ne 0.
exit.
else.
append unix_intab.
endif.
enddo.
close dataset test.
***to process the data. load the database table
loop at unix_intab.
z_mver-mandt = sy-mandt.
z_mver-matnr = unix_intab-field(10).
translate z_mver-matnr to upper case.
z_mver-werks = unix_intab-field+10(4).
translate z_mver-werks to upper case.
z_mver-gjahr = sy-datum(4).
z_mver-perkz = 'M'.
z_mver-mgv01 = unix_intab-field+14(13).
z_mver-mgv02 = unix_intab-field+27(13).
z_mver-mgv03 = unix_intab-field+40(13).
* to check the data on the screen (this is just for checking purpose)
write: / z_mver-mandt, z_mver-matnr, z_mver-werks, z_mver-gjahr,
z_mver-perkz, z_mver-mgv01,
z_mver-mgv02, z_mver-mgv03.
insert z_mver client specified.
*if the data already had been in table z_mver then sy-subrc will not be
*equal with zero. (this can be *interesting for you - (this list is
*not necessary but it maybe useful for you)
if sy-subrc ne 0.
write:/ z_mver-matnr, z_mver-werks.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 06:17:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663688#M1446677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T06:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663689#M1446678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Continue........&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
NOTES:
1. This solution is recommended only if the database table is NOT a standard SAP database table .
2. In the above mentioned unix file record's size is 53 bytes.
Every record in the unix file as the same size:
10 bytes for material
04 bytes for plant
13 bytes for corrected consumption for January
13 bytes for corrected consumption for February
13 bytes for corrected consumption for March
3. Table Z_MVER

This table was created to store the consumption values for first quarter of the year.

       

Fields
 
Data Element
 
mandt
 
mandt
 
matnr
 
matnr
 
werks
 
werks
 
gjahr
 
gjahr
 
perkz
 
perkz
 
mgv01
 
mgvbr
 
mgv02
 
mgvbr
 
mgv03
 
mgvbr
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 06:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663689#M1446678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T06:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663690#M1446679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update ztable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
EXEC SQL.
CONNECT TO :'ZTABLE'
ENDEXEC.

IF sy-subrc EQ 0 .

TRY.

EXEC SQL .
DELETE FROM DISTFILEUPLOAD

ENDEXEC .

CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref-&amp;gt;get_text( ).
MESSAGE error_text TYPE 'I'.

ENDTRY.

LOOP AT itab_cust .
TRY.
*u2013to insert
EXEC SQL.
**u2013then you can UPDATE here the normal SAP SQL commands
UPDATE................

ENDEXEC.

CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref-&amp;gt;get_text( ).
MESSAGE error_text TYPE 'I'.
ENDTRY.
ENDLOOP .

ENDIF .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 09:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663690#M1446679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-11T09:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Updateing Table Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663691#M1446680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Mar 2010 08:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updateing-table-records/m-p/6663691#M1446680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-22T08:05:12Z</dc:date>
    </item>
  </channel>
</rss>

