<?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 Find Missing Numbers? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908588#M937302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have selection option for Document number . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options : s_docno for vbak-vbeln obligatory.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example after user enters document number in the input screen. I am getting a values like the below mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Line    SIGN    OPTION  LOW             HIGH
1	I	BT	0000069686	0000069696
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I am making a select using this s_docno from VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the VBAK table i don't have document number 0000069689 &amp;amp; 0000069692. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find these missing numbers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2008 15:31:46 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-06-04T15:31:46Z</dc:date>
    <item>
      <title>Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908588#M937302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have selection option for Document number . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select-options : s_docno for vbak-vbeln obligatory.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example after user enters document number in the input screen. I am getting a values like the below mentioned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Line    SIGN    OPTION  LOW             HIGH
1	I	BT	0000069686	0000069696
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I am making a select using this s_docno from VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the VBAK table i don't have document number 0000069689 &amp;amp; 0000069692. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to find these missing numbers &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:31:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908588#M937302</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-06-04T15:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908589#M937303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Here is idea. hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First selct all entries from VBAK based on s_docno.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
lv_var = s_docno-high - s_docno-low.
lv_doc = s_docno-low.
do lv_var times.

read table itab with key vbeln = lv_doc.
if sy-subrc NE 0.
........ append in diff table as this value not present in VBAK
endif.

lv_doc = lv_doc + 1.
enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx,&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:37:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908589#M937303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T15:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908590#M937304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: L_VBELN TYPE VBELN.
LOOP AT S_VBELN.
  L_VBELN = S_VBELN-LOW.
  WHILE S_VBELN-HIGH &amp;lt; L_VBELN.
    L_VBELN = L_VBELN + 1.

    READ TABLE ITAB WITH KEY VBELN = L_VBELN.

    IF SY-SUBRC &amp;lt;&amp;gt; 0.
*     missing
    ENDIF.
  ENDWHILE.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is not the best solution. but you can make some workaround based on this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908590#M937304</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-06-04T15:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908591#M937305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ags/nimesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already that way you mentioned. but if user enters values like this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If user enters S_DOCNO this way then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Line    SIGN    OPTION  LOW             HIGH
1	I	BT	0000069686	0000069696
2	I	GE	0000069686	0000000000
3	E	NE	0000069687	0000000000
4	E	LT	0000069686	0000000000
5	E	BT	0000069656	0000069666
6	I	NE	0000069693	0000000000
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or i am looking for any function module/class that will provide the running numbers from a select-options ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908591#M937305</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-06-04T15:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908592#M937306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm..&lt;/P&gt;&lt;P&gt;Customer is the boss.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is the requirement and there's no way around then we should find any way to populate internal table with serial numbers from 1 to some big number ideal will be 9999999999 (since vbeln is 10 digits.)&lt;/P&gt;&lt;P&gt;and then you will have to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab where num NOT IN s_docno. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then read this table for validating VBAK entries...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; .. i hope you will find much better way to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also do let me know once you got the solution. I will also keep thinking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx,&lt;/P&gt;&lt;P&gt;ags..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:54:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908592#M937306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T15:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908593#M937307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A user entering this combination of criteria should get spanked, imo.&lt;/P&gt;&lt;P&gt;Does that make sense at all? Sorry, can't check, got to leave office now &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908593#M937307</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-06-04T15:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908594#M937308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Better solutions compared to previous:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: VBAK.

DATA: ITAB TYPE STANDARD TABLE OF VBAK WITH HEADER LINE.

DATA: L_VBELN TYPE VBELN.

SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.

START-OF-SELECTION.

* ITAB is the table which has all the records from the VBAK

*select * from vbak
*  into table itab
*  where vbeln in s_vbeln.

* Cration of test data
  DO 10 TIMES.
    ITAB-VBELN = SY-INDEX.
    APPEND ITAB.
  ENDDO.

* delete 4,5 and 7
  DELETE ITAB INDEX 4.
  DELETE ITAB INDEX 4.
  DELETE ITAB INDEX 5.

  READ TABLE ITAB INDEX 1.
  L_VBELN = ITAB-VBELN.
  LOOP AT ITAB.

    IF ITAB-VBELN &amp;lt;&amp;gt; L_VBELN.

      WHILE ITAB-VBELN &amp;gt; L_VBELN.

*        missing.  =  l_vbeln
        WRITE: / L_VBELN.
        L_VBELN = L_VBELN  + 1.
      ENDWHILE.

    ENDIF.

* assume next number
    L_VBELN = ITAB-VBELN + 1.

  ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 15:57:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908594#M937308</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-06-04T15:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Find Missing Numbers?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908595#M937309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your reply is closest to the solution, I need to workon this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all.&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 16:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/find-missing-numbers/m-p/3908595#M937309</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-06-04T16:04:53Z</dc:date>
    </item>
  </channel>
</rss>

