<?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 Enhancements- user exit_save_document_prepare in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577740#M1272202</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;My requirement is when sales order is created, the RSD field in sales order(VBAK-ZZREQSDATE) will be get populated automatically or entered by the users manually.But the requirement is that if the difference between the RSD date and Order Creation Date(erdat) is less than 14 working days, then while SAVING the Sales Order the system must pop up a warning message "RUSH Order u2013Lead Time &amp;lt; 14 days".other wise it should be saved as normal order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Iam using userexit_save_document_prepare, i need help in writing the code for this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any body please help me in completing this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Narasimha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 May 2009 07:07:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-09T07:07:06Z</dc:date>
    <item>
      <title>Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577740#M1272202</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;My requirement is when sales order is created, the RSD field in sales order(VBAK-ZZREQSDATE) will be get populated automatically or entered by the users manually.But the requirement is that if the difference between the RSD date and Order Creation Date(erdat) is less than 14 working days, then while SAVING the Sales Order the system must pop up a warning message "RUSH Order u2013Lead Time &amp;lt; 14 days".other wise it should be saved as normal order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.Iam using userexit_save_document_prepare, i need help in writing the code for this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any body please help me in completing this requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Narasimha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2009 07:07:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577740#M1272202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-09T07:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577741#M1272203</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;PRE&gt;&lt;CODE&gt;DATA: DELTA_DAY TYPE I.

DELTA_DAY = VBAK-ZZREQSDATE - VBAK-ERADT.

IF DELTA_DAY =&amp;gt; 14.
   MESSAGE E208(00) WITH 'RUSH Order u2013Lead Time &amp;lt; 14 days'.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not clear if you check VBAK-ZZREQSDATE has to be greater than VBAK-ERADT, beacause if it's less than VBAK-ERADT.the difference will be negative:.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: DELTA_DAY TYPE I.

IF VBAK-ZZREQSDATE &amp;gt; VBAK-ERADT.

  DELTA_DAY = VBAK-ZZREQSDATE - VBAK-ERADT.

  IF DELTA_DAY =&amp;gt; 14.
     MESSAGE E208(00) WITH 'RUSH Order u2013Lead Time &amp;lt; 14 days'.
  ENDIF.
ELSE.
  ?????????????
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2009 07:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577741#M1272203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-09T07:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577742#M1272204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same requirement added some functionality like below mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A Z Table needs to be maintained with the fields Sales Org (VKORG) as key field,Order Type (AUART) &amp;amp; Lead Time Days as key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When Sales Order is created, the user exit_save_document_prepare must be used to read the above table and if any entries maintained  based on Sales Org /Order type or only based on Sales Org , the corresponding lead time days must be considered to determine whether the Sales Order is a normal order or an Rush Order. If the difference between the RSD date (VBAK- ZZRDATE ) &amp;amp;  Order Date-Created on date ( VBAK-ERDAT) is less than 14 working days, then while SAVING the Sales Order the system must pop up a message "RUSH Order u2013Lead Time &amp;lt; 14 days".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reply if u got any idea on the above requirement with model code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Narasimha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 May 2009 11:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577742#M1272204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-09T11:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577743#M1272205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any reply please..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Narasimha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 04:33:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577743#M1272205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T04:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577744#M1272206</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;Maintain a ztable .....with table maintance or in any other means as suggested for your requirement....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next in USEREXIT_SAVE_DOCUMENT_PREPARE  .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;declare workarea of you ztable type...and fetch the data form your ztable into the workarea with ...where condition on sales org ...as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select &amp;lt; &amp;gt;&lt;/P&gt;&lt;P&gt;from ztable&lt;/P&gt;&lt;P&gt;where sorg = xvbak-vkorg..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the logic for lead time.....and raise the message ....&lt;/P&gt;&lt;P&gt;endif.&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;Shailaja Ainala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 06:01:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577744#M1272206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T06:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Enhancements- user exit_save_document_prepare</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577745#M1272207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shailaja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response, i got idea how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2009 08:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/enhancements-user-exit-save-document-prepare/m-p/5577745#M1272207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-11T08:26:16Z</dc:date>
    </item>
  </channel>
</rss>

