<?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: Problem with VA01 User Exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127576#M110778</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 may write code like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM userexit_save_document_prepare.  &lt;/P&gt;&lt;P&gt;DATA : vl_line TYPE i.  &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE xvbap LINES vl_line.  &lt;/P&gt;&lt;P&gt;IF vl_line &amp;gt; 70.    &lt;/P&gt;&lt;P&gt; LOOP AT XVBAP FROM 70.&lt;/P&gt;&lt;P&gt;  DELETE XVBAP.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;MESSAGE e063(zsd).  ENDIF.ENDFORM.                    "USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jan 2006 11:33:35 GMT</pubDate>
    <dc:creator>venkata_ramisetti</dc:creator>
    <dc:date>2006-01-06T11:33:35Z</dc:date>
    <item>
      <title>Problem with VA01 User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127575#M110777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have put a USer Ecit on VA01 that user will not enter more than 70 line items in Sale Order. i have put this in MV45AFZZ in form&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*---------------------------------------------------------------------*
*       FORM USEREXIT_SAVE_DOCUMENT_PREPARE                           *
*---------------------------------------------------------------------*
*       This userexit can be used for changes or checks, before a     *
*       document is saved.                                            *
*                                                                     *
*       If field T180-TRTYP contents 'H', the document will be        *
*       created, else it will be changed.                             *
*                                                                     *
*       This form is called at the beginning of form BELEG_SICHERN    *
*                                                                     *
*---------------------------------------------------------------------*
FORM userexit_save_document_prepare.
  DATA : vl_line TYPE i.

  DESCRIBE TABLE xvbap LINES vl_line.

  IF vl_line &amp;gt; 70.
    MESSAGE e063(zsd).
  ENDIF.

ENDFORM.                    "USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Error comes when I enter more than 70 items, but when I delete the line items and make it to 70 items, then also the error comes when debugging i found that the no. of items which i have deleted are not deleted from XVBAP table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one tell wat's missing here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abhishek suppal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2006 11:21:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127575#M110777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-06T11:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with VA01 User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127576#M110778</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 may write code like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM userexit_save_document_prepare.  &lt;/P&gt;&lt;P&gt;DATA : vl_line TYPE i.  &lt;/P&gt;&lt;P&gt;DESCRIBE TABLE xvbap LINES vl_line.  &lt;/P&gt;&lt;P&gt;IF vl_line &amp;gt; 70.    &lt;/P&gt;&lt;P&gt; LOOP AT XVBAP FROM 70.&lt;/P&gt;&lt;P&gt;  DELETE XVBAP.&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;MESSAGE e063(zsd).  ENDIF.ENDFORM.                    "USEREXIT_SAVE_DOCUMENT_PREPARE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2006 11:33:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127576#M110778</guid>
      <dc:creator>venkata_ramisetti</dc:creator>
      <dc:date>2006-01-06T11:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with VA01 User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127577#M110779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhisehk!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not online, so I can't tell you exact name, but in last 20 fields somewhere is an update flag. This changes to D (I guess) in case of line deletion -&amp;gt; internal table is as full as before, but less entries will be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Don't delete entries in xvbap!&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just make a small test, delete and change some lines (not necessarily 70) and have a look in which value they differ in xvbap. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later you just have to count the insert lines (in loop where).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2006 11:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127577#M110779</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-01-06T11:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with VA01 User Exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127578#M110780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanx Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abhishek suppal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2006 12:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-va01-user-exit/m-p/1127578#M110780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-06T12:23:10Z</dc:date>
    </item>
  </channel>
</rss>

