<?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: User Exit SD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349992#M175633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the user exit USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a static variable in the userexit USEREXIT_MOVE_FIELD_TO_VBAK..&lt;/P&gt;&lt;P&gt;statics: flag.&lt;/P&gt;&lt;P&gt;if flag = space.&lt;/P&gt;&lt;P&gt; flag = 'X'.&lt;/P&gt;&lt;P&gt; message i000 with.. &amp;lt;ur message&amp;gt;&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;Message was edited by: Sravanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 May 2006 12:45:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-15T12:45:00Z</dc:date>
    <item>
      <title>User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349988#M175629</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;My requirement is, In VA01, While order creation , when ever Order reason (VBAK-AUGRU) is NOT blank, check for the vbak-kostl in VA01 transaction, and if the value is blank or &lt;/P&gt;&lt;P&gt;a dummy value, a popup shold come with the message 'Please enter the correct cost center'. Then user will change the cost center, manually.&lt;/P&gt;&lt;P&gt;For this I have coded an information message in the user_exit 'USEREXIT_MOVE_FIELD_TO_VBAK'. But the problem here is ,&lt;/P&gt;&lt;P&gt;when we run the transaction VA01, this form 'USEREXIT_MOVE_FIELD_TO_VBAK' is getting called more than one time and&lt;/P&gt;&lt;P&gt;popup is also calling of more than once. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code. Please help me in solving the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USEREXIT_MOVE_FIELD_TO_VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;to check whether the cost center is DUMMY or blank. If so, popup to&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check the cost center and to correct it.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  Data: l_f_kostl like tvauk-kostl.&lt;/P&gt;&lt;P&gt;  CLEAR l_f_kostl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT vbak-augru is initial.&lt;/P&gt;&lt;P&gt;    IF NOT vbak-kostl is initial.&lt;/P&gt;&lt;P&gt;      select single kostl into l_f_kostl&lt;/P&gt;&lt;P&gt;                          from TVAUK where vkorg = vbak-vkorg and&lt;/P&gt;&lt;P&gt;                                           vtweg = vbak-vtweg and&lt;/P&gt;&lt;P&gt;                                           spart = vbak-spart and&lt;/P&gt;&lt;P&gt;                                           augru = vbak-augru and&lt;/P&gt;&lt;P&gt;                                       NOT datab is NULL.&lt;/P&gt;&lt;P&gt;	if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;         if vbak-kostl = l_f_kostl.&lt;/P&gt;&lt;P&gt;	    Message I208(00) with 'Please enter the correct cost center'.&lt;/P&gt;&lt;P&gt;	  endif.	&lt;/P&gt;&lt;P&gt;	endif.	&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      Message I208(00) with 'Please enter the correct cost center'.	&lt;/P&gt;&lt;P&gt;    endif.&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;ENDFORM.                    "USEREXIT_MOVE_FIELD_TO_VBAK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349988#M175629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349989#M175630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Place code into UserExit -  userexit_save_document_prepare.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not display the pop-up multiple times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:41:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349989#M175630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349990#M175631</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;Check with the enhancement of that userexit.&lt;/P&gt;&lt;P&gt;In CMOD, u can check that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bharadwaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:42:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349990#M175631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349991#M175632</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;Better to implement field exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:44:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349991#M175632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349992#M175633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the user exit USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a static variable in the userexit USEREXIT_MOVE_FIELD_TO_VBAK..&lt;/P&gt;&lt;P&gt;statics: flag.&lt;/P&gt;&lt;P&gt;if flag = space.&lt;/P&gt;&lt;P&gt; flag = 'X'.&lt;/P&gt;&lt;P&gt; message i000 with.. &amp;lt;ur message&amp;gt;&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;Message was edited by: Sravanthi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349992#M175633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: User Exit SD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349993#M175634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another soloution would be to -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Allow the popup to come when user will pres SAVE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. For this write your entire code within a IF CONDITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. IF FCODE = 'SICH'.&lt;/P&gt;&lt;P&gt;&amp;lt;your code&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. So the userexit gets triggered only during save.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 May 2006 12:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-sd/m-p/1349993#M175634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-15T12:45:25Z</dc:date>
    </item>
  </channel>
</rss>

