<?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 USEREXIT_SAVE_DOCUMENT_PREPARE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565652#M255615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to prevent a user from saving a contract (VA41 or VA42) when the Increase date field is not entered,&lt;/P&gt;&lt;P&gt;But the users normaly use the Edit-&amp;gt;Log of incomplete items&lt;/P&gt;&lt;P&gt;menu path and then presses save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I post an error message the screen is frozen unless I use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ok_code &amp;lt;&amp;gt; 'SICH'.&lt;/P&gt;&lt;P&gt;  CLEAR: ok_code.&lt;/P&gt;&lt;P&gt;  LEAVE TO SCREEN sy-dynnr.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that does not take the user back to the previous screen, it saves the contract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2006 11:08:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-04T11:08:34Z</dc:date>
    <item>
      <title>USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565652#M255615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to prevent a user from saving a contract (VA41 or VA42) when the Increase date field is not entered,&lt;/P&gt;&lt;P&gt;But the users normaly use the Edit-&amp;gt;Log of incomplete items&lt;/P&gt;&lt;P&gt;menu path and then presses save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I post an error message the screen is frozen unless I use the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ok_code &amp;lt;&amp;gt; 'SICH'.&lt;/P&gt;&lt;P&gt;  CLEAR: ok_code.&lt;/P&gt;&lt;P&gt;  LEAVE TO SCREEN sy-dynnr.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that does not take the user back to the previous screen, it saves the contract.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:08:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565652#M255615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565653#M255616</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;Why don't you write an error message if you want to prevent user from saving:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if datefield is initial.&lt;/P&gt;&lt;P&gt;        MESSAGE 'Date field can not be empty' TYPE 'E'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dharitree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:20:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565653#M255616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565654#M255617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;better to tigger BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565654#M255617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565655#M255618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to give an error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg :&lt;/P&gt;&lt;P&gt;message E398(00) with 'Please enter date field'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Preema&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Reward points for helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565655#M255618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565656#M255619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I find the BAPI's for SD?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:32:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565656#M255619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565657#M255620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;JJ, I have used an érror'message, as you say the screen does 'freeze' but only once....when the user hits enter normal service is then resumed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But anyway, shouldn't your code be??:&lt;/P&gt;&lt;P&gt;IF ok_code &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt; 'SICH'.&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR: ok_code.&lt;/P&gt;&lt;P&gt;LEAVE TO SCREEN sy-dynnr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:33:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565657#M255620</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-04T11:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565658#M255621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anybody know where to find the SD BADI's (sorry in&lt;/P&gt;&lt;P&gt;one of my previous messages I typed BAPI)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:38:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565658#M255621</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565659#M255622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neil, If I press Enter the Error message is displayed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to Leave to the screen by checking the sy-ucomm code if it is not 'SICH'. Then it does not go to the previous screen, the contract is saved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565659#M255622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T11:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565660#M255623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;JJ, what is your code? The okcode will always be 'sich' in this routine (unless you have cleared it yourself).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it should be something like:&lt;/P&gt;&lt;P&gt;If error situation.....&lt;/P&gt;&lt;P&gt;message...&lt;/P&gt;&lt;P&gt;leave to screen sy-dynnr.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 11:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565660#M255623</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-04T11:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565661#M255624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that after the message statement the program does not return to the line below it. In your code, it will execute the leave to screen statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you put he leave to screen statement before the message, then it will not execute the message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:11:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565661#M255624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565662#M255625</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 this case don't write an error message write 'I' or 'W' mesage and then leave the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dharitree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:17:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565662#M255625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565663#M255626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dharitree  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nope, it displays the same message over and over.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565663#M255626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-04T12:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565664#M255627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, so you need to set a flag indicating an error has occurred.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your logic:&lt;/P&gt;&lt;P&gt;1. if your flag is set: clear it and the okcode and leave to screen sy-dynnr.&lt;/P&gt;&lt;P&gt;2. Then have your error test. If it's true set the flag and then issue the message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 23:04:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565664#M255627</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-10-04T23:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: USEREXIT_SAVE_DOCUMENT_PREPARE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565665#M255628</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;I think you want to go back to the previous screen after error/warning message gets displayed,&lt;/P&gt;&lt;P&gt;then why are you giving sy-dynnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this you should give the previous Screen number. If you give the current screen, system will again check the date field &amp;amp; find that it is intial &amp;amp; again dispay the warning message &amp;amp; so on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dharitree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 04:18:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/userexit-save-document-prepare/m-p/1565665#M255628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T04:18:02Z</dc:date>
    </item>
  </channel>
</rss>

