<?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: Wrong dates getting updated in table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683972#M30550</link>
    <description>&lt;P&gt;ok thankyou sathya and raymond,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;i shall ask my ABAPER to put check condition before modify statement and then will check.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jul 2018 04:20:42 GMT</pubDate>
    <dc:creator>former_member302859</dc:creator>
    <dc:date>2018-07-18T04:20:42Z</dc:date>
    <item>
      <title>Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683969#M30547</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I have one code where few fields getting updated wrongly but not on daily bases.&lt;/P&gt;
  &lt;P&gt;Date should not be lesser than today's date but still its updating some history dates randomly after saving.&lt;/P&gt;
  &lt;P&gt;please suggest as below logic is on place&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;MODIFY ZCL_RM_INSPEC FROM FS_TAB.
        COMMIT WORK.
        CONCATENATE 'Checklist Number' CHECKLISTNO 'changed' INTO FS_MESSAGE SEPARATED BY SPACE.
        MESSAGE FS_MESSAGE TYPE 'I' DISPLAY LIKE 'S'.
        LEAVE TO SCREEN 101.
      ELSEIF G_TCODE = 'ZCLAC'.
 
IF ANALYSISDATE IS NOT INITIAL AND
      ( ANALYSISDATE LT CHECKEDDATE OR ANALYSISDATE GT SY-DATUM ).
        MESSAGE 'Invalid Date. Check Entry' TYPE 'I' DISPLAY LIKE 'E'.
        leave TO SCREEN 0100.
      ENDIF.
   IF ( ANALYSISDATE IS INITIAL AND ANALYSISBY IS NOT INITIAL ) OR
           ( ANALYSISDATE IS NOT INITIAL AND ANALYSISBY IS INITIAL ).
        MESSAGE 'Fill in Analysis Completion Date and Sign' TYPE 'I' DISPLAY LIKE 'E'.
        leave TO SCREEN 0100.
      ENDIF.
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 12:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683969#M30547</guid>
      <dc:creator>former_member302859</dc:creator>
      <dc:date>2018-07-17T12:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683970#M30548</link>
      <description>&lt;P&gt;Is ZCL_RM_INSPECT the table that is getting updated? If yes, The MODIFY statement is before any of your checks though.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 12:32:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683970#M30548</guid>
      <dc:creator>Sathya_Gunasekaran</dc:creator>
      <dc:date>2018-07-17T12:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683971#M30549</link>
      <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Did you know that it is the custom to perform the check before the update?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 14:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683971#M30549</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-17T14:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683972#M30550</link>
      <description>&lt;P&gt;ok thankyou sathya and raymond,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;i shall ask my ABAPER to put check condition before modify statement and then will check.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 04:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683972#M30550</guid>
      <dc:creator>former_member302859</dc:creator>
      <dc:date>2018-07-18T04:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683973#M30551</link>
      <description>&lt;P&gt;If the code is formatted nicely, it becomes clear we don't have all the code (or that it has been improperly copy pasted) - possibly something very relevant is missing.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  MODIFY ZCL_RM_INSPEC FROM FS_TAB.
  COMMIT WORK.
  CONCATENATE 'Checklist Number' CHECKLISTNO 'changed'
         INTO FS_MESSAGE SEPARATED BY SPACE.
  MESSAGE FS_MESSAGE TYPE 'I' DISPLAY LIKE 'S'.
  LEAVE TO SCREEN 101.

ELSEIF G_TCODE = 'ZCLAC'.
  IF ANALYSISDATE IS NOT INITIAL AND
               ( ANALYSISDATE LT CHECKEDDATE OR
                ANALYSISDATE GT SY-DATUM ).
    MESSAGE 'Invalid Date. Check Entry' TYPE 'I' DISPLAY LIKE 'E'.
    leave TO SCREEN 0100.
  ENDIF.
  IF ( ANALYSISDATE IS INITIAL AND ANALYSISBY IS NOT INITIAL ) OR
           ( ANALYSISDATE IS NOT INITIAL AND ANALYSISBY IS INITIAL ).
    MESSAGE 'Fill in Analysis Completion Date and Sign' TYPE 'I' DISPLAY LIKE 'E'.
    leave TO SCREEN 0100.
  ENDIF&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;The modify only runs if &lt;STRONG&gt;G_TCODE&lt;/STRONG&gt; is not &lt;STRONG&gt;ZCLAC&lt;/STRONG&gt;. The check only runs if it is. &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 07:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683973#M30551</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2018-07-18T07:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong dates getting updated in table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683974#M30552</link>
      <description>&lt;P&gt;As there is a reference to a dynpro I supposed that this code was in some user_command module. I tend to prefer to put the check in some other modules within FIELD or CHAIN/ENCHAIN statements in PAI and not everything in a single module.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;MODULE user_command AT EXIT-COMMAND.
CHAIN.
FIELD ANALYSISDATE.
FIELD ANALYSISBY.
FIELD CHECKEDDATE.
MODULE checker. " eventually ON CHAIN-REQUEST, IF ... THEN MESSAGE TYPE 'E'... 
ENDCHAIN.
MODULE user_command. " CASE OK_CODE...&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So I can use real error message and not some DISPLAY LIKE...&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 07:41:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrong-dates-getting-updated-in-table/m-p/683974#M30552</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2018-07-18T07:41:24Z</dc:date>
    </item>
  </channel>
</rss>

