<?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: loop at ztable in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545212#M1428707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Murali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you include purchase order no as a key field in your Ztable ?&lt;/P&gt;&lt;P&gt;If it is not yet done then do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2nd question : Is it a Z development for saving purchase order item details ?? or you are using standard transaction(ME21N / ME22N). Where do you get the dump ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding if you use INSERT statement then it might give you a short dump. Rather using INSERT statement use&lt;/P&gt;&lt;P&gt;MODIFY with key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: CONTACTSANKU on Jan 13, 2010 5:48 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2010 12:16:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-01-13T12:16:41Z</dc:date>
    <item>
      <title>loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545208#M1428703</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 want to restrict the user to enter the duplicate Purchase Items. Actually the end user fills the details for purchase items and after clicking save button, the data goes and sit in the ztable. If ztable already contains some purchase items and the end user is giving same purchase order to save in the ztable, it should restrict.  Since ebelp (purch item) is the key field in ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this to achieve, iam looping the internal table and checking the condition.  if itab-purchitem equals ztable-purchitem, iam displaying information message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for checking each purchitem of the ztable,  should we should loop ztable also?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Murali Krishna T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 07:52:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545208#M1428703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T07:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545209#M1428704</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;Where does the user enter the purchase order? Is it in a screen designed in SE51? Then you can select the field as dictionary field i.e. refer the field in the screen with the purchase order field in the table. You use INSERT insted of UPDATE then it will automatically check for duplicate enrty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 07:59:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545209#M1428704</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2010-01-13T07:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545210#M1428705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sri,&lt;/P&gt;&lt;P&gt;           Purchase order is from screen field from screen painter. After Checking for Duplicate Entry, it is going to short dump. So to avoid this, iam writing information message when the duplicate record entry takes place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  to check for duplicate records, we need to loop the internal table from where the user enters the purchase items.&lt;/P&gt;&lt;P&gt;In ztable there may be other purchase items. Here purch item (Ebelp) is key field. so after looping internal table, should we loop ztable also?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Murali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 09:27:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545210#M1428705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T09:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545211#M1428706</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 PAI under the save button write the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE purchase_order
 FROM ztable
 INTO lv_purchase_order
 WHERE purchase_order = ztable-purchase_order.

 IF sy-subrc EQ 0.
  MESSAGE 'purchase order already exists' type 'E'.
 ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 10:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545211#M1428706</guid>
      <dc:creator>sridhar_meesala</dc:creator>
      <dc:date>2010-01-13T10:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545212#M1428707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Murali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you include purchase order no as a key field in your Ztable ?&lt;/P&gt;&lt;P&gt;If it is not yet done then do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My 2nd question : Is it a Z development for saving purchase order item details ?? or you are using standard transaction(ME21N / ME22N). Where do you get the dump ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding if you use INSERT statement then it might give you a short dump. Rather using INSERT statement use&lt;/P&gt;&lt;P&gt;MODIFY with key fields. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: CONTACTSANKU on Jan 13, 2010 5:48 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2010 12:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545212#M1428707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-13T12:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545213#M1428708</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;&lt;/P&gt;&lt;P&gt;In PAI Event,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-po. no,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endchain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module----&amp;lt;module name&amp;gt;&lt;/P&gt;&lt;P&gt;under this module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select po. no from ztable whnere po.no = itab-po,no,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subec = 0.&lt;/P&gt;&lt;P&gt;message ''purchase order already exists' type "E".&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to take po.no field, which u have put in screen, from dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 10:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545213#M1428708</guid>
      <dc:creator>Noorie</dc:creator>
      <dc:date>2010-01-20T10:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: loop at ztable</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545214#M1428709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please use proper subjects for your posts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need of loop.&lt;/P&gt;&lt;P&gt;Mark the field as primary key in your ztable.&lt;/P&gt;&lt;P&gt;While inserting the data intot your table use.&lt;/P&gt;&lt;P&gt;MODIFY DBTABLE from itab. " It updates the existing entries and inserts new entries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jan 2010 10:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-at-ztable/m-p/6545214#M1428709</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-01-20T10:34:07Z</dc:date>
    </item>
  </channel>
</rss>

