<?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 delete statement is not working. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456892#M1414960</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;find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,&lt;/P&gt;&lt;P&gt;xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at dekek_x.&lt;/P&gt;&lt;P&gt;loop at dint_edidd where segnam = 'E1EDP10'.&lt;/P&gt;&lt;P&gt;if dekek_x-stpin = 1 .&lt;/P&gt;&lt;P&gt;CLEAR xe1edp10.&lt;/P&gt;&lt;P&gt;  MOVE dint_edidd-sdata TO xe1edp10.&lt;/P&gt;&lt;P&gt;delete dint_edidd where sdata = xe1edp10-idnkd.&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, 23 Dec 2009 15:05:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-23T15:05:15Z</dc:date>
    <item>
      <title>delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456892#M1414960</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;find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,&lt;/P&gt;&lt;P&gt;xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at dekek_x.&lt;/P&gt;&lt;P&gt;loop at dint_edidd where segnam = 'E1EDP10'.&lt;/P&gt;&lt;P&gt;if dekek_x-stpin = 1 .&lt;/P&gt;&lt;P&gt;CLEAR xe1edp10.&lt;/P&gt;&lt;P&gt;  MOVE dint_edidd-sdata TO xe1edp10.&lt;/P&gt;&lt;P&gt;delete dint_edidd where sdata = xe1edp10-idnkd.&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, 23 Dec 2009 15:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456892#M1414960</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456893#M1414961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Are you sure the inner loop or if statement provides the condition?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:10:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456893#M1414961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456894#M1414962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;   MOVE dint_edidd-sdata TO xe1edp10.&lt;/P&gt;&lt;P&gt;&amp;gt; delete dint_edidd where sdata = xe1edp10-idnkd.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are moving the value directly to the structure and comparing with field of structure???&lt;/P&gt;&lt;P&gt;this is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sdata is a char 1000 and xe1edp10-idnkd is only char 35.&lt;/P&gt;&lt;P&gt;how can it match these two values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compare proper values...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:17:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456894#M1414962</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456895#M1414963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, what a mess... (I think "mess" is not an offensive word; if it is, please, excuse me).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your loops are not related in any way. It means you will do the inner loop as many times as rows will have the outter one. And once you'll get the relationship between both loops, try to filter the outter one out of the inner one (move your IF stpin = 1 check to a WHERE clause in your initial LOOP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, from the sy-subrc the system provides you (4), the DELETE is working fine. BUT there is no data to delete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456895#M1414963</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2009-12-23T15:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456896#M1414964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And check your data types. Be careful from zeros. Are you sure there are no zeros before the idnkd and sdata =&amp;gt; xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe xe1edp10-idnkd = 000034596 and dint_edidd -sdata = 34596....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456896#M1414964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456897#M1414965</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;thanks for reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but here no leading zero mismatcj=hing happening.only here in debugging mode &lt;/P&gt;&lt;P&gt;the int. table dint_edidd where sdata showing  &lt;STRONG&gt;315934                   EA     017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont know why it is showing like this in debugging mode only ..where 017 = plant and ea = measuremnt field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when ever i am writting dint_edidd -sdata then it is giving only 315934.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me where is the probleam for deletion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456897#M1414965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456898#M1414966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1st thing..&lt;/P&gt;&lt;P&gt;i tried this :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables: edidd, e1edp10.
edidd-sdata = '315934 EA 017'.
WRITE edidd-sdata.
move edidd-sdata to e1edp10.
IF edidd-sdata = e1edp10-idnkd.
WRITE: e1edp10-idnkd.
else.
  WRITE: 'nothing'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;output&lt;/P&gt;&lt;P&gt;&amp;gt;315934 EA 017&lt;/P&gt;&lt;P&gt;&amp;gt;315934 EA 017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd thing,.&lt;/P&gt;&lt;P&gt;your loop inside loop doesnt make any sense as they are not related any where.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd thing:&lt;/P&gt;&lt;P&gt;the fields are not type compatible.. this might be the reason for wrong delete statement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and 1 more clarification:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: edidd, e1edp10.
DATA :it TYPE TABLE OF edidd WITH HEADER LINE.
edidd-sdata = '315934 EA 017'.
WRITE edidd-sdata.
APPEND edidd TO it.
edidd-sdata = '315934 EA 018'.
APPEND edidd TO it.

LOOP AT it." where segnam = 'E1EDP10'.
  CLEAR e1edp10.
  MOVE it-sdata TO e1edp10.
  DELETE it WHERE sdata = e1edp10-idnkd.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;in this also delete is working perfectly fine... you run and check..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2009 15:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456898#M1414966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-23T15:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456899#M1414967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  asissahu12 ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check ur clear statement because u r using dat with delete syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 05:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456899#M1414967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-24T05:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: delete statement is not working.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456900#M1414968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can directly delete the record by using index of record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get index in second loop by using system variable sy-index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You use delete with index option to delete the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you get it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2009 05:45:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-statement-is-not-working/m-p/6456900#M1414968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-24T05:45:31Z</dc:date>
    </item>
  </channel>
</rss>

