<?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: SM30 Event Before saving the data... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597645#M1436865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think Event 01 can handle Event 05 as well. If you check the &amp;lt;ACTION&amp;gt; = NEUER_EINTRAG, the event will trigger when a new entry is being saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you change some data in the table &amp;amp; try to save it will event 05 trigger ? So in this case the check cannot be made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Sanjane: Can you please share the code you written to achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2010 07:10:58 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2010-02-18T07:10:58Z</dc:date>
    <item>
      <title>SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597637#M1436857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I tried to capture this event and put the validation as give message type e if one of the field is blank, while it is giving the error it goes ahead and saves the record. How I can prevent it from saving and be on the same screen till the time user makes the change. It is not even executing the line if I am asking it to set the screen to 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 13:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597637#M1436857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T13:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597638#M1436858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Error message will not work. Try with Information message or 'S' and set the parameterVIM_ABORT_SAVE = 'X' , then save will not take place.&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;Abhijit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 14:10:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597638#M1436858</guid>
      <dc:creator>Abhijit74</dc:creator>
      <dc:date>2010-02-17T14:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597639#M1436859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abhijit thanks for the reply however it is not happeneing. Further more I have put foreign key check on that field but it still saves in the db.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 14:19:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597639#M1436859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-17T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597640#M1436860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the same in event 21 once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2010 15:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597640#M1436860</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-02-17T15:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597641#M1436861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The event 21 also does not work , I am surprised that how it can go to saving first and then enter custom code even if I use event 01 etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 04:44:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597641#M1436861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T04:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597642#M1436862</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;Try this way. After the validation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perform validate changing W_flag,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not w_eflag is initial.&lt;/P&gt;&lt;P&gt;message i398(00) with 'Space not allowed in description field'(001) .&lt;/P&gt;&lt;P&gt;    move X to vim_abort_saving .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works for me.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abhijit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 05:40:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597642#M1436862</guid>
      <dc:creator>Abhijit74</dc:creator>
      <dc:date>2010-02-18T05:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597643#M1436863</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;You would have ceated table maintenance generator to do this activity right. So there you would have given one function group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to that function group and change screen attribute of the field to 'Required'. Now system will it self show an error message by allowing user to enter values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to do any validation in the EVENT BEFORE SAVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert if you have any more questions on these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kusuma K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 06:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597643#M1436863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T06:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597644#M1436864</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;Did u try deleting and recreating the maintenance after creating the foreignkey? If it doesn't work, try in the event 05 with below code. Ideally it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  l_msg(35)      TYPE c.
CONSTANTS:l_e        TYPE c VALUE 'E'.

DEFINE macro_validate.
  if not &amp;amp;1 is initial.
" Your Validations
      if sy-subrc ne 0.
        clear : l_msg.
        concatenate text-001 &amp;amp;1 into l_msg.
        message l_msg type l_e .
      endif.
    endif.
END-OF-DEFINITION.

FORM create_new.
  macro_validate ztab-spcode.

ENDFORM.                    "create_new
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 06:57:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597644#M1436864</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-02-18T06:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597645#M1436865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vinod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think Event 01 can handle Event 05 as well. If you check the &amp;lt;ACTION&amp;gt; = NEUER_EINTRAG, the event will trigger when a new entry is being saved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also if you change some data in the table &amp;amp; try to save it will event 05 trigger ? So in this case the check cannot be made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Sanjane: Can you please share the code you written to achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 07:10:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597645#M1436865</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-02-18T07:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: SM30 Event Before saving the data...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597646#M1436866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kusuma,&lt;/P&gt;&lt;P&gt;Its done, thanks for the information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Others, &lt;/P&gt;&lt;P&gt;Thanks for your inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2010 09:05:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sm30-event-before-saving-the-data/m-p/6597646#M1436866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-18T09:05:19Z</dc:date>
    </item>
  </channel>
</rss>

