<?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 exits in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000323#M76285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sanjay,&lt;/P&gt;&lt;P&gt;i m new to user exit n i have been assigned an object on enhancement.&lt;/P&gt;&lt;P&gt;i m sending you the requirement,if u have idea on that do help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to use the include MV45AFZZ - User Exit   --userexit_save_document or userexit_save_docuemnt_prepare. i need to do is to create an algorithm to create ALPHA number range . Also i need to check for exceptions from a cutom table which conatins some prohibitary words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in more detail,The User Exit for this should be at document &amp;#145;Save&amp;#146; to prevent creating numbers that do not become Sales Orders.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field VBKD-IHREZ should be Display Only for the PM( philip morris) Document Types, only changed by the generation program update.  This will be controlled through configuration of Transaction Code SHD0 - Field Display Characteristics&amp;gt; Configure Application Transaction Fields.&lt;/P&gt;&lt;P&gt;and also to have a unique 5-character alpha order number generated and retained with the sales order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx in advance.&lt;/P&gt;&lt;P&gt;Vishal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Feb 2007 13:49:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-20T13:49:07Z</dc:date>
    <item>
      <title>User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000313#M76275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I had not worked in user exits and I just wanted to know how the FORM routines like USEREXIT_SAVE_DOCUMENT_PREPARE (Include MV50AFZ1) etc are used and their purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How to identify in which FORM routine should we include our custom code for some requirement.&lt;/P&gt;&lt;P&gt;2. How are X* and Y* tables used. How are those tables filled at runtime. And how are those used for updating the standard tables...for example I have used XVBAP once for updating VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 02:43:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000313#M76275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T02:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000314#M76276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check OSS 178328 It will answer all your queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( Dont forget to reward if answers were helpful)  .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 02:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000314#M76276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T02:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000315#M76277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sanjay...going thru that note. Appears informative. Points are awarded. Will get back to you if I get any doubts.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 03:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000315#M76277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T03:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000316#M76278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically for MV50AFZ1 there is another consulting note 415716 which may be of help to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 03:27:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000316#M76278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T03:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000317#M76279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sanjay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The notes have helped me a lot. But I have a question for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per the notes, it is good to read index tables first and then the document tables for better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example for sales order items for material number (vbap-matnr)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;select vbeln from vapma where kunde = 'xx'.&lt;/P&gt;&lt;P&gt;select matnr from vbap where vbeln = vapma-vebeln&lt;/P&gt;&lt;P&gt;                             and posnr = vapma-posnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;select matnr from vbap where vbeln = 'xxx' and posnr = 'yy'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What difference does those make. And how the select's using index tables are superior compared to direct select's on the document tables. Please explain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 04:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000317#M76279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T04:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000318#M76280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure which note you are referring to .&lt;/P&gt;&lt;P&gt;In these exits you already have the data in YVBAP ( current database state ), XVBAP ( screen changed values in current transaction ). There is no need to fire a query to database  . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to you question if you have the full key of VBAP ( VBELN &amp;amp; POSNR ) then there is no need to goto index table . But say you have the material number / sold to party only , then you can get the sales order numbers / item number  from VAPMA and then do a selct from VBAP , rather than doing a select from VBAP just using MATNR.&lt;/P&gt;&lt;P&gt;VAPMA has no filed like KUNDE . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 04:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000318#M76280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T04:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000319#M76281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sanjay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the confusion. My earlier post got  some error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the note desc...I forgot the note number.&lt;/P&gt;&lt;P&gt;'Performance - Customer developments in SD'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pasting the text below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Symptom&lt;/P&gt;&lt;P&gt;Customer-specific programs and program enhancements ("User Exits") have a bad performance. The bad performance is noticed during accesses to the following SAP SD tables: VBAK, VBAP, VMVA, LIKP, LIPS, VBRK, VBRP, VBFA&lt;/P&gt;&lt;P&gt;Additional key words&lt;/P&gt;&lt;P&gt;                         &lt;/P&gt;&lt;P&gt;Cause and prerequisites&lt;/P&gt;&lt;P&gt;The R/3 System contains no secondary indexes to the most important SD transaction data tables in the delivery. Instead, the R/3 System has proprietary index tables (sales document indexes, for example the tables VAKPA and VAPMA, matchcode tables for example M_VMVAB, M_VMVAC or matchcode views for example M_VMVAA, M_VMVAE), which allow an efficient access.&lt;/P&gt;&lt;P&gt;In order to use these efficiently a certain basic knowledge of the SAP data model is required. For this this note lists the most important errors which are made and it offers alternatives.&lt;/P&gt;&lt;P&gt;However note the following WARNINGS:&lt;/P&gt;&lt;P&gt;&amp;#132;X	Before you use the listed alternatives productively, you must check your program closely for functional accuracy.&lt;/P&gt;&lt;P&gt;&amp;#132;X	The sales document indexes must be maintained correctly in your system. This is usually automatically the case, however, there can be inconsistencies. Carefully read and follow Notes 128947 and 178328.&lt;/P&gt;&lt;P&gt;Consider the following NOTES:&lt;/P&gt;&lt;P&gt;In the following examples, there are often accesses to several tables, for example:&lt;/P&gt;&lt;P&gt;  SELECT FROM vakpa WHERE kunde = ...&lt;/P&gt;&lt;P&gt;     SELECT FROM vbak WHERE vbeln = vakpa-vbeln. &lt;/P&gt;&lt;P&gt;It can increase the performance, to define a selection view on the corresponding tables (here: VAKPA and VBAK) in order to combine the accesses to the two tables in one access.&lt;/P&gt;&lt;P&gt;Solution&lt;/P&gt;&lt;P&gt;1. Accesses to sales orders (tables VBAK, VBAP)&lt;/P&gt;&lt;P&gt;a) Search orders for customer number (field VBAK-KUNNR):&lt;/P&gt;&lt;P&gt;Incorrect: &lt;/P&gt;&lt;P&gt;  SELECT FROM vbak WHERE kunnr = ...&lt;/P&gt;&lt;P&gt;                        Correct: &lt;/P&gt;&lt;P&gt;  SELECT FROM vakpa WHERE kunde = ...&lt;/P&gt;&lt;P&gt;    SELECT FROM vbak WHERE vbeln = vakpa-vbeln.&lt;/P&gt;&lt;P&gt;a) Search order items for material number (field VBAP-MATNR):&lt;/P&gt;&lt;P&gt;Incorrect: &lt;/P&gt;&lt;P&gt;  SELECT FROM vbap WHERE matnr = ...&lt;/P&gt;&lt;P&gt;                        Correct: &lt;/P&gt;&lt;P&gt;  SELECT FROM vapma WHERE matnr = ...&lt;/P&gt;&lt;P&gt;    SELECT FROM vbap WHERE vbeln = vapma-vbeln&lt;/P&gt;&lt;P&gt;                        AND posnr = vapma-posnr &lt;/P&gt;&lt;P&gt;a) Other search helps for sales orders offer the matchcode tables and views M_VMVAx, x. = A, B, C, ... M; for example search for purchase order number of the customer, description and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 04:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000319#M76281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T04:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000320#M76282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This text is from note 185530 . What exactly is your problem . Do you have a performance problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This note actually says that if you have the customer number only and you want to select all orders for this customer , directly doing a select from VBAK where kunnr = &amp;lt;CUS_NUM&amp;gt; will take long time ( as customer is not a key here ) . Instead you can find the Sales order numbers from VAKPA  using KUNDE = &amp;lt;CUS_NUM&amp;gt; ( and then selct from VBAK to get further details of sales order ) . This will be very fast as VAKPA has Customer number as first key . Similarly to read sales order items for a material first get order num / item num from VAPMA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 05:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000320#M76282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T05:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000321#M76283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USEREXIT_SAVE_DOCUMENT_PREPARE is just called before saving the documents. You can verify your business rules by calling a form written in a different include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually at this point of time there will be no value updated in the tables like VBAK, VBAP..............&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;XV*** structure will hold the &amp;lt;b&amp;gt;current values&amp;lt;/b&amp;gt; of the Sales Order.&lt;/P&gt;&lt;P&gt;YV*** structure will hold the &amp;lt;b&amp;gt;previous values&amp;lt;/b&amp;gt; of the Sales Order.&lt;/P&gt;&lt;P&gt;For Example, &lt;/P&gt;&lt;P&gt;Sales Order is created with two line items say 10 and 20.&lt;/P&gt;&lt;P&gt;During the sales order change an item is added say 30.&lt;/P&gt;&lt;P&gt;XVBAP holds all the three line items(10, 20 and 30).&lt;/P&gt;&lt;P&gt;YVBAP holds only 10 and 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the values in XV*** will be updated to the tables V*** repectively during &amp;lt;b&amp;gt;COMMIT&amp;lt;/b&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using XV*** and YV*** you can determine the changes made for the sales order while change is processed. &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;Baburaj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 05:44:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000321#M76283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T05:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000322#M76284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sanjay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the solution. You solution answers my question perfectly even though you are not familiar with my problem &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I was not infront of my system at the time of posting the post...I couldnt figure out what kunde field is and why they are using that index table for pulling the vbeln's from vbak instead of direct select on vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2005 14:32:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000322#M76284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-06T14:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000323#M76285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sanjay,&lt;/P&gt;&lt;P&gt;i m new to user exit n i have been assigned an object on enhancement.&lt;/P&gt;&lt;P&gt;i m sending you the requirement,if u have idea on that do help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the requirement is.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to use the include MV45AFZZ - User Exit   --userexit_save_document or userexit_save_docuemnt_prepare. i need to do is to create an algorithm to create ALPHA number range . Also i need to check for exceptions from a cutom table which conatins some prohibitary words.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in more detail,The User Exit for this should be at document &amp;#145;Save&amp;#146; to prevent creating numbers that do not become Sales Orders.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field VBKD-IHREZ should be Display Only for the PM( philip morris) Document Types, only changed by the generation program update.  This will be controlled through configuration of Transaction Code SHD0 - Field Display Characteristics&amp;gt; Configure Application Transaction Fields.&lt;/P&gt;&lt;P&gt;and also to have a unique 5-character alpha order number generated and retained with the sales order&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx in advance.&lt;/P&gt;&lt;P&gt;Vishal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2007 13:49:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exits/m-p/1000323#M76285</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-20T13:49:07Z</dc:date>
    </item>
  </channel>
</rss>

