<?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 update Ztable report in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562296#M1076892</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;I want to update some FI documents into my ztable report day wise as a background, So pls help me with some example reports how to update/append records into Ztable from main table like bseg or bkpf(for example) and how to modify the same table and append the existing records,if any user changes the same document for any fields after posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: If an LC document get posted as new document, then my report will update the records into Ztable from BSEG. If the user agains going and changing the same document ,say for example amounts, then simultaneously it has to be updated into my same document number of my Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope its very clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls post ur examples and advises.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2008 12:54:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-30T12:54:33Z</dc:date>
    <item>
      <title>update Ztable report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562296#M1076892</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;I want to update some FI documents into my ztable report day wise as a background, So pls help me with some example reports how to update/append records into Ztable from main table like bseg or bkpf(for example) and how to modify the same table and append the existing records,if any user changes the same document for any fields after posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: If an LC document get posted as new document, then my report will update the records into Ztable from BSEG. If the user agains going and changing the same document ,say for example amounts, then simultaneously it has to be updated into my same document number of my Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope its very clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls post ur examples and advises.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2008 12:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562296#M1076892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-30T12:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: update Ztable report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562297#M1076893</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;In the report, u can retrieve data from BSEG based on Last adjusment  date (LINFV), and then for each entry you can use modify ztable from work area (keep in mind Lock/unlock the ztable ).Thus updating the ztable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2008 13:36:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562297#M1076893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-30T13:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: update Ztable report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562298#M1076894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur prompt reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could u guide me more with some examples with some small statements while appending and modifying the Ztable (with lock/unlock mode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ABAP Learner SR on Sep 30, 2008 4:56 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2008 13:55:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562298#M1076894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-30T13:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: update Ztable report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562299#M1076895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something similar to this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: it_ztable TYPE STANDARD TABLE OF ztable.
DATA: wa_ztable TYPE ztable.
DATA: it_bkpf TYPE STANDARD TABLE OF bkpf.
DATA: wa_bkpf TYPE bkpf.

SELECT * FROM bkpf INTO TABLE it_bkpf WHERE ... "some conditions

LOOP AT it_bkpf INTO wa_bkpf.
  CLEAR wa_ztable.
  SELECT SINGLE * FROM ztable INTO wa_ztable
   WHERE field1 = wa_bkpf-field1
     AND field2 = wa_bkpf-field2.
  IF sy-subrc EQ 0.
    UPDATE ztable SET field3 = wa_bkpf-field3
     WHERE field1 = wa_bkpf-field1
       AND field2 = wa_bkpf-field2.
  ELSE.
    MOVE-CORRESPONDING wa_bkpf TO wa_ztable.
    INSERT ztable FROM wa_ztable.
  ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Valter Oliveira.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2008 16:23:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562299#M1076895</guid>
      <dc:creator>valter_oliveira</dc:creator>
      <dc:date>2008-09-30T16:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: update Ztable report</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562300#M1076896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Lock Table ZHPA_CON_INF&lt;/P&gt;&lt;P&gt;  PERFORM sub_lock_db.&lt;/P&gt;&lt;P&gt;*Update the table with this work area having current date and time&lt;/P&gt;&lt;P&gt;  MODIFY zhpa_con_inf FROM wa_zhpa_con_inf.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    COMMIT WORK.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;*Unloak Table ZHPA_CON_INF&lt;/P&gt;&lt;P&gt;  PERFORM sub_unlock_db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  sub_lock_db&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Lock Database&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      No Parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_lock_db.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare the local variable for varkey&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA  : l_varkey   TYPE vim_enqkey.   "Varkey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the value of client to local variable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE sy-mandt c_intid INTO l_varkey.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Lock the table before update&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ENQUEUE_E_TABLEE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      tabname        = c_tabname "ZHPA_CON_INF&lt;/P&gt;&lt;P&gt;      varkey         = l_varkey&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      foreign_lock   = 1&lt;/P&gt;&lt;P&gt;      system_failure = 2&lt;/P&gt;&lt;P&gt;      OTHERS         = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE i000 WITH 'Error while locking table:'(002) c_tabname.&lt;/P&gt;&lt;P&gt;    LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sub_lock_db&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  sub_unlock_db&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      Unlock Database&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      No Parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM sub_unlock_db .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare the local variable for varkey&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DATA  : l_varkey   TYPE vim_enqkey.   "Varkey&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the value of client to local variable&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CONCATENATE sy-mandt c_intid INTO l_varkey.&lt;/P&gt;&lt;P&gt;*Unlock the table&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DEQUEUE_E_TABLEE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      tabname      = c_tabname  "ZHPA_CON_INF&lt;/P&gt;&lt;P&gt;      varkey       = l_varkey.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " sub_unlock_db&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2008 05:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/update-ztable-report/m-p/4562300#M1076896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-01T05:59:54Z</dc:date>
    </item>
  </channel>
</rss>

