<?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: Comparing between VBELN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360044#M1037866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for having seen my pb.&lt;/P&gt;&lt;P&gt;but i cannot execut the prog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 

sort  l_vbap by vbeln.

data :w_vbap LIKE LINE OF l_vbap.

DATA: begin of i_posnr OCCURS 0,
  posnr TYPE posnr,
  END OF i_posnr.

LOOP AT l_vbap INTO w_vbap. "&amp;lt;&amp;lt; workarea for l_vbap

  indice  = indice + 1.
  if w_vbap-posnr = w_vbap-PS_PSP_PNR.
    append w_vbap-posnr to i_posnr. "&amp;lt;&amp;lt; Table to store similar posnr
  endif.
  AT END OF vbeln.

  if indice GT 1 and i_posnr[] is not initial.

    WRITE ' two OTP'.

  ENDIF.
   clear indice.
   clear i_posnr.
  ENDAT.


ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea why it does not work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Aug 2008 15:43:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-22T15:43:36Z</dc:date>
    <item>
      <title>Comparing between VBELN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360042#M1037864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have to find a VBELN which have unless TWO 'Sales Document Item'  (for example: POSNR=10,POSNR=20,POSNR=30) then i have to find the POSNR which have the same PS_PSP_PNR.&lt;/P&gt;&lt;P&gt;i did this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT PS_PSP_PNR  POSNR vbeln  FROM vbap
   into CORRESPONDING FIELDS OF TABLE l_vbap.
LOOP AT l_vbap INTO l_vbap-vbeln.

  indice  = indice + 1.

  AT END OF vbeln.
    CLEAR indice.
  ENDAT.

  if indice GT 1.
   ??????????????????????????????????????? 
    WRITE ' two OTP'.
    ELSEIF.

  ENDIF.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help me to find the missing '???????'&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 14:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360042#M1037864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing between VBELN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360043#M1037865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi try this logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT PS_PSP_PNR  POSNR vbeln  FROM vbap
   into CORRESPONDING FIELDS OF TABLE l_vbap.
   
sort  l_vbap by vbeln. 
LOOP AT l_vbap INTO w_vbap. "&amp;lt;&amp;lt; workarea for l_vbap
  
  indice  = indice + 1.
  if w_vbap-posnr = w_vbap-PS_PSP_PNR.
    append w_vbap-posnr to i_posnr. "&amp;lt;&amp;lt; Table to store similar posnr
  endif.
  AT END OF vbeln.

  if indice GT 1 and i_posnr[] is not initial.

    WRITE ' two OTP'.
 
  ENDIF.
   clear indice.
   refresh i_posnr.
  ENDAT.
 

ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 14:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360043#M1037865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T14:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing between VBELN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360044#M1037866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for having seen my pb.&lt;/P&gt;&lt;P&gt;but i cannot execut the prog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 

sort  l_vbap by vbeln.

data :w_vbap LIKE LINE OF l_vbap.

DATA: begin of i_posnr OCCURS 0,
  posnr TYPE posnr,
  END OF i_posnr.

LOOP AT l_vbap INTO w_vbap. "&amp;lt;&amp;lt; workarea for l_vbap

  indice  = indice + 1.
  if w_vbap-posnr = w_vbap-PS_PSP_PNR.
    append w_vbap-posnr to i_posnr. "&amp;lt;&amp;lt; Table to store similar posnr
  endif.
  AT END OF vbeln.

  if indice GT 1 and i_posnr[] is not initial.

    WRITE ' two OTP'.

  ENDIF.
   clear indice.
   clear i_posnr.
  ENDAT.


ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea why it does not work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 15:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360044#M1037866</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T15:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing between VBELN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360045#M1037867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Aug 2008 09:06:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-between-vbeln/m-p/4360045#M1037867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-23T09:06:01Z</dc:date>
    </item>
  </channel>
</rss>

