<?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: updating table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170816#M754560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can i know the structure of the ur z tables...with data types and lenghs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Dec 2007 18:39:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-20T18:39:15Z</dc:date>
    <item>
      <title>updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170812#M754556</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;     my issue is updating ztable which i have created . this table gets updated with records after processing a batch session. batch session is for posting FI documents. ztable gets updated with the document number after processing the session. when there is only one transaction per session the ztable is getting updated with the respestive document no. but they r multiple transactions per session i.e multiple FI documents r created its updating the table with only document no. i.e first FI document no.. please help me in resolving this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_bktxt like bkpf-bktxt.&lt;/P&gt;&lt;P&gt;ata: v_cnt(5) type n value 0,&lt;/P&gt;&lt;P&gt;      v_cnt1(5) type n value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; v_cnt = v_cnt + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if v_bktxt(1) EQ '1'.&lt;/P&gt;&lt;P&gt;      move: v_cnt to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;            v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;            t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;      insert zbatch_log.&lt;/P&gt;&lt;P&gt;      endif.&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;This is the basic code. what i was suggested to do is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v_bktxt ( 1 )  EQ '1'&lt;/P&gt;&lt;P&gt;then check whether batchidno. exists in zbatch_log table&lt;/P&gt;&lt;P&gt;if NO &lt;/P&gt;&lt;P&gt;then move v_cnt, v_bktxt, t_bseg-belnr to zbatch_log table(my ztable).&lt;/P&gt;&lt;P&gt;if YES&lt;/P&gt;&lt;P&gt;then check the last value of v_cnt in zbatch_log table .&lt;/P&gt;&lt;P&gt;store it ina variable .&lt;/P&gt;&lt;P&gt;then move v_bktxt, t_bseg-belnr and increment the stored variable and increment the counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am not getting how to chech the ztable table whether the entries r already there r not please help me with this code.&lt;/P&gt;&lt;P&gt;(in my ztable v_cnt and batchid are primary keys)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 13:41:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170812#M754556</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T13:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170813#M754557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_bktxt like bkpf-bktxt.&lt;/P&gt;&lt;P&gt;ata: v_cnt(5) type n value 0,&lt;/P&gt;&lt;P&gt;v_cnt1(5) type n value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_cnt = v_cnt + 1.&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from zbatch_log&lt;/P&gt;&lt;P&gt;into table it_batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_batch by v_cnt descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_bseg.&lt;/P&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;from zbatc_log&lt;/P&gt;&lt;P&gt;into wa_zbatch_log&lt;/P&gt;&lt;P&gt;where batch+0(1) = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move: v_cnt to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;read table it_batch index 1.    -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;which gives the latest/recent counter number.&lt;/P&gt;&lt;P&gt;move it_batch-cnt to count.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 14:23:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170813#M754557</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T14:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170814#M754558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i tried with ur code but its not giving me the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_bktxt like bkpf-bktxt.&lt;/P&gt;&lt;P&gt;ata: v_cnt(5) type n value 0,&lt;/P&gt;&lt;P&gt;v_cnt1(5) type n value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_cnt = v_cnt + 1.&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from zbatch_log&lt;/P&gt;&lt;P&gt;into table it_batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_batch by v_cnt descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_bseg.&lt;/P&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;from zbatc_log&lt;/P&gt;&lt;P&gt;into wa_zbatch_log&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where batch+0(1) = '1'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move: v_cnt to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;read table it_batch index 1.    -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;which gives the latest/recent counter number.&lt;/P&gt;&lt;P&gt;move it_batch-cnt to count.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;notation in bold one giving error so i have changed that to&lt;/P&gt;&lt;P&gt;select single batchid&lt;/P&gt;&lt;P&gt;from zbatch_log&lt;/P&gt;&lt;P&gt;into t_batchid1&lt;/P&gt;&lt;P&gt;where batchid = v_bktxt+1(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u suggest me somemore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 15:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170814#M754558</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T15:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170815#M754559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hi lakshmi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried with ur code but its not giving me the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : v_bktxt like bkpf-bktxt.&lt;/P&gt;&lt;P&gt;ata: v_cnt(5) type n value 0,&lt;/P&gt;&lt;P&gt;v_cnt1(5) type n value 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_cnt = v_cnt + 1.&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from zbatch_log&lt;/P&gt;&lt;P&gt;into table it_batch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_batch by v_cnt descending.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_bseg.&lt;/P&gt;&lt;P&gt;select single *&lt;/P&gt;&lt;P&gt;from zbatc_log&lt;/P&gt;&lt;P&gt;into wa_zbatch_log&lt;/P&gt;&lt;P&gt;where batch+0(1) = '1'.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;move: v_cnt to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;read table it_batch index 1. -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;which gives the latest/recent counter number.&lt;/P&gt;&lt;P&gt;move it_batch-cnt to count.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count to zbatch_log-cnt,&lt;/P&gt;&lt;P&gt;v_bktxt+1(10) to zbatch_log-batchid,&lt;/P&gt;&lt;P&gt;t_bseg-belnr to zbatch_log-belnr1.&lt;/P&gt;&lt;P&gt;insert zbatch_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;notation in bold one giving error so i have changed that to&lt;/P&gt;&lt;P&gt;select single batchid&lt;/P&gt;&lt;P&gt;from zbatch_log&lt;/P&gt;&lt;P&gt;into t_batchid1&lt;/P&gt;&lt;P&gt;where batchid = v_bktxt+1(10).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u suggest me somemore.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 15:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170815#M754559</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-19T15:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170816#M754560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can i know the structure of the ur z tables...with data types and lenghs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2007 18:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170816#M754560</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-20T18:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: updating table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170817#M754561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi lakshmi&lt;/P&gt;&lt;P&gt;            issue got resolved and thank u very much for ur help with ur idea of code i did some modifications and got the result  thanks once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2007 06:34:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/updating-table/m-p/3170817#M754561</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-24T06:34:32Z</dc:date>
    </item>
  </channel>
</rss>

